Commit 46b8105a531d6cea9997e2203de57c3600561461

Authored by xp.Huang
2 parents 1d3ad428 406279a5

Merge branch 'f-dev' into 'main'

fix:修改转换脚本编辑问题 style:修改组织列表显隐组件样式问题

See merge request huang/yun-teng-iot-front!245
@@ -344,7 +344,7 @@ @@ -344,7 +344,7 @@
344 } 344 }
345 345
346 &-form-container { 346 &-form-container {
347 - padding: 16px; 347 + padding: 16px 16px 0px 36px;
348 348
349 .ant-form { 349 .ant-form {
350 padding: 12px 10px 6px 10px; 350 padding: 12px 10px 6px 10px;
@@ -477,14 +477,14 @@ @@ -477,14 +477,14 @@
477 cursor: pointer; 477 cursor: pointer;
478 position: absolute; 478 position: absolute;
479 top: 0.85rem; 479 top: 0.85rem;
480 - left: 0.5vw; 480 + left: 1.1vw;
481 } 481 }
482 .fold-right { 482 .fold-right {
483 z-index: 9999; 483 z-index: 9999;
484 cursor: pointer; 484 cursor: pointer;
485 position: absolute; 485 position: absolute;
486 top: 0.85rem; 486 top: 0.85rem;
487 - left: 17.5vw; 487 + left: 18.1vw;
488 } 488 }
489 @prefix-cls: ~'@{namespace}-basic-tree'; 489 @prefix-cls: ~'@{namespace}-basic-tree';
490 490
@@ -44,12 +44,14 @@ @@ -44,12 +44,14 @@
44 const aceEditor = ref(); 44 const aceEditor = ref();
45 const aceRef = ref(); 45 const aceRef = ref();
46 const getTitle = computed(() => (isUpdate.value ? '编辑转换脚本' : '新增转换脚本')); 46 const getTitle = computed(() => (isUpdate.value ? '编辑转换脚本' : '新增转换脚本'));
  47 + const editId = ref('');
47 const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { 48 const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
48 resetFields(); 49 resetFields();
49 setDrawerProps({ confirmLoading: false }); 50 setDrawerProps({ confirmLoading: false });
50 isUpdate.value = data.isUpdate; 51 isUpdate.value = data.isUpdate;
51 initEditor(data.record?.configuration.jsScript); 52 initEditor(data.record?.configuration.jsScript);
52 if (isUpdate.value) { 53 if (isUpdate.value) {
  54 + editId.value = data.record.id;
53 setFieldsValue(data.record); 55 setFieldsValue(data.record);
54 } 56 }
55 }); 57 });
@@ -84,6 +86,7 @@ @@ -84,6 +86,7 @@
84 emit('isStatus', { status: 1, jsCode }); 86 emit('isStatus', { status: 1, jsCode });
85 }; 87 };
86 const handleSubmit = async () => { 88 const handleSubmit = async () => {
  89 + const editIdPost = isUpdate.value ? { id: editId.value } : {};
87 try { 90 try {
88 setDrawerProps({ confirmLoading: true }); 91 setDrawerProps({ confirmLoading: true });
89 const fieldsValue = await validate(); 92 const fieldsValue = await validate();
@@ -94,6 +97,7 @@ @@ -94,6 +97,7 @@
94 }, 97 },
95 type: 'org.thingsboard.rule.engine.transform.TbTransformMsgNode', 98 type: 'org.thingsboard.rule.engine.transform.TbTransformMsgNode',
96 ...fieldsValue, 99 ...fieldsValue,
  100 + ...editIdPost,
97 }); 101 });
98 closeDrawer(); 102 closeDrawer();
99 emit('success'); 103 emit('success');