提交 938f4a39 编写于 作者: IBZGIT01's avatar IBZGIT01

ibizdev提交

上级 8e3cec50
MIT License
Copyright (c) 2019 dev_ibizsys
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# ionic_R6
#### Description
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
\ No newline at end of file
# ionic_R6
#### 介绍
{**以下是码云平台说明,您可以替换此简介**
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
\ No newline at end of file
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
import { AppPage } from './app.po';
describe('new App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getPageTitle()).toContain('Tab One');
});
});
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getPageTitle() {
return element(by.css('ion-title')).getText();
}
}
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
{
"name": "myApp",
"integrations": {},
"type": "angular"
}
此差异已折叠。
{
"name": "myApp",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "^7.2.2",
"@angular/core": "^7.2.2",
"@angular/forms": "^7.2.2",
"@angular/http": "^7.2.2",
"@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2",
"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^4.1.0",
"core-js": "^2.5.4",
"echarts": "4.1.0",
"moment": "^2.24.0",
"ng-zorro-antd-mobile": "^0.12.0",
"ng2-file-upload": "^1.3.0",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"zone.js": "~0.8.29"
},
"devDependencies": {
"@angular-devkit/architect": "~0.13.8",
"@angular-devkit/build-angular": "~0.13.8",
"@angular-devkit/core": "~7.3.8",
"@angular-devkit/schematics": "~7.3.8",
"@angular/cli": "~7.3.8",
"@angular/compiler": "~7.2.2",
"@angular/compiler-cli": "~7.2.2",
"@angular/language-service": "~7.2.2",
"@ionic/angular-toolkit": "~1.5.1",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.14.2",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~8.1.0",
"tslint": "~5.16.0",
"typescript": "~3.1.6"
},
"description": "An Ionic project"
}
{
"/": {
"target": "http://127.0.0.1:8080/test"
}
}
\ No newline at end of file
<ion-app>
<ion-router-outlet></ion-router-outlet>
</ion-app>
import { Component } from '@angular/core';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppInitService } from '@global/service/appInit.service';
import { CodeList } from '@global/service/codelist';
import { App } from '@global/service/App';
import { SettingsService } from '@global/service/Settings';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private appInitService: AppInitService,
private app: App,
private themeSetting:SettingsService
) {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
});
const url: URL = new URL(window.location.href);
if (Object.is(url.hash, '') || Object.is(url.hash, '#/')) {
const startUrl: string = this.app.getStartPage();
if (startUrl && !Object.is(startUrl, '')) {
window.location.href = url.origin + url.pathname + '#' + startUrl;
}
}
}
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule,HTTP_INTERCEPTORS } from '@angular/common/http';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { AppInitService } from '@global/service/appInit.service';
import { Http } from '@global/service/Http';
import { App } from '@global/service/App';
import { AppNotification } from '@global/service/Notification';
import { CodeList } from '@global/service/codelist';
import Interceptors from '@global/service/interceptor';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [BrowserModule,HttpClientModule,BrowserAnimationsModule,IonicModule.forRoot(), AppRoutingModule],
providers: [
StatusBar,
SplashScreen,
{ provide: LocationStrategy, useClass: HashLocationStrategy },
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
{ provide: HTTP_INTERCEPTORS, useClass: Interceptors, multi: true },
AppInitService,
Http,
App,
CodeList,
AppNotification
],
bootstrap: [AppComponent]
})
export class AppModule {
}
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1547534604236" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="553" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M511.990608 186.50543a325.503963 325.503963 0 1 0 325.503962 325.503962 325.503963 325.503963 0 0 0-325.503962-325.503962z m-77.375005 108.263974a122.063986 122.063986 0 0 1 64.151406-26.515011 123.691506 123.691506 0 1 1-64.151406 26.515011z m292.038087 419.221978c-0.644227 11.731705-7.391652 20.038838-17.461931 25.972504a97.006962 97.006962 0 0 1-33.22853 11.019665c-27.73565 4.916466-55.810367 5.153813-83.851177 5.357253-26.955797 0.20344-53.911594 0-80.867391 0-28.820663 0-57.641327 0.271253-86.394176 0-18.275691-0.237347-36.551382-0.91548-54.759261-2.203933a151.054183 151.054183 0 0 1-48.283088-10.171999 40.416742 40.416742 0 0 1-20.750877-16.953331 33.906663 33.906663 0 0 1-3.96708-15.936132 156.987849 156.987849 0 0 1 19.937118-85.580417 162.989328 162.989328 0 0 1 86.46199-73.306204 170.414887 170.414887 0 0 1 60.591206-10.646693h95.989763a166.820781 166.820781 0 0 1 111.891987 41.027062 155.495955 155.495955 0 0 1 52.72486 91.887056 166.142648 166.142648 0 0 1 1.966587 39.535169z m-44.383822-98.329322a14.681585 14.681585 0 0 0-19.869304-2.475186c-29.05801 21.157758-105.653161 76.968124-119.351453 87.17403-16.953331 12.579372-33.533689 37.873742-33.53369 37.873742l2.543 4.306146s16.546451-0.5086 45.977435-18.038344c23.463411-13.969545 94.090989-67.542072 122.063986-88.869363a13.969545 13.969545 0 0 0 2.33956-20.004931z" p-id="554"></path><path d="M511.990608 1024C225.275867 1024-7.154306 787.094147 0.169533 498.751887 7.222119 220.615532 238.262119-2.354682 516.500194 0.018784a508.294782 508.294782 0 0 1 277.186968 84.359777 16.512545 16.512545 0 0 1 4.340053 23.327784A16.478638 16.478638 0 0 1 775.445378 111.910771a479.033332 479.033332 0 0 0-742.555915 400.098621c0 264.098996 214.866522 478.965518 478.965518 478.965518s479.101145-214.866522 479.101145-478.965518A473.438732 473.438732 0 0 0 945.995891 309.315362a16.580358 16.580358 0 0 1 7.425559-21.801984 16.546451 16.546451 0 0 1 22.446211 7.662906A506.192569 506.192569 0 0 1 1023.981216 512.009392c0 282.306874-229.683734 511.990608-511.990608 511.990608z" p-id="555"></path><path d="M927.00816 223.361972m-18.648664 0a18.648665 18.648665 0 1 0 37.297329 0 18.648665 18.648665 0 1 0-37.297329 0Z" p-id="556"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1546946578477" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3171" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M216.327 223.774h616.465q27.01 0 46.076 19.066t19.066 46.076v467.115q0 27.01-19.066 46.076t-46.076 19.066H216.327q-26.216 0-46.076-19.066-19.066-19.066-19.066-46.076V591.587v-47.665-30.982-45.282-178.743q0-27.01 19.066-46.076 19.86-19.066 46.076-19.066z m0 631.559h616.465q41.31 0 69.908-28.599 27.804-28.599 27.804-69.114V289.71q0-40.515-27.804-69.114-28.599-28.599-69.908-28.599H216.327q-40.515 0-69.114 28.599-28.599 28.599-28.599 69.114V757.619q0 39.721 28.599 68.32 28.599 29.393 69.114 29.393z m46.076-429.778q0 28.599 19.86 48.459 20.655 20.655 49.254 20.655 28.599 0 49.254-20.655 19.86-19.86 19.86-48.459 0-28.599-19.86-48.459-20.655-20.655-49.254-20.655-28.599 0-49.254 20.655t-19.86 48.459z m32.571 0q0-15.094 11.122-26.216 10.327-10.327 25.421-10.327t25.421 10.327q11.122 11.122 11.122 26.216 0 15.094-11.122 26.216-10.327 10.327-25.421 10.327-14.299 0-25.421-10.327t-11.122-26.216z m368.608 67.526L835.97 665.469q5.561 5.561 5.561 11.122 0 6.355-5.561 11.916-5.561 6.355-11.916 6.355-5.561 0-11.122-6.355L640.544 516.119q-8.739-8.739-22.244-8.739-14.299 0-23.832 8.739-46.076 46.076-138.228 137.434-19.066 19.066-46.87 19.066-27.01 0-46.87-19.066-7.15-7.15-21.449-22.244-9.533-8.739-23.832-8.739-13.505 0-22.244 8.739l-57.198 57.198q-11.122 11.916-23.038 0-5.561-5.561-5.561-11.122t5.561-11.916l57.198-57.198q19.066-19.066 46.87-19.066 27.01 0 46.87 19.066 7.15 7.15 21.449 22.244 8.739 8.739 22.244 8.739 14.299 0 23.832-8.739 45.282-46.076 136.639-137.434 19.86-19.066 47.665-19.066 27.01 0 46.076 19.066z" p-id="3172"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552038197448" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4596" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><defs><style type="text/css"></style></defs><path d="M748.307692 163.446154v697.107692c0 19.692308-25.6 33.476923-43.323077 17.723077L287.507692 537.6c-15.753846-11.815385-15.753846-37.415385 0-49.230769L704.984615 143.753846c17.723077-13.784615 43.323077-1.969231 43.323077 19.692308z" p-id="4597"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1546848026758" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2109" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M172.4 775.4l0.7 0.7c6.7 6.4 16.2 9.7 26 8l229.5-40.5c6.3-1.1 11.8-4.2 16-8.4l0.1 0.1L857 322.7c35.1-35.1 35.1-92.2 0-127.3L752.4 90.7c-17-17-39.6-26.3-63.6-26.3s-46.7 9.3-63.6 26.3L212.8 503.3l0.1 0.1c-4.2 4.2-7.3 9.7-8.4 16L164 749.1c-1.6 9.9 1.8 19.6 8.4 26.3z m377.7-524.8l147.1 147.2-288 288.3-178.6 31.5 31.5-178.7 288-288.3z m117.4-117.5c5.6-5.6 13.1-8.7 21.2-8.7s15.6 3.1 21.2 8.7l104.7 104.7c11.7 11.7 11.7 30.8 0 42.5l-74.9 75-147.1-147.2 74.9-75zM929 900.4H93c-16.5 0-30 13.5-30 30s13.5 30 30 30h836c16.5 0 30-13.5 30-30s-13.5-30-30-30z" p-id="2110"></path></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="37px" height="37px" viewBox="0 0 37 37" enable-background="new 0 0 37 37" xml:space="preserve"> <image id="image0" width="37" height="37" x="0" y="0"
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAlCAMAAADyQNAxAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAC3FBMVEX///+T4u1Dzt8DvdQA
vNMAvNMAvNMAvNMAvNMDvdRDzt902ecHvtQAvNMAvNMHvtSN4OwQwNYAvNMHvtQAvNMQwNZR0eIA
vNMAvNPg9/ouyNwdw9gAvNMwydzu+vwlxdoAvNMnxtpDzt9v2eYsx9vP8vcHvNQTwdcDvdRIzuC8
7fMnxtsAvNNR0eH3/P0Mv9UYwdcMv9ay6/IAvNNo1+VIzuAuyNwMvdQTwdcgxNkMvdQxyNwZw9g1
yd1M0OF32+jG7/X+/v4bwtcTwdcsx9tn1+Xa9fkDvdRT0uIDvdRp2OWx6/Ho+foMv9X+/v7+/v6h
5u/+/v7+/v5z2uf+/v79/v5Lz+D+/v7+/v74/f1i1uU7y96c5e6P4ewDvdQMv9XI8PY+zN5Ezd+y
6/IuyNw+zN7U9PiE3uo0yt04y9163OgAvNMMv9ZR0eF02eeM4Oul5/BR0eIMvdRj1eW27PL3/P3+
/v74/f1k1uRY0+Pc9vng9/pb1OMZw9jF7/XI8PY0yt3k+Pum5/AuyNsQwNZFzuDT8/fo+fo7y95D
zt+n6PADvdTi9/pLz+Alxdrv+vwxyNyh5u/1/P173Ojx+/zX9fgTwdfw+vyg5u+O4exM0OFP0eGc
5e6Y5O6X5O0jxNnO8fb8/v77/f563Ohu2Oai5+/9/v6t6vL5/f0HvtVZ0+Nc1ORy2edi1uWq6PFF
zt/u+vyy6/IMv9W87fPq+ftv2eaK4OtAzd/0+/1l1uTp+vtT0uK77PPr+fsgxNk3yt0nxtuK3+sy
ydyp6PHs+vvJ8PYdw9iU4+0+zN5h1eVl1+Rs2eWH3uoHvtTb9vmv6vGE3uqB3enO8vcnxtqx6vHH
8PU8zN6r6fHU9Pis6fJp2OXw+/x62+hO0OHP8vcwydw1yd2e5u9n1+Upx9vy+/wsx9tJz+D2/P04
y93I8PW67PPf9vnC7/S37fJHz+BU0uJ12ueO4OyW4+3///8rU5UbAAAAa3RSTlMAH1iKtdjw/opY
H0eU3ZRHOpj09Jg6a9VrEon+iRISkpISiWv+OtXVOphH9EeUH93dH1hYirXY2PDw/v7w2LWKWB/d
3R+UR/T0R5iYOtXVOmv+a4mJEpKSEhKJ/olr1Ws6mDpHlEcfWIpYHy5FZtQAAAABYktHRACIBR1I
AAAAB3RJTUUH4wETAToi0sPn5wAAAp9JREFUOMt1lOVbVEEUxkdZWIxFXVEM7O7AFru7uzteBCQu
KRhX2rUQJQRdFFhBwBZFEEVAERVbsbvrL/Au7sydDc+H+8x5z++ZOXPumUMIZ1WqWimsbZQ21grb
atWJZatRUwWXDa5u7u5urhtdVHa1LDC166g9PL28BYP5ePnWta9nCtV3gJ+/YGQBgQ4NjJiGjZSb
ggQzC27s2ESGmjbD5i2GyNZt4vYQioWGNW/BqJYIpwlFAJEQo1h6Oxwp1Eqp2UnlXdi9xw972aHR
rQ25tWkr7mNqTOR+4QA85dz827WvpDogVhbjEJ+gwUHuCon2eqijOslH1g5BsvDDHKXt1FmiusCd
05KBI0dTjOqRakdI125imqxE6TxMaisIKd17kJ44xinpyDAv7nEn0guZ1AvJigGyzakTtqQ3aAkD
TkoFxSlz6rSC9AFN6wwy0s7inH55PkcU0y8wrC/pF0PXF5ErXAJ0eflx0leHMFaP/mTAZbouwJWr
foCor1hedqEG12hkIHFme3nnS+GiKME7oBglgnAdXjTiTAZBS520xBtuhZWdAJTeLNOF0sawJoPZ
HTnTHxqZQL1bCjIEqWbQbeBO+V3m5tqSoUg3hbT3cJ/3S53IsOGi1oh58FA6jhd8RowkZBQe8drj
Mn1S/FN5IvUEGT1Gw2/miacVz/CcU8aO07fheBRzWpb0J1/gJadMqOzoiZNErqeS8ep1Cd7IwuQp
/57HVOXbCia+ey+llST/6WnT6VObgQ9sQAgfY30LouWtZrJXO2s2PoUKFm3OXHkEzJuvLPpsjnxZ
sJCDJFu0GIFfjZlvJQ5LTEfT0mXqspzv7GWmBP1Q2y+3MOdWrFRB/Pnrd0Tmn/J4UWW36j8zc/Wa
tYa5arVuPR/4CyeiB37+cbpVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE5LTAxLTE4VDE3OjU4OjM0
KzA4OjAwys3J3AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOS0wMS0xOFQxNzo1ODozNCswODowMLuQ
cWAAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAAElFTkSuQmCC" />
</svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552099203268" class="icon" style="" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1084" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.03125" height="32"><defs><style type="text/css"></style></defs><path d="M0 572.14976h695.07584v240.39936l324.80256-299.66848-324.80256-299.71456V453.5296H0v118.62016z" fill="#CC5323" p-id="1085"></path></svg>
\ No newline at end of file
<svg width="350" height="140" xmlns="http://www.w3.org/2000/svg" style="background:#f6f7f9"><g fill="none" fill-rule="evenodd"><path fill="#F04141" style="mix-blend-mode:multiply" d="M61.905-34.23l96.194 54.51-66.982 54.512L22 34.887z"/><circle fill="#10DC60" style="mix-blend-mode:multiply" cx="155.5" cy="135.5" r="57.5"/><path fill="#3880FF" style="mix-blend-mode:multiply" d="M208.538 9.513l84.417 15.392L223.93 93.93z"/><path fill="#FFCE00" style="mix-blend-mode:multiply" d="M268.625 106.557l46.332-26.75 46.332 26.75v53.5l-46.332 26.75-46.332-26.75z"/><circle fill="#7044FF" style="mix-blend-mode:multiply" cx="299.5" cy="9.5" r="38.5"/><rect fill="#11D3EA" style="mix-blend-mode:multiply" transform="rotate(-60 148.47 37.886)" x="143.372" y="-7.056" width="10.196" height="89.884" rx="5.098"/><path d="M-25.389 74.253l84.86 8.107c5.498.525 9.53 5.407 9.004 10.905a10 10 0 0 1-.057.477l-12.36 85.671a10.002 10.002 0 0 1-11.634 8.42l-86.351-15.226c-5.44-.959-9.07-6.145-8.112-11.584l13.851-78.551a10 10 0 0 1 10.799-8.219z" fill="#7044FF" style="mix-blend-mode:multiply"/><circle fill="#0CD1E8" style="mix-blend-mode:multiply" cx="273.5" cy="106.5" r="20.5"/></g></svg>
import ViewEngine from './view-engine';
/**
* 编辑视图引擎
*
* @export
* @class EditViewEngine
* @extends {ViewEngine}
*/
export default class EditViewEngine extends ViewEngine {
/**
* 表单部件
*
* @protected
* @type {*}
* @memberof EditViewEngine
*/
protected form: any;
/**
* 父健为当前健
*
* @protected
* @type {string}
* @memberof EditViewEngine
*/
protected p2k: string = '';
/**
* 初始化编辑视图引擎
*
* @param {*} [options={}]
* @memberof EditViewEngine
*/
public init(options: any = {}): void {
this.form = options.form;
this.p2k = options.p2k;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof EditViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getForm()) {
const tag = this.getForm().name;
if (Object.is(this.p2k, '1') && this.viewdata.srfparentdata && !Object.is(this.viewdata.srfparentdata.srfparentkey, '')) {
Object.assign(this.viewdata, { srfkey: this.viewdata.srfparentdata.srfparentkey });
}
const action: string = this.viewdata.srfkey && !Object.is(this.viewdata.srfkey, '') ? 'load' : 'loaddraft';
this.setViewState2({ tag: tag, action: action, viewdata: this.viewdata });
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof EditViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'form')) {
this.formEvent(eventName, args);
}
}
/**
* 表单事件
*
* @param {string} eventName
* @param {*} args
* @memberof EditViewEngine
*/
public formEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.onFormLoad(args);
}
if (Object.is(eventName, 'save')) {
this.onFormSave(args);
}
if (Object.is(eventName, 'remove')) {
this.onFormRemove(args);
}
}
/**
* 表单加载完成
*
* @param {*} args
* @memberof EditViewEngine
*/
public onFormLoad(args: any): void {
if (Object.is(args.srfuf, '1')) {
this.view.datainfo = args.srfmajortext;
this.view.viewdataschange.emit({action:'load',items:args});
}
}
/**
* 表单保存完成
*
* @param {*} args
* @memberof EditViewEngine
*/
public onFormSave(args: any): void {
if(this.view){
this.view.viewdataschange.emit({action:'save',items:args});
}
}
/**
* 表单删除完成
*
* @param {*} args
* @memberof EditViewEngine
*/
public onFormRemove(args: any): void {
this.view.viewrefreshTag =true;
this.view.viewdataschange.emit({action:'remove',items:args});
}
/**
* 处理实体界面行为
*
* @param {string} tag
* @param {string} [actionmode]
* @returns {void}
* @memberof EditViewEngine
*/
public doSysUIAction(tag: string, actionmode?: string): void {
// if (Object.is(tag, 'Help')) {
// this.doHelp();
// return;
// }
// if (Object.is(tag, 'SaveAndStart')) {
// this.doSaveAndStart();
// return;
// }
// if (Object.is(tag, 'SaveAndExit')) {
// this.doSaveAndExit();
// return;
// }
// if (Object.is(tag, 'SaveAndNew')) {
// this.doSaveAndNew();
// return;
// }
if (Object.is(tag, 'Save')) {
this.doSave();
return;
}
// if (Object.is(tag, 'Print')) {
// this.doPrint();
// return;
// }
// if (Object.is(tag, 'Copy')) {
// this.doCopy();
// return;
// }
// if (Object.is(tag, 'RemoveAndExit')) {
// this.doRemoveAndExit();
// return;
// }
// if (Object.is(tag, 'Refresh')) {
// this.doRefresh();
// return;
// }
// if (Object.is(tag, 'New')) {
// this.doNew();
// return;
// }
// if (Object.is(tag, 'FirstRecord')) {
// this.doMoveToRecord('first');
// return;
// }
// if (Object.is(tag, 'PrevRecord')) {
// this.doMoveToRecord('prev');
// return;
// }
// if (Object.is(tag, 'NextRecord')) {
// this.doMoveToRecord('next');
// return;
// }
// if (Object.is(tag, 'LastRecord')) {
// this.doMoveToRecord('last');
// return;
// }
// if (Object.is(tag, 'Exit') || Object.is(tag, 'Close')) {
// this.doExit();
// return;
// }
super.doSysUIAction(tag, actionmode);
}
/**
* 编辑界面_保存操作
*
* @memberof IBizEditViewController
*/
public doSave(): void {
// this.afterformsaveaction = '';
if(this.viewdata){
this.saveData(this.viewdata);
}else{
this.saveData({});
}
}
/**
* 保存视图数据
*
* @param {*} [arg={}]
* @memberof EditViewEngine
*/
public saveData(arg: any = {}): void {
if (this.getForm()) {
const tag = this.getForm().name;
this.setViewState2({ tag: tag, action: 'save', viewdata: arg });
}
}
/**
* 获取表单对象
*
* @returns {*}
* @memberof EditViewEngine
*/
public getForm(): any {
return this.form;
}
}
\ No newline at end of file
此差异已折叠。
import ViewEngine from './view-engine';
/**
* 编辑视图引擎
*
* @export
* @class MobEditView9Engine
* @extends {ViewEngine}
*/
export default class MobEditView9Engine extends ViewEngine {
/**
* 表单部件
*
* @protected
* @type {*}
* @memberof MobEditView9Engine
*/
protected form: any;
/**
* 父健为当前健
*
* @protected
* @type {string}
* @memberof MobEditView9Engine
*/
protected p2k: string = '';
/**
* 初始化编辑视图引擎
*
* @param {*} [options={}]
* @memberof MobEditView9Engine
*/
public init(options: any = {}): void {
this.form = options.form;
this.p2k = options.p2k;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MobEditView9Engine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getForm()) {
const tag = this.getForm().name;
if (Object.is(this.p2k, '1') && this.viewdata.srfparentdata && !Object.is(this.viewdata.srfparentdata.srfparentkey, '')) {
Object.assign(this.viewdata, { srfkey: this.viewdata.srfparentdata.srfparentkey });
}
const action: string = this.viewdata.srfkey && !Object.is(this.viewdata.srfkey, '') ? 'load' : 'loaddraft';
this.setViewState2({ tag: tag, action: action, viewdata: this.viewdata });
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof MobEditView9Engine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'form')) {
this.formEvent(eventName, args);
}
}
/**
* 表单事件
*
* @param {string} eventName
* @param {*} args
* @memberof MobEditView9Engine
*/
public formEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.onFormLoad(args);
}
if (Object.is(eventName, 'save')) {
this.onFormSave(args);
}
if (Object.is(eventName, 'remove')) {
this.onFormRemove(args);
}
}
/**
* 表单加载完成
*
* @param {*} args
* @memberof MobEditView9Engine
*/
public onFormLoad(args: any): void {
if (Object.is(args.srfuf, '1')) {
this.view.datainfo = args.srfmajortext;
this.view.viewdataschange.emit({action:'load',items:args});
}
}
/**
* 表单保存完成
*
* @param {*} args
* @memberof MobEditView9Engine
*/
public onFormSave(args: any): void {
if(this.view){
this.view.viewdataschange.emit({action:'save',items:args});
}
}
/**
* 表单删除完成
*
* @param {*} args
* @memberof MobEditView9Engine
*/
public onFormRemove(args: any): void {
this.view.viewrefreshTag =true;
this.view.viewdataschange.emit({action:'remove',items:args});
}
/**
* 处理实体界面行为
*
* @param {string} tag
* @param {string} [actionmode]
* @returns {void}
* @memberof MobEditView9Engine
*/
public doSysUIAction(tag: string, actionmode?: string): void {
// if (Object.is(tag, 'Help')) {
// this.doHelp();
// return;
// }
// if (Object.is(tag, 'SaveAndStart')) {
// this.doSaveAndStart();
// return;
// }
// if (Object.is(tag, 'SaveAndExit')) {
// this.doSaveAndExit();
// return;
// }
// if (Object.is(tag, 'SaveAndNew')) {
// this.doSaveAndNew();
// return;
// }
if (Object.is(tag, 'Save')) {
this.doSave();
return;
}
// if (Object.is(tag, 'Print')) {
// this.doPrint();
// return;
// }
// if (Object.is(tag, 'Copy')) {
// this.doCopy();
// return;
// }
// if (Object.is(tag, 'RemoveAndExit')) {
// this.doRemoveAndExit();
// return;
// }
// if (Object.is(tag, 'Refresh')) {
// this.doRefresh();
// return;
// }
// if (Object.is(tag, 'New')) {
// this.doNew();
// return;
// }
// if (Object.is(tag, 'FirstRecord')) {
// this.doMoveToRecord('first');
// return;
// }
// if (Object.is(tag, 'PrevRecord')) {
// this.doMoveToRecord('prev');
// return;
// }
// if (Object.is(tag, 'NextRecord')) {
// this.doMoveToRecord('next');
// return;
// }
// if (Object.is(tag, 'LastRecord')) {
// this.doMoveToRecord('last');
// return;
// }
// if (Object.is(tag, 'Exit') || Object.is(tag, 'Close')) {
// this.doExit();
// return;
// }
super.doSysUIAction(tag, actionmode);
}
/**
* 编辑界面_保存操作
*
* @memberof IBizEditViewController
*/
public doSave(): void {
// this.afterformsaveaction = '';
if(this.viewdata){
this.saveData(this.viewdata);
}else{
this.saveData({});
}
}
/**
* 保存视图数据
*
* @param {*} [arg={}]
* @memberof MobEditView9Engine
*/
public saveData(arg: any = {}): void {
if (this.getForm()) {
const tag = this.getForm().name;
this.setViewState2({ tag: tag, action: 'save', viewdata: arg });
}
}
/**
* 获取表单对象
*
* @returns {*}
* @memberof MobEditView9Engine
*/
public getForm(): any {
return this.form;
}
}
\ No newline at end of file
此差异已折叠。
import ViewEngine from './view-engine';
/**
* 多数据引擎
*
* @export
* @class MDViewEngine
* @extends {ViewEngine}
*/
export default class MobMDView9Engine extends ViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridViewEngine
*/
protected mdctrl: any;
/**
* 属性面板
*
* @protected
* @type {*}
* @memberof PickupGridViewEngine
*/
protected propertypanel: any;
/**
* 打开数据
*
* @type {*}
* @memberof GridViewEngine
*/
protected openData?: (params: any) => void;
/**
* 新建数据
*
* @protected
* @memberof GridViewEngine
*/
protected newData?: (params: any) => void;
/**
* Creates an instance of GridViewEngine.
* @memberof GridViewEngine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof GridViewEngine
*/
public init(options: any = {}): void {
this.propertypanel = options.propertypanel;
this.mdctrl = options.mdctrl;
this.openData = options.opendata;
this.newData = options.newdata;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MDViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
const _srfparentdata = this.viewdata.srfparentdata ? { srfparentdata: this.viewdata.srfparentdata } : { srfparentdata: {} };
if (this.getMDCtrl()) {
const tag = this.getMDCtrl().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: _srfparentdata });
}
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'mdctrl')) {
this.MDCtrlEvent(eventName,args);
}
}
/**
*
*
* @param {string} eventName
* @param {*} [args={}]
* @memberof GridViewEngine
*/
/**
* 事件处理
*
* @param {string} eventName
* @param {any[]} args
* @memberof MDViewEngine
*/
public MDCtrlEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'rowclick')) {
this.doEdit(args);
}
if (Object.is(eventName, 'click')) {
this.doEdit(args);
}
if (Object.is(eventName, 'rowdblclick')) {
this.doEdit(args);
}
if (Object.is(eventName, 'selectionchange')) {
this.selectionChange(args);
}
if (Object.is(eventName, 'load')) {
this.MDCtrlLoad(args);
}
if (Object.is(eventName, 'beforeload')) {
this.MDCtrlBeforeLoad(args)
}
}
/**
* 处理实体界面行为
*
* @param {string} tag
* @param {string} [actionmode]
* @returns {void}
* @memberof GridViewEngine
*/
public doSysUIAction(tag: string, actionmode?: string): void {
if (Object.is(tag, 'Edit')) {
this.doEdit();
return;
}
if (Object.is(tag, 'Remove')) {
this.doRemove();
return;
}
if (Object.is(tag, 'SaveRow')) {
this.doSaveEditRow();
return;
}
if (Object.is(tag, 'New')) {
this.doNew();
return;
}
if (Object.is(tag, 'OpenRowEdit')) {
this.doOpenRowEdit();
return;
}
if (Object.is(tag, 'CloseRowEdit')) {
this.doCloseRowEdit();
return;
}
super.doSysUIAction(tag, actionmode);
}
/**
* 多数据项界面_开启行编辑操作
*
* @memberof GridViewEngine
*/
public doOpenRowEdit(): void {
if (this.getMDCtrl()) {
const tag = this.getMDCtrl().name;
this.setViewState2({ tag: tag, action: 'openEdit', viewdata: {} });
}
}
/**
* 多数据项界面_关闭行编辑操作
*
* @memberof GridViewEngine
*/
public doCloseRowEdit(): void {
if (this.getMDCtrl()) {
const tag = this.getMDCtrl().name;
this.setViewState2({ tag: tag, action: 'closeEdit', viewdata: {} });
}
}
/**
* 多数据项界面_提交编辑数据操作
*
* @memberof GridViewEngine
*/
public doSaveEditRow(): void {
if (this.getMDCtrl()) {
const tag = this.getMDCtrl().name;
this.setViewState2({ tag: tag, action: 'submitEidt', viewdata: {} });
}
}
/**
* 多数据项界面_编辑操作
*
* @param {*} [params={}]
* @returns {void}
* @memberof GridViewEngine
*/
public doEdit(params: any = {}): void {
// 获取要编辑的数据集合
if (params && params.srfkey) {
if (this.isFunc(this.getMDCtrl().findItem)) {
params = this.getMDCtrl().findItem('srfkey', params.srfkey);
}
const arg = { data: params };
this.onEditData(arg);
return;
}
if (this.isFunc(this.getMDCtrl().getSelection)) {
const selectedData = this.getMDCtrl().getSelection();
if (selectedData == null || selectedData.length === 0) {
return;
}
this.onEditData({ data: selectedData[0] });
}
}
/**
* 编辑数据
*
* @param {*} arg
* @memberof GridViewEngine
*/
public onEditData(arg: any): void {
const loadParam: any = {};
if (arg.srfcopymode) {
Object.assign(loadParam, {
srfsourcekey: arg.data.srfkey
});
} else {
Object.assign(loadParam, { srfkey: arg.data.srfkey, srfdeid: arg.data.srfdeid });
}
if (this.openData && this.isFunc(this.openData)) {
this.openData(loadParam);
}
}
/**
* 多数据项界面_新建操作
*
* @param {*} [params={}]
* @memberof GridViewEngine
*/
public doNew(params: any = {}): void {
this.onNewData();
}
/**
* 新建数据
*
* @returns {void}
* @memberof GridViewEngine
*/
public onNewData(): void {
let loadParam: any = {};
this.doNewDataNormal(loadParam);
}
/**
* 常规新建数据
*
* @param {*} arg
* @returns {*}
* @memberof GridViewEngine
*/
public doNewDataNormal(arg: any): any {
return this.openDataView(arg);
}
/**
* 多数据项界面_删除操作
*
* @memberof MDViewEngine
*/
public doRemove(): void {
}
public openDataView(view: any = {}): boolean {
const openMode = view.openMode;
if (openMode !== undefined) {
if (Object.is(openMode, 'POPUPMODAL')) {
view.modal = true;
} else if (Object.is(openMode, 'POPUP')) {
view.modal = true;
} else if (Object.is(openMode, '') || Object.is(openMode, 'INDEXVIEWTAB')) {
view.modal = false;
}
}
if (this.newData && this.isFunc(this.newData)) {
this.newData({});
}
return true;
}
/**
* 选中变化
*
* @param {any[]} args
* @memberof GridViewEngine
*/
public selectionChange(args: any[]): void {
if (this.view) {
this.view.viewdataschange.emit(args);
}
if (this.getPropertyPanel()) {
const tag = this.getPropertyPanel().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: args[0] });
}
}
/**
* 多数据部件加载完成
*
* @param {any[]} args
* @memberof MDViewEngine
*/
public MDCtrlLoad(args: any[]) {
if (this.view) {
this.view.viewload.emit(args);
}
}
/**
* 多数据部件加载之前
*
* @param {*} [arg={}]
* @memberof MDViewEngine
*/
public MDCtrlBeforeLoad(arg: any = {}): void {
if (this.viewdata.srfparentdata && Object.keys(this.viewdata.srfparentdata).length > 0) {
Object.assign(arg, { srfparentdata: this.viewdata.srfparentdata });
}
if (this.view) {
Object.assign(arg, { query: this.view.query });
}
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof MDViewEngine
*/
public getMDCtrl(): any {
return this.mdctrl;
}
/**
* 获取属性面板
*
* @returns
* @memberof PickupGridViewEngine
*/
public getPropertyPanel() {
return this.propertypanel;
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
/**
* 多编辑表单视图引擎
*
* @export
* @class MobMEditView9Engine
* @extends {ViewEngine}
*/
export default class MobMEditView9Engine extends ViewEngine {
/**
* 多编辑表单面板
*
* @protected
* @type {*}
* @memberof MobMEditView9Engine
*/
protected meditviewpanel: any;
/**
* 打开数据
*
* @type {*}
* @memberof MobMEditView9Engine
*/
protected openData?: (params: any) => void;
/**
* 新建数据
*
* @protected
* @memberof MobMEditView9Engine
*/
protected newData?: (params: any) => void;
/**
* Creates an instance of MobMEditView9Engine.
* @memberof MobMEditView9Engine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof MobMEditView9Engine
*/
public init(options: any = {}): void {
this.meditviewpanel = options.meditviewpanel;
this.openData = options.opendata;
this.newData = options.newdata;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MobMEditView9Engine
*/
public load(opts: any = {}): void {
super.load(opts);
const _srfparentdata = this.viewdata.srfparentdata ? { srfparentdata: this.viewdata.srfparentdata } : { srfparentdata: {} };
if (this.getMeditviewpanel()) {
const tag = this.getMeditviewpanel().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: _srfparentdata });
}
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof MobMEditView9Engine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'meditviewpanel')) {
this.editviewpanelEvent(eventName, args);
}
}
/**
* 多编辑表单面板事件分发
*
* @param {*} [opts={}]
* @memberof MobMEditView9Engine
*/
public editviewpanelEvent(eventName:string, args:any){
if (Object.is(eventName, 'load')) {
this.view.viewdataschange.emit({action:'load','items':args});
}
if (Object.is(eventName, 'beforesave')) {
this.view.viewdataschange.emit({action:'beforesave','items':args});
this.view.drdatachange.emit({action:'beforesave','items':args});
}
if (Object.is(eventName, 'editformchange')) {
this.view.viewdataschange.emit({action:'editformchange','items':args});
this.view.drdatachange.emit({action:'editformchange','items':args});
}
if (Object.is(eventName, 'savecompleted')) {
this.view.viewdataschange.emit({action:'savecompleted','items':args});
this.view.drdatasaved.emit({action:'savecompleted','items':args});
}
}
/**
* 多编辑表单面板部件
*
* @returns {*}
* @memberof MDViewEngine
*/
public getMeditviewpanel(): any {
return this.meditviewpanel;
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
/**
* 数据选择视图引擎
*
* @export
* @class MDViewEngine
* @extends {ViewEngine}
*/
export default class MobMPickupViewEngine extends ViewEngine {
/**
* pickupviewpanel面板
*
* @type {*}
* @memberof GridViewEngine
*/
protected pickupviewpanel: any;
/**
* 打开数据
*
* @type {*}
* @memberof GridViewEngine
*/
protected openData?: (params: any) => void;
/**
* 新建数据
*
* @protected
* @memberof GridViewEngine
*/
protected newData?: (params: any) => void;
/**
* Creates an instance of GridViewEngine.
* @memberof GridViewEngine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof GridViewEngine
*/
public init(options: any = {}): void {
this.pickupviewpanel = options.pickupviewpanel;
this.openData = options.opendata;
this.newData = options.newdata;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MDViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
const _srfparentdata = this.viewdata.srfparentdata ? { srfparentdata: this.viewdata.srfparentdata } : { srfparentdata: {} };
if (this.getPickupviewpanel()) {
const tag = this.getPickupviewpanel().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: _srfparentdata });
}
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'pickupviewpanel')) {
this.pickupviewpanelEvent(eventName, args);
}
}
/**
* pickupviewpanel事件
*
* @param {string} eventName
* @param {*} [args={}]
* @memberof MDViewEngine
*/
public pickupviewpanelEvent(eventName: string, args: any = {}): void {
if (Object.is(eventName, 'load')) {
this.onPickupviewpanelLoad(args);
}
if (Object.is(eventName, 'dataschange')) {
this.onickupviewpanelDatasChange(args);
}
}
/**
* 搜索表单加载完成
*
* @param {*} [args={}]
* @memberof MDViewEngine
*/
public onPickupviewpanelLoad(args: any = {}): void {
if (this.view) {
this.view.viewload.emit(args);
}
}
public onickupviewpanelDatasChange(args: any = {}): void {
if (this.view) {
this.view.viewdataschange.emit(args);
this.view.viewDatasChange(args);
}
}
public doSysUIAction(tag: string, actionmode?: string): void {
super.doSysUIAction(tag, actionmode);
}
public getPickupviewpanel(): any {
return this.pickupviewpanel;
}
}
\ No newline at end of file
此差异已折叠。
import ViewEngine from './view-engine';
/**
* 编辑视图引擎
*
* @export
* @class MobPickupTreeViewEngine
* @extends {ViewEngine}
*/
export default class MobPickupTreeViewEngine extends ViewEngine {
/**
* 树部件
*
* @protected
* @type {*}
* @memberof MobTreeViewEngine
*/
protected tree: any;
/**
* 初始化编辑视图引擎
*
* @param {*} [options={}]
* @memberof MobTreeViewEngine
*/
public init(options: any = {}): void {
this.tree = options.tree;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MobTreeViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getTree()) {
const tag = this.getTree().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.viewdata });
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof MobTreeViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'tree')) {
this.treeEvent(eventName, args);
}
}
/**
* 树事件
*
* @param {string} eventName
* @param {*} args
* @memberof MobTreeViewEngine
*/
public treeEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.onTreeLoad(args);
}
if (Object.is(eventName, 'selectchange')) {
this.onTreeSelectchange(args);
}
}
/**
* 树加载完成
*
* @param {*} args
* @memberof MobTreeViewEngine
*/
public onTreeLoad(args: any): void {
if (this.view) {
this.view.datainfo = args.srfmajortext;
this.view.viewdataschange.emit({action:'load',items:args});
}
}
/**
* 树点击事件
*
* @param {*} args
* @memberof MobTreeViewEngine
*/
public onTreeSelectchange(args: any): void {
if(this.view){
this.view.selectedArray = args;
this.view.viewdataschange.emit({action:'selectchange',items:args});
}
}
/**
* 获取树对象
*
* @returns {*}
* @memberof MobTreeViewEngine
*/
public getTree(): any {
return this.tree;
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
/**
* 数据选择视图引擎
*
* @export
* @class MDViewEngine
* @extends {ViewEngine}
*/
export default class MobPickupViewEngine extends ViewEngine {
/**
* pickupviewpanel面板
*
* @type {*}
* @memberof GridViewEngine
*/
protected pickupviewpanel: any;
/**
* 打开数据
*
* @type {*}
* @memberof GridViewEngine
*/
protected openData?: (params: any) => void;
/**
* 新建数据
*
* @protected
* @memberof GridViewEngine
*/
protected newData?: (params: any) => void;
/**
* Creates an instance of GridViewEngine.
* @memberof GridViewEngine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof GridViewEngine
*/
public init(options: any = {}): void {
this.pickupviewpanel = options.pickupviewpanel;
this.openData = options.opendata;
this.newData = options.newdata;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MDViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
const _srfparentdata = this.viewdata.srfparentdata ? { srfparentdata: this.viewdata.srfparentdata } : { srfparentdata: {} };
if (this.getPickupviewpanel()) {
const tag = this.getPickupviewpanel().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: _srfparentdata });
}
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'pickupviewpanel')) {
this.pickupviewpanelEvent(eventName, args);
}
}
/**
* pickupviewpanel事件
*
* @param {string} eventName
* @param {*} [args={}]
* @memberof MDViewEngine
*/
public pickupviewpanelEvent(eventName: string, args: any = {}): void {
if (Object.is(eventName, 'load')) {
this.onPickupviewpanelLoad(args);
}
if (Object.is(eventName, 'dataschange')) {
this.onickupviewpanelDatasChange(args);
}
}
/**
* 搜索表单加载完成
*
* @param {*} [args={}]
* @memberof MDViewEngine
*/
public onPickupviewpanelLoad(args: any = {}): void {
if (this.view) {
this.view.viewload.emit(args);
}
}
public onickupviewpanelDatasChange(args: any = {}): void {
if (this.view) {
this.view.viewdataschange.emit(args);
this.view.viewDatasChange(args);
}
}
public doSysUIAction(tag: string, actionmode?: string): void {
super.doSysUIAction(tag, actionmode);
}
public getPickupviewpanel(): any {
return this.pickupviewpanel;
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
/**
* 编辑视图引擎
*
* @export
* @class MobTreeViewEngine
* @extends {ViewEngine}
*/
export default class MobTreeViewEngine extends ViewEngine {
/**
* 树部件
*
* @protected
* @type {*}
* @memberof MobTreeViewEngine
*/
protected tree: any;
/**
* 初始化编辑视图引擎
*
* @param {*} [options={}]
* @memberof MobTreeViewEngine
*/
public init(options: any = {}): void {
this.tree = options.tree;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MobTreeViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getTree()) {
const tag = this.getTree().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.viewdata });
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof MobTreeViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'tree')) {
this.treeEvent(eventName, args);
}
}
/**
* 树事件
*
* @param {string} eventName
* @param {*} args
* @memberof MobTreeViewEngine
*/
public treeEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.onTreeLoad(args);
}
if (Object.is(eventName, 'click')) {
this.onTreeClick(args);
}
}
/**
* 树加载完成
*
* @param {*} args
* @memberof MobTreeViewEngine
*/
public onTreeLoad(args: any): void {
if (this.view) {
this.view.datainfo = args.srfmajortext;
this.view.viewdataschange.emit({action:'load',items:args});
}
}
/**
* 树点击事件
*
* @param {*} args
* @memberof MobTreeViewEngine
*/
public onTreeClick(args: any): void {
if(this.view){
this.view.viewdataschange.emit({action:'click',items:args});
}
}
/**
* 保存视图数据
*
* @param {*} [arg={}]
* @memberof MobTreeViewEngine
*/
public saveData(arg: any = {}): void {
if (this.getTree()) {
const tag = this.getTree().name;
this.setViewState2({ tag: tag, action: 'save', viewdata: arg });
}
}
/**
* 获取树对象
*
* @returns {*}
* @memberof MobTreeViewEngine
*/
public getTree(): any {
return this.tree;
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
/**
* 编辑视图引擎
*
* @export
* @class MobWFActionViewEngine
* @extends {ViewEngine}
*/
export default class MobWFActionViewEngine extends ViewEngine {
/**
* 表单部件
*
* @protected
* @type {*}
* @memberof MobWFActionViewEngine
*/
protected form: any;
/**
* 父健为当前健
*
* @protected
* @type {string}
* @memberof MobWFActionViewEngine
*/
protected p2k: string = '';
/**
* 初始化编辑视图引擎
*
* @param {*} [options={}]
* @memberof MobWFActionViewEngine
*/
public init(options: any = {}): void {
this.form = options.form;
this.p2k = options.p2k;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof MobWFActionViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getForm()) {
const tag = this.getForm().name;
if (Object.is(this.p2k, '1') && this.viewdata.srfparentdata && !Object.is(this.viewdata.srfparentdata.srfparentkey, '')) {
Object.assign(this.viewdata, { srfkey: this.viewdata.srfparentdata.srfparentkey });
}
const action: string = this.viewdata.srfkey && !Object.is(this.viewdata.srfkey, '') ? 'load' : 'loaddraft';
// const action: string ='loaddraft';
this.setViewState2({ tag: tag, action: action, viewdata: this.viewdata });
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof MobWFActionViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'form')) {
this.formEvent(eventName, args);
}
}
/**
* 表单事件
*
* @param {string} eventName
* @param {*} args
* @memberof MobWFActionViewEngine
*/
public formEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.onFormLoad(args);
}
if (Object.is(eventName, 'save')) {
this.onFormSave(args);
}
if (Object.is(eventName, 'remove')) {
this.onFormRemove(args);
}
if (Object.is(eventName, 'wfstart')) {
this.onFormWFStart(args);
}
if (Object.is(eventName, 'wfsubmit')) {
this.onFormWFSubmit(args);
}
}
/**
* 表单加载完成
*
* @param {*} args
* @memberof MobWFActionViewEngine
*/
public onFormLoad(args: any): void {
if (Object.is(args.srfuf, '1')) {
this.view.datainfo = args.srfmajortext;
this.view.viewdataschange.emit({action:'load',items:args});
}
}
/**
* 表单工作流开始流程完成
*
* @param {*} args
* @memberof MobWFActionViewEngine
*/
public onFormWFStart(args: any): void {
if (this.view) {
this.view.viewdataschange.emit({action:'wfstart',items:args});
}
}
/**
* 表单工作流提交完成
*
* @param {*} args
* @memberof MobWFActionViewEngine
*/
public onFormWFSubmit(args: any): void {
if (this.view) {
this.view.viewdataschange.emit({action:'wfsubmit',items:args});
this.view.$activeData = args;
this.view.backView();
this.view.$navCtrl.back();
}
}
/**
* 表单保存完成
*
* @param {*} args
* @memberof MobWFActionViewEngine
*/
public onFormSave(args: any): void {
if(this.view){
this.view.viewdataschange.emit({action:'save',items:args});
if(this.viewdata){
this.submitData(this.viewdata);
}else{
this.submitData({});
}
}
}
/**
* 表单删除完成
*
* @param {*} args
* @memberof MobWFActionViewEngine
*/
public onFormRemove(args: any): void {
this.view.viewrefreshTag =true;
this.view.viewdataschange.emit({action:'remove',items:args});
}
/**
* 处理实体界面行为
*
* @param {string} tag
* @param {string} [actionmode]
* @returns {void}
* @memberof MobWFActionViewEngine
*/
public doSysUIAction(tag: string, actionmode?: string): void {
if (Object.is(tag, 'Save')) {
this.doSave();
return;
}
super.doSysUIAction(tag, actionmode);
}
/**
* 编辑界面_保存操作
*
* @memberof IBizEditViewController
*/
public doSave(): void {
// this.afterformsaveaction = '';
if(this.viewdata){
this.saveData(this.viewdata);
}else{
this.saveData({});
}
}
/**
* 保存视图数据
*
* @param {*} [arg={}]
* @memberof MobWFActionViewEngine
*/
public saveData(arg: any = {}): void {
if (this.getForm()) {
const tag = this.getForm().name;
this.setViewState2({ tag: tag, action: 'save', viewdata: arg });
}
}
/**
* 提交工作流
*
* @param {*} [arg={}]
* @memberof MobWFActionViewEngine
*/
public submitData(arg: any = {}): void {
if (this.getForm()) {
const tag = this.getForm().name;
this.setViewState2({ tag: tag, action: 'submit', viewdata: arg });
}
}
/**
* 获取表单对象
*
* @returns {*}
* @memberof MobWFActionViewEngine
*/
public getForm(): any {
return this.form;
}
}
\ No newline at end of file
import EditViewEngine from './edit-view-engine';
/**
* 编辑视图引擎
*
* @export
* @class EditViewEngine
* @extends {ViewEngine}
*/
export default class MobWFEditViewEngine extends EditViewEngine {
/**
* 表单部件
*
* @protected
* @type {*}
* @memberof EditViewEngine
*/
protected form: any;
/**
* 工具栏
*
* @protected
* @type {*}
* @memberof EditViewEngine
*/
protected righttoolbar: any;
/**
* 快速工具栏
*
* @protected
* @type {*}
* @memberof EditViewEngine
*/
protected quicktoolbar: any;
/**
* 父健为当前健
*
* @protected
* @type {string}
* @memberof EditViewEngine
*/
protected p2k: string = '';
/**
* 初始化编辑视图引擎
*
* @param {*} [options={}]
* @memberof EditViewEngine
*/
public init(options: any = {}): void {
super.init(options);
this.righttoolbar = options.righttoolbar;
this.quicktoolbar =options.quicktoolbar;
}
}
\ No newline at end of file
import EditViewEngine from './edit-view-engine';
/**
* 工作流编辑视图3引擎
*
* @export
* @class EditViewEngine
* @extends {ViewEngine}
*/
export default class MobWFEditView3Engine extends EditViewEngine {
}
\ No newline at end of file
import MobMDViewEngine from './mob-mdview-engine';
export default class MobWFMDViewEngine extends MobMDViewEngine {
}
\ No newline at end of file
import EditViewEngine from './edit-view-engine';
export default class MobWFStartViewEngine extends EditViewEngine {
}
\ No newline at end of file
import { ComUtil } from '@global/util/ComUtil';
/**
*
*
* @export
* @class ViewEngine
*/
export default class ViewEngine {
/**
* 视图部件对象
*
* @protected
* @type {*}
* @memberof ViewEngine
*/
protected view: any = null;
/**
* 引擎参数
*
* @type {*}
* @memberof ViewEngine
*/
protected opt: any = {};
/**
*
*
* @type {*}
* @memberof ViewEngine
*/
protected methods: any = {};
/**
* 视图数据
*
* @type {*}
* @memberof ViewEngine
*/
public viewdata: any = {};
/**
* Creates an instance of ViewEngine.
* @memberof ViewEngine
*/
constructor() { }
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof GridViewEngine
*/
public init(options: any = {}): void {
this.opt = options;
this.methods = options.methods;
this.view = options.view;
const hasviewdata: boolean = this.view.viewdata ? true : false;
if (hasviewdata) {
try {
if(this.view.viewdata.parentdata){
let tempObj;
if(typeof(this.view.viewdata.parentdata)=='string'){
tempObj = JSON.parse(this.view.viewdata.parentdata);
}else{
tempObj = this.view.viewdata.parentdata;
}
Object.assign(this.viewdata, tempObj);
if (this.view.viewdata.srfkey) {
Object.assign(this.viewdata, { srfkey: this.view.viewdata.srfkey });
}
}else{
if(typeof(this.view.viewdata) =='string'){
Object.assign(this.viewdata, JSON.parse(this.view.viewdata));
}else{
Object.assign(this.viewdata, this.view.viewdata);
}
}
} catch (error) {
console.log(error);
}
} else {
const _viewdata: any = {};
let router = this.view.$route;
// if (router && router.length >0) {
// if(router.startsWith("parentdata")){
// let tempRouter = JSON.parse(router.split("=")[1]).srfparentdata;
// if(Object.keys(tempRouter).length >0){
// router ="";
// Object.keys(tempRouter).forEach((item:any,index:any) => {
// if(index < Object.keys(tempRouter).length-1){
// router +=item+"="+tempRouter[item]+";";
// }else{
// router +=item+"="+tempRouter[item];
// }
// });
// }
// }
// Object.assign(_viewdata, ComUtil.formatMatrixParse2(router));
// }else{
// if(router.name){
// Object.assign(this.viewdata,router.name);
// }
// }
if(router && router.length >0){
Object.assign(_viewdata, JSON.parse(router));
}
Object.assign(this.viewdata, _viewdata);
}
this.load();
}
/**
* 设置视图数据
*
* @param {string} viewdata
* @memberof ViewEngine
*/
public setViewData(viewdata: string): void {
this.viewdata = {};
try {
Object.assign(this.viewdata, JSON.parse(viewdata));
} catch (error) {
console.log(error);
}
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof ViewEngine
*/
public load(opts: any = {}): void {
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof ViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
}
/**
* 处理界面行为
*
* @param {string} tag
* @param {string} [actionmode]
* @memberof ViewEngine
*/
public doSysUIAction(tag: string, actionmode?: string): void {
if (Object.is(actionmode, 'FRONT')) {
if (this.methods.front) {
this.methods.front(tag);
}
}
}
/**
* 处理工作流界面行为
*
* @param {string} tag
* @param {string} [actionmode]
* @memberof ViewEngine
*/
public doSysWFUIAction(tag: string, actionmode?: string): void {
if (Object.is(actionmode, 'WFFRONT')) {
if (this.methods.wfFront) {
this.methods.wfFront(tag);
}
}
}
/**
* 是否为方法
*
* @protected
* @param {*} func
* @returns {boolean}
* @memberof ViewEngine
*/
protected isFunc(func: any): boolean {
return func instanceof Function;
}
/**
* 父数据参数模式
*
* @param {{ tag: string, action: string, viewdata: any }} { tag, action, viewdata }
* @memberof ViewEngine
*/
public setViewState2({ tag, action, viewdata }: { tag: string, action: string, viewdata: any }): void {
this.view.viewState.next({ tag: tag, action: action, data: viewdata });
}
}
\ No newline at end of file
export const environment = {
production: true
};
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// http://ionicframework.com/docs/theming/
@import '~@ionic/angular/css/core.css';
@import '~@ionic/angular/css/normalize.css';
@import '~@ionic/angular/css/structure.css';
@import '~@ionic/angular/css/typography.css';
@import '~@ionic/angular/css/display.css';
@import '~@ionic/angular/css/padding.css';
@import '~@ionic/angular/css/float-elements.css';
@import '~@ionic/angular/css/text-alignment.css';
@import '~@ionic/angular/css/text-transformation.css';
@import '~@ionic/angular/css/flex-utils.css';
@import './theme/default.scss';
@import './theme/user.scss';
<div class="app-anchor-point">
<div class="app-anchor-point-content">
<div *ngFor="let group of $items" (click)="locationMobile(group.name)">
{{ group.name }}
</div>
</div>
</div>
<div class="app-anchor-point-list" >
<ion-list #appAnchorPointList style="height: 100%;overflow-y: auto;">
<ion-item-group *ngFor="let group of $items" [id]="group.name">
<ion-item-divider>
<ion-label>{{ group.name }}</ion-label>
</ion-item-divider>
<ng-container *ngFor="let item of group.items">
<ng-container *ngTemplateOutlet="template;context: {$implicit: item}"></ng-container>
</ng-container>
</ion-item-group>
</ion-list>
</div>
\ No newline at end of file
.app-anchor-point {
position: absolute;
height: 100%;
right: 0px;
z-index: 1;
.app-anchor-point-content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
div {
padding: 5px 3px;
font-weight: 500;
}
}
}
.app-anchor-point-list {
overflow-y: auto;
overflow-x: hidden;
height: calc(100vh - 46px);
scroll-behavior: smooth;
}
\ No newline at end of file
import { Component, Input, ContentChild, TemplateRef, ViewChild, ViewContainerRef, ElementRef } from '@angular/core';
/**
* 锚点分组列表组件
*
* @export
* @class AppAnchorPointList
*/
@Component({
selector: 'app-anchor-point-list',
templateUrl: 'app-anchor-point-list.html',
styleUrls: ['app-anchor-point-list.scss']
})
export class AppAnchorPointList {
/**
* 插座内容
*
* @type {TemplateRef<any>}
* @memberof AppAnchorPointList
*/
@ContentChild(TemplateRef)
template: TemplateRef<any>;
/**
* List容器
*
* @type {TemplateRef<any>}
* @memberof AppAnchorPointList
*/
@ViewChild('appAnchorPointList', { read: ViewContainerRef })
container: ViewContainerRef;
/**
* 列表数据
*
* @type {any[]}
* @memberof AppAnchorPointList
*/
@Input()
set items(val: any[]) {
if (val) {
this.$items = val;
this.anchorPoints.clear();
}
}
public $items: any[] = [];
/**
* 所有锚点项
*
* @private
* @type {Map<string, Element>}
* @memberof AppAnchorPointList
*/
private anchorPoints: Map<string, Element> = new Map();
/**
* 容器dom对象
*
* @private
* @type {HTMLDivElement}
* @memberof AppAnchorPointList
*/
private containerElement: HTMLDivElement;
/**
* Creates an instance of AppAnchorPointList.
* @memberof AppAnchorPointList
*/
constructor() { }
/**
* 初始化锚点
*
* @memberof AppAnchorPointList
*/
private initAnchorPoint(): void {
if (this.container) {
this.containerElement = this.container.element.nativeElement;
const arr: HTMLCollection = this.containerElement.getElementsByTagName('ion-item-group');
if (arr) {
for (let i: number = 0; i < arr.length; i++) {
const item: Element = arr.item(i);
this.anchorPoints.set(item.id, item);
}
}
}
}
/**
* 定位移动
*
* @param {string} id 移动位置id
* @memberof AppAnchorPointList
*/
public locationMobile(id: string): void {
if (this.anchorPoints.size !== this.$items.length) {
this.initAnchorPoint();
}
const item: any = this.anchorPoints.get(id);
if (item) {
this.containerElement.scrollTo(0, item.offsetTop);
}
}
}
\ No newline at end of file
<div class="app-app-menu">
<ion-card style="border-radius: 0;">
<ng-container *ngIf=" title && title !=='否'">
<ion-item lines="full">
<ion-label>{{ title }}</ion-label>
</ion-item>
</ng-container>
<ion-card-content>
<ion-grid>
<ion-row>
<ion-col *ngFor="let item of items;" [size]="12 / numCol" class="app-app-menu-item"
(click)="onClick(item)">
<div class="icon">
<ng-container *ngIf="!round; else roundIcon;">
<app-icon [item]="item" [isDefault]="true"></app-icon>
</ng-container>
<ng-template #roundIcon>
<img *ngIf="item&&item.icon" class="round-icon"
[src]="item.icon?item.icon:null"
onerror="this.src = './assets/icon/default_img.png'">
</ng-template>
</div>
<div class="title {{ item.textcls }}" [ngClass]="{'round-title': round}">
{{ item.text }}
</div>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
</div>
\ No newline at end of file
.head{
font-size: 1.15rem;
font-weight: 540;
padding-left: 0.75rem;
padding-top: 0.5rem;
font-family: AncientWar;
}
.app-app-menu {
ion-card {
margin: 0px;
ion-card-header, ion-card-content {
padding: 0.5rem;
}
}
ion-grid {
padding: 0px;
}
.app-app-menu-item {
display: flex;
flex-direction: column;
align-items: center;
.icon {
width: 2.625rem;
height: 2.625rem;
}
.title {
font-size: 0.875rem;
}
.round-title {
margin-top: 0.5rem;
font-size: 0.625rem;
color: black;
}
.round-icon {
border-radius: 50%;
}
}
}
\ No newline at end of file
import { Component, Input, Output, EventEmitter } from '@angular/core';
/**
* 默认应用菜单部件样式
*
* @export
* @class AppQuickMenu
*/
@Component({
selector: 'app-app-menu',
templateUrl: './app-app-menu.html',
styleUrls: ['./app-app-menu.scss']
})
export class AppQuickMenu {
/**
* 菜单数据
*
* @type {any[]}
* @memberof AppQuickMenu
*/
@Input()
items: any[] = [];
/**
* 菜单部件标题
*
* @type {string}
* @memberof AppQuickMenu
*/
@Input()
title: string;
/**
* 一行显示的列数
*
* @type {number}
* @memberof AppQuickMenu
*/
@Input()
numCol: number = 4;
/**
* 是否为圆的图标
*
* @type {boolean}
* @memberof AppQuickMenu
*/
@Input()
round: boolean = false;
/**
* 菜单点击事件
*
* @type {EventEmitter<string>}
* @memberof AppQuickMenu
*/
@Output()
menuClick: EventEmitter<string> = new EventEmitter();
/**
* 菜单点击
*
* @param {string} appFuncId
* @memberof AppQuickMenu
*/
public onClick(appFuncId: string): void {
this.menuClick.emit(appFuncId);
}
}
\ No newline at end of file
<div class="app-calendar">
<div class="calendar-header">
<ion-icon name="arrow-round-back" (click)="lastMonth()"></ion-icon>
<span>{{ year }}-{{ month + 1 }}-{{ day }}</span>
<ion-icon name="arrow-round-forward" (click)="nextMonth()"></ion-icon>
</div>
<div class="calendar-flex">
<div class="calendar-row">
<div class="calendar-col" *ngFor="let week of calendarUtil.weeks">
<div class="calendar-week">
{{ week }}
</div>
</div>
</div>
<div class="calendar-content" [ngStyle]="{'max-height': (isMonthMode ? '276px' : '66px')}">
<div class="calendar-flex">
<div class="calendar-row" *ngFor="let items of content">
<div class="calendar-col" *ngFor="let item of items">
<div class="calendar-day" [ngClass]="getDayClass(item, month)" (click)="activeDay(item, item.month)">
<div style="margin-bottom: 1px;">{{ (calendarUtil.day === item.day && calendarUtil.month === item.month) ? '今' : item.day }}</div>
<div [ngClass]="{ 'have-data': isData(item) }"></div>
</div>
</div>
</div>
</div>
<!-- <div class="calendar-shrink" (click)="showModeChange()">
<ion-icon [name]="isMonthMode ? 'arrow-up' : 'arrow-down'" style="font-size: 20px;"></ion-icon>
</div> -->
</div>
</div>
</div>
\ No newline at end of file
.app-calendar {
width: 100%;
.calendar-content {
transition: 1.3s;
}
.calendar-header {
min-height: 36px;
font-size: 24px;
display: flex;
justify-content: center;
align-items: center;
ion-icon {
flex-grow: 1;
}
span {
flex-grow: 5;
text-align: center;
}
}
.calendar-flex {
display: flex;
flex-direction: column;
width: 100vw;
.calendar-row {
display: flex;
flex-direction: row;
width: 100vw;
.calendar-col {
width: calc(100% / 7);
height: 36px;
margin: 3px;
display: flex;
justify-content: center;
align-items: center;
.calendar-day,
.calendar-week {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 36px;
height: 36px;
border-radius: 50%;
}
.active {
background-color: cornflowerblue;
color: white;
}
.no-current-month {
color: #e3e3e3;
}
}
}
}
.calendar-shrink {
width: 100%;
text-align: center;
border-bottom: 1px solid #e3e3e3;
}
.have-data {
border-radius: 50%;
width: 5px;
height: 5px;
background-color: var(--ion-color-secondary, #0cd1e8);
margin-bottom: -5px;
}
}
\ No newline at end of file
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { AppCalendarUtil } from '../../util/AppCalendarUtil';
import * as moment from 'moment';
@Component({
selector: 'app-calendar',
templateUrl: './app-calendar.html',
styleUrls: ['app-calendar.scss']
})
export class AppCalendar implements OnInit {
@Input()
set data(val: any[]) {
if (val) {
this.items = val;
this.items.forEach((item: any) => {
// const date: Date = moment(item.begintime, this.dateFormat).toDate();
const date: Date = new Date(item.begintime);
this.dateIsData[`${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`] = true;
});
}
}
/**
* 设置当前选中时间
*
* @memberof AppCalendar
*/
@Input()
set activeDate(val: {year: number, month: number, day: number}) {
if (val) {
this.year = val.year;
this.month = val.month;
this.day = val.day;
}
}
/**
* 选中时间变更事件
*
* @type {EventEmitter<{year: number, month: number, day: number}>}
* @memberof AppCalendar
*/
@Output()
activeDateChange: EventEmitter<{year: number, month: number, day: number}> = new EventEmitter();
/**
* 数据
*
* @type {any[]}
* @memberof AppCalendar
*/
public items: any[] = [];
/**
* 当前日期是否有数据
*
* @type {*}
* @memberof AppCalendar
*/
public dateIsData: any = {};
/**
* 日历工具类
*
* @type {AppCalendarUtil}
* @memberof AppCalendar
*/
public calendarUtil: AppCalendarUtil = new AppCalendarUtil();
/**
* 日历当前显示年份
*
* @type {number}
* @memberof AppCalendar
*/
public year: number;
/**
* 日历当前显示月份
*
* @type {number}
* @memberof AppCalendar
*/
public month: number;
/**
* 日历当前选中天
*
* @type {number}
* @memberof AppCalendar
*/
public day: number;
/**
* 日历显示内容
*
* @type {any[]}
* @memberof AppCalendar
*/
public content: any[] = [];
/**
* 是否为月显示模式
*
* @type {boolean}
* @memberof AppCalendar
*/
public isMonthMode: boolean = true;
/**
* 日期格式
*
* @type {string}
* @memberof AppCalendar
*/
public dateFormat: string = 'YYYY-MM-DD HH:mm:ss';
/**
* Creates an instance of AppCalendar.
* @memberof AppCalendar
*/
constructor() {
this.year = this.calendarUtil.year;
this.month = this.calendarUtil.month;
this.day = this.calendarUtil.day;
this.showMonthDaysChange();
}
public ngOnInit() { }
/**
* 设置当前激活天
*
* @param {*} item
* @param {number} month
* @memberof AppCalendar
*/
public activeDay(item: any, month: number): void {
if (item && item.day) {
this.day = item.day;
}
if (this.month !== month) {
if (this.month > month) {
this.monthChange(false);
} else {
this.monthChange(true);
}
this.showMonthDaysChange();
}
this.onChange();
}
/**
* 发送选中时间变更事件
*
* @memberof AppCalendar
*/
public onChange(): void {
this.activeDateChange.emit({
year: this.year,
month: this.month,
day: this.day
});
}
/**
* 改变当前显示模式
*
* @memberof AppCalendar
*/
public showModeChange() {
this.isMonthMode = !this.isMonthMode;
this.showMonthDaysChange();
}
/**
* 获取当前显示
*
* @memberof AppCalendar
*/
public showMonthDaysChange(): void {
const arr: any[] = this.calendarUtil.getDaysCurrentMonth(this.month, this.year);
this.content = [];
if (this.isMonthMode) {
this.content.push(...arr);
} else {
this.content.push(arr.find((items: any[]) => {
const num: number = items.findIndex((item) => (item.day === this.day && item.month === this.month));
return num !== -1;
}));
}
}
/**
* 上个月
*
* @memberof AppCalendar
*/
public lastMonth(): void {
if (this.isMonthMode) {
this.monthChange(false);
this.showMonthDaysChange();
} else {
// this.weeksChange(false);
}
}
/**
* 下个月
*
* @memberof AppCalendar
*/
public nextMonth(): void {
if (this.isMonthMode) {
this.monthChange(true);
this.showMonthDaysChange();
} else {
// this.weeksChange(true);
}
}
/**
* 月份变更
*
* @param {boolean} [isNext=true] 下个月 or 上个月
* @memberof AppCalendar
*/
public monthChange(isNext: boolean = true): void {
if (this.month === 0) {
this.month = isNext ? 1 : 11;
if (!isNext) {
--this.year;
}
} else if (this.month === 11) {
this.month = isNext ? 0 : 10;
if (isNext) {
++this.year;
}
} else {
this.month = isNext ? this.month + 1 : this.month - 1;
}
this.onChange();
}
/**
* 获取天样式
*
* @param {*} item
* @param {number} month
* @returns {*}
* @memberof AppCalendar
*/
public getDayClass(item: any, month: number): any {
const classNames: any = {};
classNames.active = item.day === this.day && item.month === this.month;
classNames['no-current-month'] = item.month !== month;
return classNames;
}
/**
* 是否有数据
*
* @param {*} item
* @returns {boolean}
* @memberof AppCalendar
*/
public isData(item: any): boolean {
if (item) {
const r = this.dateIsData[`${item.year}-${item.month}-${item.day}`];
return r ? true : false;
}
return false;
}
}
\ No newline at end of file
<ion-datetime class="app-datetime" [displayFormat]="datefmt" cancelText="取消" doneText="确定" [(ngModel)]="value" (ngModelChange)="onValueChange($event)"></ion-datetime>
\ No newline at end of file
.app-datetime {
padding: 6px 0px;
}
\ No newline at end of file
import { Component, Input, forwardRef } from '@angular/core';
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';
import { DatePipe } from '@angular/common';
import * as moment from 'moment';
@Component({
selector: 'app-datetime',
templateUrl: './app-datetime.html',
styleUrls: ['./app-datetime.scss'],
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => AppDateTime),
multi: true
}
]
})
export class AppDateTime implements ControlValueAccessor {
/**
* 编辑器值
*
* @type {string}
* @memberof AppDateTime
*/
public value: string;
/**
* 时间编辑器格式
*
* @type {string}
* @memberof AppDateTime
*/
@Input()
datefmt: string;
/**
* 是否启用
*
* @type {boolean}
* @memberof AppDateTime
*/
@Input()
disabled: boolean;
/**
* 提示信息
*
* @type {string}
* @memberof AppDateTime
*/
@Input()
placeholder: string;
/**
* Creates an instance of AppDateTime.
* 创建 AppDateTime 实例
*
* @param {DatePipe} datePipe
* @memberof AppDateTime
*/
constructor(private datePipe: DatePipe) { }
/**
* 数据发生改变
*
* @param {*} val
* @memberof AppDateTime
*/
public onValueChange(val): void {
if (this.datefmt.indexOf('YYYY') > 0 || this.datefmt.indexOf('MM') > 0 || this.datefmt.indexOf('DD') > 0) {
this.value = this.datePipe.transform(val, this.datefmt.replace('YYYY', 'yyyy').replace('DD', 'dd'));
} else {
this.value = moment(val).format(this.datefmt);
}
this.onChange(this.value);
}
/**
* 输入
*
* @param {*} obj
* @memberof AppDateTime
*/
public writeValue(obj: any): void {
this.value = obj;
}
private onTouched: () => void = () => { };
private onChange: (val: any) => void = () => { };
public registerOnChange(fn: any): void { this.onChange = fn; }
public registerOnTouched(fn: any): void { this.onTouched = fn; }
}
\ No newline at end of file
import { Component, Input } from '@angular/core';
/**
* 分割线
*
* @export
* @class AppDividingLine
*/
@Component({
selector: 'app-dividing-line',
template: `<div class="app-dividing-line" [ngStyle]="{}"></div>`,
styles: [`.app-dividing-line { width: 100%; height: 8pt; background-color: #d5d5d5;}`]
})
export class AppDividingLine {
/**
* 样式
*
* @type {*}
* @memberof AppDividingLine
*/
public style: any = {};
/**
* 高度
*
* @memberof AppDividingLine
*/
@Input()
set height(val: string) {
if (val && !Object.is(val, '')) {
this.style.height = val;
}
}
/**
* 背景颜色
*
* @memberof AppDividingLine
*/
@Input()
set backgroundColor(val: string) {
if (val && !Object.is(val, '')) {
Object.assign(this.style, { 'background-color': val });
}
}
}
\ No newline at end of file
<input #fileUpload [hidden]="true" type="file" ng2FileSelect [uploader]="uploader" [multiple]="multiple" />
<ng-container *ngIf="!multiple; else fileMultiple;">
<div class="app-file-upload">
<div class="app-file-upload-content">
<ion-chip *ngFor="let item of files; let i = index;">
<ion-label (tap)="downloadFile(item)">{{ item.name | slice:0:9 }} {{ item.name.length > 10 ? '...' : '' }}</ion-label>
<ion-icon [hidden]="disabled" name="close-circle" (click)="deleteFile(item.id, i)"></ion-icon>
</ion-chip>
</div>
<div class="app-file-upload-button">
<ion-icon class='add-icon' [hidden]="disabled || (files.length >= fileCount)" name="add" (click)="fileSelect()"
color="primary"></ion-icon>
</div>
</div>
</ng-container>
<ng-template #fileMultiple>
<div class="app-file-upload-multiple">
<ion-item *ngIf="labelText" class="app-file-upload-title" lines="none">
<ion-label slot="start">
{{ labelText }}<span class="stars" *ngIf="allowEmpty">*</span>
</ion-label>
<span slot="end">
<ion-icon class='add-icon' class="app-file-upload-button" [hidden]="disabled || (files.length >= fileCount)" name="add"
(click)="fileSelect()" color="primary"></ion-icon>
</span>
</ion-item>
<div class="app-file-upload-content">
<ion-item class="app-file-upload-list-item" *ngFor="let item of files; let i = index;" lines="full">
<label (tap)="downloadFile(item)">
{{ item.name }}
</label>
<ion-icon slot="end" [hidden]="disabled" name="close" (click)="deleteFile(item.id, i)" color="primary"></ion-icon>
</ion-item>
</div>
</div>
</ng-template>
\ No newline at end of file
.app-file-upload {
display: flex;
}
.app-file-upload-multiple {
margin-bottom: 3px;
.app-file-upload-title {
--padding-start: 0px;
--inner-padding-end: 0px;
--min-height: 28px;
span {
font-size: 28px;
-webkit-margin-start: 0px;
margin-inline-start: 0px;
-webkit-margin-end: 0px;
margin-inline-end: 0px;
}
.stars {
font-size: var(--app-important-font-size);
margin-left: 3px;
}
}
.app-file-upload-list-item {
@extend .app-file-upload-title;
font-size: var(--app-normal-font-size);
ion-icon {
margin: 0px;
}
}
.app-file-upload-content {
text-align: start;
}
}
.app-file-upload-content {
flex-grow: 1;
overflow: hidden;
}
.app-file-upload-button {
font-size: 22pt;
display: flex;
justify-content: center;
align-self: center;
}
\ No newline at end of file
<ion-card class="form-druipart-card">
<ion-card-content style="padding: 0;">
<ng-template #container></ng-template>
</ion-card-content>
</ion-card>
\ No newline at end of file
.form-druipart-card{
margin: 5px;
border-radius: 0;
box-shadow: var(--app-dividing-line-color) 0px 0px 5px;
}
\ No newline at end of file
<ng-container *ngTemplateOutlet="template; context: { '$implicit': this.field}"></ng-container>
\ No newline at end of file
import { Component, OnInit, ContentChild, TemplateRef, Input } from '@angular/core';
@Component({
selector: 'app-form-item',
templateUrl: './app-form-item.component.html',
styleUrls: ['./app-form-item.component.scss'],
})
export class AppFormItemComponent implements OnInit {
@ContentChild(TemplateRef)
template: TemplateRef<any>;
/**
* 表单项控制器
*
*
*/
@Input() field: any;
constructor() { }
ngOnInit() {}
}
<ion-list class="app-form">
<ng-container *ngTemplateOutlet="template; context: { '$implicit': this.form}"></ng-container>
</ion-list>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册