Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
ba9bfcbdcc | |||
c85ee3f425 | |||
c872318147 | |||
![]() |
93f5bd0c58 | ||
![]() |
d991b2a3e0 | ||
![]() |
919709e560 | ||
![]() |
8159f97701 | ||
![]() |
6ed69a4e8e | ||
![]() |
ae6ec1b4eb | ||
![]() |
fee4985d75 | ||
![]() |
6040224f29 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
node_modules
|
||||
.idea
|
||||
.idea
|
||||
|
12
.idea/CellsysBase.iml
generated
12
.idea/CellsysBase.iml
generated
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/CellsysBase.iml" filepath="$PROJECT_DIR$/.idea/CellsysBase.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
93
.idea/workspace.xml
generated
93
.idea/workspace.xml
generated
@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c4ea8ac7-164b-45ff-bbfd-c3f0f9ce655e" name="更改" comment="一些调整">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/cellsysSystem.js" beforeDir="false" afterPath="$PROJECT_DIR$/cellsysSystem.js" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/utils/axios.js" beforeDir="false" afterPath="$PROJECT_DIR$/utils/axios.js" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 1
|
||||
}</component>
|
||||
<component name="ProjectId" id="2qjkDDWcCp3kqhQnsWiZ1pEbaqB" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"git-widget-placeholder": "master",
|
||||
"last_opened_file_path": "E:/work/web_CellsysPortal/trunk/cellsysArt",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"settings.editor.selected.configurable": "preferences.editor",
|
||||
"ts.external.directory.path": "D:\\Program Files\\WebStorm 2024.2.3\\plugins\\javascript-plugin\\jsLanguageServicesImpl\\external",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-js-predefined-d6986cc7102b-5c90d61e3bab-JavaScript-WS-242.23339.15" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="默认任务">
|
||||
<changelist id="c4ea8ac7-164b-45ff-bbfd-c3f0f9ce655e" name="更改" comment="" />
|
||||
<created>1735183249700</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1735183249700</updated>
|
||||
<workItem from="1735183250727" duration="851000" />
|
||||
<workItem from="1735194108286" duration="9000" />
|
||||
<workItem from="1735195064295" duration="4145000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="一些调整">
|
||||
<option name="closed" value="true" />
|
||||
<created>1735183268189</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1735183268189</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="一些调整" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="一些调整" />
|
||||
</component>
|
||||
</project>
|
@ -147,7 +147,7 @@ class CellsysGroup {
|
||||
_membersParam.push({
|
||||
_realname: memberObj.realName,
|
||||
_mobile: memberObj.mobile,
|
||||
_gender: memberObj.gender,
|
||||
_gender: String(memberObj.gender),
|
||||
_email: memberObj.email,
|
||||
_member_type_name: memberObj.typeName
|
||||
? memberObj.typeName
|
||||
@ -210,5 +210,4 @@ class CellsysGroup {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default CellsysGroup
|
||||
export default CellsysGroup;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Canvg from 'canvg'
|
||||
import { CellsysType } from './cellsysUtil.js'
|
||||
import {CellsysType, EditTask, EditType} from './cellsysUtil.js'
|
||||
|
||||
|
||||
class CellsysIcon {
|
||||
@ -142,6 +142,82 @@ const personStand = {
|
||||
'data': 'M505.394 231.226c49.548 0 92.49-46.245 92.49-102.4s-42.942-105.703-92.49-105.703-92.49 46.245-92.49 102.4 39.638 105.703 92.49 105.703zm75.974 66.064H429.419c-16.516 0-33.032 6.607-46.245 19.82-13.213 13.213-19.82 33.032-19.82 52.851v214.71c0 39.639 26.427 69.368 59.459 72.67l6.606 3.304v336.93h151.949V657.341h6.606c33.032-3.303 56.155-33.032 59.458-72.671v-214.71c0-39.638-29.729-72.67-66.064-72.67z'
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建图标
|
||||
* @param {*} icon
|
||||
*/
|
||||
export function saveIcon(icon) {
|
||||
let editTask = new EditTask(EditType.saveIcon);
|
||||
editTask.addParam("_name", icon.name);
|
||||
editTask.addParam("_fill_color", icon.fillColor);
|
||||
editTask.addParam("_fill_opacity", icon.fillOpacity);
|
||||
editTask.addParam("_type", icon.type);
|
||||
editTask.addParam("_tags", icon.tags);
|
||||
editTask.addParam("_data", icon.data);
|
||||
editTask.addParam("_rotate", icon.rotate);
|
||||
return editTask.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入图标
|
||||
* @param {*} cellsysObject
|
||||
*/
|
||||
export function importIcons(cellsysObject) {
|
||||
let editTask = new EditTask(EditType.importIcons),
|
||||
paramList = []
|
||||
if (cellsysObject.length > 0) {
|
||||
cellsysObject.forEach(icon => {
|
||||
paramList.push({
|
||||
'_name': icon.name,
|
||||
'_fill_color': icon.fillColor,
|
||||
'_fill_opacity': icon.fillOpacity,
|
||||
'_type': icon.type,
|
||||
'_tags': icon.tags,
|
||||
'_data': icon.data,
|
||||
'_rotate': icon.rotate
|
||||
})
|
||||
})
|
||||
editTask.addParam('_icons', paramList)
|
||||
}
|
||||
return editTask.execute()
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新图标
|
||||
* @param {*} cellsysObject
|
||||
*/
|
||||
export function updateIcon(cellsysObject) {
|
||||
let editTask = new EditTask(EditType.updateIcon);
|
||||
editTask.addParam("_icon_id", cellsysObject.id);
|
||||
editTask.addParam("_id", cellsysObject.id);
|
||||
editTask.addParam("_name", cellsysObject.name);
|
||||
editTask.addParam("_fill_color", cellsysObject.fillColor);
|
||||
editTask.addParam("_fill_opacity", cellsysObject.fillOpacity);
|
||||
editTask.addParam("_type", cellsysObject.type);
|
||||
editTask.addParam("_tags", cellsysObject.tags);
|
||||
editTask.addParam("_data", cellsysObject.data);
|
||||
return editTask.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除图标
|
||||
* @param {*} cellsysObject
|
||||
*/
|
||||
export function deleteIcon(cellsysObject) {
|
||||
let editTask = new EditTask(EditType.deleteIcon);
|
||||
editTask.addParam("_id", cellsysObject.id);
|
||||
return editTask.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序图标
|
||||
* @param {*} data
|
||||
*/
|
||||
export function sortIcons(data) {
|
||||
let editTask = new EditTask(EditType.sortIcon)
|
||||
editTask.addParam('_icons', data)
|
||||
return editTask.execute()
|
||||
}
|
||||
|
||||
export default CellsysIcon
|
||||
export {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { CellsysType } from './cellsysUtil.js';
|
||||
import {CellsysType, EditTask, EditType, Query, QueryTask, QueryType} from './cellsysUtil.js';
|
||||
|
||||
class CellsysIconType {
|
||||
constructor(params) {
|
||||
@ -16,4 +16,47 @@ class CellsysIconType {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增图标类型
|
||||
* @param {*} cellsysObject
|
||||
*/
|
||||
export function saveIconType(cellsysObject) {
|
||||
let editTask = new EditTask(EditType.saveIconType)
|
||||
editTask.addParam("_name", cellsysObject.name)
|
||||
editTask.addParam("_sort", cellsysObject.sort)
|
||||
return editTask.execute()
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新图标类型
|
||||
* @param {*} cellsysObject
|
||||
*/
|
||||
export function updateIconType(cellsysObject) {
|
||||
let editTask = new EditTask(EditType.updateIconType)
|
||||
editTask.addParam("_id", cellsysObject.id)
|
||||
editTask.addParam("_name", cellsysObject.name)
|
||||
editTask.addParam("_sort", cellsysObject.sort)
|
||||
return editTask.execute()
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除图标类型
|
||||
* @param {*} cellsysObject
|
||||
*/
|
||||
export function deleteIconType(cellsysObject) {
|
||||
let editTask = new EditTask(EditType.deleteIconType)
|
||||
editTask.addParam("_id", cellsysObject.id)
|
||||
return editTask.execute()
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序图标
|
||||
* @param {*} data
|
||||
*/
|
||||
export function sortIconTypes(data) {
|
||||
let editTask = new EditTask(EditType.sortIconType)
|
||||
editTask.addParam('_icon_types', data)
|
||||
return editTask.execute()
|
||||
}
|
||||
|
||||
export default CellsysIconType
|
||||
|
@ -51,7 +51,12 @@ class CellsysMember {
|
||||
return formatterDate(this.dateTime, 'YYYY-MM-DD HH:mm');
|
||||
}
|
||||
}
|
||||
|
||||
get createTimeFormat() {
|
||||
return formatterDate(this.createTime);
|
||||
}
|
||||
get updateTimeFormat() {
|
||||
return formatterDate(this.updateTime);
|
||||
}
|
||||
setLeader(value) {
|
||||
if (value && value === 1) {
|
||||
this.isLeader = 1;
|
||||
|
@ -241,7 +241,7 @@ class CellsysOrg {
|
||||
editTask.addParam('_username', params.userName);
|
||||
editTask.addParam('_realname', params.realName);
|
||||
editTask.addParam('_email', params.email);
|
||||
editTask.addParam('_gender', params.gender);
|
||||
editTask.addParam('_gender', String(params.gender));
|
||||
editTask.addParam('_birthday', params.birthday);
|
||||
editTask.addParam('_avatar', params.avatar);
|
||||
editTask.addParam('_is_username', 0);
|
||||
@ -296,9 +296,9 @@ class CellsysOrg {
|
||||
/**
|
||||
* 查询组织内的所有App
|
||||
*/
|
||||
queryApps(pageInfo, order, filters) {
|
||||
queryApps(pageInfo, order, filters,getUnion) {
|
||||
let query = new Query();
|
||||
query.addFilter('org_id', Operator.Equals, this.id);
|
||||
// query.addFilter('org_id', Operator.Equals, this.id);
|
||||
if (pageInfo) {
|
||||
query.setCurrPage(pageInfo.currPage);
|
||||
query.setPageSize(pageInfo.pageSize);
|
||||
@ -313,7 +313,14 @@ class CellsysOrg {
|
||||
query.addFilter(item['name'], item['operator'], item['value']);
|
||||
});
|
||||
}
|
||||
let queryTask = new QueryTask(QueryType.App, pageInfo ? true : false);
|
||||
let queryType=QueryType.App
|
||||
if (this.unionStatus === 1 && getUnion === true) {
|
||||
//联合状态为父级组织,并且需要获取联合信息
|
||||
queryType = QueryType.UnionApp;
|
||||
} else {
|
||||
query.setOrder({ org_id: 'asc', id: 'desc' });
|
||||
}
|
||||
let queryTask = new QueryTask(queryType, pageInfo ? true : false);
|
||||
return new Promise((resolve, reject) => {
|
||||
queryTask
|
||||
.execute(query)
|
||||
@ -346,9 +353,9 @@ class CellsysOrg {
|
||||
* @param order
|
||||
* @returns {Promise<unknown>}
|
||||
*/
|
||||
queryAppListByPublish(pageInfo, filters, order) {
|
||||
queryAppListByPublish(pageInfo, filters, order,getUnion) {
|
||||
let query = new Query();
|
||||
query.addFilter('org_id', Operator.Equals, this.id);
|
||||
// query.addFilter('org_id', Operator.Equals, this.id);
|
||||
query.addFilter('is_publish', Operator.Equals, 1);
|
||||
if (pageInfo) {
|
||||
query.setCurrPage(pageInfo.currPage);
|
||||
@ -364,7 +371,14 @@ class CellsysOrg {
|
||||
query.addFilter(item['name'], item['operator'], item['value']);
|
||||
});
|
||||
}
|
||||
let queryTask = new QueryTask(QueryType.App, pageInfo ? true : false);
|
||||
let queryType=QueryType.App
|
||||
if (this.unionStatus === 1 && getUnion === true) {
|
||||
//联合状态为父级组织,并且需要获取联合信息
|
||||
queryType = QueryType.UnionApp;
|
||||
} else {
|
||||
query.setOrder({ org_id: 'asc', id: 'desc' });
|
||||
}
|
||||
let queryTask = new QueryTask(queryType, pageInfo ? true : false);
|
||||
return new Promise((resolve, reject) => {
|
||||
queryTask
|
||||
.execute(query)
|
||||
@ -805,7 +819,7 @@ class CellsysOrg {
|
||||
* @param feedback 审核意见
|
||||
* @returns {function(): Promise<unknown>}
|
||||
*/
|
||||
auditJoinOrgMember(params) {
|
||||
auditJoinOrgMember(params = {}) {
|
||||
let { userId, audit, feedback, memberTypeId, groudIds } = params;
|
||||
let editTask = new EditTask(EditType.OrgMember_Update);
|
||||
let status = audit ? 2 : 3;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Query, QueryTask, QueryType } from './cellsysUtil.js';
|
||||
import './utils/paho-mqtt.js';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import cellsysSystem from './cellsysSystem';
|
||||
|
||||
let clientManager = {
|
||||
//全局clinet管理
|
||||
@ -37,7 +37,7 @@ const TopicType = {
|
||||
|
||||
const createMqttClient = (cellsysPush, cellsysTopic) => {
|
||||
// let clientId = 'cellsys' + (new Date().getTime()) + Math.floor(Math.random() * 100)
|
||||
let clientId = getToken() + cellsysTopic.topicType + new Date().getTime();
|
||||
let clientId = cellsysSystem.token + cellsysTopic.topicType + new Date().getTime();
|
||||
let { ip, port, aliasPath, isSSL, username, password } = cellsysPush;
|
||||
|
||||
let client;
|
||||
|
@ -54,6 +54,8 @@ const QueryType = {
|
||||
UnionMemberTypeUser: '/rpc/view_org_union_member_type_user',
|
||||
// 门户中App的列表
|
||||
App: '/rpc/view_org_app_basic', //查询应用基础列表2(含原始应用id)view_app_basic不含
|
||||
//查询组织联合的u应用列表
|
||||
UnionApp: '/rpc/view_org_union_app',
|
||||
// 应用模板
|
||||
AppModel: '/rpc/view_app_model',
|
||||
AppModelType: '/rpc/view_app_model_type',
|
||||
@ -143,6 +145,7 @@ const QueryType = {
|
||||
StatsEventCount: '/rpc/view_stats_event_type_count',
|
||||
Icon: '/rpc/view_icon',
|
||||
IconType: '/rpc/view_icon_type',
|
||||
|
||||
QRCodeList: '/rpc/view_qr_code', //查询二维码列表
|
||||
BannerType: '/rpc/view_banner_type',
|
||||
BannerList: '/rpc/view_banner',
|
||||
@ -377,6 +380,16 @@ const EditType = {
|
||||
EdgeNameUpdate: '/rpc/UpdateEdgeName',
|
||||
//更改用户聊天记录已读状态
|
||||
ChatPrivateRead: '/rpc/cellsysChatPrivateRead',
|
||||
//图标
|
||||
importIcons: '/rpc/cellsysIconsInsert',
|
||||
saveIcon: '/rpc/cellsysIconInsert',
|
||||
updateIcon: '/rpc/cellsysIconUpdate',
|
||||
deleteIcon: '/rpc/cellsysIconDelete',
|
||||
sortIcon: '/rpc/cellsysIconSortUpdate',
|
||||
saveIconType: '/rpc/cellsysIconTypeInsert',
|
||||
updateIconType: '/rpc/cellsysIconTypeUpdate',
|
||||
deleteIconType: '/rpc/cellsysIconTypeDelete',
|
||||
sortIconType: '/rpc/cellsysIconTypeSortUpdate',
|
||||
};
|
||||
|
||||
// 提交类接口
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@airkoon/cellsys",
|
||||
"version": "1.15.3",
|
||||
"description": "边缘服务器相关",
|
||||
"version": "1.16.4",
|
||||
"description": "边缘服务器和cloud的公共库",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
|
@ -31,6 +31,7 @@ service.interceptors.request.use(
|
||||
},
|
||||
);
|
||||
|
||||
//这里需要注意的是,由于历史原因,axios的response的成功回调格式是在本文件中封装,而失败回调的格式是在引用CellsysBase的项目中按需进行封装。
|
||||
service.interceptors.response.use(
|
||||
(response) => {
|
||||
let data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user