Merge branch 'dev' into dev-dictionary
This commit is contained in:
commit
5a9d4514fe
|
@ -395,6 +395,7 @@ const setDevMesChartOption = (
|
|||
y: Array<number>,
|
||||
maxY: number,
|
||||
): void => {
|
||||
const yLen = String(Math.ceil(maxY)).length
|
||||
devMegOptions.value = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
|
@ -412,7 +413,7 @@ const setDevMesChartOption = (
|
|||
grid: {
|
||||
top: '2%',
|
||||
bottom: '5%',
|
||||
left: maxY > 100000 ? '50px' : '70px',
|
||||
left: maxY < 900000 ? '60px' : (yLen * 7.5 + Math.floor(yLen/3) * 1.2 + 10) + 'px',
|
||||
right: '50px',
|
||||
},
|
||||
series: [
|
||||
|
@ -596,8 +597,9 @@ const getEcharts = (data: any) => {
|
|||
const y = res.result.map((item: any) => item.data.value).reverse();
|
||||
const maxY = Math.max.apply(
|
||||
null,
|
||||
messageChartYData.value.length ? messageChartYData.value : [0],
|
||||
y.length ? y : [0],
|
||||
);
|
||||
|
||||
setDevMesChartOption(x, y, maxY);
|
||||
}
|
||||
});
|
||||
|
@ -623,4 +625,4 @@ getDevice();
|
|||
height: 500px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
v-model:value="record[column.dataIndex]"
|
||||
placeholder="请选择"
|
||||
allowClear
|
||||
show-search
|
||||
:filter-option="filterOption"
|
||||
:options="channelList"
|
||||
@select="(_, option) => { record.provider = option.provider }"
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
<template>
|
||||
<j-select allowClear v-model:value="_value" @change="onChange" placeholder="请选择" style="width: 100%">
|
||||
<j-select allowClear v-model:value="_value" @change="onChange" placeholder="请选择" style="width: 100%" show-search :filter-option="filterOption">
|
||||
<j-select-option
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
:filter-option="filterOption"
|
||||
>{{ item.name }}</j-select-option
|
||||
>
|
||||
</j-select>
|
||||
|
|
|
@ -243,11 +243,11 @@ const columns = [
|
|||
options: [
|
||||
{
|
||||
label: '正常',
|
||||
value: 'started',
|
||||
value: 'enabled',
|
||||
},
|
||||
{
|
||||
label: '禁用',
|
||||
value: 'disable',
|
||||
value: 'disabled',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -389,8 +389,7 @@ const beforeUpload = (file: any) => {
|
|||
reader.readAsText(file);
|
||||
reader.onload = async (result) => {
|
||||
const text = result.target?.result;
|
||||
// console.log('text: ', text);
|
||||
// console.log(file);
|
||||
console.log(text);
|
||||
if (!file.type.includes('json')) {
|
||||
onlyMessage('请上传json格式文件', 'error');
|
||||
return false;
|
||||
|
@ -410,6 +409,10 @@ const beforeUpload = (file: any) => {
|
|||
if(!data?.name){
|
||||
data.name = "产品" + Date.now();
|
||||
}
|
||||
if(!data?.deviceType || JSON.stringify(data?.deviceType) === '{}' ){
|
||||
onlyMessage('缺少deviceType字段或对应的值','error')
|
||||
return false
|
||||
}
|
||||
const res = await updateDevice(data);
|
||||
if (res.status === 200) {
|
||||
onlyMessage('操作成功');
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
<template #label>
|
||||
<j-space>
|
||||
物模型
|
||||
<j-tooltip title="在线编辑器中编写物模型脚本">
|
||||
<j-tooltip title="在编辑器中编写物模型脚本">
|
||||
<AIcon
|
||||
type="QuestionCircleOutlined"
|
||||
style="color: rgb(136, 136, 136)"
|
||||
|
|
|
@ -31,7 +31,7 @@ const handle = async (appId: string, url: string) => {
|
|||
let menuUrl: any = url;
|
||||
if (res.status === 200) {
|
||||
if (res.result.page.routeType === 'hash') {
|
||||
menuUrl = `${url}`;
|
||||
menuUrl = `/#${url}`;
|
||||
}
|
||||
if (res.result.provider === 'internal-standalone') {
|
||||
const urlStandalone = `${res.result.page.baseUrl}/api/application/sso/${appId}/login?redirect=${menuUrl}?layout=false`;
|
||||
|
@ -39,7 +39,7 @@ const handle = async (appId: string, url: string) => {
|
|||
} else if (res.result.provider === 'internal-integrated') {
|
||||
const tokenUrl = `${
|
||||
res.result.page.baseUrl
|
||||
}?X-Access-Token=${LocalStore.get(TOKEN_KEY)}`;
|
||||
}/${menuUrl}?layout=false&X-Access-Token=${LocalStore.get(TOKEN_KEY)}`;
|
||||
iframeUrl.value = tokenUrl;
|
||||
} else {
|
||||
const urlOther = `${res.result.page.baseUrl}/${menuUrl}`;
|
||||
|
|
|
@ -111,7 +111,7 @@ const pickerTimeChange = (value: any) => {
|
|||
};
|
||||
const changeType = (value:any) =>{
|
||||
getNetworkEcharts(data.value);
|
||||
}
|
||||
}
|
||||
const getNetworkEcharts = async (val: any) => {
|
||||
loading.value = true;
|
||||
const resp: any = await dashboard(networkParams(val));
|
||||
|
@ -149,10 +149,16 @@ const getNetworkEcharts = async (val: any) => {
|
|||
|
||||
const formatterData = (value: any) => {
|
||||
let _data = '';
|
||||
if (value >= 1024 && value < 1024 * 1024) {
|
||||
_data = `${Number((value / 1024).toFixed(2))}KB`;
|
||||
} else if (value >= 1024 * 1024) {
|
||||
_data = `${Number((value / 1024 / 1024).toFixed(2))}M`;
|
||||
const kb = 1024
|
||||
const mb = kb**2
|
||||
const gb = kb**3
|
||||
|
||||
if (value >= kb && value < mb) {
|
||||
_data = `${Number((value / kb).toFixed(2))}KB`;
|
||||
} else if (value >= mb && value < gb) {
|
||||
_data = `${Number((value / mb).toFixed(2))}M`;
|
||||
} else if (value >= gb) {
|
||||
_data = `${Number((value / gb).toFixed(2))}G`;
|
||||
} else {
|
||||
_data = `${value}B`;
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
<div>
|
||||
1、平台支持将告警数据输出到kafka,第三方系统可订阅kafka中的告警数据,进行业务处理。
|
||||
</div>
|
||||
<h2>输出参数</h2>
|
||||
<h2>推送参数</h2>
|
||||
<div>
|
||||
<j-table
|
||||
:dataSource="outputData"
|
||||
|
|
|
@ -208,10 +208,17 @@ const columns = [
|
|||
},
|
||||
{
|
||||
dataIndex: 'id$dim-assets',
|
||||
key: 'id$dim-assets',
|
||||
title: '所属组织',
|
||||
hideInTable: true,
|
||||
search: {
|
||||
type: 'treeSelect',
|
||||
componentProps: {
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'value',
|
||||
},
|
||||
},
|
||||
options: () =>
|
||||
new Promise((resolve) => {
|
||||
getTreeData_api({ paging: false }).then((resp: any) => {
|
||||
|
@ -256,6 +263,7 @@ const productQuery = (p: any) => {
|
|||
}
|
||||
sorts.push({ name: 'createTime', order: 'desc' });
|
||||
p.sorts = sorts;
|
||||
console.log('productQuery',p)
|
||||
return queryProductList(p);
|
||||
};
|
||||
|
||||
|
@ -289,4 +297,4 @@ onMounted(() => {
|
|||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -109,13 +109,17 @@ const upperOptions = computed(() => {
|
|||
});
|
||||
|
||||
const onChange = () => {
|
||||
const objValue: any = { source: _source.value, value: _value.value }
|
||||
if (_source.value === 'upper') {
|
||||
objValue.upperKey = _value.value
|
||||
}
|
||||
emit('update:value', _value.value);
|
||||
emit('update:source', _source.value);
|
||||
emit('change', { source: _source.value, value: _value.value });
|
||||
emit('change', objValue);
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
_value.value = props.value;
|
||||
_source.value = props.source || 'fixed';
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -173,11 +173,18 @@ const onChange = () => {
|
|||
|
||||
const onValueChange = (val: any, label: string) => {
|
||||
const optionColumn = isObject(val) && (val as any).metadata ? [(val as any).column] : []
|
||||
|
||||
const objectValue: any = {
|
||||
value: propertyModelRef?.propertiesValue,
|
||||
source: propertyModelRef?.source,
|
||||
}
|
||||
|
||||
if (propertyModelRef?.source === 'upper') {
|
||||
objectValue.upperKey = propertyModelRef?.propertiesValue
|
||||
}
|
||||
|
||||
const obj = {
|
||||
[`${propertyModelRef.properties}`]: {
|
||||
value: propertyModelRef?.propertiesValue,
|
||||
source: propertyModelRef?.source,
|
||||
},
|
||||
[`${propertyModelRef.properties}`]: objectValue
|
||||
};
|
||||
emit('update:value', obj);
|
||||
emit('change', label || val, optionColumn)
|
||||
|
@ -212,4 +219,4 @@ const onSave = () => {
|
|||
};
|
||||
|
||||
defineExpose({ onSave });
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
v-if="refStr"
|
||||
ref="editorRef"
|
||||
language="json"
|
||||
style="height: 100%"
|
||||
style="height: 100% ; min-height: 200px;"
|
||||
theme="vs"
|
||||
v-model:modelValue="requestBody.code"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue