@steedos/service-core-objects 3.0.0-beta.105 → 3.0.0-beta.107

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.
@@ -0,0 +1,37 @@
1
+ name: announcements
2
+ label: Announcement
3
+ description:
4
+ fields:
5
+ name:
6
+ label: Title
7
+ help:
8
+ description:
9
+ body:
10
+ label: Main Body
11
+ help:
12
+ description:
13
+ members:
14
+ label: User Members
15
+ help:
16
+ description:
17
+ organizations:
18
+ label: Organization Members
19
+ help:
20
+ description:
21
+ created:
22
+ label: Creation Time
23
+ help:
24
+ description:
25
+ created_by:
26
+ label: Created by
27
+ help:
28
+ description:
29
+ modified_by:
30
+ label: Modified by
31
+ help:
32
+ description:
33
+ groups:
34
+ members: Members
35
+ listviews:
36
+ all:
37
+ label: All Announcements
@@ -0,0 +1,37 @@
1
+ name: announcements
2
+ label: 公告
3
+ description:
4
+ fields:
5
+ name:
6
+ label: 标题
7
+ help:
8
+ description:
9
+ body:
10
+ label: 正文
11
+ help:
12
+ description:
13
+ members:
14
+ label: 人员
15
+ help:
16
+ description:
17
+ organizations:
18
+ label: 部门
19
+ help:
20
+ description:
21
+ created:
22
+ label: 发布时间
23
+ help:
24
+ description:
25
+ created_by:
26
+ label: 发布人
27
+ help:
28
+ description:
29
+ modified_by:
30
+ label: 修改人
31
+ help:
32
+ description:
33
+ groups:
34
+ members: 发布对象
35
+ listviews:
36
+ all:
37
+ label: 所有公告
@@ -88,7 +88,7 @@ fields:
88
88
  description:
89
89
  coordinatesType:
90
90
  label: Coordinates Type
91
- help:
91
+ help: "Coordinate system type: The default Baidu coordinate is 'bd09'. When using Autonavi Maps, it should be set to 'gcj02'. Autonavi Maps does not support coordinate conversion"
92
92
  description:
93
93
  reference_to:
94
94
  label: Reference to
@@ -340,11 +340,11 @@ fields:
340
340
  help:
341
341
  description:
342
342
  searchable:
343
- label: Enable full-text search
343
+ label: Enable quick search on the list page
344
344
  help:
345
345
  description:
346
346
  filterable:
347
- label: Filterable
347
+ label: Default Filter Field
348
348
  help:
349
349
  description:
350
350
  show_as_qr:
@@ -35,7 +35,7 @@ fields:
35
35
  description:
36
36
  coordinatesType:
37
37
  label: 坐标类型
38
- help:
38
+ help: 坐标系类型,默认百度坐标'bd09',使用高德地图时应设置为'gcj02', 高德地图不支持坐标转换
39
39
  description:
40
40
  create:
41
41
  label: 弹出选择时允许新建
@@ -52,120 +52,119 @@ Steedos.StandardObjects = {
52
52
  return permissions && permissions["allowDelete"];
53
53
  }
54
54
  },
55
- // standard_approve:{
56
- // visible: function (object_name, record_id, record_permissions, props) {
57
- // return false;
58
- // // if (!Session.get("record_id")) {
59
- // // /*只在详细界面显示这个action*/
60
- // // return false;
61
- // // }
62
- // // var object_workflow, record;
63
- // // if (record_permissions && !record_permissions["allowEdit"]) {
64
- // // return false;
65
- // // }
66
- // // record = props.record;
67
- // // // record_permissions = Creator.getRecordPermissions(object_name, record, Meteor.userId());
68
- // // // if (record_permissions && !record_permissions["allowEdit"]) {
69
- // // // return false;
70
- // // // }
71
- // // object_workflow = _.find(Creator.object_workflows, function (ow) {
72
- // // return ow.object_name === object_name && (!ow.sync_direction || ow.sync_direction == 'both' || ow.sync_direction == 'obj_to_ins');
73
- // // });
74
- // // if (!object_workflow) {
75
- // // return false;
76
- // // }
77
- // // if (record && record.instances && record.instances.length > 0) {
78
- // // return false;
79
- // // }else if(record && !_.has(record,'instances') ){
80
- // // // 如果record存在,且record的instances字段不存在,则再查询一次
81
- // // var queryResult = Steedos.authRequest("/graphql", {
82
- // // type: 'POST',
83
- // // async: false,
84
- // // data: JSON.stringify({
85
- // // query: `{record:${object_name}__findOne(id: "${record_id}"){instances}}`
86
- // // }),
87
- // // contentType: 'application/json',
88
- // // error: function () { }
89
- // // });
90
- // // var recordDoc = queryResult && queryResult.data && queryResult.data.record;
91
- // // if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
92
- // // return false;
93
- // // }
94
- // // }
95
- // // return true;
96
- // }
97
- // },
98
- // standard_view_instance:{
99
- // visible: function (object_name, record_id, record_permissions, props) {
100
- // if (!Session.get("record_id")) {
101
- // /*只在详细界面显示这个action*/
102
- // return false;
103
- // }
104
- // var record = props.record;
105
- // if (record && !_.isEmpty(record.instances)) {
106
- // return true;
107
- // }else if(record && !_.has(record,'instances') ){
108
- // // 如果record存在且record的instances字段不存在,则再查询一次
109
- // var queryResult = Steedos.authRequest("/graphql", {
110
- // type: 'POST',
111
- // async: false,
112
- // data: JSON.stringify({
113
- // query: `{record:${object_name}__findOne(id: "${record_id}"){instances}}`
114
- // }),
115
- // contentType: 'application/json',
116
- // error: function () { }
117
- // });
118
- // var recordDoc = queryResult && queryResult.data && queryResult.data.record;
119
- // if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
120
- // return true;
121
- // }
122
- // }
123
- // return false;
124
- // },
125
- // todo: function () {
126
- // console.log(this)
127
- // var record = this.record.record;
128
- // var data, instanceId, uobj, url;
129
- // if (!record.instances || !record.instances[0]) {
130
- // // 如果record存在且record的instances字段不存在,则再查询一次
131
- // var queryResult = Steedos.authRequest("/graphql", {
132
- // type: 'POST',
133
- // async: false,
134
- // data: JSON.stringify({
135
- // query: `{record:${this.object_name}__findOne(id: "${this.record_id}"){instances}}`
136
- // }),
137
- // contentType: 'application/json',
138
- // error: function () { }
139
- // });
140
- // var recordDoc = queryResult && queryResult.data && queryResult.data.record;
141
- // if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
142
- // instanceId = recordDoc.instances[0]._id;
143
- // }
144
- // } else {
145
- // instanceId = record.instances[0]._id;
146
- // }
147
- // if (!instanceId) {
148
- // console.error('instanceId not exists');
149
- // return;
150
- // }
151
- // Steedos.authRequest(Steedos.absoluteUrl(`api/workflow/instance/check_is_removed/${instanceId}`), {
152
- // type: 'POST',
153
- // async: false,
154
- // data: JSON.stringify({
155
- // objectName: this.object_name,
156
- // recordId: this.record_id
157
- // }),
158
- // contentType: 'application/json',
159
- // success: function (res) {
160
- // Steedos.openWindow(Steedos.absoluteUrl(`api/workflow/instance/${instanceId}`))
161
- // },
162
- // error: function (res) {
163
- // // toastr.error('未找到申请单,可能已被删除,请重新发起审批。');
164
- // FlowRouter.reload();
165
- // }
166
- // });
167
- // }
168
- // },
55
+ standard_approve:{
56
+ visible: function (object_name, record_id, record_permissions, props) {
57
+ if (!record_id) {
58
+ /*只在详细界面显示这个action*/
59
+ return false;
60
+ }
61
+ var object_workflow, record;
62
+ if (record_permissions && !record_permissions["allowEdit"]) {
63
+ return false;
64
+ }
65
+ record = props.record;
66
+ // record_permissions = Creator.getRecordPermissions(object_name, record, Meteor.userId());
67
+ // if (record_permissions && !record_permissions["allowEdit"]) {
68
+ // return false;
69
+ // }
70
+ object_workflow = _.find(Steedos.object_workflows, function (ow) {
71
+ return ow.object_name === object_name && (!ow.sync_direction || ow.sync_direction == 'both' || ow.sync_direction == 'obj_to_ins');
72
+ });
73
+ if (!object_workflow) {
74
+ return false;
75
+ }
76
+ if (record && record.instances && record.instances.length > 0) {
77
+ return false;
78
+ }else if(record && !_.has(record,'instances') ){
79
+ // 如果record存在,且recordinstances字段不存在,则再查询一次
80
+ var queryResult = Steedos.authRequest("/graphql", {
81
+ type: 'POST',
82
+ async: false,
83
+ data: JSON.stringify({
84
+ query: `{record:${object_name}__findOne(id: "${record_id}"){instances}}`
85
+ }),
86
+ contentType: 'application/json',
87
+ error: function () { }
88
+ });
89
+ var recordDoc = queryResult && queryResult.data && queryResult.data.record;
90
+ if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
91
+ return false;
92
+ }
93
+ }
94
+ return true;
95
+ }
96
+ },
97
+ standard_view_instance:{
98
+ visible: function (object_name, record_id, record_permissions, props) {
99
+ if (!record_id) {
100
+ /*只在详细界面显示这个action*/
101
+ return false;
102
+ }
103
+ var record = props.record;
104
+ if (record && !_.isEmpty(record.instances)) {
105
+ return true;
106
+ }else if(record && !_.has(record,'instances') ){
107
+ // 如果record存在且recordinstances字段不存在,则再查询一次
108
+ var queryResult = Steedos.authRequest("/graphql", {
109
+ type: 'POST',
110
+ async: false,
111
+ data: JSON.stringify({
112
+ query: `{record:${object_name}__findOne(id: "${record_id}"){instances}}`
113
+ }),
114
+ contentType: 'application/json',
115
+ error: function () { }
116
+ });
117
+ var recordDoc = queryResult && queryResult.data && queryResult.data.record;
118
+ if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
119
+ return true;
120
+ }
121
+ }
122
+ return false;
123
+ },
124
+ todo: function () {
125
+ console.log(this)
126
+ var record = this.record.record;
127
+ var data, instanceId, uobj, url;
128
+ if (!record.instances || !record.instances[0]) {
129
+ // 如果record存在且recordinstances字段不存在,则再查询一次
130
+ var queryResult = Steedos.authRequest("/graphql", {
131
+ type: 'POST',
132
+ async: false,
133
+ data: JSON.stringify({
134
+ query: `{record:${this.object_name}__findOne(id: "${this.record_id}"){instances}}`
135
+ }),
136
+ contentType: 'application/json',
137
+ error: function () { }
138
+ });
139
+ var recordDoc = queryResult && queryResult.data && queryResult.data.record;
140
+ if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
141
+ instanceId = recordDoc.instances[0]._id;
142
+ }
143
+ } else {
144
+ instanceId = record.instances[0]._id;
145
+ }
146
+ if (!instanceId) {
147
+ console.error('instanceId not exists');
148
+ return;
149
+ }
150
+ Steedos.authRequest(Steedos.absoluteUrl(`api/workflow/instance/check_is_removed/${instanceId}`), {
151
+ type: 'POST',
152
+ async: false,
153
+ data: JSON.stringify({
154
+ objectName: this.object_name,
155
+ recordId: this.record_id
156
+ }),
157
+ contentType: 'application/json',
158
+ success: function (res) {
159
+ Steedos.openWindow(Steedos.absoluteUrl(`api/workflow/instance/${instanceId}`))
160
+ },
161
+ error: function (res) {
162
+ // toastr.error('未找到申请单,可能已被删除,请重新发起审批。');
163
+ FlowRouter.reload();
164
+ }
165
+ });
166
+ }
167
+ },
169
168
  standard_submit_for_approval:{
170
169
  visible: function (object_name, record_id) {
171
170
  return Steedos.ProcessManager.allowSubmit(object_name, record_id);