Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
XieYongHong 2023-10-20 18:09:15 +08:00
commit 50a9d83270
7 changed files with 12 additions and 9 deletions

View File

@ -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 }"

View File

@ -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>

View File

@ -243,11 +243,11 @@ const columns = [
options: [ options: [
{ {
label: '正常', label: '正常',
value: 'started', value: 'enabled',
}, },
{ {
label: '禁用', label: '禁用',
value: 'disable', value: 'disabled',
}, },
], ],
}, },

View File

@ -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('操作成功');

View File

@ -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)"

View File

@ -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"

View File

@ -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"
/> />