diff --git a/src/views/device/Product/index.vue b/src/views/device/Product/index.vue index 364bf578..567bf0b9 100644 --- a/src/views/device/Product/index.vue +++ b/src/views/device/Product/index.vue @@ -470,8 +470,8 @@ const query = reactive({ }, { title: '接入方式', - key: 'accessName', - dataIndex: 'accessName', + key: 'accessId', + dataIndex: 'accessId', search: { type: 'select', options: async () => { @@ -482,7 +482,7 @@ const query = reactive({ typeList.value = []; typeList.value = resp.result.map((item: any) => ({ label: item.name, - value: item.name, + value: item.id, })); res(typeList.value); }); diff --git a/src/views/rule-engine/Alarm/Configuration/index.vue b/src/views/rule-engine/Alarm/Configuration/index.vue index 265d52d3..c6ad66b1 100644 --- a/src/views/rule-engine/Alarm/Configuration/index.vue +++ b/src/views/rule-engine/Alarm/Configuration/index.vue @@ -271,11 +271,11 @@ const columns = [ }, { title: '关联场景联动', - dataIndex: 'sceneId', - wdith: 250, + dataIndex: 'scene', scopedSlots: true, search: { type: 'select', + // defaultTermType: 'rule-bind-alarm', options: async () => { const res = await getScene( encodeQuery({ @@ -338,7 +338,23 @@ const map = { other: '其他', }; const handleSearch = (e: any) => { - params.value = e; + const _terms = (e?.terms || []).map((item: any) => { + item.terms = item.terms.map((i: any) => { + if(i.column === 'scene'){ + return { + ...i, + termType: 'rule-bind-alarm', + column: 'id' + } + } + return i + }) + return item + }) + params.value = { + ...e, + terms: _terms + } }; const queryDefaultLevel = () => { queryLevel().then((res) => { diff --git a/src/views/rule-engine/Scene/Save/action/Notify/variableItem/User.vue b/src/views/rule-engine/Scene/Save/action/Notify/variableItem/User.vue index d955afc5..923c4e9d 100644 --- a/src/views/rule-engine/Scene/Save/action/Notify/variableItem/User.vue +++ b/src/views/rule-engine/Scene/Save/action/Notify/variableItem/User.vue @@ -38,7 +38,7 @@ v-if="['email'].includes(notifyType)" style="width: calc(100% - 120px)" placeholder="请选择收信人" - @change="(key, label) => onChange(source, key, false, label)" + @change="(key, label) => onChange(source, key, label)" :tree-data="treeData" :multiple="true" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" @@ -66,7 +66,7 @@ style="width: calc(100% - 120px)" placeholder="请选择收信人" @change=" - (key, label) => onChange(source, key, undefined, label) + (key, label) => onChange(source, key, label) " :tree-data="treeData" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" @@ -102,7 +102,6 @@ onChange( source, val, - false, option?.label || option?.name, ) " @@ -120,7 +119,6 @@ onChange( source, val, - false, Array.isArray(val) ? val.join(',') : val, ) " @@ -132,7 +130,7 @@ :value="value?.value" @change=" (e) => - onChange(source, e.target.value, false, e.target.value) + onChange(source, e.target.value, e.target.value) " > @@ -183,7 +181,13 @@ const triggerType = computed(() => { const relationData = computed(() => { const item = props.value; - if (item?.source === 'relation') { + if(notifyType.value === 'email'){ + if(item && Array.isArray(item) && item.length){ + if(item[0].source === 'relation'){ + return item.map(i => i?.relation?.objectId) + } + } + } else if (item?.source === 'relation') { const relation = item?.relation; if (relation) { if (relation.objectId) { @@ -324,7 +328,7 @@ const getObj = ( const onChange = ( _source: string = 'fixed', _value?: string | string[], - isRelation?: boolean, + // isRelation?: boolean, _name?: string, ) => { let _values: any = undefined; @@ -332,16 +336,15 @@ const onChange = ( const _names: string[] = Array.isArray(_name) ? _name : [_name || '']; if (Array.isArray(_value)) { if (props?.notify?.notifyType === 'email') { - if (isRelation) { - const arr = _value.map((item) => { - const _item = labelMap.get(item); - _names.push(_item?.name || ''); - return getObj('relation', item, _item?.relation); - }); - _values = arr; - } else { - _values = getObj(_source, _value, false); - } + _values = _value.map((item) => { + return { + source: "relation", + relation:{ + objectType: "user", + objectId: item + } + } + }); } } else { const item = treeDataMap.get(_value) diff --git a/src/views/system/Menu/Detail/BasicInfo.vue b/src/views/system/Menu/Detail/BasicInfo.vue index e070b92a..b6b443b3 100644 --- a/src/views/system/Menu/Detail/BasicInfo.vue +++ b/src/views/system/Menu/Detail/BasicInfo.vue @@ -149,7 +149,7 @@ :model="form.data" class="basic-form permiss-form" > - +