diff --git a/src/components/index.ts b/src/components/index.ts
index 3e8f4b57..fdbb2309 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -8,7 +8,7 @@ import CardBox from './CardBox/index.vue';
// import Search from './Search'
import NormalUpload from './NormalUpload/index.vue'
import FileFormat from './FileFormat/index.vue'
-// import JUpload from './JUpload/index.vue'
+import JProUpload from './JUpload/index.vue'
import { BasicLayoutPage, BlankLayoutPage } from './Layout'
import { PageContainer } from 'jetlinks-ui-components/es/components'
import Ellipsis from './Ellipsis/index.vue'
@@ -27,7 +27,7 @@ export default {
// .component('Search', Search)
.component('NormalUpload', NormalUpload)
.component('FileFormat', FileFormat)
- // .component('JUpload', JUpload)
+ .component('JProUpload', JProUpload)
.component('BasicLayoutPage', BasicLayoutPage)
.component('BlankLayoutPage', BlankLayoutPage)
.component('PageContainer', PageContainer)
diff --git a/src/views/device/Instance/Export/index.vue b/src/views/device/Instance/Export/index.vue
index 9f49c011..1b422fde 100644
--- a/src/views/device/Instance/Export/index.vue
+++ b/src/views/device/Instance/Export/index.vue
@@ -1,5 +1,12 @@
-
+
-
-
-
-
-
-
-
-
- xlsx
- csv
-
-
-
+
+
+
+ {{ item.name }}
+
+
+
+
+ xlsx
+ csv
+
+
+
-
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Import/index.vue b/src/views/device/Instance/Import/index.vue
index 899cdb61..335ff68d 100644
--- a/src/views/device/Instance/Import/index.vue
+++ b/src/views/device/Instance/Import/index.vue
@@ -1,36 +1,35 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Save/index.vue b/src/views/device/Instance/Save/index.vue
index b49cd0ba..00bf127c 100644
--- a/src/views/device/Instance/Save/index.vue
+++ b/src/views/device/Instance/Save/index.vue
@@ -18,7 +18,7 @@
-
+
@@ -60,15 +60,14 @@
{{item.name}}
@@ -105,16 +104,12 @@ const formRef = ref();
const modelRef = reactive({
productId: undefined,
- id: '',
+ id: undefined,
name: '',
describe: '',
photoUrl: getImage('/device/instance/device-card.png'),
});
-const filterOption = (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-};
-
const vailId = async (_: Record, value: string) => {
if (!props?.data?.id && value) {
const resp = await isExists(value);
@@ -202,10 +197,15 @@ const handleCancel = () => {
const handleSave = () => {
formRef.value
.validate()
- .then(async () => {
+ .then(async (_data: any) => {
loading.value = true;
- const resp = await update(toRaw(modelRef));
- loading.value = false;
+ const obj = {...toRaw(modelRef), ..._data}
+ if(!obj.id){
+ delete obj.id
+ }
+ const resp = await update(obj).finally(() => {
+ loading.value = false;
+ })
if (resp.status === 200) {
message.success('操作成功!');
emit('save');
diff --git a/src/views/device/Instance/index.vue b/src/views/device/Instance/index.vue
index d28d075d..5320be4e 100644
--- a/src/views/device/Instance/index.vue
+++ b/src/views/device/Instance/index.vue
@@ -229,7 +229,7 @@
-
+
>({});
@@ -696,4 +696,8 @@ const saveBtn = () => {
const handleSearch = (_params: any) => {
params.value = _params;
};
+
+const onRefresh = () => {
+ instanceRef.value?.reload();
+}
diff --git a/src/views/device/Instance/typings.d.ts b/src/views/device/Instance/typings.d.ts
index e00c9319..035c56f0 100644
--- a/src/views/device/Instance/typings.d.ts
+++ b/src/views/device/Instance/typings.d.ts
@@ -83,4 +83,17 @@ type InstanceModel = {
params: Set; // 处理无限循环Card
active?: string; // 当前编辑的Card
selectedRows: Map;
+}
+
+export interface ActionsType {
+ key: string;
+ text?: string;
+ disabled?: boolean;
+ permission?: boolean;
+ onClick?: (data: any) => void;
+ style?: CSSProperties;
+ tooltip?: TooltipProps;
+ popConfirm?: PopconfirmProps;
+ icon?: string;
+ children?: ActionsType[];
}
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/index.vue b/src/views/rule-engine/Scene/index.vue
index 9d49e85d..1ec7c88f 100644
--- a/src/views/rule-engine/Scene/index.vue
+++ b/src/views/rule-engine/Scene/index.vue
@@ -1,6 +1,6 @@
-
+
{{ slotProps.name }}
@@ -126,7 +125,7 @@
import SaveModal from './Save/save.vue';
import type { SceneItem } from './typings';
import { useMenuStore } from 'store/menu';
-import { query, _delete, _action } from '@/api/rule-engine/scene';
+import { query, _delete, _action, _execute } from '@/api/rule-engine/scene';
import { message } from 'ant-design-vue';
import type { ActionsType } from '@/components/Table';
import { getImage } from '@/utils/comm';
@@ -180,10 +179,12 @@ const columns = [
scopedSlots: true,
search: {
type: 'select',
- options: Array.from(typeMap).map((item) => ({
- label: item[1],
- value: item[0],
- })),
+ options: Array.from(typeMap).map((item) => {
+ return {
+ label: item[1]?.text,
+ value: item[0],
+ }
+ }),
},
},
{
@@ -305,9 +306,18 @@ const getActions = (
: '未启用,不能手动触发',
},
icon: 'LikeOutlined',
- onClick: () => {
- // handleView(data.id, data.triggerType);
- },
+ popConfirm: {
+ title: '',
+ onConfirm: async () => {
+ const resp = await _execute(data.id)
+ if (resp.status === 200) {
+ message.success('操作成功!');
+ sceneRef.value?.reload();
+ } else {
+ message.error('操作失败!');
+ }
+ }
+ }
};
actions.splice(1, 0, _item);
}
diff --git a/yarn.lock b/yarn.lock
index 04660101..1bda2b9a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3903,8 +3903,8 @@ jetlinks-store@^0.0.3:
jetlinks-ui-components@^1.0.4:
version "1.0.4"
- resolved "https://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.4.tgz#38f2abbb6c686ce1e1d7c08a318a6c2f50267adc"
- integrity sha512-bpmSoKVpdgZ2FUxIBaqBpewt2T9g1tTf4tECam9uTdww6SDxyvLzWmeKIUfVIwp2Ts7uKpHPFsCtI8fPmZuRjw==
+ resolved "https://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.4.tgz#31f6879f83d394ba45bfd6e94ce0b20de817d490"
+ integrity sha512-5X26+GsqsduCUSmlaYOAw/MDwKRsZFnifzzRqHcm5qbCi0KrrkID9aKatsMRaeTVEEca1/nzPaPGgXAo6bEpfQ==
dependencies:
"@vueuse/core" "^9.12.0"
ant-design-vue "^3.2.15"
From 7ed42f8acc8df44b47a2cf5e1ff0c5fdf4d19afe Mon Sep 17 00:00:00 2001
From: JiangQiming <291854119@qq.com>
Date: Mon, 6 Mar 2023 11:29:56 +0800
Subject: [PATCH 04/16] =?UTF-8?q?update:=20=E6=90=9C=E7=B4=A2=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6=E6=9B=B4=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/media/Cascade/Channel/BindChannel/index.vue | 2 +-
src/views/media/Cascade/Channel/index.vue | 2 +-
src/views/media/Cascade/index.vue | 2 +-
src/views/media/Device/Channel/index.vue | 2 +-
src/views/media/Device/index.vue | 2 +-
src/views/notice/Config/Log/index.vue | 2 +-
src/views/notice/Config/index.vue | 2 +-
src/views/notice/Template/Log/index.vue | 2 +-
src/views/notice/Template/index.vue | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/views/media/Cascade/Channel/BindChannel/index.vue b/src/views/media/Cascade/Channel/BindChannel/index.vue
index 137a0b19..18145a37 100644
--- a/src/views/media/Cascade/Channel/BindChannel/index.vue
+++ b/src/views/media/Cascade/Channel/BindChannel/index.vue
@@ -10,7 +10,7 @@
@cancel="_vis = false"
:confirmLoading="loading"
>
-
-
-
-
-
-
-
-
-
Date: Mon, 6 Mar 2023 11:43:45 +0800
Subject: [PATCH 05/16] =?UTF-8?q?update:=20=E7=BB=84=E7=BB=87=E7=AE=A1?=
=?UTF-8?q?=E7=90=86-=E4=BA=A7=E5=93=81=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/Department/product/index.vue | 234 ++++++++++++++----
yarn.lock | 4 +-
2 files changed, 186 insertions(+), 52 deletions(-)
diff --git a/src/views/system/Department/product/index.vue b/src/views/system/Department/product/index.vue
index aea5a9eb..c7ba80d5 100644
--- a/src/views/system/Department/product/index.vue
+++ b/src/views/system/Department/product/index.vue
@@ -1,15 +1,15 @@
-
+
@@ -56,7 +56,7 @@
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+ {{ o.text }}
+
+
+
+
+
+
+
+ {{
+ item.text
+ }}
+
+
+
+
+
+
+ {{
+ table.permissionList.value.length &&
+ table.getPermissLabel(slotProps.permission)
+ }}
+
+
+
+
+
+
+
+
+
+
+
();
+
+const columns = [
+ {
+ title: 'ID',
+ dataIndex: 'id',
+ key: 'id',
+ ellipsis: true,
+ fixed: 'left',
+ search: {
+ type: 'string',
+ },
+ },
+ {
+ title: '名称',
+ dataIndex: 'name',
+ key: 'name',
+ ellipsis: true,
+ search: {
+ type: 'string',
+ },
+ },
+ {
+ title: '资产权限',
+ dataIndex: 'permission',
+ key: 'permission',
+ ellipsis: true,
+ scopedSlots: true,
+ },
+ {
+ title: '说明',
+ dataIndex: 'describe',
+ key: 'describe',
+ ellipsis: true,
+ },
+ {
+ title: '状态',
+ dataIndex: 'state',
+ key: 'state',
+ ellipsis: true,
+ search: {
+ type: 'select',
+ options: [
+ {
+ label: '正常',
+ value: 1,
+ },
+ {
+ label: '禁用',
+ value: 0,
+ },
+ ],
+ },
+ scopedSlots: true,
+ },
+
+ {
+ title: '操作',
+ dataIndex: 'action',
+ key: 'action',
+ fixed: 'right',
+ scopedSlots: true,
+ },
+];
const query = {
- columns: [
- {
- title: 'ID',
- dataIndex: 'id',
- key: 'id',
- ellipsis: true,
- fixed: 'left',
- search: {
- type: 'string',
- },
- },
- {
- title: '名称',
- dataIndex: 'name',
- key: 'name',
- ellipsis: true,
- fixed: 'left',
- search: {
- type: 'string',
- },
- },
- {
- title: '状态',
- dataIndex: 'state',
- key: 'state',
- ellipsis: true,
- fixed: 'left',
- search: {
- type: 'select',
- options: [
- {
- label: '正常',
- value: 1,
- },
- {
- label: '禁用',
- value: 0,
- },
- ],
- },
- },
- ],
params: ref({}),
search: (params: any) => {
query.params.value = params;
@@ -250,6 +348,33 @@ const table = {
);
},
+ getActions: (
+ data: Partial>,
+ type: 'card' | 'table',
+ ) => {
+ if (!data) return [];
+ else
+ return [
+ {
+ permission: true,
+ key: 'edit',
+ tooltip: { title: '编辑' },
+ icon: 'EditOutlined',
+ onClick: () => table.clickEdit(data),
+ },
+ {
+ permission: true,
+ key: 'unbind',
+ tooltip: { title: '解除绑定' },
+ popConfirm: {
+ title: `是否解除绑定`,
+ onConfirm: () => table.clickUnBind(data),
+ },
+ icon: 'DisconnectOutlined',
+ },
+ ];
+ },
+
// 获取权限数据字典
getPermissionDict: () => {
getPermissionDict_api().then((resp: any) => {
@@ -261,7 +386,7 @@ const table = {
const permissionList = table.permissionList.value;
if (permissionList.length < 1 || values.length < 1) return '';
const result = values.map(
- (key) => permissionList.find((item:any) => item.id === key)?.name,
+ (key) => permissionList.find((item: any) => item.id === key)?.name,
);
return result.join(',');
},
@@ -442,6 +567,15 @@ const dialogs = reactive({
diff --git a/src/views/media/Device/Playback/index.less b/src/views/media/Device/Playback/index.less
new file mode 100644
index 00000000..dfa44d81
--- /dev/null
+++ b/src/views/media/Device/Playback/index.less
@@ -0,0 +1,120 @@
+@borderColor: #d9d9d9;
+
+.playback-warp {
+ display: flex;
+ padding: 24px;
+ background-color: #fff;
+
+ .playback-left {
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ width: 0;
+
+ .playback-media {
+ width: 100%;
+ }
+ }
+
+ .playback-right {
+ width: 300px;
+ margin-left: 24px;
+
+ .playback-calendar {
+ margin-top: 16px;
+ border: 1px solid @borderColor;
+ border-radius: 2px;
+
+ .ant-picker-calendar-header {
+ justify-content: space-between;
+
+ > div:nth-child(3) {
+ display: none;
+ }
+ }
+ }
+
+ .playback-list {
+ display: flex;
+ height: 300px;
+ margin-top: 16px;
+ overflow-y: auto;
+ border: 1px solid @borderColor;
+
+ &.no-list {
+ align-items: center;
+ justify-content: center;
+ }
+
+ .playback-list-items {
+ width: 100%;
+
+ .ant-list-item {
+ padding-left: 12px;
+ }
+ }
+ }
+ }
+
+ .time-line-warp {
+ padding: 10px 0;
+
+ .time-line-clock {
+ display: flex;
+ align-items: stretch;
+ justify-content: space-between;
+ width: 100%;
+
+ > div {
+ color: #666;
+ font-size: 12px;
+ }
+ }
+
+ .time-line-content {
+ position: relative;
+ padding-bottom: 20px;
+
+ .time-line-progress {
+ position: relative;
+ height: 16px;
+ overflow: hidden;
+ background-color: #d9d9d9;
+ border-radius: 2px;
+
+ > div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ background-color: #52c41a;
+ cursor: pointer;
+ }
+ }
+ .time-line-btn {
+ position: absolute;
+ top: -2px;
+ left: 0;
+ width: 3px;
+ height: 19px;
+ background-color: @primary-color;
+ border-radius: 2px;
+ visibility: hidden;
+ }
+
+ .time-line {
+ position: absolute;
+ bottom: -8px;
+ left: -30px;
+ width: 60px;
+ padding: 2px 0;
+ font-size: 12px;
+ text-align: center;
+ background-color: #d9d9d9;
+ border-radius: 2px;
+ box-shadow: 0 0 12px rgba(#000, 0.15);
+ visibility: hidden;
+ }
+ }
+ }
+}
diff --git a/src/views/media/Device/Playback/index.vue b/src/views/media/Device/Playback/index.vue
index e0d2ef94..321a7127 100644
--- a/src/views/media/Device/Playback/index.vue
+++ b/src/views/media/Device/Playback/index.vue
@@ -1,7 +1,203 @@
+
- 回放
+
+
+
-
+
+
+
diff --git a/src/views/media/Device/Playback/timeLine.vue b/src/views/media/Device/Playback/timeLine.vue
new file mode 100644
index 00000000..e77c014d
--- /dev/null
+++ b/src/views/media/Device/Playback/timeLine.vue
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
+
+ {{ moment(playTime || 0).format('HH:mm:ss') }}
+
+
+
+
+
+
+
+
From 3039c20e2f06d5e03db524c807c1d6ef6c60f4aa Mon Sep 17 00:00:00 2001
From: easy <1358086367@qq.com>
Date: Mon, 6 Mar 2023 16:35:59 +0800
Subject: [PATCH 09/16] =?UTF-8?q?update:=20=E8=A7=92=E8=89=B2=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E7=BB=84=E4=BB=B6=E6=9B=B4=E6=8D=A2=E3=80=81=E5=BC=B9?=
=?UTF-8?q?=E7=AA=97=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../system/Role/Detail/Permiss/index.vue | 32 +--
src/views/system/Role/Detail/User/index.vue | 253 ++++++++++--------
.../Role/Detail/components/AddUserDialog.vue | 148 +++++-----
.../Role/Detail/components/PermissTree.vue | 56 ++--
src/views/system/Role/Detail/index.vue | 9 +-
.../system/Role/components/AddDialog.vue | 90 +++----
src/views/system/Role/index.vue | 122 ++++-----
7 files changed, 338 insertions(+), 372 deletions(-)
diff --git a/src/views/system/Role/Detail/Permiss/index.vue b/src/views/system/Role/Detail/Permiss/index.vue
index c41cb1b8..3fcbe584 100644
--- a/src/views/system/Role/Detail/Permiss/index.vue
+++ b/src/views/system/Role/Detail/Permiss/index.vue
@@ -1,42 +1,42 @@
-
+
基本信息
-
-
+
-
-
-
-
+
+
-
-
-
+
+
+
-
+
+
@@ -86,8 +86,10 @@ form.getForm();
+
diff --git a/src/views/system/Role/Detail/components/AddUserDialog.vue b/src/views/system/Role/Detail/components/AddUserDialog.vue
index e22e46ba..bd34c834 100644
--- a/src/views/system/Role/Detail/components/AddUserDialog.vue
+++ b/src/views/system/Role/Detail/components/AddUserDialog.vue
@@ -1,123 +1,99 @@
-
-
+ queryParams = {...params}"
+ />
-
-
- 取消
- 确定
-
-
+
-
-
diff --git a/src/views/system/Role/Detail/components/PermissTree.vue b/src/views/system/Role/Detail/components/PermissTree.vue
index ec63d97d..dc7875ab 100644
--- a/src/views/system/Role/Detail/components/PermissTree.vue
+++ b/src/views/system/Role/Detail/components/PermissTree.vue
@@ -1,6 +1,6 @@
-
数据权限
-
+
勾选任意数据权限均能看到自己创建的数据权限
-
-
-
+
+
批量设置批量设置
-
+ >
{{ column.title }}
@@ -48,21 +48,21 @@
-
{{ record.name }}{{ record.name }}
-
{{ button.name }}{{ button.name }}
@@ -72,13 +72,16 @@
不支持数据权限配置,默认可查看全部数据
-
-
+ {{ asset.name }}{{ asset.name }}
-
+
-import { QuestionCircleOutlined } from '@ant-design/icons-vue';
import { cloneDeep } from 'lodash-es';
import { getPrimissTree_api } from '@/api/system/role';
@@ -167,6 +169,12 @@ const bulkChange = () => {
}
});
};
+
+// 重置批量设置
+const resetBulk = () => {
+ bulkValue.value = '';
+ bulkShow.value = false;
+};
// ------------下面为表格内容部分------------------
const flatTableData: tableItemType[] = []; // 表格数据的扁平化版本--浅克隆 方便进行对表格数据进行操作
@@ -273,6 +281,9 @@ function menuChange(
}
}
+ // 取消批量设置
+ resetBulk();
+
// 改变头部节点状态
const selectList = flatTableData.filter((item) => item.granted); // 第一列选中的项
if (selectList.length === flatTableData.length) {
@@ -390,8 +401,3 @@ type tableItemType = {
assetAccesses?: any[];
};
-
-
diff --git a/src/views/system/Role/Detail/index.vue b/src/views/system/Role/Detail/index.vue
index 639cdc98..c97dbd05 100644
--- a/src/views/system/Role/Detail/index.vue
+++ b/src/views/system/Role/Detail/index.vue
@@ -1,10 +1,10 @@
@@ -12,7 +12,6 @@
diff --git a/src/views/system/Role/components/AddDialog.vue b/src/views/system/Role/components/AddDialog.vue
index 16c3fc54..b57c50e3 100644
--- a/src/views/system/Role/components/AddDialog.vue
+++ b/src/views/system/Role/components/AddDialog.vue
@@ -1,18 +1,20 @@
-
+
-
-
- 取消
- 确定
-
diff --git a/src/views/system/Role/index.vue b/src/views/system/Role/index.vue
index 72ee4749..ee75a296 100644
--- a/src/views/system/Role/index.vue
+++ b/src/views/system/Role/index.vue
@@ -1,20 +1,23 @@
-
+ queryParams = params"
+ />
新增
@@ -47,9 +50,7 @@
-
+
@@ -59,73 +60,56 @@ import PermissionButton from '@/components/PermissionButton/index.vue';
import AddDialog from './components/AddDialog.vue';
import { getRoleList_api, delRole_api } from '@/api/system/role';
import { message } from 'ant-design-vue';
+import { useMenuStore } from '@/store/menu';
const permission = 'system/Role';
+const { jumpPage } = useMenuStore();
const addDialogRef = ref(); // 新增弹窗实例
-const router = useRouter();
-const route = useRoute();
+const isSave = !!useRoute().query.save;
-// 筛选
-const query = reactive({
- columns: [
- {
- title: '标识',
- dataIndex: 'id',
- key: 'id',
- ellipsis: true,
- fixed: 'left',
+const columns = [
+ {
+ title: '标识',
+ dataIndex: 'id',
+ key: 'id',
+ ellipsis: true,
+ fixed: 'left',
+ search: {
+ type: 'string',
},
- {
- title: '名称',
- dataIndex: 'name',
- key: 'name',
- ellipsis: true,
+ },
+ {
+ title: '名称',
+ dataIndex: 'name',
+ key: 'name',
+ ellipsis: true,
+ search: {
+ type: 'string',
},
- {
- title: '描述',
- key: 'description',
- ellipsis: true,
- dataIndex: 'description',
- filters: true,
- onFilter: true,
+ },
+ {
+ title: '描述',
+ key: 'description',
+ ellipsis: true,
+ dataIndex: 'description',
+ search: {
+ type: 'string',
},
- {
- title: '操作',
- valueType: 'option',
- width: 200,
- fixed: 'right',
- },
- ],
- params: {},
-});
+ },
+ {
+ title: '操作',
+ dataIndex: 'action',
+ key: 'action',
+ width: 200,
+ fixed: 'right',
+ scopedSlots: true,
+ },
+];
+const queryParams = ref({});
// 表格
const tableRef = ref>({});
-const table = reactive({
- columns: [
- {
- title: '标识',
- dataIndex: 'id',
- key: 'id',
- },
- {
- title: '名称',
- dataIndex: 'name',
- key: 'name',
- },
- {
- title: '说明',
- dataIndex: 'description',
- key: 'description',
- },
- {
- title: '操作',
- dataIndex: 'action',
- key: 'action',
- scopedSlots: true,
- },
- ],
- tableData: [],
+const table = {
clickAdd: () => {
addDialogRef.value.openDialog(true, {});
},
@@ -137,13 +121,11 @@ const table = reactive({
}
});
},
- clickEdit: (row: any) => {
- router.push(`/system/Role/detail/${row.id}`);
+ clickEdit: ({ id }: { id: string }) => {
+ jumpPage(`system/Role/Detail`, { id });
},
-});
-nextTick(() => {
- route.query.save && table.clickAdd();
-});
+};
+const dialogVisible = ref(isSave);
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/Diagnose/Message/index.vue b/src/views/device/Instance/Detail/Diagnose/Message/index.vue
index bac6d51c..f5bed24d 100644
--- a/src/views/device/Instance/Detail/Diagnose/Message/index.vue
+++ b/src/views/device/Instance/Detail/Diagnose/Message/index.vue
@@ -1,20 +1,20 @@
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
@@ -38,11 +38,11 @@
:key="item.key"
/>
-
+
-
-
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/Running/Event/index.vue b/src/views/device/Instance/Detail/Running/Event/index.vue
index a9e169ad..3059d3bf 100644
--- a/src/views/device/Instance/Detail/Running/Event/index.vue
+++ b/src/views/device/Instance/Detail/Running/Event/index.vue
@@ -1,28 +1,30 @@
-
-
+
- {{ moment(slotProps.timestamp).format('YYYY-MM-DD HH:mm:ss') }}
+ {{ dayjs(slotProps.timestamp).format('YYYY-MM-DD HH:mm:ss') }}
-
+
-
+
-
+
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/Running/Property/Detail/Charts.vue b/src/views/device/Instance/Detail/Running/Property/Detail/Charts.vue
index 57c25647..6b7f6571 100644
--- a/src/views/device/Instance/Detail/Running/Property/Detail/Charts.vue
+++ b/src/views/device/Instance/Detail/Running/Property/Detail/Charts.vue
@@ -1,36 +1,36 @@
-
+
-
+
统计周期:
-
- 实际值
+ 实际值
- 按分钟统计
- 按小时统计
- 按天统计
- 按周统计
- 按月统计
-
+
按分钟统计
+
按小时统计
+
按天统计
+
按周统计
+
按月统计
+
统计规则:
-
- 平均值
- 最大值
- 最小值
- 总数
-
+
+ 平均值
+ 最大值
+ 最小值
+ 总数
+
-
+
-
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/Running/Property/index.vue b/src/views/device/Instance/Detail/Running/Property/index.vue
index f0d6036a..fd9db835 100644
--- a/src/views/device/Instance/Detail/Running/Property/index.vue
+++ b/src/views/device/Instance/Detail/Running/Property/index.vue
@@ -2,7 +2,8 @@
@@ -58,26 +59,6 @@
-
-
-
@@ -107,6 +88,7 @@ import { message } from 'ant-design-vue';
import { getWebSocket } from '@/utils/websocket';
import { map } from 'rxjs/operators';
import { queryDashboard } from '@/api/comm';
+
const columns = [
{
title: '名称',
@@ -142,9 +124,6 @@ const _data = defineProps({
const value = ref
('');
const dataSource = ref([]);
const _dataSource = ref([]);
-const pageIndex = ref(0);
-const pageSize = ref(8);
-const total = ref(0);
const editVisible = ref(false); // 编辑
const detailVisible = ref(false); // 详情
const currentInfo = ref>({});
@@ -152,6 +131,9 @@ const instanceStore = useInstanceStore();
const indicatorVisible = ref(false); // 指标
const loading = ref(false);
const propertyValue = ref>({});
+const _params = reactive({
+ name: '',
+});
const subRef = ref();
@@ -309,39 +291,35 @@ const getDashboard = async () => {
loading.value = false;
};
-const query = (page: number, size: number, value: string) => {
- pageIndex.value = page || 0;
- pageSize.value = size || 8;
- const _from = pageIndex.value * pageSize.value;
- const _to = (pageIndex.value + 1) * pageSize.value;
- const arr = _.cloneDeep(_dataSource.value);
- if (unref(value)) {
- const li = arr.filter((i: any) => {
- return i?.name.indexOf(unref(value)) !== -1;
+const query = (params: Record) =>
+ new Promise((resolve) => {
+ const _from = params.pageIndex * params.pageSize;
+ const _to = (params.pageIndex + 1) * params.pageSize;
+ let arr = _.cloneDeep(_dataSource.value);
+ if (params?.name) {
+ const li = _dataSource.value.filter((i: any) => {
+ return i?.name.indexOf(params.name) !== -1;
+ });
+ arr = _.cloneDeep(li);
+ }
+ resolve({
+ result: {
+ data: arr.slice(_from, _to),
+ pageIndex: params.pageIndex || 0,
+ pageSize: params.pageSize || 12,
+ total: arr.length,
+ },
+ status: 200,
});
- dataSource.value = li.slice(_from, _to);
- total.value = li.length;
- } else {
- dataSource.value = arr.slice(_from, _to);
- total.value = arr.length;
- }
- getDashboard();
-};
-
-const pageChange = (page: number, size: number) => {
- if (size === pageSize.value) {
- query(page - 1, size, value.value);
- } else {
- query(0, size, value.value);
- }
-};
+ getDashboard();
+ });
watch(
() => _data.data,
(newVal) => {
if (newVal.length) {
_dataSource.value = newVal as PropertyData[];
- query(0, 8, value.value);
+ _params.name = '';
}
},
{
@@ -351,7 +329,7 @@ watch(
);
const onSearch = () => {
- query(0, 8, value.value);
+ _params.name = value.value;
};
onUnmounted(() => {
diff --git a/src/views/device/Instance/Detail/components/BindParentDevice/index.vue b/src/views/device/Instance/Detail/components/BindParentDevice/index.vue
new file mode 100644
index 00000000..4d2a4cd6
--- /dev/null
+++ b/src/views/device/Instance/Detail/components/BindParentDevice/index.vue
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+ {{
+ slotProps.registryTime
+ ? dayjs(slotProps.registryTime).format(
+ 'YYYY-MM-DD HH:mm:ss',
+ )
+ : ''
+ }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue b/src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue
index 2597cd04..add45b11 100644
--- a/src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue
+++ b/src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue
@@ -1,5 +1,5 @@
-
采集器的点位名称与属性名称一致时将自动映射绑定;有多个采集器点位名称与属性名称一致时以第1个采集器的点位数据进行绑定
-
+
-
-
+
-
+
-
-
+
-
+
{{ item.title }}
-
-
+
-
+
-
-
+
+
-
+
-
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Process/index.vue b/src/views/device/Instance/Process/index.vue
index 7dda3761..05b405ac 100644
--- a/src/views/device/Instance/Process/index.vue
+++ b/src/views/device/Instance/Process/index.vue
@@ -1,12 +1,12 @@
-
+
总数量:{{count}}
{{errMessage}}
-
+
diff --git a/yarn.lock b/yarn.lock
index 1bda2b9a..40dff6cf 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3903,8 +3903,8 @@ jetlinks-store@^0.0.3:
jetlinks-ui-components@^1.0.4:
version "1.0.4"
- resolved "https://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.4.tgz#31f6879f83d394ba45bfd6e94ce0b20de817d490"
- integrity sha512-5X26+GsqsduCUSmlaYOAw/MDwKRsZFnifzzRqHcm5qbCi0KrrkID9aKatsMRaeTVEEca1/nzPaPGgXAo6bEpfQ==
+ resolved "https://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.4.tgz#418d9218c2d0076b4a16606eb87ea755db303409"
+ integrity sha512-7c509Xx4YVamM/R6Xg62iIOxh2gWz8ASKCN2Pa8lU2CP1n+Vn5Xi5Q0fpd0AiFdi1QadssGaGUkpzbqCqWXLsQ==
dependencies:
"@vueuse/core" "^9.12.0"
ant-design-vue "^3.2.15"
From 1cf4a3f8b02c70be614cc1b3dab7eaa4e842e189 Mon Sep 17 00:00:00 2001
From: 100011797 <2642441182@qq.com>
Date: Mon, 6 Mar 2023 18:03:51 +0800
Subject: [PATCH 12/16] =?UTF-8?q?fix:=20dueros=E6=9B=BF=E6=8D=A2=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DuerOS/Detail/command/EditTable.vue | 4 +-
.../DuerOS/Detail/command/index.vue | 74 +++---
src/views/Northbound/DuerOS/Detail/doc.vue | 8 +-
src/views/Northbound/DuerOS/Detail/index.vue | 226 +++++++++---------
src/views/Northbound/DuerOS/index.vue | 34 ++-
.../Diagnose/Message/Function/EditTable.vue | 5 +-
.../Detail/Info/components/Tags/Save.vue | 2 +-
yarn.lock | 4 +-
8 files changed, 177 insertions(+), 180 deletions(-)
diff --git a/src/views/Northbound/DuerOS/Detail/command/EditTable.vue b/src/views/Northbound/DuerOS/Detail/command/EditTable.vue
index 975d91fd..a080b038 100644
--- a/src/views/Northbound/DuerOS/Detail/command/EditTable.vue
+++ b/src/views/Northbound/DuerOS/Detail/command/EditTable.vue
@@ -1,5 +1,5 @@
-
-
+