biz9-logic 3.2.10 → 3.2.12
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.
- package/biz9_config +1 -1
- package/index.js +75 -71
- package/package.json +1 -1
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -121,79 +121,83 @@ class Obj {
|
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
class CMS {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
static Tab_Edit_Title_General = 'general';
|
|
125
|
+
static Tab_Edit_Title_Photo = 'photo';
|
|
126
|
+
static Tab_Edit_Title_List = 'list';
|
|
127
|
+
static Tab_Edit_Title_Value = 'value';
|
|
128
|
+
static Tab_Edit_Title_Setting = 'setting';
|
|
129
|
+
static Tab_Edit_Title_Note = 'note';
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
static get_new_query_item = (item,parent_item,top_item) => {
|
|
132
|
+
return {
|
|
133
|
+
id: item.id ? item.id : 0,
|
|
134
|
+
data_type:item.data_type ? item.data_type : DataType.DT_BLANK,
|
|
135
|
+
parent_id:parent_item.id ? parent_item.id : 0,
|
|
136
|
+
parent_data_type:parent_item.data_type ? parent_item.data_type : DataType.DT_BLANK,
|
|
137
137
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
138
|
+
top_id:top_item.id ? top_item.id : 0,
|
|
139
|
+
top_data_type:top_item.data_type ? top_item.data_type : DataType.DT_BLANK
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
static get_query_itemz_by_query = (item) => {
|
|
143
|
+
return [];
|
|
144
|
+
};
|
|
145
|
+
static get_query_item_by_page = (item) => {
|
|
146
|
+
return { id:item.id ? item.id : 0, data_type:item.data_type ? item.data_type : DataType.DT_BLANK };
|
|
147
|
+
};
|
|
148
|
+
static get_query_parent_item_by_page = (parent_item) => {
|
|
149
|
+
return { id:parent_item.id ? parent_item.id : 0, data_type:parent_item.data_type ? parent_item.data_type : DataType.DT_BLANK };
|
|
150
|
+
};
|
|
151
|
+
static get_query_top_item_by_page = (top_item) => {
|
|
152
|
+
return { id:top_item.id ? top_item.id : 0, data_type:top_item.data_type ? top_item.data_type : DataType.DT_BLANK };
|
|
153
|
+
};
|
|
154
|
+
static get_query_item_by_query = (query) => {
|
|
155
|
+
return { id:query.get('id') ? query.get('id') : 0, data_type:query.get('data_type') ? query.get('data_type') : DataType.DT_BLANK } ;
|
|
156
|
+
};
|
|
157
|
+
static get_query_parent_item_by_query = (query) => {
|
|
158
|
+
return { id:query.get('parent_id') ? query.get('parent_id') : 0, data_type:query.get('parent_data_type') ? query.get('parent_data_type') : DataType.DT_BLANK } ;
|
|
159
|
+
};
|
|
160
|
+
static get_query_top_item_by_query = (query) => {
|
|
161
|
+
return { id:query.get('top_id') ? query.get('top_id') : 0, data_type:query.get('top_data_type') ? query.get('top_data_type') : DataType.DT_BLANK } ;
|
|
162
|
+
};
|
|
163
|
+
static get_sub_page_title = (title) => {
|
|
164
|
+
switch(title)
|
|
165
|
+
{
|
|
166
|
+
case CMS.Tab_Edit_Title_General:
|
|
167
|
+
return 'General';
|
|
168
|
+
break;
|
|
169
|
+
case CMS.Tab_Edit_Title_Photo:
|
|
170
|
+
return 'Photos';
|
|
171
|
+
break;
|
|
172
|
+
case CMS.Tab_Edit_Title_Value:
|
|
173
|
+
return 'Values';
|
|
174
|
+
break;
|
|
175
|
+
case CMS.Tab_Edit_Title_Setting:
|
|
176
|
+
return 'Settings';
|
|
177
|
+
case CMS.Tab_Edit_Title_Note:
|
|
178
|
+
return 'Note';
|
|
179
|
+
default:
|
|
180
|
+
return 'N/A';
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
static get_page_url = (url,tab_title,item,parent_item,top_item,parms) => {
|
|
184
|
+
let r_url="?tab_title="+tab_title
|
|
185
|
+
+"&id="+item.id
|
|
186
|
+
+"&data_type="
|
|
187
|
+
+item.data_type
|
|
188
|
+
+"&parent_id="
|
|
189
|
+
+parent_item.id
|
|
190
|
+
+"&parent_data_type="
|
|
191
|
+
+parent_item.data_type
|
|
192
|
+
+"&top_id="
|
|
193
|
+
+top_item.id
|
|
194
|
+
+"&top_data_type="
|
|
195
|
+
+top_item.data_type;
|
|
196
|
+
if(parms){
|
|
197
|
+
url = url + parms;
|
|
198
|
+
}
|
|
199
|
+
return r_url;
|
|
200
|
+
}
|
|
197
201
|
}
|
|
198
202
|
|
|
199
203
|
module.exports = {
|