@steedos/standard-object-database 2.7.10 → 2.7.11-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -169,6 +169,7 @@ function _sendObjectMeta(objectConfig){
|
|
|
169
169
|
if(res){
|
|
170
170
|
// console.log('send object meta success', length);
|
|
171
171
|
broker.broadcast("$packages.statisticsActivatedPackages", {});
|
|
172
|
+
broker.emit(`translations.object.change`, {});
|
|
172
173
|
}
|
|
173
174
|
})
|
|
174
175
|
_objectConfigs = [];
|
|
@@ -391,6 +391,10 @@ module.exports = {
|
|
|
391
391
|
_.each(bodyItem.body, (field)=>{
|
|
392
392
|
if(_.startsWith(field.type, 'sfield-')){
|
|
393
393
|
|
|
394
|
+
if(field.config){
|
|
395
|
+
field.config.object = object.name
|
|
396
|
+
}
|
|
397
|
+
|
|
394
398
|
if(field.config && field.config.amis){
|
|
395
399
|
delete field.config.amis.name
|
|
396
400
|
delete field.config.amis.mode
|
|
@@ -406,6 +410,9 @@ module.exports = {
|
|
|
406
410
|
visible_on: bodyItem.visible_on
|
|
407
411
|
})
|
|
408
412
|
}else if(_.startsWith(bodyItem.type, 'sfield-')){
|
|
413
|
+
if(bodyItem.config){
|
|
414
|
+
bodyItem.config.object = object.name
|
|
415
|
+
}
|
|
409
416
|
if(bodyItem.config && bodyItem.config.amis){
|
|
410
417
|
delete bodyItem.config.amis.name
|
|
411
418
|
delete bodyItem.config.amis.mode
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2022-05-28 11:07:57
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime: 2024-
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2024-10-31 17:36:24
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
const InternalData = require('@steedos/standard-objects').internalData;
|
|
@@ -17,7 +17,22 @@ module.exports = {
|
|
|
17
17
|
doc.visible;
|
|
18
18
|
},
|
|
19
19
|
beforeUpdate: async function(){
|
|
20
|
-
const { doc } = this;
|
|
20
|
+
const { doc, id } = this;
|
|
21
|
+
if(doc.label){
|
|
22
|
+
const dbRecord = await this.getObject('object_actions').findOne(id);
|
|
23
|
+
|
|
24
|
+
const amis_schema = doc.amis_schema || dbRecord.amis_schema;
|
|
25
|
+
|
|
26
|
+
if(dbRecord && dbRecord.label != doc.label && amis_schema && _.isString(amis_schema) ){
|
|
27
|
+
try {
|
|
28
|
+
const json = JSON.parse(amis_schema);
|
|
29
|
+
json.body[0].label = doc.label
|
|
30
|
+
doc.amis_schema = JSON.stringify(json)
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.log(error)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
21
36
|
delete doc.visible_type
|
|
22
37
|
doc.visible;
|
|
23
38
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-object-database",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.11-beta.2",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"description": "steedos package",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@steedos-widgets/amis-lib": "^1.0.22",
|
|
15
|
-
"@steedos/metadata-core": "2.7.
|
|
16
|
-
"@steedos/service-object-mixin": "2.7.
|
|
17
|
-
"@steedos/standard-objects": "2.7.
|
|
15
|
+
"@steedos/metadata-core": "2.7.11-beta.2",
|
|
16
|
+
"@steedos/service-object-mixin": "2.7.11-beta.2",
|
|
17
|
+
"@steedos/standard-objects": "2.7.11-beta.2",
|
|
18
18
|
"amis-formula": "~6.3.0",
|
|
19
19
|
"clone": "^2.1.2",
|
|
20
20
|
"moleculer-bullmq": "3.0.0"
|
|
21
21
|
},
|
|
22
22
|
"repository": {},
|
|
23
23
|
"license": "MIT",
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "2e6f72c0e3b573e2992dd7bcc444438119157f3a"
|
|
25
25
|
}
|