diff --git a/src/store/scene.ts b/src/store/scene.ts
index c25514b2..973f334e 100644
--- a/src/store/scene.ts
+++ b/src/store/scene.ts
@@ -1,5 +1,5 @@
import { defineStore } from 'pinia'
-import type { BranchesType, FormModelType, SceneItem } from '@/views/rule-engine/Scene/typings'
+import type { FormModelType, SceneItem } from '@/views/rule-engine/Scene/typings'
import { detail } from '@/api/rule-engine/scene'
import { cloneDeep, isArray } from 'lodash-es'
import { randomString } from '@/utils/utils'
diff --git a/src/views/account/Center/components/EditPasswordDialog.vue b/src/views/account/Center/components/EditPasswordDialog.vue
index 566f2bf0..1e8e6843 100644
--- a/src/views/account/Center/components/EditPasswordDialog.vue
+++ b/src/views/account/Center/components/EditPasswordDialog.vue
@@ -25,13 +25,13 @@
label="密码"
name="newPassword"
:rules="[
- { required: true,message:'请输入密码' },
+ { required: true, message: '请输入密码' },
{ validator: checkMothods.new, trigger: 'blur' },
]"
>
@@ -64,7 +64,7 @@ const emits = defineEmits(['ok', 'update:visible']);
const props = defineProps<{
visible: boolean;
}>();
-const loading = ref(false)
+const loading = ref(false);
const formRef = ref
();
const form = ref({
oldPassword: '',
@@ -102,7 +102,9 @@ const checkMothods = {
},
confirm: async (_rule: Rule, value: string) => {
if (!value) return Promise.reject();
-
+ else if (form.value.newPassword && value !== form.value.newPassword) {
+ formRef.value?.validate('newPassword');
+ }
try {
const resp: any = await validateField_api('password', value);
if (resp.status === 200 && !resp.result.passed)
@@ -116,18 +118,20 @@ const checkMothods = {
const handleOk = () => {
formRef.value?.validate().then(() => {
- loading.value = true
+ loading.value = true;
const params = {
oldPassword: form.value.oldPassword,
newPassword: form.value.newPassword,
};
- updateMepsd_api(params).then((resp) => {
- if (resp.status === 200) {
- message.success('保存成功');
- emits('ok');
- emits('update:visible', false);
- }
- }).finally(()=>loading.value = false)
+ updateMepsd_api(params)
+ .then((resp) => {
+ if (resp.status === 200) {
+ message.success('保存成功');
+ 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 4fa2727c..adb4792f 100644
--- a/src/views/account/Center/index.vue
+++ b/src/views/account/Center/index.vue
@@ -114,10 +114,7 @@
修改密码
-
-
+
安全性高的密码可以使帐号更安全。建议您定期更换密码,设置一个包含字母,符号或数字中至少两项且长度超过8位的密码({});
+const userInfo = ref
({} as any);
// 第三方账号
const bindList = ref([]);
const bindIcon = {
diff --git a/src/views/device/Category/components/modifyModal/index.vue b/src/views/device/Category/components/modifyModal/index.vue
index 0d94cb56..b3137349 100644
--- a/src/views/device/Category/components/modifyModal/index.vue
+++ b/src/views/device/Category/components/modifyModal/index.vue
@@ -93,7 +93,13 @@ const formModel = ref({
description: '',
});
const rules = ref({
- name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
+ name: [
+ { required: true, message: '请输入名称', trigger: 'blur' },
+ {
+ max: 64,
+ message: '最多可输入64个字符',
+ },
+ ],
sortIndex: [{ required: true, message: '请输入排序', trigger: 'blur' }],
});
const visible = ref(false);
@@ -112,7 +118,7 @@ const submitData = async () => {
addParams.value = {
...formModel.value,
// sortIndex:
- // childArr.value[childArr.value.length - 1].sortIndex + 1,
+ // childArr.value[childArr.value.length - 1].sortIndex + 1,
parentId: addObj.value.id,
};
} else if (props.isChild === 2) {
diff --git a/src/views/device/Category/index.vue b/src/views/device/Category/index.vue
index 5feb2ee1..928266d5 100644
--- a/src/views/device/Category/index.vue
+++ b/src/views/device/Category/index.vue
@@ -10,7 +10,7 @@
ref="tableRef"
:columns="table.columns"
:dataSource="dataSource"
- model="table"
+ model="TABLE"
:defaultParams="{
paging: false,
sorts: [
@@ -35,7 +35,7 @@
-
+
{
* 关闭弹窗
*/
const cancel = () => {
+ queryParams.value = {};
visible.value = false;
};
/**
@@ -968,6 +971,7 @@ const submitData = async () => {
message.success('操作成功!');
}
visible.value = false;
+ queryParams.value = {};
});
}
} else {
diff --git a/src/views/device/Product/Save/index.vue b/src/views/device/Product/Save/index.vue
index fb35ffc1..56d37d43 100644
--- a/src/views/device/Product/Save/index.vue
+++ b/src/views/device/Product/Save/index.vue
@@ -125,6 +125,7 @@
placeholder="请选择产品分类"
:tree-data="treeList"
@change="valueChange"
+ allow-clear
:fieldNames="{ label: 'name', value: 'id' }"
:filterTreeNode="
(v, option) => filterSelectNode(v, option)
diff --git a/src/views/device/Product/index.vue b/src/views/device/Product/index.vue
index 1277a802..92056e92 100644
--- a/src/views/device/Product/index.vue
+++ b/src/views/device/Product/index.vue
@@ -202,7 +202,7 @@ const columns = [
scopedSlots: true,
},
{
- title: '名称',
+ title: '产品名称',
dataIndex: 'name',
key: 'name',
},
diff --git a/src/views/home/components/BootCard.vue b/src/views/home/components/BootCard.vue
index be223180..ff47a7a2 100644
--- a/src/views/home/components/BootCard.vue
+++ b/src/views/home/components/BootCard.vue
@@ -34,8 +34,11 @@ const props = defineProps({
const { cardData, cardTitle } = toRefs(props);
const jumpPage = (item: bootConfig) => {
- if (item.auth === undefined || item.auth) _jumpPage(item.link, item.params);
- else message.warning('暂无权限,请联系管理员');
+ if (item.auth === undefined || item.auth) {
+ _jumpPage(item.link, item.params);
+ } else {
+ message.warning('暂无权限,请联系管理员');
+ }
};
diff --git a/src/views/home/components/BootCardSmall.vue b/src/views/home/components/BootCardSmall.vue
index 4fb576ec..89da9e0e 100644
--- a/src/views/home/components/BootCardSmall.vue
+++ b/src/views/home/components/BootCardSmall.vue
@@ -37,8 +37,11 @@ const { cardData, cardTitle } = toRefs(props);
const { jumpPage: _jumpPage } = useMenuStore();
const jumpPage = (item: bootConfig) => {
- if (item.auth === undefined || item.auth) _jumpPage(item.link, item.params);
- else message.warning('暂无权限,请联系管理员');
+ if (item.auth === undefined || item.auth) {
+ _jumpPage(item.link, item.params);
+ } else {
+ message.warning('暂无权限,请联系管理员');
+ }
};
diff --git a/src/views/home/components/ComprehensiveHome/index.vue b/src/views/home/components/ComprehensiveHome/index.vue
index ca5aaff8..3be3776e 100644
--- a/src/views/home/components/ComprehensiveHome/index.vue
+++ b/src/views/home/components/ComprehensiveHome/index.vue
@@ -13,7 +13,7 @@
-
+
@@ -157,7 +157,7 @@ const deviceStepDetails: recommendList[] = [
linkUrl: 'device/Instance',
auth: devicePermission('import'),
params: {
- type: 'import'
+ type: 'import',
},
},
];
@@ -227,17 +227,4 @@ const opsStepDetails: recommendList[] = [
const productDialogVisible = ref(false);
const deviceDialogVisible = ref(false);
-
-
-
-// 设备管理-产品---新增弹窗 {save:true}
-// 设备管理-产品-产品详情---设备接入标签页 {id: 'xxxx', tab:'xxx'}
-// 规则引擎-规则编排---新增弹窗 {save: true}
-
-
-// 设备管理-设备---新增弹窗
-// 设备管理-设备---导入弹窗
-// 设备管理-设备-设备详情---设备诊断标签页
-
-// 运维管理-日志管理---系统日志标签页
diff --git a/src/views/home/components/DevOpsHome/index.vue b/src/views/home/components/DevOpsHome/index.vue
index 93bd4b05..cc698a68 100644
--- a/src/views/home/components/DevOpsHome/index.vue
+++ b/src/views/home/components/DevOpsHome/index.vue
@@ -46,9 +46,6 @@ const opsBootConfig: bootConfig[] = [
english: 'STEP3',
label: '实时监控',
link: 'link/DashBoard',
- params: {
- type: 'add',
- },
},
];
const opsStepDetails: recommendList[] = [
diff --git a/src/views/home/components/StepCard.vue b/src/views/home/components/StepCard.vue
index e6277eef..5e6de26b 100644
--- a/src/views/home/components/StepCard.vue
+++ b/src/views/home/components/StepCard.vue
@@ -38,7 +38,9 @@ const props = defineProps({
// 跳转页面
const jumpPage = (row: recommendList) => {
- if (row.auth === false) return message.warning('暂无权限,请联系管理员');
+ if (row.auth === false) {
+ return message.warning('暂无权限,请联系管理员');
+ }
row.onClick ? row.onClick(row) : _jumpPage(row.linkUrl, row.params);
};
diff --git a/src/views/home/components/dialogs/DeviceChooseDialog.vue b/src/views/home/components/dialogs/DeviceChooseDialog.vue
index 94a35a02..d0bbdf50 100644
--- a/src/views/home/components/dialogs/DeviceChooseDialog.vue
+++ b/src/views/home/components/dialogs/DeviceChooseDialog.vue
@@ -52,7 +52,9 @@ const props = defineProps<{
// 弹窗控制
const confirm = () => {
- if (selectedKeys.value.length < 1) return message.warn('请选择设备');
+ if (selectedKeys.value.length < 1) {
+ return message.warn('请选择设备');
+ }
emits('confirm', selectedKeys.value[0]);
emits('update:visible', false);
};
diff --git a/src/views/home/components/dialogs/ProductChooseDialog.vue b/src/views/home/components/dialogs/ProductChooseDialog.vue
index 5ee070b0..a4d1ac08 100644
--- a/src/views/home/components/dialogs/ProductChooseDialog.vue
+++ b/src/views/home/components/dialogs/ProductChooseDialog.vue
@@ -46,8 +46,8 @@ const form = ref({
const productList = ref<[productItem] | []>([]);
const getOptions = () => {
- getProductList_api().then((resp: any) => {
- productList.value = resp.result
+ getProductList_api().then(({ result }: any) => {
+ productList.value = result
.filter((i: any) => !i?.accessId)
.map((item: { name: any; id: any }) => ({
label: item.name,
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 72e5709a..6751556b 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -54,25 +54,26 @@ import { getMe_api, getView_api } from '@/api/home';
import { getAppInfo_api } from '@/api/system/apply';
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) => {
- if (resp.status === 200) {
- if (resp.result) {
- if (resp.result.username === 'admin')
- currentView.value = 'comprehensive';
- else currentView.value = resp.result?.content;
- } else currentView.value = 'init';
+ getView_api().then(({ status, result }: any) => {
+ if (status === 200) {
+ currentView.value = 'init';
+ if (result) {
+ currentView.value =
+ result.username === 'admin'
+ ? 'comprehensive'
+ : result?.content;
+ }
}
});
};
if (isNoCommunity) {
- // 判断是否是api用户 是则跳转 否则获取选中的视图
+ // 判断是否是api用户 不是则获取选中的视图
getMe_api().then((resp: any) => {
if (resp && resp.status === 200) {
const isApiUser = resp.result.dimensions.find(
@@ -85,10 +86,14 @@ if (isNoCommunity) {
getAppInfo_api(clientId).then((resp: any) => {
secureKey.value = resp.result.apiServer.secureKey;
});
- } else setCurrentView();
+ } else {
+ setCurrentView();
+ }
}
});
-} else setCurrentView();
+} else {
+ setCurrentView();
+}