Commit 5976dc989b038d0e6c8fd1b137119678e12091a7

Authored by ww
1 parent 6e7141a4

fix: permission key update && send command params update

@@ -39,7 +39,7 @@ const GLOBAL_PLATFORM_INFO = (() => { @@ -39,7 +39,7 @@ const GLOBAL_PLATFORM_INFO = (() => {
39 /** 39 /**
40 * @description 写权限 key 40 * @description 写权限 key
41 */ 41 */
42 -const CAN_WRITE = 'api:yt:configuration:center:get_configuration_info:get' 42 +const CAN_WRITE = 'api:yt:configuration:center:get_configuration_info:design'
43 43
44 const USER_PERMISSION = { 44 const USER_PERMISSION = {
45 permission: [] 45 permission: []
@@ -5934,7 +5934,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { @@ -5934,7 +5934,7 @@ DataFormatPanel.prototype.addDataFont = function (container) {
5934 const type = graph.getAttributeForCell(cell, basicAttr.COMPONENT_TYPE) 5934 const type = graph.getAttributeForCell(cell, basicAttr.COMPONENT_TYPE)
5935 return renderMapping[type]?.(field) || {} 5935 return renderMapping[type]?.(field) || {}
5936 5936
5937 - function getSubmitValue(field) { 5937 + function getSubmitValue(field) {
5938 const ENABLED_FLAG = 'on' 5938 const ENABLED_FLAG = 'on'
5939 const additionalKey = HandleDataSource.enumConst 5939 const additionalKey = HandleDataSource.enumConst
5940 const value = { 5940 const value = {
@@ -7930,7 +7930,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { @@ -7930,7 +7930,7 @@ DataFormatPanel.prototype.addDataFont = function (container) {
7930 data: treeList, 7930 data: treeList,
7931 onlyIconControl: true, 7931 onlyIconControl: true,
7932 7932
7933 - click(node) { 7933 + click(node) {
7934 form.val(componentFilter, { 7934 form.val(componentFilter, {
7935 [enumDataSourceConst.ORG_NAME]: node?.data?.title, 7935 [enumDataSourceConst.ORG_NAME]: node?.data?.title,
7936 [enumDataSourceConst.DEVICE_ID]: null, 7936 [enumDataSourceConst.DEVICE_ID]: null,
@@ -7999,13 +7999,13 @@ DataFormatPanel.prototype.addDataFont = function (container) { @@ -7999,13 +7999,13 @@ DataFormatPanel.prototype.addDataFont = function (container) {
7999 currentDataSource = { organizationId: orgId, deviceProfileId, deviceType } 7999 currentDataSource = { organizationId: orgId, deviceProfileId, deviceType }
8000 queue.push(getProduct(deviceType)) 8000 queue.push(getProduct(deviceType))
8001 queue.push(getMeetConditionsDevice({ organizationId: orgId, deviceProfileId, deviceType })) 8001 queue.push(getMeetConditionsDevice({ organizationId: orgId, deviceProfileId, deviceType }))
8002 - queue.push(getAttrByDeviceId(deviceProfileId)) 8002 + queue.push(getAttrByDeviceId(deviceProfileId))
8003 Promise.all(queue) 8003 Promise.all(queue)
8004 .finally(() => { 8004 .finally(() => {
8005 const orgNode = UseLayUi.findTreeObjectByField(treeList, orgId) 8005 const orgNode = UseLayUi.findTreeObjectByField(treeList, orgId)
8006 8006
8007 $(`#${componentId} input[name="${enumDataSourceConst.ORG_ID}"]`).val(orgNode?.id).parent().find('span').html(orgNode?.name) 8007 $(`#${componentId} input[name="${enumDataSourceConst.ORG_ID}"]`).val(orgNode?.id).parent().find('span').html(orgNode?.name)
8008 - 8008 +
8009 form.val(componentFilter, { 8009 form.val(componentFilter, {
8010 orgId, 8010 orgId,
8011 deviceId, 8011 deviceId,
@@ -14486,6 +14486,8 @@ class HandleDataInteraction { @@ -14486,6 +14486,8 @@ class HandleDataInteraction {
14486 if (!value || !deviceId) continue 14486 if (!value || !deviceId) continue
14487 const data = { 14487 const data = {
14488 method: "methodThingskit", 14488 method: "methodThingskit",
  14489 + additionalInfo: { cmdType: 'API' },
  14490 + persistent: true,
14489 params: JSON.parse(value), 14491 params: JSON.parse(value),
14490 } 14492 }
14491 if (deviceId) { 14493 if (deviceId) {
@@ -14630,6 +14632,8 @@ class HandleDataInteraction { @@ -14630,6 +14632,8 @@ class HandleDataInteraction {
14630 const data = replaceAttrPlaceholder(command, attr, value) 14632 const data = replaceAttrPlaceholder(command, attr, value)
14631 const instructionData = { 14633 const instructionData = {
14632 method: "methodThingskit", 14634 method: "methodThingskit",
  14635 + additionalInfo: { cmdType: 'API' },
  14636 + persistent: true,
14633 params: data, 14637 params: data,
14634 } 14638 }
14635 14639