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