Compare commits

...

2 Commits

Author SHA1 Message Date
wangshaoping e7b6fecfb0 基础框架发布: 8.2.36 1 week ago
wangshaoping 50de974e4d 基础框架发布: 8.2.36 1 week ago
  1. 1
      io.sc.platform.core.frontend/.npmrc
  2. 28
      io.sc.platform.core.frontend/src/platform/layout/sub-layout/Topper.vue
  3. 1
      io.sc.platform.core.frontend/template-project/.npmrc
  4. 5
      io.sc.platform.core.frontend/template-project/src/views/testcase/excel/Excel copy.vue
  5. 67
      io.sc.platform.core.frontend/template-project/src/views/testcase/excel/Excel.vue
  6. 51
      io.sc.platform.core.frontend/template-project/src/views/testcase/word/Word.vue
  7. 5
      io.sc.platform.poi/src/main/java/io/sc/platform/poi/univerjs/model/IWorkbookData.java

1
io.sc.platform.core.frontend/.npmrc

@ -11,4 +11,5 @@ git-checks=false
# 登录 npm 仓库的用户认证信息, 在 npm publish 时使用, publish 的 npm registry 在 package.json 文件中 publishConfig 部分配置 # 登录 npm 仓库的用户认证信息, 在 npm publish 时使用, publish 的 npm registry 在 package.json 文件中 publishConfig 部分配置
# _authToken 可通过以下命令获取 # _authToken 可通过以下命令获取
# curl -X PUT -H "Content-Type:application/json" -d '{"_id":"org.couchdb.user:admin","name":"admin","password":"admin"}' http://nexus.sc.io:8000/repository/npm-releases/-/user/org.couchdb.user:admin # curl -X PUT -H "Content-Type:application/json" -d '{"_id":"org.couchdb.user:admin","name":"admin","password":"admin"}' http://nexus.sc.io:8000/repository/npm-releases/-/user/org.couchdb.user:admin
# 上海农商银行内网令牌: NpmToken.ed1a68b7-543f-3c15-8451-2edbc0de057f
//nexus.sc.io:8000/repository/npm-releases/:_authToken=NpmToken.67c99588-56a6-3ce1-9bea-a9a6164f8090 //nexus.sc.io:8000/repository/npm-releases/:_authToken=NpmToken.67c99588-56a6-3ce1-9bea-a9a6164f8090

28
io.sc.platform.core.frontend/src/platform/layout/sub-layout/Topper.vue

@ -274,6 +274,7 @@ import {
AuthenticationManager, AuthenticationManager,
ComponentManager, ComponentManager,
NotifyManager, NotifyManager,
DialogManager,
Tools, Tools,
} from '@/platform'; } from '@/platform';
import LoginDialog from '@/platform/views/LoginDialog'; import LoginDialog from '@/platform/views/LoginDialog';
@ -433,7 +434,7 @@ const doLogout = () => {
}; };
const findUnCompletedTasks = () => { const findUnCompletedTasks = () => {
axios.get(Environment.apiContextPath('/api/flowable/process/query/myTask?page=1&size=10&pageable=true')).then((response) => { axios.get(Environment.apiContextPath('/api/flowable/process/query/myTask?page=1&size=10&pageable=true&sortBy=-startTime')).then((response) => {
unCompletedTasksRef.value = response.data.content || []; unCompletedTasksRef.value = response.data.content || [];
unCompletedTasksTotalCountRef.value = response.data.totalElements; unCompletedTasksTotalCountRef.value = response.data.totalElements;
}); });
@ -470,18 +471,39 @@ const findUnReadedAnnouncements = () => {
}); });
}; };
const handleTask = (item) => { const afterTaskCompleted = () => {
findUnReadedAnnouncements();
if (Environment.getConfigure().setting.workbenchAutoHandleNextTask) {
axios.get(Environment.apiContextPath('/api/flowable/process/query/myTask?page=1&size=10&pageable=true&sortBy=-startTime')).then((response) => {
const content = response?.data?.content;
if (Tools.isArray(content) && content.length > 0) {
const nextTask = content[0];
DialogManager.confirm(t('home.card.myTask.action.process.tip.nextTask', { businessType: nextTask.businessType }), () => {
handleTask(nextTask);
});
}
});
}
};
const handleTask = (item: any) => {
if (item.taskHandFrontendModelName && item.taskHandFrontendComponentName) { if (item.taskHandFrontendModelName && item.taskHandFrontendComponentName) {
// //
componentRef.value = null; componentRef.value = null;
// //
nextTick(() => { nextTick(() => {
const component = defineAsyncComponent(ComponentManager.getRemoteComponent(item.taskHandFrontendModelName, item.taskHandFrontendComponentName)); const component = defineAsyncComponent({
loader: ComponentManager.getRemoteComponent(item.taskHandFrontendModelName, item.taskHandFrontendComponentName),
onError: (error, retry, fail, attempts) => {
NotifyManager.error(t('home.card.task.tip.remoteComponentLoadError'));
},
});
componentRef.value = h(component, { componentRef.value = h(component, {
action: 'process', action: 'process',
task: item, task: item,
properties: Tools.json2Object(item.taskHandFrontendComponentProperties), properties: Tools.json2Object(item.taskHandFrontendComponentProperties),
onClose: findUnCompletedTasks, onClose: findUnCompletedTasks,
onAfterTaskCompleted: afterTaskCompleted,
}); });
}); });
} else if (item.taskHandFrontendRouteName) { } else if (item.taskHandFrontendRouteName) {

1
io.sc.platform.core.frontend/template-project/.npmrc

@ -1,5 +1,6 @@
# npm 仓库地址, 在 npm install 时使用 # npm 仓库地址, 在 npm install 时使用
registry=http://nexus.sc.io:8000/repository/npm-public/ registry=http://nexus.sc.io:8000/repository/npm-public/
#registry=https://registry.npmmirror.com
# 用户邮箱 # 用户邮箱
email= email=

5
io.sc.platform.core.frontend/template-project/src/views/testcase/excel/Excel copy.vue

@ -8,6 +8,7 @@
// import '@univerjs/sheets-ui/lib/index.css'; // import '@univerjs/sheets-ui/lib/index.css';
// import '@univerjs/sheets-formula/lib/index.css'; // import '@univerjs/sheets-formula/lib/index.css';
/*
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { eventBus } from '@/platform'; import { eventBus } from '@/platform';
@ -60,9 +61,6 @@ onMounted(() => {
}, },
}); });
/**
* 语言改变事件
*/
eventBus.on('onLocaleChanged', (locale) => { eventBus.on('onLocaleChanged', (locale) => {
if (locale === 'en') { if (locale === 'en') {
univer.setLocale(LocaleType.EN_US); univer.setLocale(LocaleType.EN_US);
@ -89,4 +87,5 @@ onMounted(() => {
univer.createUnit(UniverInstanceType.UNIVER_SHEET, {}); univer.createUnit(UniverInstanceType.UNIVER_SHEET, {});
}); });
*/
</script> </script>

67
io.sc.platform.core.frontend/template-project/src/views/testcase/excel/Excel.vue

@ -2,30 +2,61 @@
<div ref="divRef" class="border border-gray-200" style="height: 100%"></div> <div ref="divRef" class="border border-gray-200" style="height: 100%"></div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { axios, Environment } from '@/platform';
/* /*
import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core'; import { ref, onMounted } from 'vue';
import UniverPresetSheetsCoreZhCN from '@univerjs/preset-sheets-core/locales/zh-CN'; import { LocaleType, mergeLocales, Univer, UniverInstanceType } from '@univerjs/core';
import { createUniver, LocaleType, mergeLocales } from '@univerjs/presets'; import DesignZhCN from '@univerjs/design/locale/zh-CN';
import '@univerjs/preset-sheets-core/lib/index.css'; import { UniverDocsPlugin } from '@univerjs/docs';
import { UniverDocsUIPlugin } from '@univerjs/docs-ui';
import DocsUIZhCN from '@univerjs/docs-ui/locale/zh-CN';
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
import { UniverRenderEnginePlugin } from '@univerjs/engine-render';
import { UniverSheetsPlugin } from '@univerjs/sheets';
import { UniverSheetsFormulaUIPlugin } from '@univerjs/sheets-formula-ui';
import SheetsFormulaUIZhCN from '@univerjs/sheets-formula-ui/locale/zh-CN';
import { UniverSheetsNumfmtUIPlugin } from '@univerjs/sheets-numfmt-ui';
import SheetsNumfmtUIZhCN from '@univerjs/sheets-numfmt-ui/locale/zh-CN';
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui';
import SheetsUIZhCN from '@univerjs/sheets-ui/locale/zh-CN';
import SheetsZhCN from '@univerjs/sheets/locale/zh-CN';
import { UniverUIPlugin } from '@univerjs/ui';
import UIZhCN from '@univerjs/ui/locale/zh-CN';
import type { IWorkbookData } from '@univerjs/core';
const { univer, univerAPI } = createUniver({ import '@univerjs/design/lib/index.css';
import '@univerjs/ui/lib/index.css';
import '@univerjs/docs-ui/lib/index.css';
import '@univerjs/sheets-ui/lib/index.css';
import '@univerjs/sheets-formula-ui/lib/index.css';
import '@univerjs/sheets-numfmt-ui/lib/index.css';
const divRef = ref();
const WORKBOOK_DATA: Partial<IWorkbookData> = {};
const univer = new Univer({
locale: LocaleType.ZH_CN, locale: LocaleType.ZH_CN,
locales: { locales: {
[LocaleType.ZH_CN]: mergeLocales(UniverPresetSheetsCoreZhCN), [LocaleType.ZH_CN]: mergeLocales(DesignZhCN, UIZhCN, DocsUIZhCN, SheetsZhCN, SheetsUIZhCN, SheetsFormulaUIZhCN, SheetsNumfmtUIZhCN),
}, },
presets: [
UniverSheetsCorePreset({
container: 'app',
}),
],
}); });
univerAPI.createWorkbook({});
*/
console.log(new Date()); onMounted(() => {
axios.get(Environment.apiContextPath('/api/lcdp/configure/test')).then((response) => { univer.registerPlugin(UniverRenderEnginePlugin);
console.log(response); univer.registerPlugin(UniverFormulaEnginePlugin);
console.log(new Date());
univer.registerPlugin(UniverUIPlugin, {
container: divRef.value,
});
univer.registerPlugin(UniverDocsPlugin);
univer.registerPlugin(UniverDocsUIPlugin);
univer.registerPlugin(UniverSheetsPlugin);
univer.registerPlugin(UniverSheetsUIPlugin);
univer.registerPlugin(UniverSheetsFormulaUIPlugin);
univer.registerPlugin(UniverSheetsNumfmtUIPlugin);
univer.createUnit(UniverInstanceType.UNIVER_SHEET, WORKBOOK_DATA);
}); });
*/
</script> </script>

51
io.sc.platform.core.frontend/template-project/src/views/testcase/word/Word.vue

@ -9,53 +9,4 @@
<div class="text-subtitle2">text-subtitle1</div> <div class="text-subtitle2">text-subtitle1</div>
<div ref="divRef" class="border border-gray-200" style="height: 100%"></div> <div ref="divRef" class="border border-gray-200" style="height: 100%"></div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts"></script>
import { ref, onMounted } from 'vue';
import '@univerjs/design/lib/index.css';
import '@univerjs/ui/lib/index.css';
import '@univerjs/docs-ui/lib/index.css';
import '@univerjs/sheets-ui/lib/index.css';
//import '@univerjs/sheets-formula/lib/index.css';
import { Univer, UniverInstanceType, LocaleType } from '@univerjs/core';
import { defaultTheme } from '@univerjs/design';
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
import { UniverRenderEnginePlugin } from '@univerjs/engine-render';
import { UniverUIPlugin } from '@univerjs/ui';
import { UniverDocsPlugin } from '@univerjs/docs';
import { UniverDocsUIPlugin } from '@univerjs/docs-ui';
import { UniverSheetsPlugin } from '@univerjs/sheets';
import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula';
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui';
const divRef = ref();
onMounted(() => {
const univer = new Univer({
locale: LocaleType.en_US,
theme: defaultTheme,
});
univer.registerPlugin(UniverRenderEnginePlugin);
univer.registerPlugin(UniverFormulaEnginePlugin);
univer.registerPlugin(UniverUIPlugin, {
container: divRef.value,
});
univer.registerPlugin(UniverDocsPlugin, {
hasScroll: false,
});
univer.registerPlugin(UniverDocsUIPlugin);
univer.registerPlugin(UniverSheetsPlugin);
univer.registerPlugin(UniverSheetsUIPlugin);
univer.registerPlugin(UniverSheetsFormulaPlugin);
univer.createUnit(UniverInstanceType.UNIVER_DOC, {});
});
</script>

5
io.sc.platform.poi/src/main/java/io/sc/platform/poi/univerjs/model/IWorkbookData.java

@ -7,7 +7,10 @@ import java.util.Map;
* Snapshot of a workbook. * Snapshot of a workbook.
*/ */
public class IWorkbookData { public class IWorkbookData {
private String id;//Id of the Univer Sheet /**
* Id of the Univer Sheet
*/
private String id;
private Integer rev;//Revision of this spreadsheet. Used in collaborated editing. Starts from one private Integer rev;//Revision of this spreadsheet. Used in collaborated editing. Starts from one
private String name;//Name of the Univer Sheet private String name;//Name of the Univer Sheet
private String appVersion;//Version of Univer model definition private String appVersion;//Version of Univer model definition

Loading…
Cancel
Save