Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev
This commit is contained in:
commit
48b6bbc0a7
|
@ -8,34 +8,34 @@
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
|
<!-- <AIcon type="MoreOutline" /> -->
|
||||||
<more-outlined />
|
<more-outlined />
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu>
|
<j-menu>
|
||||||
<a-menu-item v-for="item in symbolList.filter((t: SymbolType, i: number) => i > 6)" :key="item.key"
|
<j-menu-item v-for="item in symbolList.filter((t: SymbolType, i: number) => i > 6)" :key="item.key"
|
||||||
@click="addOperatorValue(item.value)">
|
@click="addOperatorValue(item.value)">
|
||||||
{{ item.value }}
|
{{ item.value }}
|
||||||
</a-menu-item>
|
</j-menu-item>
|
||||||
</a-menu>
|
</j-menu>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<span v-if="mode !== 'advance'">
|
<span v-if="mode !== 'advance'">
|
||||||
<a-tooltip :title="!id ? '请先输入标识' : '设置属性规则'">
|
<j-tooltip :title="!id ? '请先输入标识' : '设置属性规则'">
|
||||||
<fullscreen-outlined :class="!id ? 'disabled' : ''" @click="fullscreenClick" />
|
<AIcon type="FullscreenOutlined" :class="!id ? 'disabled' : ''" @click="fullscreenClick" />
|
||||||
</a-tooltip>
|
<!-- <fullscreen-outlined :class="!id ? 'disabled' : ''" @click="fullscreenClick" /> -->
|
||||||
|
</j-tooltip>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="editor">
|
<div class="editor">
|
||||||
<MonacoEditor v-if="loading" v-model:model-value="_value" theme="vs" ref="editor" />
|
<JMonacoEditor v-if="loading" v-model:model-value="_value" theme="vs" ref="editor" lang="javascript"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="Editor">
|
<script setup lang="ts" name="Editor">
|
||||||
import { FullscreenOutlined, MoreOutlined } from '@ant-design/icons-vue';
|
|
||||||
import MonacoEditor from '@/components/MonacoEditor/index.vue';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mode?: 'advance' | 'simple';
|
mode?: 'advance' | 'simple';
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
]">
|
]">
|
||||||
<j-input v-model:value="_value[index].name" size="small"></j-input>
|
<j-input v-model:value="_value[index].name" size="small"></j-input>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
<value-type-form v-model:value="_value[index].valueType" :name="name.concat([index, 'valueType'])" isSub
|
<value-type-form v-model:value="_value[index].valueType" :name="name.concat([index, 'valueType'])" :isSub="isSub"
|
||||||
key="json_sub"></value-type-form>
|
key="json_sub"></value-type-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -69,6 +69,10 @@ const props = defineProps({
|
||||||
name: {
|
name: {
|
||||||
type: Array as PropType<(string | number)[]>,
|
type: Array as PropType<(string | number)[]>,
|
||||||
default: () => ([])
|
default: () => ([])
|
||||||
|
},
|
||||||
|
isSub: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="modifyModal">
|
<script setup lang="ts" name="modifyModal">
|
||||||
import { PropType } from 'vue';
|
import { PropType } from 'vue';
|
||||||
import { Form, message } from 'ant-design-vue';
|
import { Form, message } from 'jetlinks-ui-components';
|
||||||
import { queryTree, saveTree, updateTree } from '@/api/device/category';
|
import { queryTree, saveTree, updateTree } from '@/api/device/category';
|
||||||
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
||||||
import { list } from '@/api/iot-card/home';
|
import { list } from '@/api/iot-card/home';
|
||||||
|
|
|
@ -75,8 +75,7 @@
|
||||||
import { queryTree, deleteTree } from '@/api/device/category';
|
import { queryTree, deleteTree } from '@/api/device/category';
|
||||||
import type { ActionsType } from '@/components/Table/index.vue';
|
import type { ActionsType } from '@/components/Table/index.vue';
|
||||||
import ModifyModal from './components/modifyModal/index.vue';
|
import ModifyModal from './components/modifyModal/index.vue';
|
||||||
import type { TableColumnType, TableProps } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
const expandedRowKeys = ref<any>([]);
|
const expandedRowKeys = ref<any>([]);
|
||||||
const tableRef = ref<Record<string, any>>({});
|
const tableRef = ref<Record<string, any>>({});
|
||||||
const modifyRef = ref();
|
const modifyRef = ref();
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<!-- 勾选 -->
|
<!-- 勾选 -->
|
||||||
<div v-if="active" class="checked-icon">
|
<div v-if="active" class="checked-icon">
|
||||||
<div>
|
<div>
|
||||||
<CheckOutlined />
|
<AIcon type="CheckOutlined"></AIcon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,11 +31,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
|
||||||
SearchOutlined,
|
|
||||||
CheckOutlined,
|
|
||||||
DeleteOutlined,
|
|
||||||
} from '@ant-design/icons-vue';
|
|
||||||
import { StatusColorEnum } from '@/utils/consts.ts';
|
import { StatusColorEnum } from '@/utils/consts.ts';
|
||||||
import type { ActionsType } from '@/components/Table/index.vue';
|
import type { ActionsType } from '@/components/Table/index.vue';
|
||||||
import { PropType } from 'vue';
|
import { PropType } from 'vue';
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<h3>配置信息</h3>
|
<h3>配置信息</h3>
|
||||||
<div style="margin: 0 0px 0 15px; color: #1d39c4">
|
<div style="margin: 0 0px 0 15px; color: #1d39c4">
|
||||||
<edit-outlined @click="editConfig" />
|
<AIcon type="EditOutlined"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -53,11 +53,6 @@ import { useProductStore } from '@/store/product';
|
||||||
import Save from '../../Save/index.vue';
|
import Save from '../../Save/index.vue';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import {
|
|
||||||
EditOutlined,
|
|
||||||
DeleteOutlined,
|
|
||||||
PlusOutlined,
|
|
||||||
} from '@ant-design/icons-vue';
|
|
||||||
const productStore = useProductStore();
|
const productStore = useProductStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const saveRef = ref();
|
const saveRef = ref();
|
||||||
|
|
|
@ -370,7 +370,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useProductStore } from '@/store/product';
|
import { useProductStore } from '@/store/product';
|
||||||
import { ConfigMetadata } from '@/views/device/Product/typings';
|
import { ConfigMetadata } from '@/views/device/Product/typings';
|
||||||
import { Empty, FormItem, message } from 'ant-design-vue';
|
import { Empty, message } from 'jetlinks-ui-components';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import Title from '../Title/index.vue';
|
import Title from '../Title/index.vue';
|
||||||
import { usePermissionStore } from '@/store/permission';
|
import { usePermissionStore } from '@/store/permission';
|
||||||
|
@ -396,7 +396,7 @@ const productStore = useProductStore();
|
||||||
import Driver from 'driver.js';
|
import Driver from 'driver.js';
|
||||||
import 'driver.js/dist/driver.min.css';
|
import 'driver.js/dist/driver.min.css';
|
||||||
import { marked } from 'marked';
|
import { marked } from 'marked';
|
||||||
import type { FormInstance, TableColumnType } from 'ant-design-vue';
|
import type { TableColumnType } from 'ant-design-vue';
|
||||||
import { useMenuStore } from '@/store/menu';
|
import { useMenuStore } from '@/store/menu';
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const menuStore = useMenuStore();
|
const menuStore = useMenuStore();
|
||||||
|
|
|
@ -112,7 +112,7 @@ import {
|
||||||
getDeviceNumber,
|
getDeviceNumber,
|
||||||
getProtocolDetail,
|
getProtocolDetail,
|
||||||
} from '@/api/device/product';
|
} from '@/api/device/product';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import encodeQuery from '@/utils/encodeQuery';
|
import encodeQuery from '@/utils/encodeQuery';
|
||||||
import { useMenuStore } from '@/store/menu';
|
import { useMenuStore } from '@/store/menu';
|
||||||
|
|
|
@ -17,13 +17,22 @@
|
||||||
<div class="product-tips">
|
<div class="product-tips">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<div class="product-icon">
|
<div class="product-icon">
|
||||||
<check-circle-outlined class="icon-style" />
|
<AIcon
|
||||||
|
type="CheckCircleOutlined"
|
||||||
|
class="icon-style"
|
||||||
|
></AIcon>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-title">产品创建成功</div>
|
<div class="product-title">产品创建成功</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<div class="product-id">产品ID: {{ idValue }}</div>
|
<div class="product-id">产品ID: {{ idValue }}</div>
|
||||||
<div class="product-btn" @click="showDetail" style="cursor: pointer;">查看详情</div>
|
<div
|
||||||
|
class="product-btn"
|
||||||
|
@click="showDetail"
|
||||||
|
style="cursor: pointer"
|
||||||
|
>
|
||||||
|
查看详情
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>接下来推荐操作:</div>
|
<div>接下来推荐操作:</div>
|
||||||
<div class="product-main">1、配置产品接入方式</div>
|
<div class="product-main">1、配置产品接入方式</div>
|
||||||
|
@ -48,7 +57,6 @@
|
||||||
<script lang="ts" setup name="DialogTips">
|
<script lang="ts" setup name="DialogTips">
|
||||||
import { getImage } from '@/utils/comm.ts';
|
import { getImage } from '@/utils/comm.ts';
|
||||||
import { useProductStore } from '@/store/product';
|
import { useProductStore } from '@/store/product';
|
||||||
import { CheckCircleOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { useMenuStore } from '@/store/menu';
|
import { useMenuStore } from '@/store/menu';
|
||||||
const visible = ref<boolean>(false);
|
const visible = ref<boolean>(false);
|
||||||
const productStore = useProductStore();
|
const productStore = useProductStore();
|
||||||
|
@ -72,12 +80,11 @@ const show = (id: string) => {
|
||||||
* 查看详情
|
* 查看详情
|
||||||
*/
|
*/
|
||||||
const showDetail = () => {
|
const showDetail = () => {
|
||||||
menuStore.jumpPage('device/Product/Detail',{id:idValue.value})
|
menuStore.jumpPage('device/Product/Detail', { id: idValue.value });
|
||||||
};
|
};
|
||||||
defineExpose({
|
defineExpose({
|
||||||
show: show,
|
show: show,
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.product-tips {
|
.product-tips {
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
import { category } from '@/api/device/product';
|
import { category } from '@/api/device/product';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import { getImage } from '@/utils/comm.ts';
|
import { getImage } from '@/utils/comm.ts';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import DialogTips from '../DialogTips/index.vue';
|
import DialogTips from '../DialogTips/index.vue';
|
||||||
import { useProductStore } from '@/store/product';
|
import { useProductStore } from '@/store/product';
|
||||||
import { filterTreeSelectNode, filterSelectNode } from '@/utils/comm';
|
import { filterTreeSelectNode, filterSelectNode } from '@/utils/comm';
|
||||||
|
|
|
@ -160,12 +160,7 @@
|
||||||
import server from '@/utils/request';
|
import server from '@/utils/request';
|
||||||
import type { ActionsType } from '@/components/Table/index.vue';
|
import type { ActionsType } from '@/components/Table/index.vue';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import {
|
import { message } from 'jetlinks-ui-components';
|
||||||
EditOutlined,
|
|
||||||
DeleteOutlined,
|
|
||||||
PlusOutlined,
|
|
||||||
} from '@ant-design/icons-vue';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import {
|
import {
|
||||||
getProviders,
|
getProviders,
|
||||||
category,
|
category,
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<j-form-item label="输入参数" name="inputs" :rules="[
|
<j-form-item label="输入参数" name="inputs" :rules="[
|
||||||
{ validator: (_rule: Rule, val: Record<any, any>[]) => validateJson(_rule, val, '输入参数', false) },
|
{ validator: (_rule: Rule, val: Record<any, any>[]) => validateJson(_rule, val, '输入参数', false) },
|
||||||
]">
|
]">
|
||||||
<JsonParam v-model:value="value.inputs" :name="['inputs']"></JsonParam>
|
<JsonParam v-model:value="value.inputs" :name="['inputs']" :is-sub="false"></JsonParam>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
<value-type-form :name="['output']" v-model:value="value.output" key="function" title="输出参数" :required="false"></value-type-form>
|
<value-type-form :name="['output']" v-model:value="value.output" key="function" title="输出参数" :required="false"></value-type-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -109,7 +109,7 @@ const save = reactive({
|
||||||
if (props?.type === 'device') {
|
if (props?.type === 'device') {
|
||||||
instanceStore.refresh(id as string)
|
instanceStore.refresh(id as string)
|
||||||
} else {
|
} else {
|
||||||
productStore.refresh(id as string)
|
productStore.getDetail(id as string)
|
||||||
}
|
}
|
||||||
// Store.set(SystemConst.REFRESH_METADATA_TABLE, true);
|
// Store.set(SystemConst.REFRESH_METADATA_TABLE, true);
|
||||||
if (deploy) {
|
if (deploy) {
|
||||||
|
@ -125,7 +125,7 @@ const save = reactive({
|
||||||
}
|
}
|
||||||
// Store.set('product-deploy', deploy);
|
// Store.set('product-deploy', deploy);
|
||||||
} else {
|
} else {
|
||||||
save.resetMetadata();
|
// save.resetMetadata();
|
||||||
message.success({
|
message.success({
|
||||||
key: 'metadata',
|
key: 'metadata',
|
||||||
content: '操作成功!',
|
content: '操作成功!',
|
||||||
|
@ -133,9 +133,9 @@ const save = reactive({
|
||||||
}
|
}
|
||||||
metadataStore.set('edit', false)
|
metadataStore.set('edit', false)
|
||||||
metadataStore.set('item', {})
|
metadataStore.set('item', {})
|
||||||
if (instanceStore.detail) {
|
// if (props?.type === 'device' && instanceStore.detail) {
|
||||||
instanceStore.detail.independentMetadata = true;
|
// instanceStore.detail.independentMetadata = true;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message.error('操作失败!');
|
message.error('操作失败!');
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
}">
|
}">
|
||||||
<AIcon type="EditOutlined" />
|
<AIcon type="EditOutlined" />
|
||||||
</PermissionButton>
|
</PermissionButton>
|
||||||
<PermissionButton :has-permission="`${permission}:delete`" type="link" key="delete" style="padding: 0"
|
<PermissionButton :has-permission="`${permission}:delete`" type="link" key="delete" style="padding: 0" danger
|
||||||
:pop-confirm="{
|
:pop-confirm="{
|
||||||
title: '确认删除?', onConfirm: async () => {
|
title: '确认删除?', onConfirm: async () => {
|
||||||
await removeItem(record);
|
await removeItem(record);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<j-tabs @change="handleConvertMetadata" destroy-inactive-tab-pane>
|
<j-tabs @change="handleConvertMetadata" destroy-inactive-tab-pane>
|
||||||
<j-tab-pane v-for="item in codecs" :key="item.id" :tab="item.name">
|
<j-tab-pane v-for="item in codecs" :key="item.id" :tab="item.name">
|
||||||
<div class="cat-panel">
|
<div class="cat-panel">
|
||||||
<MonacoEditor v-model="value" theme="vs" style="height: 100%"></MonacoEditor>
|
<JMonacoEditor v-model="value" theme="vs" style="height: 100%" lang="javascript"></JMonacoEditor>
|
||||||
</div>
|
</div>
|
||||||
</j-tab-pane>
|
</j-tab-pane>
|
||||||
</j-tabs>
|
</j-tabs>
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
<j-form-item label="选择产品" v-bind="validateInfos.copy" v-if="formModel.type === 'copy'">
|
<j-form-item label="选择产品" v-bind="validateInfos.copy" v-if="formModel.type === 'copy'">
|
||||||
<j-select :options="productList" v-model:value="formModel.copy" option-filter-prop="label"></j-select>
|
<j-select :options="productList" v-model:value="formModel.copy" option-filter-prop="label"></j-select>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
<j-form-item label="物模型类型" v-bind="validateInfos.metadata"
|
<j-form-item label="物模型类型" v-bind="validateInfos.metadata" v-if="type === 'device' || formModel.type === 'import'">
|
||||||
v-if="type === 'device' || formModel.type === 'import'">
|
|
||||||
<j-select v-model:value="formModel.metadata">
|
<j-select v-model:value="formModel.metadata">
|
||||||
<j-select-option value="jetlinks">Jetlinks物模型</j-select-option>
|
<j-select-option value="jetlinks">Jetlinks物模型</j-select-option>
|
||||||
<j-select-option value="alink">阿里云物模型TSL</j-select-option>
|
<j-select-option value="alink">阿里云物模型TSL</j-select-option>
|
||||||
|
@ -34,16 +33,23 @@
|
||||||
<j-form-item label="文件上传" v-bind="validateInfos.upload" v-if="formModel.metadataType === 'file'">
|
<j-form-item label="文件上传" v-bind="validateInfos.upload" v-if="formModel.metadataType === 'file'">
|
||||||
<j-input v-model:value="formModel.upload">
|
<j-input v-model:value="formModel.upload">
|
||||||
<template #addonAfter>
|
<template #addonAfter>
|
||||||
<j-upload v-model:file-list="fileList" :before-upload="beforeUpload" accept=".json"
|
<j-upload v-model:file-list="fileList" :before-upload="beforeUpload" accept=".json" :show-upload-list="false"
|
||||||
:show-upload-list="false" :action="FILE_UPLOAD" @change="fileChange"
|
:action="FILE_UPLOAD" @change="fileChange" :headers="{ 'X-Access-Token': getToken() }">
|
||||||
:headers="{ 'X-Access-Token': getToken()}">
|
|
||||||
<AIcon type="UploadOutlined" class="upload-button" />
|
<AIcon type="UploadOutlined" class="upload-button" />
|
||||||
</j-upload>
|
</j-upload>
|
||||||
</template>
|
</template>
|
||||||
</j-input>
|
</j-input>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
<j-form-item label="物模型" v-bind="validateInfos.import" v-if="formModel.metadataType === 'script'">
|
<j-form-item v-bind="validateInfos.import" v-if="formModel.metadataType === 'script'">
|
||||||
<MonacoEditor v-model="formModel.import" theme="vs" style="height: 300px"></MonacoEditor>
|
<template #label>
|
||||||
|
<j-space>
|
||||||
|
物模型
|
||||||
|
<j-tooltip title="在线编辑器中编写物模型脚本">
|
||||||
|
<AIcon type="QuestionCircleOutlined" style="color: rgb(136, 136, 136);"/>
|
||||||
|
</j-tooltip>
|
||||||
|
</j-space>
|
||||||
|
</template>
|
||||||
|
<JMonacoEditor v-model="formModel.import" theme="vs" style="height: 300px" lang="javascript"></JMonacoEditor>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
</j-form>
|
</j-form>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
|
@ -60,7 +66,6 @@ import { useInstanceStore } from '@/store/instance'
|
||||||
import { useProductStore } from '@/store/product';
|
import { useProductStore } from '@/store/product';
|
||||||
import { FILE_UPLOAD } from '@/api/comm';
|
import { FILE_UPLOAD } from '@/api/comm';
|
||||||
import { getToken } from '@/utils/comm';
|
import { getToken } from '@/utils/comm';
|
||||||
import MonacoEditor from '@/components/MonacoEditor/index.vue'
|
|
||||||
import { useMetadataStore } from '@/store/metadata';
|
import { useMetadataStore } from '@/store/metadata';
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
@ -250,7 +255,7 @@ const handleImport = async () => {
|
||||||
resp = await modify(id as string, params)
|
resp = await modify(id as string, params)
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (resp.status === 200) {
|
if (resp.success) {
|
||||||
if (props?.type === 'device') {
|
if (props?.type === 'device') {
|
||||||
const detail = instanceStore.current
|
const detail = instanceStore.current
|
||||||
detail.metadata = paramsDevice
|
detail.metadata = paramsDevice
|
||||||
|
@ -290,6 +295,7 @@ const handleImport = async () => {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-button {
|
.upload-button {
|
||||||
width: 37px;
|
width: 37px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<j-card>
|
<j-card>
|
||||||
<div class='device-detail-metadata' style="position: relative;">
|
<div class='device-detail-metadata' style="position: relative;">
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
<j-tooltip v-if="type === 'device'" :title="instanceStore.detail?.independentMetadata && type === 'device'
|
<j-tooltip :title="instanceStore.detail?.independentMetadata && type === 'device'
|
||||||
? '该设备已脱离产品物模型,修改产品物模型对该设备无影响'
|
? '该设备已脱离产品物模型,修改产品物模型对该设备无影响'
|
||||||
: '设备会默认继承产品的物模型,修改设备物模型后将脱离产品物模型'">
|
: '设备会默认继承产品的物模型,修改设备物模型后将脱离产品物模型'">
|
||||||
<div class="ellipsis">
|
<div class="ellipsis">
|
||||||
|
@ -84,11 +84,11 @@ const resetMetadata = async () => {
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.device-detail-metadata {
|
.device-detail-metadata {
|
||||||
.tips {
|
.tips {
|
||||||
width: calc(100% - 670px);
|
// width: calc(100% - 670px);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
margin-left: 380px;
|
margin-left: 420px;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -255,7 +255,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { modalState, formState, logoState } from '../data/interface';
|
import { modalState, formState, logoState } from '../data/interface';
|
||||||
import { getImage } from '@/utils/comm.ts';
|
import { getImage } from '@/utils/comm.ts';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form, message } from 'jetlinks-ui-components';
|
||||||
import { FILE_UPLOAD } from '@/api/comm';
|
import { FILE_UPLOAD } from '@/api/comm';
|
||||||
import {
|
import {
|
||||||
getSystemPermission,
|
getSystemPermission,
|
||||||
|
@ -274,8 +274,6 @@ import {
|
||||||
deployDevice,
|
deployDevice,
|
||||||
saveInit,
|
saveInit,
|
||||||
} from '@/api/initHome';
|
} from '@/api/initHome';
|
||||||
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
import { SystemConst } from '@/utils/consts'
|
import { SystemConst } from '@/utils/consts'
|
||||||
|
@ -362,7 +360,7 @@ const saveBasicInfo = () =>{
|
||||||
resolve(false);
|
resolve(false);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error: ValidateErrorEntity<formState>) => {
|
.catch(() => {
|
||||||
resolve(false);
|
resolve(false);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
@ -129,9 +129,8 @@ import {
|
||||||
deployDevice,
|
deployDevice,
|
||||||
} from '@/api/initHome';
|
} from '@/api/initHome';
|
||||||
import { modalState } from '../data/interface';
|
import { modalState } from '../data/interface';
|
||||||
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
||||||
import type { Rule } from 'ant-design-vue/es/form';
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
import { message } from 'ant-design-vue/es';
|
import { message } from 'jetlinks-ui-components';
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
/**
|
/**
|
||||||
* 初始化数据状态
|
* 初始化数据状态
|
||||||
|
@ -315,7 +314,7 @@ const saveCurrentData = () => {
|
||||||
resolve(false);
|
resolve(false);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error: ValidateErrorEntity<modalState>) => {
|
.catch(() => {
|
||||||
resolve(false);
|
resolve(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -65,33 +65,16 @@ import Basic from './Basic/index.vue';
|
||||||
import Role from './Role/index.vue';
|
import Role from './Role/index.vue';
|
||||||
import Menu from './Menu/index.vue';
|
import Menu from './Menu/index.vue';
|
||||||
import InitData from './InitData/index.vue';
|
import InitData from './InitData/index.vue';
|
||||||
import {
|
|
||||||
PlusOutlined,
|
|
||||||
ExclamationCircleOutlined,
|
|
||||||
LoadingOutlined,
|
|
||||||
} from '@ant-design/icons-vue';
|
|
||||||
|
|
||||||
import type {
|
|
||||||
FormInstance,
|
|
||||||
UploadChangeParam,
|
|
||||||
UploadProps,
|
|
||||||
} from 'ant-design-vue';
|
|
||||||
import { modalState, formState, logoState } from './data/interface';
|
import { modalState, formState, logoState } from './data/interface';
|
||||||
import { saveInit } from '@/api/initHome';
|
import { saveInit } from '@/api/initHome';
|
||||||
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
|
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
|
||||||
import { FILE_UPLOAD } from '@/api/comm';
|
import { FILE_UPLOAD } from '@/api/comm';
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import { Form } from 'ant-design-vue';
|
|
||||||
const basicRef = ref();
|
const basicRef = ref();
|
||||||
const roleRef = ref();
|
const roleRef = ref();
|
||||||
const initDataRef = ref();
|
const initDataRef = ref();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
// const useForm = Form.useForm;
|
|
||||||
// const { resetFields, validate, validateInfos } = useForm(
|
|
||||||
// modalForm.value,
|
|
||||||
// rulesModle.value,
|
|
||||||
// );
|
|
||||||
/**
|
/**
|
||||||
* 默认打开第一个初始菜单
|
* 默认打开第一个初始菜单
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -49,9 +49,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Form } from 'ant-design-vue';
|
|
||||||
import { saveOutputData } from '@/api/rule-engine/config';
|
import { saveOutputData } from '@/api/rule-engine/config';
|
||||||
import { message } from 'ant-design-vue/es';
|
import { Form, message } from 'jetlinks-ui-components';
|
||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const Myprops = defineProps({
|
const Myprops = defineProps({
|
||||||
|
|
|
@ -59,9 +59,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Form } from 'ant-design-vue';
|
|
||||||
import { saveOutputData } from '@/api/rule-engine/config';
|
import { saveOutputData } from '@/api/rule-engine/config';
|
||||||
import { message } from 'ant-design-vue/es';
|
import { Form, message } from 'jetlinks-ui-components';
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
const Myprops = defineProps({
|
const Myprops = defineProps({
|
||||||
|
|
|
@ -186,11 +186,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import InputSave from './Save/input.vue';
|
import InputSave from './Save/input.vue';
|
||||||
import OutputSave from './save/output.vue';
|
import OutputSave from './save/output.vue';
|
||||||
import {
|
|
||||||
EditOutlined,
|
|
||||||
DeleteOutlined,
|
|
||||||
PlusOutlined,
|
|
||||||
} from '@ant-design/icons-vue';
|
|
||||||
import { getDataExchange } from '@/api/rule-engine/config';
|
import { getDataExchange } from '@/api/rule-engine/config';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { marked } from 'marked';
|
import { marked } from 'marked';
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { queryLevel, saveLevel } from '@/api/rule-engine/config';
|
import { queryLevel, saveLevel } from '@/api/rule-engine/config';
|
||||||
import { LevelItem } from './typing';
|
import { LevelItem } from './typing';
|
||||||
import { message } from 'ant-design-vue/es';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import Io from './Io/index.vue'
|
import Io from './Io/index.vue'
|
||||||
const list = ref([
|
const list = ref([
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,7 +56,7 @@ import { getTargetTypes, save, detail } from '@/api/rule-engine/configuration';
|
||||||
import { queryLevel } from '@/api/rule-engine/config';
|
import { queryLevel } from '@/api/rule-engine/config';
|
||||||
import { query } from '@/api/rule-engine/scene';
|
import { query } from '@/api/rule-engine/scene';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import { useMenuStore } from '@/store/menu';
|
import { useMenuStore } from '@/store/menu';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useAlarmConfigurationStore } from '@/store/alarm';
|
import { useAlarmConfigurationStore } from '@/store/alarm';
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
import { query } from '@/api/rule-engine/scene';
|
import { query } from '@/api/rule-engine/scene';
|
||||||
import { bindScene } from '@/api/rule-engine/configuration';
|
import { bindScene } from '@/api/rule-engine/configuration';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '名称',
|
title: '名称',
|
||||||
|
|
|
@ -97,7 +97,7 @@ import { unbindScene } from '@/api/rule-engine/configuration';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import type { ActionsType } from '@/components/Table';
|
import type { ActionsType } from '@/components/Table';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { message } from 'ant-design-vue/es';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import Save from './save/index.vue';
|
import Save from './save/index.vue';
|
||||||
import { useAlarmConfigurationStore } from '@/store/alarm';
|
import { useAlarmConfigurationStore } from '@/store/alarm';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
|
|
@ -179,7 +179,7 @@ import {
|
||||||
import { queryLevel } from '@/api/rule-engine/config';
|
import { queryLevel } from '@/api/rule-engine/config';
|
||||||
import { Store } from 'jetlinks-store';
|
import { Store } from 'jetlinks-store';
|
||||||
import type { ActionsType } from '@/components/Table/index.vue';
|
import type { ActionsType } from '@/components/Table/index.vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { useMenuStore } from '@/store/menu';
|
import { useMenuStore } from '@/store/menu';
|
||||||
import encodeQuery from '@/utils/encodeQuery';
|
import encodeQuery from '@/utils/encodeQuery';
|
||||||
|
|
|
@ -49,7 +49,7 @@ import { detail, queryHistoryList } from '@/api/rule-engine/log';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import type { ActionsType } from '@/components/Table/index.vue';
|
import type { ActionsType } from '@/components/Table/index.vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import { useAlarmStore } from '@/store/alarm';
|
import { useAlarmStore } from '@/store/alarm';
|
||||||
import Info from './info.vue';
|
import Info from './info.vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Empty } from 'ant-design-vue';
|
import { Empty } from 'jetlinks-ui-components';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { useMenuStore } from '@/store/menu';
|
import { useMenuStore } from '@/store/menu';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { saveRule, modify } from '@/api/rule-engine/instance';
|
import { saveRule, modify } from '@/api/rule-engine/instance';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
|
|
||||||
const emit = defineEmits(['success', 'closeSave']);
|
const emit = defineEmits(['success', 'closeSave']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
|
@ -148,7 +148,7 @@ import {
|
||||||
} from '@/api/rule-engine/instance';
|
} from '@/api/rule-engine/instance';
|
||||||
import type { ActionsType } from '@/components/Table/index.vue';
|
import type { ActionsType } from '@/components/Table/index.vue';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'jetlinks-ui-components';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import { SystemConst } from '@/utils/consts';
|
import { SystemConst } from '@/utils/consts';
|
||||||
const params = ref<Record<string, any>>({});
|
const params = ref<Record<string, any>>({});
|
||||||
|
|
Loading…
Reference in New Issue