parent
97363057f0
commit
7bf000925b
|
@ -529,7 +529,7 @@ export const getPropertiesInfo = (deviceId: string, data: Record<string, unknown
|
||||||
* @param data
|
* @param data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const getPropertiesList = (deviceId: string, property: string, data: Record<string, unknown>) => server.post(`/device-instance/${deviceId}/property/${property}/_query`, data)
|
export const getPropertiesList = (deviceId: string, property: string, data: Record<string, unknown>) => server.post(`/device-instance/${deviceId}/property/${property}/_query/no-paging`, data)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定协议
|
* 获取指定协议
|
||||||
|
|
|
@ -37,7 +37,6 @@ const total = ref(0);
|
||||||
// const list = ref<any[]>([]);
|
// const list = ref<any[]>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
|
|
||||||
const subscribeNotice = () => {
|
const subscribeNotice = () => {
|
||||||
getWebSocket('notification', '/notifications', {})
|
getWebSocket('notification', '/notifications', {})
|
||||||
?.pipe()
|
?.pipe()
|
||||||
|
@ -88,9 +87,8 @@ const subscribeNotice = () => {
|
||||||
const read = (type: string, data: any) => {
|
const read = (type: string, data: any) => {
|
||||||
changeStatus_api('_read', [data.payload.id]).then((resp: any) => {
|
changeStatus_api('_read', [data.payload.id]).then((resp: any) => {
|
||||||
if (resp.status !== 200) return;
|
if (resp.status !== 200) return;
|
||||||
// notification.close(data.payload.id);
|
notification.close(data.payload.id);
|
||||||
getList();
|
getList();
|
||||||
console.log(data,type)
|
|
||||||
if (type !== '_read') {
|
if (type !== '_read') {
|
||||||
menuStory.routerPush('account/center', {
|
menuStory.routerPush('account/center', {
|
||||||
tabKey: 'StationMessage',
|
tabKey: 'StationMessage',
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@ok="ok"
|
@ok="ok"
|
||||||
:confirmLoading="loading"
|
:confirmLoading="loading"
|
||||||
|
:maskClosable="false"
|
||||||
>
|
>
|
||||||
<div style="height: 300px; width: 100%;">
|
<div style="height: 300px; width: 100%;">
|
||||||
<vue-cropper
|
<vue-cropper
|
||||||
|
|
|
@ -86,4 +86,5 @@ const workflowNotice = [
|
||||||
]
|
]
|
||||||
export const getInitData = () =>{
|
export const getInitData = () =>{
|
||||||
return menuStore.hasMenu('process') ? [...systemNotice,...workflowNotice] : [...systemNotice]
|
return menuStore.hasMenu('process') ? [...systemNotice,...workflowNotice] : [...systemNotice]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,13 +19,17 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<j-form layout="vertical" ref="formRef" :model="modelRef">
|
<j-form layout="vertical" ref="formRef" :model="modelRef">
|
||||||
<template v-for="(item, index) in (props.config || [])" :key="index">
|
<template v-for="(item, index) in props.config || []" :key="index">
|
||||||
<j-form-item
|
<j-form-item
|
||||||
v-for="i in item.properties"
|
v-for="i in item.properties"
|
||||||
:name="i.property"
|
:name="i.property"
|
||||||
:key="i.property"
|
:key="i.property"
|
||||||
:required='!!i.type.expands?.required'
|
:required="!!i.type.expands?.required"
|
||||||
:rules='!!i.type.expands?.required ? [{ required: true, message: `请输入${i.name}`}] :[]'
|
:rules="
|
||||||
|
!!i.type.expands?.required
|
||||||
|
? [{ required: true, message: `请输入${i.name}` }]
|
||||||
|
: []
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<span style="margin-right: 5px">{{ i.name }}</span>
|
<span style="margin-right: 5px">{{ i.name }}</span>
|
||||||
|
@ -36,16 +40,7 @@
|
||||||
<ValueItem
|
<ValueItem
|
||||||
v-model:modelValue="modelRef[i.property]"
|
v-model:modelValue="modelRef[i.property]"
|
||||||
:itemType="i.type.type"
|
:itemType="i.type.type"
|
||||||
:options="
|
:options="getOptions(i)"
|
||||||
i.type.type === 'enum'
|
|
||||||
? (i.type?.elements || []).map((item) => {
|
|
||||||
return {
|
|
||||||
label: item?.text,
|
|
||||||
value: item?.value,
|
|
||||||
};
|
|
||||||
})
|
|
||||||
: undefined
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
@ -68,23 +63,44 @@ const instanceStore = useInstanceStore();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
config: {
|
config: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: [],
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
|
const getOptions = (i: any) => {
|
||||||
|
if (i.type.type === 'enum') {
|
||||||
|
return (i.type?.elements || []).map((item) => {
|
||||||
|
return {
|
||||||
|
label: item?.text,
|
||||||
|
value: item?.value,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
} else if (i.type.type === 'boolean') {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: i.type?.falseText,
|
||||||
|
value: i.type?.falseValue,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i.type?.trueText,
|
||||||
|
value: i.type?.trueValue,
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
const obj = instanceStore.current?.configuration
|
const obj = instanceStore.current?.configuration;
|
||||||
if (obj && Object.keys(obj).length) {
|
if (obj && Object.keys(obj).length) {
|
||||||
(props?.config || []).map((item: any) => {
|
(props?.config || []).map((item: any) => {
|
||||||
if (Array.isArray(item.properties) && item?.properties.length) {
|
if (Array.isArray(item.properties) && item?.properties.length) {
|
||||||
item.properties.map((i: any) => {
|
item.properties.map((i: any) => {
|
||||||
modelRef[i.property] = obj[i.property]
|
modelRef[i.property] = obj[i.property];
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})
|
|
||||||
|
|
||||||
const onClose = () => {
|
const onClose = () => {
|
||||||
emit('close');
|
emit('close');
|
||||||
|
@ -97,10 +113,10 @@ const saveBtn = () => {
|
||||||
const values = toRaw(modelRef);
|
const values = toRaw(modelRef);
|
||||||
const resp = await modify(instanceStore.current?.id || '', {
|
const resp = await modify(instanceStore.current?.id || '', {
|
||||||
id: instanceStore.current?.id,
|
id: instanceStore.current?.id,
|
||||||
configuration: { ...values }
|
configuration: { ...values },
|
||||||
})
|
});
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
onlyMessage('操作成功!')
|
onlyMessage('操作成功!');
|
||||||
emit('save');
|
emit('save');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,20 +328,20 @@ const requiredCheck = (data:any) =>{
|
||||||
check = true
|
check = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!item?.async && item?.async !== false){
|
// if(!item?.async && item?.async !== false){
|
||||||
onlyMessage(`方法定义第${index + 1}个数组中缺失async属性`,'error');
|
// onlyMessage(`方法定义第${index + 1}个数组中缺失async属性`,'error');
|
||||||
check = true
|
// check = true
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if(item?.inputs){
|
if(item?.inputs){
|
||||||
testObject(item.inputs,index)
|
testObject(item.inputs,index)
|
||||||
item.inputs.forEach((i:any)=>{
|
// item.inputs.forEach((i:any)=>{
|
||||||
if(!i?.expands?.required && i?.expands?.required !== false){
|
// if(!i?.expands?.required && i?.expands?.required !== false){
|
||||||
onlyMessage(`方法定义inputs第${index+1}个数组中缺失expands.required属性`,'error')
|
// onlyMessage(`方法定义inputs第${index+1}个数组中缺失expands.required属性`,'error')
|
||||||
check = true
|
// check = true
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -357,11 +357,11 @@ const requiredCheck = (data:any) =>{
|
||||||
check = true
|
check = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(!item?.async && item?.async !== false){
|
// if(!item?.async && item?.async !== false){
|
||||||
onlyMessage(`事件定义第${index + 1}个数组中缺失async属性`,'error');
|
// onlyMessage(`事件定义第${index + 1}个数组中缺失async属性`,'error');
|
||||||
check = true
|
// check = true
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if(!item?.valueType?.type){
|
if(!item?.valueType?.type){
|
||||||
onlyMessage(`事件定义第${index + 1}个数组中缺失valueType.type属性`,'error');
|
onlyMessage(`事件定义第${index + 1}个数组中缺失valueType.type属性`,'error');
|
||||||
check = true
|
check = true
|
||||||
|
|
|
@ -1506,7 +1506,6 @@ export default [
|
||||||
url: '/iot/DataCollect/Dashboard',
|
url: '/iot/DataCollect/Dashboard',
|
||||||
icon: 'icon-keshihua',
|
icon: 'icon-keshihua',
|
||||||
showPage: [
|
showPage: [
|
||||||
'dashboard',
|
|
||||||
'data-collect-channel',
|
'data-collect-channel',
|
||||||
'data-collect-opc',
|
'data-collect-opc',
|
||||||
'data-collector',
|
'data-collector',
|
||||||
|
@ -2836,7 +2835,7 @@ export default [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
buttons: [],
|
buttons: [],
|
||||||
showPage: ['dashboard', 'media-device'],
|
showPage: ['media-device'],
|
||||||
accessSupport: { text: "不支持", value: "unsupported" },
|
accessSupport: { text: "不支持", value: "unsupported" },
|
||||||
supportDataAccess: false
|
supportDataAccess: false
|
||||||
},
|
},
|
||||||
|
|
|
@ -452,8 +452,9 @@ const handleBind = (row: any) => {
|
||||||
* 绑定用户, 用户下拉筛选
|
* 绑定用户, 用户下拉筛选
|
||||||
*/
|
*/
|
||||||
const filterOption = (input: string, option: any) => {
|
const filterOption = (input: string, option: any) => {
|
||||||
|
const text = option?.componentOptions?.children?.[0]?.text || option.label
|
||||||
return (
|
return (
|
||||||
option.componentOptions.children[0].text
|
text
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.indexOf(input.toLowerCase()) >= 0
|
.indexOf(input.toLowerCase()) >= 0
|
||||||
);
|
);
|
||||||
|
|
|
@ -268,7 +268,6 @@ watch(
|
||||||
() => props.productDetail,
|
() => props.productDetail,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal?.id) {
|
if (newVal?.id) {
|
||||||
console.log(props.values)
|
|
||||||
if (props.values?.selector === 'fixed' && props.values?.selectorValues?.length === 1) {
|
if (props.values?.selector === 'fixed' && props.values?.selectorValues?.length === 1) {
|
||||||
const id = props.values?.selectorValues?.[0]?.value;
|
const id = props.values?.selectorValues?.[0]?.value;
|
||||||
if (id) {
|
if (id) {
|
||||||
|
@ -300,6 +299,8 @@ watch(
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
queryBuiltIn();
|
queryBuiltIn();
|
||||||
|
}else{
|
||||||
|
modelRef.message.properties = [] as any;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,7 +41,11 @@
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
</j-col>
|
</j-col>
|
||||||
<j-col :span="12">
|
<j-col :span="12">
|
||||||
<j-form-item label="编码" name="code" :rules="[
|
<j-form-item
|
||||||
|
label="编码"
|
||||||
|
name="code"
|
||||||
|
:validateFirst="true"
|
||||||
|
:rules="[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入编码',
|
message: '请输入编码',
|
||||||
|
|
|
@ -60,14 +60,14 @@
|
||||||
ref="variableRef"
|
ref="variableRef"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="current === 4 && isNoCommunity ">
|
<template v-if="current === 4">
|
||||||
<div class="alert">
|
<div class="alert">
|
||||||
<AIcon type="InfoCircleOutlined" />
|
<AIcon type="InfoCircleOutlined" />
|
||||||
通过角色控制哪些用户可以订阅从【{{ name }}】接收到【{{ showName }}】通知
|
通过角色控制哪些用户可以订阅从【{{ name }}】接收到【{{ showName }}】通知
|
||||||
</div>
|
</div>
|
||||||
<Role type="add" v-model="formModel.grant.role.idList" />
|
<Role type="add" v-model="formModel.grant.role.idList" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="current === 5 || current === 4 && !isNoCommunity">
|
<template v-if="current === 5">
|
||||||
<div>
|
<div>
|
||||||
<div class="alert">
|
<div class="alert">
|
||||||
<AIcon type="InfoCircleOutlined" />
|
<AIcon type="InfoCircleOutlined" />
|
||||||
|
@ -170,19 +170,13 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const stepList = isNoCommunity ? [
|
const stepList = [
|
||||||
'选择通知方式',
|
'选择通知方式',
|
||||||
'选择通知配置',
|
'选择通知配置',
|
||||||
'选择通知模板',
|
'选择通知模板',
|
||||||
'配置模板变量',
|
'配置模板变量',
|
||||||
'配置用户权限',
|
'配置用户权限',
|
||||||
'完成',
|
'完成',
|
||||||
] : [
|
|
||||||
'选择通知方式',
|
|
||||||
'选择通知配置',
|
|
||||||
'选择通知模板',
|
|
||||||
'配置模板变量',
|
|
||||||
'完成',
|
|
||||||
]
|
]
|
||||||
const current = ref<number>(0);
|
const current = ref<number>(0);
|
||||||
const variable = ref([]);
|
const variable = ref([]);
|
||||||
|
|
Loading…
Reference in New Issue