Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev

This commit is contained in:
100011797 2023-03-20 10:44:55 +08:00
commit f88a3d22aa
21 changed files with 98 additions and 37 deletions

View File

@ -106,7 +106,7 @@ const slots = useSlots();
const props = defineProps({
value: {
type: Object as PropType<Record<string, any>>,
default: () => {},
default: () => ({}),
},
showStatus: {
type: Boolean,
@ -126,6 +126,7 @@ const props = defineProps({
},
statusNames: {
type: Object,
default:()=>({'default':'default'})
},
actions: {
type: Array as PropType<TableActionsType[]>,

View File

@ -1,4 +1,41 @@
.ant-form-item-required:before {
position: absolute;
right: -12px;
}
}
// 说明文档样式
.doc {
height: 750px;
padding: 24px;
overflow-y: auto;
color: rgba(#000, 0.8);
font-size: 14px;
background-color: #fafafa;
.url {
padding: 8px 16px;
color: #2f54eb;
background-color: rgba(#a7bdf7, 0.2);
}
h1 {
margin: 16px 0;
color: rgba(#000, 0.85);
font-weight: bold;
font-size: 14px;
&:first-child {
margin-top: 0;
}
}
h2 {
margin: 6px 0;
color: rgba(0, 0, 0, 0.8);
font-size: 14px;
}
.image {
margin: 16px 0;
}
}

View File

@ -11,12 +11,12 @@
</div>
</template>
<j-descriptions-item label="ID">{{
productStore.current.id
}}</j-descriptions-item>
<j-descriptions-item label="产品分类">{{
productStore.current.classifiedName
}}</j-descriptions-item>
<j-descriptions-item label="ID">
<Ellipsis>{{ productStore.current.id }}</Ellipsis>
</j-descriptions-item>
<j-descriptions-item label="产品分类">
<Ellipsis>{{ productStore.current.classifiedName }}</Ellipsis>
</j-descriptions-item>
<j-descriptions-item label="设备类型">{{
productStore.current.deviceType?.text
}}</j-descriptions-item>
@ -29,10 +29,14 @@
}}</j-button>
</j-descriptions-item>
<j-descriptions-item label="创建时间">{{
moment(productStore.current.createTime).format('YYYY-MM-DD HH:mm:ss')
moment(productStore.current.createTime).format(
'YYYY-MM-DD HH:mm:ss',
)
}}</j-descriptions-item>
<j-descriptions-item label="更新时间">{{
moment(productStore.current.modifyTime).format('YYYY-MM-DD HH:mm:ss')
moment(productStore.current.modifyTime).format(
'YYYY-MM-DD HH:mm:ss',
)
}}</j-descriptions-item>
<j-descriptions-item label="说明" :span="3">
@ -41,7 +45,7 @@
</j-descriptions>
</j-card>
<!-- 编辑 -->
<Save ref="saveRef" :isAdd="isAdd" :title="title" @success="refresh"/>
<Save ref="saveRef" :isAdd="isAdd" :title="title" @success="refresh" />
</template>
<script lang="ts" setup>
@ -74,7 +78,7 @@ const changeTables = () => {
/**
* 修改成功刷新
*/
const refresh = () =>{
const refresh = () => {
productStore.refresh(route.params.id as string);
}
};
</script>

View File

@ -8,7 +8,14 @@
<template #title>
<div>
<div style="display: flex; align-items: center">
<div>{{ productStore.current.name }}</div>
<a-tooltip>
<template #title>{{
productStore.current.name
}}</template>
<div class="productDetailHead">
{{ productStore.current.name }}
</div>
</a-tooltip>
<div style="margin: -5px 0 0 20px">
<j-popconfirm
title="确认禁用"
@ -237,15 +244,19 @@ const jumpDevice = () => {
termType: 'eq',
value: productStore.current?.id,
};
menuStory.jumpPage('device/Instance',{},{
target: 'device-instance',
q: JSON.stringify({ terms: [{ terms: [{searchParams}] }] }),
});
menuStory.jumpPage(
'device/Instance',
{},
{
target: 'device-instance',
q: JSON.stringify({ terms: [{ terms: [{ searchParams }] }] }),
},
);
};
onMounted(() => {
getProtocol();
if(history.state?.params?.tab){
productStore.tabActiveKey = history.state?.params?.tab
if (history.state?.params?.tab) {
productStore.tabActiveKey = history.state?.params?.tab;
}
});
</script>
@ -254,4 +265,11 @@ onMounted(() => {
.ant-switch-disabled {
cursor: not-allowed;
}
.productDetailHead {
width: 50%;
overflow: hidden;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -239,6 +239,7 @@
placeholder="请选择IP地址"
:options="allList"
@change="setPorts"
showSearch
/>
</j-col>
<j-col :span="10">
@ -766,5 +767,5 @@ const handleSubmit = () => {
</script>
<style lang="less" scoped>
@import './index.less';
// @import './index.less';
</style>

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
const Email = () => {
return (

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
const Webhook = () => {
return (

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
const AliyunSms = () => {
return (

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
const AliyunVoice = () => {
return (

View File

@ -1,5 +1,5 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
const DingTalkRebot = () => {
const b = '{name}';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
const Email = () => {
const a = '{标题}';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
const Webhook = () => {
return (

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';

View File

@ -1,4 +1,4 @@
import './index.less';
// import './index.less';
import { Image } from 'ant-design-vue';
import { getImage } from '@/utils/comm';