|
@@ -1,176 +1,86 @@
|
|
|
-import Loading from './loading/index.js';
|
|
|
|
|
-import Modal from './modal/index.js';
|
|
|
|
|
-import DateTime from './dateTime/index.js';
|
|
|
|
|
-import DateTimeV2 from './dateTime-v2/index.js';
|
|
|
|
|
-import Date from './date/index.js';
|
|
|
|
|
-import Checkbox from '../packages/checkbox/index.js';
|
|
|
|
|
-import AmisWidget from '../packages/amis/index.js';
|
|
|
|
|
-import PageSizeSelect from './page-size-select/index.js';
|
|
|
|
|
-import Time from './time/index.js';
|
|
|
|
|
-import Switches from './switches/index.js';
|
|
|
|
|
-import YearPicker from './year-picker/index.js';
|
|
|
|
|
-import VueBootstrapPagination from './vue-bootstrap-pagination/index.js';
|
|
|
|
|
-import VueMonthlyPicker from './vue-monthly-picker/index.js';
|
|
|
|
|
-import UploadWidget from './upload-widget/index.js';
|
|
|
|
|
-import Scanner from './scanner/index.js';
|
|
|
|
|
-import Navbar from './navbar/index.js';
|
|
|
|
|
-import ImagePreview from './image-preview/index.js';
|
|
|
|
|
-import InfoWindow from './info/index.js';
|
|
|
|
|
-import ProcessReport from './process/index.js';
|
|
|
|
|
-import ProcessReportResult from './process/process-report-result.js';
|
|
|
|
|
-import ProcessReportResultPreview from './process/process-report-result-preview.js';
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-import DocGenerator from './info/doc-generator.js';
|
|
|
|
|
-import SearchWidget from './info/search-widget.js';
|
|
|
|
|
-import MultiSearchWidget from './info/multi-search-widget.js';
|
|
|
|
|
-import SearchAutoCompleteWidget from './info/search-auto-complete-widget.js';
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-import PrintEpc from './print/print-epc.js';
|
|
|
|
|
-import PrintWidget from './print/print-widget.js';
|
|
|
|
|
-
|
|
|
|
|
-// import Pagination from './pagination/index.js';
|
|
|
|
|
-
|
|
|
|
|
-import TreeViewNode from './tree/index.js';
|
|
|
|
|
-import ClientOrganization from './client-organization/index.js';
|
|
|
|
|
|
|
+import * as components from './components';
|
|
|
|
|
|
|
|
import langZhCn from './i18n/zh-CN.js';
|
|
import langZhCn from './i18n/zh-CN.js';
|
|
|
import langEnUs from './i18n/en-US.js';
|
|
import langEnUs from './i18n/en-US.js';
|
|
|
|
|
|
|
|
-// import VueI18n from 'vue-i18n';
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-import Uuid from './common/Uuid.js';
|
|
|
|
|
-import Common from './common/Common.js';
|
|
|
|
|
-import SqlApi from './common/SqlApi.js';
|
|
|
|
|
-import Notify from './common/Notify.js';
|
|
|
|
|
-import IFrameUtil from './common/IFrameUtil.js';
|
|
|
|
|
-import UserStorageResource from './common/UserStorageResource.js';
|
|
|
|
|
-import DownloadService from './common/DownloadService.js';
|
|
|
|
|
-import ProcessReportResource from './process/src/api/ProcessReportResource.js';
|
|
|
|
|
-import CssUtil from './common/CssUtil.js';
|
|
|
|
|
-import JsUtil from './common/JsUtil.js';
|
|
|
|
|
-
|
|
|
|
|
-import ModalFix from './modal/src/ModalFix.js';
|
|
|
|
|
-import PrintUtil from './print/src/PrintUtil.js';
|
|
|
|
|
-
|
|
|
|
|
-const components = [
|
|
|
|
|
- Loading,
|
|
|
|
|
- Modal,
|
|
|
|
|
- DateTime,
|
|
|
|
|
- DateTimeV2,
|
|
|
|
|
- Date,
|
|
|
|
|
- Checkbox,
|
|
|
|
|
- AmisWidget,
|
|
|
|
|
- PageSizeSelect,
|
|
|
|
|
- Time,
|
|
|
|
|
- Switches,
|
|
|
|
|
- YearPicker,
|
|
|
|
|
- VueBootstrapPagination,
|
|
|
|
|
- VueMonthlyPicker,
|
|
|
|
|
- UploadWidget,
|
|
|
|
|
- Scanner,
|
|
|
|
|
- Navbar,
|
|
|
|
|
- ImagePreview,
|
|
|
|
|
- InfoWindow,
|
|
|
|
|
- ProcessReport,
|
|
|
|
|
- ProcessReportResult,
|
|
|
|
|
- ProcessReportResultPreview,
|
|
|
|
|
- DocGenerator,
|
|
|
|
|
- SearchWidget,
|
|
|
|
|
- MultiSearchWidget,
|
|
|
|
|
- SearchAutoCompleteWidget,
|
|
|
|
|
- PrintEpc,
|
|
|
|
|
- PrintWidget,
|
|
|
|
|
- TreeViewNode,
|
|
|
|
|
- ClientOrganization,
|
|
|
|
|
- // Pagination
|
|
|
|
|
-];
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-const install = function (app, opts = {}) {
|
|
|
|
|
- console.log('start install.');
|
|
|
|
|
- /* istanbul ignore if */
|
|
|
|
|
- // if (install.installed){
|
|
|
|
|
- // console.log('pc-component-v3 already installed.');
|
|
|
|
|
- // return;
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+export * from './components';
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- // Vue.use(VueI18n);
|
|
|
|
|
|
|
+export const install = function (app) {
|
|
|
|
|
+ console.log('start install pc-component-v3.');
|
|
|
|
|
|
|
|
app.mixin({
|
|
app.mixin({
|
|
|
beforeCreate() {
|
|
beforeCreate() {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
- // 这里为了防止 beforeCreate 比 vue-i18n 的 beforeCreate 先执行导致 this.$i18n 为空
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- // 判断是否为根节点,合并国际化信息
|
|
|
|
|
- if (this.$root === this && this.$i18n) {
|
|
|
|
|
- //if (this.$i18n) {
|
|
|
|
|
- console.log('merge pc-component-v3 i18n.');
|
|
|
|
|
- _self.$i18n.mergeLocaleMessage('zh-CN', langZhCn);
|
|
|
|
|
- _self.$i18n.mergeLocaleMessage('en-US', langEnUs);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // 判断是否为根节点,合并国际化信息
|
|
|
|
|
+ if (this.$root === this && this.$i18n) {
|
|
|
|
|
+ console.log('merge pc-component-v3 i18n.');
|
|
|
|
|
+ _self.$i18n.mergeLocaleMessage('zh-CN', langZhCn);
|
|
|
|
|
+ _self.$i18n.mergeLocaleMessage('en-US', langEnUs);
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- components.map(component => {
|
|
|
|
|
- console.log('install component: ' + component.name);
|
|
|
|
|
- app.component(component.name, component);
|
|
|
|
|
|
|
+ Object.keys(components).forEach(key => {
|
|
|
|
|
+ const component = components[key];
|
|
|
|
|
+ if (component.install) {
|
|
|
|
|
+ console.log('install pc-component-v3 component: ' + component.name);
|
|
|
|
|
+ app.use(component);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- install.installed = true;
|
|
|
|
|
|
|
+ console.log('pc-component-v3 install finished.');
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- console.log('install finished.');
|
|
|
|
|
|
|
+ return app;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+// const install = function (app, opts = {}) {
|
|
|
|
|
+// console.log('start install.');
|
|
|
|
|
+// /* istanbul ignore if */
|
|
|
|
|
+// // if (install.installed){
|
|
|
|
|
+// // console.log('pc-component-v3 already installed.');
|
|
|
|
|
+// // return;
|
|
|
|
|
+// // }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// // Vue.use(VueI18n);
|
|
|
|
|
+
|
|
|
|
|
+// app.mixin({
|
|
|
|
|
+// beforeCreate() {
|
|
|
|
|
+// var _self = this;
|
|
|
|
|
+// // 这里为了防止 beforeCreate 比 vue-i18n 的 beforeCreate 先执行导致 this.$i18n 为空
|
|
|
|
|
+// this.$nextTick(() => {
|
|
|
|
|
+// // 判断是否为根节点,合并国际化信息
|
|
|
|
|
+// if (this.$root === this && this.$i18n) {
|
|
|
|
|
+// //if (this.$i18n) {
|
|
|
|
|
+// console.log('merge pc-component-v3 i18n.');
|
|
|
|
|
+// _self.$i18n.mergeLocaleMessage('zh-CN', langZhCn);
|
|
|
|
|
+// _self.$i18n.mergeLocaleMessage('en-US', langEnUs);
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
+// },
|
|
|
|
|
+// });
|
|
|
|
|
+
|
|
|
|
|
+// components.map(component => {
|
|
|
|
|
+// console.log('install component: ' + component.name);
|
|
|
|
|
+// app.component(component.name, component);
|
|
|
|
|
+// });
|
|
|
|
|
+
|
|
|
|
|
+// install.installed = true;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// console.log('install finished.');
|
|
|
|
|
+// };
|
|
|
|
|
+
|
|
|
|
|
+let version = '1.0.28';
|
|
|
|
|
+
|
|
|
|
|
+export {
|
|
|
|
|
+ version,
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
- version: '1.2.9',
|
|
|
|
|
install,
|
|
install,
|
|
|
- Loading,
|
|
|
|
|
- Modal,
|
|
|
|
|
- DateTime,
|
|
|
|
|
- DateTimeV2,
|
|
|
|
|
- Date,
|
|
|
|
|
- Checkbox,
|
|
|
|
|
- AmisWidget,
|
|
|
|
|
- PageSizeSelect,
|
|
|
|
|
- Time,
|
|
|
|
|
- Switches,
|
|
|
|
|
- YearPicker,
|
|
|
|
|
- VueBootstrapPagination,
|
|
|
|
|
- VueMonthlyPicker,
|
|
|
|
|
- UploadWidget,
|
|
|
|
|
- Scanner,
|
|
|
|
|
- Navbar,
|
|
|
|
|
- ImagePreview,
|
|
|
|
|
- InfoWindow,
|
|
|
|
|
- DocGenerator,
|
|
|
|
|
- ProcessReport,
|
|
|
|
|
- ProcessReportResult,
|
|
|
|
|
- ProcessReportResultPreview,
|
|
|
|
|
- SearchWidget,
|
|
|
|
|
- MultiSearchWidget,
|
|
|
|
|
- SearchAutoCompleteWidget,
|
|
|
|
|
- PrintEpc,
|
|
|
|
|
- PrintWidget,
|
|
|
|
|
- TreeViewNode,
|
|
|
|
|
- ClientOrganization,
|
|
|
|
|
- // Pagination,
|
|
|
|
|
- Uuid,
|
|
|
|
|
- Common,
|
|
|
|
|
- SqlApi,
|
|
|
|
|
- Notify,
|
|
|
|
|
- IFrameUtil,
|
|
|
|
|
- ModalFix,
|
|
|
|
|
- PrintUtil,
|
|
|
|
|
- UserStorageResource,
|
|
|
|
|
- DownloadService,
|
|
|
|
|
- ProcessReportResource,
|
|
|
|
|
- CssUtil,
|
|
|
|
|
- JsUtil,
|
|
|
|
|
|
|
+ version,
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+
|