Skip to content

Commit 0a9adee

Browse files
Add files via upload
1 parent 90c770b commit 0a9adee

9 files changed

Lines changed: 1526 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<Index />
3+
</template>
4+
5+
<script>
6+
import Index from './template/Index.vue'
7+
8+
export default {
9+
components: {
10+
Index
11+
}
12+
}
13+
</script>
14+
15+
<style lang="less" scoped></style>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Copyright (c) 2023 - present TinyEngine Authors.
3+
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
4+
*
5+
* Use of this source code is governed by an MIT-style license.
6+
*
7+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10+
*
11+
*/
12+
13+
/* metaService: engine.plugins.blockmanage.js-http */
14+
import { getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register'
15+
16+
const baseUrl = 'http://10.234.151.79:9090'
17+
export const isDevelopEnv = import.meta.env.MODE?.includes('dev')
18+
// 模版管理 -- 获取模版列表
19+
export const fetchTemplateList = (params) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/app-center/api/app-template/list`, {params})
20+
21+
// 模版管理 -- 通过模板创建应用
22+
export const createAppFromTemplate = (params) => getMetaApi(META_SERVICE.Http).post(`${baseUrl}/app-center/api/app-template/create`, params)
23+
24+
// 模版管理 -- 业务场景全查询
25+
export const fetchBusinessCategory = () => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/material-center/api/business-category/list`)
26+
27+
// 模版管理 -- 按分类查询业务场景
28+
export const fetchBusinessCategoryByGroup = (group) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/material-center/api/business-category/find?group=${group}`)
29+
30+
// 应用管理 -- 获取应用列表
31+
export const fetchApplicationList = (params) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/app-center/api/apps/page`, {params}) // currentPage pageSize
32+
33+
// 应用管理 -- 创建应用
34+
export const createApplication = (params) => getMetaApi(META_SERVICE.Http).post(`${baseUrl}/app-center/api/apps/create`, params)
35+
36+
// 应用管理 -- 编辑应用
37+
export const updateApplication = (id, params) => getMetaApi(META_SERVICE.Http).post(`${baseUrl}/app-center/api/apps/update/${id}`, params)
38+
39+
// 应用管理 -- 删除应用
40+
export const deleteApplication = (id) => getMetaApi(META_SERVICE.Http).get(`${baseUrl}/app-center/api/apps/delete/${id}`)
41+
42+
// 模板管理 -- 查询页面列表
43+
export const getPageList = (id) => getMetaApi(META_SERVICE.Http).get(`/app-center/api/pages/list/${id}`)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Copyright (c) 2023 - present TinyEngine Authors.
3+
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
4+
*
5+
* Use of this source code is governed by an MIT-style license.
6+
*
7+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10+
*
11+
*/
12+
13+
import { createApp } from 'vue'
14+
import initSvgs from '@opentiny/tiny-engine-svgs'
15+
import { mergeRegistry, initServices } from '@opentiny/tiny-engine-meta-register'
16+
import './styles/vars.less'
17+
import App from './App.vue'
18+
19+
export const initTemplate = ({ registry, lifeCycles = {} }) => {
20+
const { beforeAppCreate } = lifeCycles
21+
22+
mergeRegistry(...(Array.isArray(registry) ? registry : [registry]))
23+
beforeAppCreate?.()
24+
25+
initServices()
26+
27+
const app = createApp(App)
28+
29+
initSvgs(app)
30+
31+
app.mount('#app')
32+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:root {
2+
--te-template-common-text-color: var(--te-common-text-primary);
3+
--te-template-common-text-color-secondary: var(--te-common-text-secondary);
4+
--te-template-common-bg-color: var(--te-common-bg-default);
5+
--te-template-common-container-bg-color: var(--te-common-bg-container);
6+
--te-template-common-bg-color-active: var(--te-common-bg-container);
7+
--te-template-common-bg-color-hover: var(--te-common-bg-container);
8+
--te-template-common-before-bg-color: var(--te-common-bg-primary);
9+
--te-template-common-border-color: var(--te-common-border-divider);
10+
--te-template-common-border-bg-color: var(--te-common-border-bg-divider);
11+
12+
// 列表 - 列表状态切换图标
13+
--te-template-app-center-btn-bg-color: var(--te-common-bg-container);
14+
--te-template-app-center-btn-icon-color: var(--te-common-icon-secondary);
15+
--te-template-app-center-btn-color-active: var(--te-common-icon-primary);
16+
--te-template-app-center-btn-border-color-active: var(--te-common-border-active);
17+
--te-template-app-center-btn-bg-color-active: var(--te-common-bg-default);
18+
19+
// 列表
20+
--te-template-center-common-item-bg-color: var(--te-common-bg-container-weaken);
21+
--te-template-center-common-item-tag-bg-color: var(--te-common-bg-prompt);
22+
--te-template-center-common-item-operation-bg-color: var(--te-common-bg-prompt);
23+
--te-template-center-common-item-desc-text-color: var(--te-common-text-secondary);
24+
--te-template-center-common-item-from-text-color: var(--te-common-text-weaken);
25+
}

0 commit comments

Comments
 (0)