Commit 08cd4940c7313efeb251dfe4bd8ca36c634d12a1

Authored by xp.Huang
2 parents 788df374 5976dc98

Merge branch 'ww' into 'main'

fix: permission key update && send command params update

See merge request huang/thingskit-drawio!54
... ... @@ -2,6 +2,7 @@
2 2 * @description load script from oss server prefix
3 3 */
4 4 const OSS_Prefix = 'https://oss.yuntengcloud.com/iotdocs/thingskit-scada-development/'
  5 +// const OSS_Prefix = 'https://oss.yuntengcloud.com/iotdocs/thingskit-scada-release/'
5 6
6 7 /**
7 8 * @description enable load script form oss server
... ...
... ... @@ -39,7 +39,7 @@ const GLOBAL_PLATFORM_INFO = (() => {
39 39 /**
40 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 44 const USER_PERMISSION = {
45 45 permission: []
... ...
... ... @@ -5934,7 +5934,7 @@ DataFormatPanel.prototype.addDataFont = function (container) {
5934 5934 const type = graph.getAttributeForCell(cell, basicAttr.COMPONENT_TYPE)
5935 5935 return renderMapping[type]?.(field) || {}
5936 5936
5937   - function getSubmitValue(field) {
  5937 + function getSubmitValue(field) {
5938 5938 const ENABLED_FLAG = 'on'
5939 5939 const additionalKey = HandleDataSource.enumConst
5940 5940 const value = {
... ... @@ -7930,7 +7930,7 @@ DataFormatPanel.prototype.addDataFont = function (container) {
7930 7930 data: treeList,
7931 7931 onlyIconControl: true,
7932 7932
7933   - click(node) {
  7933 + click(node) {
7934 7934 form.val(componentFilter, {
7935 7935 [enumDataSourceConst.ORG_NAME]: node?.data?.title,
7936 7936 [enumDataSourceConst.DEVICE_ID]: null,
... ... @@ -7999,13 +7999,13 @@ DataFormatPanel.prototype.addDataFont = function (container) {
7999 7999 currentDataSource = { organizationId: orgId, deviceProfileId, deviceType }
8000 8000 queue.push(getProduct(deviceType))
8001 8001 queue.push(getMeetConditionsDevice({ organizationId: orgId, deviceProfileId, deviceType }))
8002   - queue.push(getAttrByDeviceId(deviceProfileId))
  8002 + queue.push(getAttrByDeviceId(deviceProfileId))
8003 8003 Promise.all(queue)
8004 8004 .finally(() => {
8005 8005 const orgNode = UseLayUi.findTreeObjectByField(treeList, orgId)
8006 8006
8007 8007 $(`#${componentId} input[name="${enumDataSourceConst.ORG_ID}"]`).val(orgNode?.id).parent().find('span').html(orgNode?.name)
8008   -
  8008 +
8009 8009 form.val(componentFilter, {
8010 8010 orgId,
8011 8011 deviceId,
... ... @@ -14486,6 +14486,8 @@ class HandleDataInteraction {
14486 14486 if (!value || !deviceId) continue
14487 14487 const data = {
14488 14488 method: "methodThingskit",
  14489 + additionalInfo: { cmdType: 'API' },
  14490 + persistent: true,
14489 14491 params: JSON.parse(value),
14490 14492 }
14491 14493 if (deviceId) {
... ... @@ -14630,6 +14632,8 @@ class HandleDataInteraction {
14630 14632 const data = replaceAttrPlaceholder(command, attr, value)
14631 14633 const instructionData = {
14632 14634 method: "methodThingskit",
  14635 + additionalInfo: { cmdType: 'API' },
  14636 + persistent: true,
14633 14637 params: data,
14634 14638 }
14635 14639
... ...