提交 cef3be9e 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 414dd3bf
......@@ -117,7 +117,9 @@ $ yarn build
|─ ─ favicon.ico 图标
​ |─ ─ src 工程文件夹
|─ ─ assets 静态资源
|─ ─ codelist 动态代码表服务
|─ ─ components 基础组件,主要包含编辑器组件和其他全局使用的组件
|─ ─ counter 计数器服务
|─ ─ engine 引擎文件,主要封装了内置视图的内置逻辑
|─ ─ environments 环境文件
​ |─ ─ interface 接口文件
......@@ -150,6 +152,7 @@ $ yarn build
|─ ─ YYY-ui-logic-base.ts 应用实体界面处理逻辑文件
|─ ─ YYY-ui-logic.ts 自定义应用实体界面处理逻辑文件
|─ ─ utils 工具类文件
|─ ─ utilservice 应用功能服务
|─ ─ widgets 部件文件夹
|─ ─ appde 应用实体名称
​ |─ ─ XXX 部件名称
......
......@@ -18,19 +18,24 @@
"@fullcalendar/list": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0",
"@fullcalendar/vue": "^4.4.0",
"vuedraggable": "^2.23.2",
"async-validator": "^3.3.0",
"@popperjs/core": "^2.4.3",
"axios": "^0.19.1",
"core-js": "^3.4.4",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.17",
"ibiz-vue-lib": "^0.1.13",
"interactjs": "^1.9.4",
"moment": "^2.24.0",
"path-to-regexp": "^6.1.0",
"qs": "^6.9.1",
"rxjs": "^6.5.4",
"tinymce": "4.8.5",
"view-design": "^4.1.0",
"view-design": "4.2.0",
"vue": "^2.6.10",
"vue-class-component": "^7.0.2",
"vue-grid-layout": "^2.3.7",
......@@ -54,6 +59,7 @@
"@vue/cli-service": "^4.1.0",
"@vue/test-utils": "1.0.0-beta.29",
"axios-mock-adapter": "^1.17.0",
"compression-webpack-plugin": "^4.0.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"mockjs": "^1.1.0",
......
......@@ -8,6 +8,9 @@
"id": "0",
"label": "ENABLED",
"text": "ENABLED",
"class":"",
"data":"",
"codename":"Item_0",
"color": "rgba(58, 116, 7, 1)",
"value": 0,
......@@ -17,6 +20,9 @@
"id": "1",
"label": "DISABLED",
"text": "DISABLED",
"class":"",
"data":"",
"codename":"Item_1",
"color": "rgba(67, 65, 65, 1)",
"value": 1,
......
window.Environment = {
// 应用基础路径
BaseUrl: '',
// 是否为开发模式
devMode: true,
// 是否为pc端应用
isAppMode:true,
// 是否开启权限认证
enablePermissionValid:false,
// 打开目标工具,可选参数:sln、mos
debugOpenMode:'mos',
// 配置平台地址
StudioUrl: "http://172.16.170.145/mos/",
// 中心标识
SlnId: "B4BF5C84-D020-4D9A-A986-8FA4FD72816C",
// 系统标识
SysId: "B428B5BE-EA90-4101-A493-BA7085D89F0A",
// 前端应用标识
AppId: "6e0b7357169ef4eba84e1347ed94bd84",
}
\ No newline at end of file
......@@ -8,9 +8,11 @@ import { AppPopover } from './utils/app-popover/app-popover';
import { AppModal } from './utils/app-modal/app-modal';
import { AppDrawer } from './utils/app-drawer/app-drawer';
import { uiServiceRegister } from '@/uiservice/ui-service-register';
import { authServiceRegister } from '@/authservice/auth-service-register';
import { utilServiceRegister } from '@/utilservice/util-service-register';
import { entityServiceRegister } from '@/service/entity-service-register';
import { counterServiceRegister } from '@/counter/counter-service-register';
import { codeListRegister } from '@codelist/codelist-register';
import InputBox from './components/input-box/input-box.vue'
import AppKeepAlive from './components/app-keep-alive/app-keep-alive.vue'
......@@ -28,7 +30,6 @@ import AppCheckboxList from './components/app-checkbox-list/app-checkbox-list.vu
import AppRadioGroup from './components/app-radio-group/app-radio-group.vue'
import AppEmbedPicker from './components/app-embed-picker/app-embed-picker.vue'
import AppTreePicker from './components/app-tree-picker/app-tree-picker.vue'
import AppRichTextEditor from './components/app-rich-text-editor/app-rich-text-editor.vue'
import AppFileUpload from './components/app-file-upload/app-file-upload.vue'
import AppImageUpload from './components/app-image-upload/app-image-upload.vue'
import PropertyLayout from './components/property-layout/property-layout.vue'
......@@ -38,6 +39,7 @@ import AppFormGroup from './components/app-form-group/app-form-group.vue'
import AppFormItem from './components/app-form-item/app-form-item.vue'
import AppPicker from './components/app-picker/app-picker.vue'
import AppMpicker from './components/app-mpicker/app-mpicker.vue'
import AppUpicker from './components/app-upicker/app-upicker.vue'
import AppFormGroup2 from './components/app-form-group2/app-form-group2.vue'
import AppFormItem2 from './components/app-form-item2/app-form-item2.vue'
import CodeList from './components/codelist/codelist.vue'
......@@ -53,7 +55,6 @@ import AppRate from './components/app-rate/app-rate.vue'
import AppSwitch from './components/app-switch/app-switch.vue'
import AppSlider from './components/app-slider/app-slider.vue'
import AppStepper from './components/app-stepper/app-stepper.vue'
import AppPortalDesign from './components/app-portal-design/app-portal-design.vue'
import DatePickerRange from './components/date-picker-range/date-picker-range.vue'
import AppRangeDate from './components/app-range-date/app-range-date.vue'
import AppActionBar from './components/app-actionbar/app-actionbar.vue'
......@@ -63,21 +64,41 @@ import AppStudioAction from './components/app-studioaction/app-studioaction.vue'
import AppDebugActions from './components/app-debug-actions/app-debug-actions.vue'
import AppHeaderMenus from './components/app-header-menus/app-header-menus.vue'
import AppColumnLink from './components/app-column-link/app-column-link.vue'
import AppDataUploadView from './components/app-data-upload/app-data-upload.vue'
import DropDownListDynamic from './components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import AppImagePreview from './components/app-image-preview/app-image-preview.vue'
import AppFormatData from './components/app-format-data/app-format-data.vue'
import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file-info.vue'
import ContextMenu from './components/context-menu/context-menu'
import AppColumnFormat from './components/app-column-format/app-column-format.vue'
import AppQuickGroup from './components/app-quick-group/app-quick-group.vue'
import AppGroupPicker from './components/app-group-picker/app-group-picker.vue'
import AppWFApproval from './components/app-wf-approval/app-wf-approval.vue'
import Breadcrumb from './components/app-breadcrumb/app-breadcrumb.vue'
import AppTransfer from './components/app-transfer/app-transfer.vue'
import ContextMenuDrag from './components/context-menu-drag/context-menu-drag.vue'
import AppOrgSelect from './components/app-org-select/app-org-select.vue'
import AppDepartmentSelect from './components/app-department-select/app-department-select.vue'
import AppGroupSelect from './components/app-group-select/app-group-select.vue'
import UpdatePwd from './components/app-update-password/app-update-password.vue'
import AppMenuItem from './components/app-menu-item/app-menu-item.vue'
import AppFullScren from './components/app-full-scren/app-full-scren.vue'
import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
import ActionTimeline from './components/action-timeline/action-timeline.vue'
import CronEditor from './components/cron-editor/cron-editor.vue'
import AppMessagePopover from './components/app-message-popover/app-message-popover.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载实体权限服务注册中心
window['authServiceRegister'] = authServiceRegister;
// 全局挂载功能服务注册中心
window['utilServiceRegister'] = utilServiceRegister;
// 全局挂载数据服务注册中心
window['entityServiceRegister'] = entityServiceRegister;
// 全局挂载计数器服务注册中心
window['counterServiceRegister'] = counterServiceRegister;
// 全局挂载代码表服务注册中心
window['codeListRegister'] = codeListRegister;
export const AppComponents = {
install(v: any, opt: any) {
......@@ -90,6 +111,8 @@ export const AppComponents = {
v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool;
v.component('app-full-scren',AppFullScren);
v.component('app-lock-scren',AppLockScren);
v.component('input-box', InputBox);
v.component('app-keep-alive',AppKeepAlive);
v.component('tab-page-exp',TabPageExp);
......@@ -106,7 +129,7 @@ export const AppComponents = {
v.component('app-radio-group',AppRadioGroup);
v.component('app-embed-picker', AppEmbedPicker);
v.component('app-tree-picker', AppTreePicker);
v.component('app-rich-text-editor',AppRichTextEditor);
v.component('app-rich-text-editor', () => import('./components/app-rich-text-editor/app-rich-text-editor.vue'));
v.component('app-file-upload',AppFileUpload);
v.component('app-image-upload',AppImageUpload);
v.component('property-layout',PropertyLayout);
......@@ -116,6 +139,7 @@ export const AppComponents = {
v.component('app-form-item',AppFormItem);
v.component('app-picker', AppPicker);
v.component('app-mpicker', AppMpicker);
v.component('app-upicker', AppUpicker);
v.component('app-form-group2', AppFormGroup2);
v.component('app-form-item2', AppFormItem2);
v.component('codelist', CodeList);
......@@ -131,7 +155,7 @@ export const AppComponents = {
v.component('app-switch', AppSwitch);
v.component('app-slider', AppSlider);
v.component('app-stepper', AppStepper);
v.component('app-portal-design',AppPortalDesign);
v.component('app-portal-design', () => import('./components/app-portal-design/app-portal-design.vue'));
v.component('date-picker-range',DatePickerRange);
v.component('app-range-date', AppRangeDate);
v.component('app-actionbar', AppActionBar);
......@@ -141,11 +165,26 @@ export const AppComponents = {
v.component('app-debug-actions', AppDebugActions);
v.component('app-header-menus', AppHeaderMenus);
v.component('app-column-link', AppColumnLink);
v.component('app-data-upload', AppDataUploadView);
v.component('app-data-upload', () => import('./components/app-data-upload/app-data-upload.vue'));
v.component('dropdown-list-dynamic', DropDownListDynamic);
v.component('app-image-preview', AppImagePreview);
v.component('app-format-data', AppFormatData);
v.component('app-upload-file-info', AppUploadFileInfo);
v.component('context-menu',ContextMenu);
v.component('app-column-format',AppColumnFormat);
v.component('app-quick-group',AppQuickGroup);
v.component('app-org-select',AppOrgSelect);
v.component('app-department-select',AppDepartmentSelect);
v.component('app-group-select',AppGroupSelect);
v.component('app-group-picker',AppGroupPicker);
v.component('app-wf-approval',AppWFApproval);
v.component('app-breadcrumb',Breadcrumb);
v.component('app-transfer',AppTransfer);
v.component('context-menu-drag',ContextMenuDrag);
v.component('app-update-password',UpdatePwd);
v.component('app-menu-item', AppMenuItem);
v.component('action-timeline', ActionTimeline);
v.component('cron-editor', CronEditor);
v.component('app-message-popover', AppMessagePopover);
},
};
\ No newline at end of file
......@@ -39,10 +39,10 @@ export class AuthServiceRegister {
* @memberof AuthServiceRegister
*/
protected init(): void {
this.allAuthService.set('jobsinfo', () => import('@/authservice/jobs-info/jobs-info-auth-service'));
this.allAuthService.set('jobslog', () => import('@/authservice/jobs-log/jobs-log-auth-service'));
this.allAuthService.set('jobslock', () => import('@/authservice/jobs-lock/jobs-lock-auth-service'));
this.allAuthService.set('jobslog', () => import('@/authservice/jobs-log/jobs-log-auth-service'));
this.allAuthService.set('jobsregistry', () => import('@/authservice/jobs-registry/jobs-registry-auth-service'));
this.allAuthService.set('jobsinfo', () => import('@/authservice/jobs-info/jobs-info-auth-service'));
this.allAuthService.set('jobslock', () => import('@/authservice/jobs-lock/jobs-lock-auth-service'));
}
/**
......
<template>
<div class="app-actionbar">
<div class="app-actionbar-item" v-for="(item,index) in items" :key="index">
<Badge v-if="item.counterService&&item.counterService.counterData" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
<Badge v-if="item.counterService&&item.counterService.counterData" v-show="item.visabled" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button :disabled="item.disabled" @click="handleClick(item, $event)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button>
</Badge>
<i-button v-else @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
<i-button v-show="item.visabled" :disabled="item.disabled" v-else @click="handleClick(item, $event)">{{item.actionName}}</i-button>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Model, Emit } from "vue-property-decorator";
import { Subject } from "rxjs";
import { Vue, Component, Prop, Model, Emit,Inject, Watch } from "vue-property-decorator";
import { Subject,Subscription } from "rxjs";
import { Environment } from '@/environments/environment';
@Component({})
export default class AppActionBar extends Vue {
......@@ -24,15 +25,127 @@ export default class AppActionBar extends Vue {
*/
@Prop() public items!:any;
/**
* 注入的UI服务
*
* @type {*}
* @memberof AppActionBar
*/
@Prop() public uiService!: any;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof AppActionBar
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ActionlinetestBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 部件数据
*
* @type {*}
* @memberof AppActionBar
*/
public data: any;
/**
* 组件初始化
*
* @memberof AppActionBar
*/
public created(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, "app-actionbar")) {
return;
}
if(Object.is(action,'loadmodel')){
this.data = data;
this.calcActionItemAuthState(data,this.items,this.uiService);
}
});
}
}
/**
* 触发界面行为
*
* @memberof AppActionBar
*/
public handleClick($event:any){
this.$emit('itemClick',$event);
public handleClick(item: any, $event:any){
let _data = {
tag : item.viewlogicname,
params : this.data,
event : $event
};
this.$emit('itemClick',_data);
}
/**
* 计算界面行为项权限状态
*
* @param {*} [data] 传入数据
* @param {*} [ActionModel] 界面行为模型
* @param {*} [UIService] 界面行为服务
* @memberof AppActionBar
*/
public calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
if(Environment.enablePermissionValid){
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
}
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
}
}
/**
* 组件销毁
*
* @memberof AppActionBar
*/
public destory(){
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
</script>
......
<template>
<div class="appAddressSelection">
<el-cascader
style="width:100%"
:disabled="disabled"
size ="medium"
v-model="CurrentVal"
......@@ -14,6 +15,7 @@ import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import axios from 'axios';
import { cityCode } from './city_code'
@Component({})
export default class AppAddressSelection extends Vue {
......@@ -63,12 +65,7 @@ export default class AppAddressSelection extends Vue {
* @memberof AppAddressSelection
*/
public getcity() {
axios.get("../../assets/json/city_code.json").then((response: any) => {
this.format(response.data);
}).catch((response: any) => {
console.log("城市数据加载失败");
});
this.format(cityCode);
}
/**
......@@ -86,11 +83,11 @@ export default class AppAddressSelection extends Vue {
* @memberof AppAddressSelection
*/
public format(data :any) {
let data1 = JSON.parse(JSON.stringify(data).replace(/city/g, 'children'))
let data2 = JSON.parse(JSON.stringify(data1).replace(/name/g, 'label'))
let data3 = JSON.parse(JSON.stringify(data2).replace(/area/g, 'children'))
let data4 = JSON.parse(JSON.stringify(data3).replace(/code/g, 'value'))
this.city = data4;
let town = JSON.parse(JSON.stringify(data).replace(/city/g, 'children'))
let county = JSON.parse(JSON.stringify(town).replace(/name/g, 'label'))
let city = JSON.parse(JSON.stringify(county).replace(/area/g, 'children'))
let province = JSON.parse(JSON.stringify(city).replace(/code/g, 'value'))
this.city = province;
}
}
......
......@@ -7,6 +7,7 @@
size='small'
:trigger-on-focus="true"
:fetch-suggestions="onSearch"
:sort="sort"
@select="onACSelect"
@input="onInput"
@blur="onBlur"
......@@ -100,12 +101,20 @@ export default class AppAutocomplete extends Vue {
@Prop() public name!: string;
/**
* 编辑器参数
*
* @type {string}
* 局部上下文导航参数
*
* @type {any}
* @memberof AppAutocomplete
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppAutocomplete
*/
@Prop() public itemParam?: any;
@Prop() public localParam!:any;
/**
* 值项名称
......@@ -115,11 +124,20 @@ export default class AppAutocomplete extends Vue {
*/
@Prop() public valueitem?: string;
/**
* 排序
*
* @type {string}
* @memberof AppAutocomplete
*/
@Prop() public sort?: string;
/**
* 值
*
* @type {*}
* @memberof AppPicker
* @memberof AppAutocomplete
*/
@Model('change') public value?: any;
......@@ -127,7 +145,7 @@ export default class AppAutocomplete extends Vue {
* 当前值
*
* @type {string}
* @memberof AppPicker
* @memberof AppAutocomplete
*/
public curvalue: string = '';
......@@ -160,7 +178,7 @@ export default class AppAutocomplete extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPicker
* @memberof AppAutocomplete
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
......@@ -173,29 +191,25 @@ export default class AppAutocomplete extends Vue {
* @param callback
*/
public onSearch(query: any, callback: any): void {
// 公共参数处理
let data: any = {};
const bcancel: boolean = this.handlePublicParams(data);
if (!bcancel) {
return;
}
// 参数处理
let _context = data.context;
let _param = data.param;
// 处理搜索参数
query = !query ? '' : query;
if (!this.inputState && Object.is(query, this.value)) {
query = '';
}
this.inputState = false;
// 合并视图上下文参数和视图参数
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
Object.assign(param, { query: query });
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(this.data,this.itemParam.context);
Object.assign(context,_context);
}
if (this.itemParam.param) {
let _param = this.$util.formatData(this.data,this.itemParam.param);
Object.assign(param,_param);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(this.data,this.itemParam.parentdata);
Object.assign(param,_parentdata);
if(this.sort && !Object.is(this.sort, "")) {
Object.assign(_param, { sort: this.sort });
}
Object.assign(_param, { query: query });
// 错误信息国际化
let error: string = (this.$t('components.appAutocomplete.error') as any);
let miss: string = (this.$t('components.appAutocomplete.miss') as any);
......@@ -208,7 +222,7 @@ export default class AppAutocomplete extends Vue {
} else if(!this.acParams.interfaceName) {
this.$Notice.error({ title: error, desc: miss+'interfaceName' });
} else {
this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, context, param).then((response: any) => {
this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, _context, _param).then((response: any) => {
if (!response) {
this.$Notice.error({ title: error, desc: requestException });
} else {
......@@ -274,6 +288,34 @@ export default class AppAutocomplete extends Vue {
this.$forceUpdate();
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppAutocomplete
*/
public handlePublicParams(arg: any): boolean {
if (!this.data) {
this.$Notice.error({ title: (this.$t('components.AppAutocomplete.error') as any), desc: (this.$t('components.AppAutocomplete.formdataException') as any) });
return false;
}
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
return true;
}
}
</script>
......
......@@ -7,7 +7,7 @@
</template>
<script lang="ts">
import { Component, Vue, Prop, Model } from 'vue-property-decorator';
import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({
......@@ -43,7 +43,7 @@ export default class AppCheckBox extends Vue {
* @type {string}
* @memberof AppCheckBox
*/
@Prop({default:';'}) public valueSeparator?: string;
@Prop({default:','}) public valueSeparator?: string;
/**
* 是否禁用
......@@ -53,6 +53,46 @@ export default class AppCheckBox extends Vue {
*/
@Prop() disabled?: boolean;
/**
* 传入表单数据
*
* @type {*}
* @memberof AppCheckBox
*/
@Prop() public data?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppCheckBox
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppCheckBox
*/
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppCheckBox
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppCheckBox
*/
@Prop() public viewparams!: any;
/**
* 获取启用禁用状态
*
......@@ -97,28 +137,6 @@ export default class AppCheckBox extends Vue {
}
}
/**
* 分隔符
*
* @type {*}
* @memberof AppCheckBox
*/
@Prop() separator: any;
/**
* 获取分隔符
*
* @readonly
* @memberof AppCheckBox
*/
get currentseparator() {
if (this.separator) {
return this.separator;
} else {
return ';';
}
}
/**
* 选中值
*
......@@ -188,6 +206,28 @@ export default class AppCheckBox extends Vue {
*/
public items: any[] = [];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppCheckBox
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
}
/**
* vue 生命周期
*
......@@ -203,7 +243,13 @@ export default class AppCheckBox extends Vue {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
}
} else if (Object.is(this.codelistType,"DYNAMIC")) {
this.codeListService.getItems(this.tag).then((res:any) => {
// 公共参数处理
let data: any = {};
this.handlePublicParams(data);
// 参数处理
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
}).catch((error:any) => {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
......@@ -212,6 +258,29 @@ export default class AppCheckBox extends Vue {
}
}
/**
* 监听表单数据变化
*
* @memberof AppCheckBox
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
if(newVal){
if(this.tag && this.codelistType == 'DYNAMIC'){
// 公共参数处理
let data: any = {};
this.handlePublicParams(data);
// 参数处理
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
}).catch((error:any)=>{
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
})
}
}
}
}
</script>
......
......@@ -30,6 +30,22 @@ export default class AppColumnLink extends Vue {
*/
@Prop() public linkview?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppColumnLink
*/
@Prop() public localParam!:any;
/**
* 值项名称
*
......@@ -191,7 +207,7 @@ export default class AppColumnLink extends Vue {
private openRedirectView($event: any, view: any, data: any): void {
this.$http.get(view.url, data).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '请求异常' });
this.$Notice.error({ title: (this.$t('app.commonWords.error') as string), desc: (this.$t('app.commonWords.reqException') as string) });
}
if (response.status === 401) {
return;
......@@ -243,7 +259,7 @@ export default class AppColumnLink extends Vue {
}
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常!' });
this.$Notice.error({ title: (this.$t('app.commonWords.error') as string), desc: (this.$t('app.commonWords.reqException') as string) });
return;
}
if (response.status === 401) {
......@@ -279,8 +295,17 @@ export default class AppColumnLink extends Vue {
return false;
}
// 合并表单参数
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
return true;
}
......
......@@ -65,14 +65,21 @@ export default class AppDashboardDesignService {
public loadPortletList(context: any, viewparams: any): Promise<any> {
return new Promise((resolve: any, reject: any) => {
Http.getInstance().get('./assets/json/portlet-data.json').then((response: any) => {
if (response && response.status === 200 && response.data && Array.isArray(response.data)) {
const datas: any[] = this.filterData(response.data, viewparams.appdeName);
if (response && response.status === 200 && response.data) {
let result:Array<any> = [];
if(typeof(response.data)=='string'){
const index:number = response.data.lastIndexOf(",");
result = JSON.parse((response.data).slice(0,index)+']');
}else{
result = response.data;
}
const datas: any[] = this.filterData(result, viewparams.appdeName);
const list = this.prepareList(datas);
const groups = this.prepareGroup(datas);
resolve({data: datas, result: list.reverse(), groups: groups});
}
}).catch((response: any) => {
console.log(response.status);
console.log(response);
});
});
}
......
<template>
<div class="app-data-upload-view">
<el-row :gutter="20">
<el-row style="margin-top:24px" :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">{{$t('components.appDataUploadView.selectfile')}}</el-button>
<input ref="inputUpLoad" type="file" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="importFile"/>
......@@ -13,12 +13,12 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="height:calc(100% - 128px);padding: 0px 12px;">
<el-row style="height:480px;padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0 && isUploading === false">
<ul>
<li v-for="(item,index) in importDataArray" :key="index" class="font-class">
{{$t('components.appDataUploadView.dataid')+item[importUniqueItem]+$t('components.appDataUploadView.read')+'......'}}
{{item[importUniqueItem]?$t('components.appDataUploadView.dataid')+item[importUniqueItem]+$t('components.appDataUploadView.read')+'......':$t('components.appDataUploadView.read')+'......'}}
</li>
</ul>
</template>
......@@ -285,7 +285,7 @@ export default class AppDataUploadView extends Vue {
this.importDataArray = [];
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,data:tempDataArray}).then((res:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:tempDataArray}).then((res:any) =>{
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -295,6 +295,10 @@ export default class AppDataUploadView extends Vue {
this.importSuccessData = result.data;
this.promptInfo = (this.$t('components.appDataUploadView.completed') as string);
this.isUploading = false;
}).catch((error:any) =>{
this.isUploading = false;
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
console.error(error);
})
}).catch((error:any) =>{
this.isUploading = false;
......@@ -443,13 +447,13 @@ export default class AppDataUploadView extends Vue {
if (codelist) {
resolve([...JSON.parse(JSON.stringify(codelist.items))]);
} else {
console.log(`----${codeListObject.tag}----代码表不存在`);
console.log(`----${codeListObject.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
}
}else if(codeListObject.tag && Object.is(codeListObject.type,"DYNAMIC")){
this.codeListService.getItems(codeListObject.tag).then((res:any) => {
resolve(res);
}).catch((error:any) => {
console.log(`----${codeListObject.tag}----代码表不存在`);
console.log(`----${codeListObject.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
});
}
})
......
......@@ -6,12 +6,16 @@
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
@viewdataschange="setValue(args)"
@viewdataschange="setValue($event)"
style="height:100%;">
</component>
</div>
<template v-if="placeholder">
<div v-if="value" class="app-embed-value">{{value}}</div>
<div v-if="value" class="app-embed-value">
<span v-for="(item,index) in value.split(',')" :key="index">
{{item}}
</span>
</div>
<div v-else class="app-embed-placeholder">{{placeholder}}</div>
</template>
</div>
......@@ -62,7 +66,7 @@ export default class AppEmbedPicker extends Vue {
* 表单数据
*
* @type {*}
* @memberof AppPicker
* @memberof AppEmbedPicker
*/
@Prop() public data!: any;
......@@ -95,15 +99,15 @@ export default class AppEmbedPicker extends Vue {
* 值项名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppEmbedPicker
*/
@Prop() public valueItem?: string;
@Prop() public valueItem!: string;
/**
* 关联视图名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppEmbedPicker
*/
@Prop() public refviewname?: string;
......@@ -127,17 +131,25 @@ export default class AppEmbedPicker extends Vue {
* 属性项名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppEmbedPicker
*/
@Prop() public name!: string;
/**
* 关联视图参数
*
* @type {*}
* 局部上下文导航参数
*
* @type {any}
* @memberof AppEmbedPicker
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppEmbedPicker
*/
@Prop() public itemParam: any;
@Prop() public localParam!:any;
/**
* 是否忽略之变化
......@@ -160,29 +172,36 @@ export default class AppEmbedPicker extends Vue {
*
* @memberof AppEmbedPicker
*/
public setViewParam(activeData: any) {
if (!this.itemParam || !activeData) {
public setViewParam() {
if (!this.data) {
return;
}
let formData:any = JSON.parse(this.data);
let arg: any = {};
// 合并视图上下文参数和视图参数
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(activeData,this.itemParam.context);
Object.assign(context,_context);
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
if(formData[this.name] && formData[this.valueItem]){
let selectItems:Array<any> = [];
let tempvalue: Array<any> = formData[this.valueItem].split(',');
let temptext: Array<any> = formData[this.name].split(',');
tempvalue.forEach((srfkey: any, index: number)=>{
selectItems.push({ srfmajortext : temptext[index], srfkey: srfkey });
});
arg.param.selectedData = selectItems;
this.$forceUpdate();
}
if (this.itemParam.param) {
let _param = this.$util.formatData(activeData,this.itemParam.param);
Object.assign(param,_param);
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(formData,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,this.itemParam.parentdata);
Object.assign(param,_parentdata);
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(formData,arg.context,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param);
this.viewdata = JSON.stringify(arg.context);
this.viewparam = JSON.stringify(arg.param);
}
/**
......@@ -196,14 +215,19 @@ export default class AppEmbedPicker extends Vue {
onActivedataChange(newVal: any, oldVal: any) {
const newFormData: any = JSON.parse(newVal);
const oldDormData: any = JSON.parse(oldVal);
this.setViewParam(newFormData);
this.setViewParam();
if (!this.refreshitems || this.ignorefieldvaluechange) {
return;
}
if(Object.is(newFormData[this.refreshitems], oldDormData[this.refreshitems])) {
return;
}
this.setValue([{srfmajortext: null, srfkey: null}]);
if (this.valueItem) {
this.$emit('formitemvaluechange', { name: this.valueItem, value: null });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: null });
}
}
/**
......@@ -212,10 +236,11 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker
*/
public created() {
this.setViewParam();
if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) {
this.setViewParam(JSON.parse(this.data));
this.setViewParam();
}
});
}
......@@ -239,11 +264,21 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker
*/
public setValue(item: any) {
if (this.valueItem) {
this.$emit('formitemvaluechange', { name: this.valueItem, value: item[0].srfkey });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: item[0].srfmajortext });
let srfkey: string = '';
let srfmajortext: string = '';
if(item && Array.isArray(item)){
item.forEach((select: any)=>{
srfkey += select.srfkey+",";
srfmajortext += select.srfmajortext+',';
})
srfkey = srfkey.substring(0,srfkey.length-1);
srfmajortext = srfmajortext.substring(0,srfmajortext.length-1);
if (this.valueItem) {
this.$emit('formitemvaluechange', { name: this.valueItem, value: srfkey });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: srfmajortext });
}
}
}
......
......@@ -107,18 +107,18 @@ export default class AppExportExcel extends Vue {
this.visible = false;
} else if (Object.is(type, 'custom')) {
if (!this.startPage || !this.endPage) {
this.$Notice.warning({ title: '警告', desc: '请输入起始页' });
this.$Notice.warning({ title: (this.$t('app.commonWords.warning') as string), desc: (this.$t('components.appExportExcel.desc') as string) });
return;
}
const startPage: any = Number.parseInt(this.startPage, 10);
const endPage: any = Number.parseInt(this.endPage, 10);
if (Number.isNaN(startPage) || Number.isNaN(endPage)) {
this.$Notice.warning({ title: '警告', desc: '请输入有效的起始页' });
this.$Notice.warning({ title: (this.$t('app.commonWords.warning') as string), desc: (this.$t('components.appExportExcel.desc1') as string) });
return;
}
if (startPage < 1 || endPage < 1 || startPage > endPage) {
this.$Notice.warning({ title: '警告', desc: '请输入有效的起始页' });
this.$Notice.warning({ title: (this.$t('app.commonWords.warning') as string), desc: (this.$t('components.appExportExcel.desc1') as string) });
return;
}
this.startPage = null;
......
......@@ -100,6 +100,22 @@ export default class AppFileUpload extends Vue {
*/
@Prop() public data!: string;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 初始化值
*
......@@ -120,7 +136,8 @@ export default class AppFileUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
this.setFiles(newval)
this.getParams();
this.setFiles(newval);
this.dataProcess();
}
......@@ -146,7 +163,7 @@ export default class AppFileUpload extends Vue {
* @type {string}
* @memberof AppFileUpload
*/
@Prop() public uploadparams?: string;
@Prop() public uploadparams?: any;
/**
* 下载参数
......@@ -154,15 +171,7 @@ export default class AppFileUpload extends Vue {
* @type {string}
* @memberof AppFileUpload
*/
@Prop() public exportparams?: string;
/**
* 自定义参数
*
* @type {*}
* @memberof AppFileUpload
*/
@Prop() public customparams?: any;
@Prop() public exportparams?: any;
/**
* 上传文件路径
......@@ -186,20 +195,20 @@ export default class AppFileUpload extends Vue {
public files = [];
/**
* 上传keys
* 上传params
*
* @type {Array<any>}
* @memberof AppFileUpload
*/
public upload_keys: Array<any> = [];
public upload_params: Array<any> = [];
/**
* 导出keys
* 导出params
*
* @type {Array<any>}
* @memberof AppFileUpload
*/
public export_keys: Array<any> = [];
public export_params: Array<any> = [];
/**
* 自定义数组
......@@ -239,31 +248,37 @@ export default class AppFileUpload extends Vue {
* @memberof AppFileUpload
*/
private dataProcess(): void {
let upload_arr: Array<string> = [];
let export_arr: Array<string> = [];
const _data: any = JSON.parse(this.data);
this.upload_keys.forEach((key: string) => {
upload_arr.push(`${key}=${_data[key]}`);
});
this.export_keys.forEach((key: string) => {
export_arr.push(`${key}=${_data[key]}`);
});
let _url = `${Environment.BaseUrl}${Environment.UploadFile}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
_url = `${_url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
if (this.upload_params.length > 0 ) {
_url +='?';
this.upload_params.forEach((item:any,i:any)=>{
_url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.upload_params.length-1){
_url += '&';
}
})
}
this.uploadUrl = _url;
this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
url = `${url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
if (this.export_params.length > 0) {
url +='?';
this.export_params.forEach((item:any,i:any)=>{
url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.export_params.length-1){
url += '&';
}
})
}
file.url = url;
});
}
/**
* vue 生命周期
*
......@@ -274,6 +289,7 @@ export default class AppFileUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
......@@ -289,32 +305,47 @@ export default class AppFileUpload extends Vue {
*/
public mounted() {
this.appData = this.$store.getters.getAppData();
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
let uploadparams: string = '';
let exportparams: string = '';
/**
*获取上传,导出参数
*
*@memberof AppFileUpload
*/
public getParams(){
let uploadparams: any = JSON.parse(JSON.stringify(this.uploadparams));
let exportparams: any = JSON.parse(JSON.stringify(this.exportparams));
let upload_params: Array<string> = [];
let export_params: Array<string> = [];
let param:any = this.viewparams;
let context:any = this.context;
let _data:any = JSON.parse(this.data);
let upload_keys: Array<string> = [];
let export_keys: Array<string> = [];
let custom_arr: Array<string> = [];
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = this.uploadparams;
upload_keys = uploadparams.split(';');
upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = this.exportparams;
export_keys = exportparams.split(';');
export_params = this.$util.computedNavData(_data,param,context,exportparams);
}
if (this.customparams && !Object.is(this.customparams, '')) {
Object.keys(this.customparams).forEach((name: string) => {
custom_arr.push(`${name}=${this.customparams[name]}`);
});
this.upload_params = [];
this.export_params = [];
for (const item in upload_params) {
this.upload_params.push({
[item]:upload_params[item]
})
}
for (const item in export_params) {
this.export_params.push({
[item]:export_params[item]
})
}
this.upload_keys = upload_keys;
this.export_keys = export_keys;
this.custom_arr = custom_arr;
this.setFiles(this.value);
this.dataProcess();
}
/**
......
......@@ -3,7 +3,8 @@
<component
:is="viewname"
class="viewcontainer2"
:viewdata ="viewdata"
:viewdata ="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:formDruipart="formDruipart"
:isformDruipart="true"
......@@ -39,6 +40,14 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop() public viewname?: string;
/**
* 临时数据模式:从数据模式:"2"、主数据模式:"1"、无临时数据模式:"0"
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@Prop({default:"0"}) public tempMode?:string;
/**
* 刷新关系项
*
......@@ -47,6 +56,14 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop({ default: '' }) public refreshitems!: string;
/**
* 禁止加载
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@Prop({ default: false }) public isForbidLoad!: boolean;
/**
* 关系视图类型
*
......@@ -111,6 +128,22 @@ export default class AppFormDRUIPart extends Vue {
*/
@Prop() public viewparams!: any;
/**
* 局部上下文
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public localContext!:any;
/**
* 局部参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public localParam!:any;
/**
* 应用实体参数名称
*
......@@ -232,29 +265,52 @@ export default class AppFormDRUIPart extends Vue {
}
const formData: any = data?data:JSON.parse(this.data);
const _paramitem = formData[this.paramItem];
let viewdata = {srfparentdename:this.parentName,srfparentkey:_paramitem};
Object.assign(viewdata, this.$viewTool.getIndexViewParam());
let tempContext:any = {};
let tempParam:any = {};
Object.assign(tempContext, this.$viewTool.getIndexViewParam());
const _parameters: any[] = [...this.$viewTool.getIndexParameters(), ...this.parameters];
_parameters.forEach((parameter: any) => {
const { pathName, parameterName }: { pathName: string, parameterName: string } = parameter;
if (formData[parameterName] && !Object.is(formData[parameterName], '')) {
Object.assign(viewdata, { [parameterName]: formData[parameterName] });
Object.assign(tempContext, { [parameterName]: formData[parameterName] });
}
});
Object.assign(viewdata, { [this.paramItem]: _paramitem });
Object.assign(tempContext, { [this.paramItem]: _paramitem });
//设置顶层视图唯一标识
Object.assign(viewdata,this.context);
this.viewdata = JSON.stringify(viewdata);
this.viewparam = JSON.stringify(this.viewparams);
Object.assign(tempContext,this.context);
Object.assign(tempContext,{srfparentdename:this.parentName,srfparentkey:_paramitem});
Object.assign(tempParam,{srfparentdename:this.parentName,srfparentkey:_paramitem});
// 设置局部上下文
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localContext);
Object.assign(tempContext,_context);
}
this.viewdata = JSON.stringify(tempContext);
// 设置局部参数
if(this.localParam && Object.keys(this.localParam).length >0){
let _param:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localParam);
Object.assign(tempParam,_param);
}
if(this.viewparams.hasOwnProperty('copymode')) Object.assign(tempParam,{copymode:this.viewparams.copymode});
this.viewparam = JSON.stringify(tempParam);
if (this.isRelationalData) {
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) {
this.blockUIStart();
return;
} else {
// 从数据模式无遮罩层
if(this.tempMode && Object.is(this.tempMode,"2")){
this.blockUIStop();
}else{
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) {
this.blockUIStart();
return;
} else {
this.blockUIStop();
}
}
}
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}});
if(!this.isForbidLoad){
setTimeout(() => {
this.formDruipart.next({action:'load',data:{srfparentdename:this.parentName,srfparentkey:_paramitem}});
}, 0);
}
}
/**
......@@ -277,12 +333,22 @@ export default class AppFormDRUIPart extends Vue {
}
// 表单保存之前
if (Object.is($event.type, 'beforesave')) {
if(Object.is(this.refviewtype,'DEMEDITVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW9')){
// 支持嵌入视图类型:嵌入视图本身抛drdatasaved的视图,如:DEMEDITVIEW9,DEGRIDVIEW9,DEGRIDVIEW等
// 从数据模式直接通知保存
// 临时补充,todo
if(Object.is(this.refviewtype,'DEMEDITVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW9') || Object.is(this.refviewtype,'DEGRIDVIEW')){
if(this.tempMode && Object.is(this.tempMode,"2")){
this.formDruipart.next({action:'save',data:$event.data});
} else {
// 不需要保存的界面也要抛出事件,供计数器计算
this.$emit('drdatasaved',$event);
}else{
if($event.data && !Object.is($event.data.srfuf,"0")){
this.formDruipart.next({action:'save',data:$event.data});
}else{
this.$emit('drdatasaved',$event);
}
}
}else{
this.$emit('drdatasaved',$event);
}
}
// 表单保存完成
if (Object.is($event.type, 'save')) {
......@@ -345,7 +411,7 @@ export default class AppFormDRUIPart extends Vue {
* @memberof AppFormDRUIPart
*/
public mditemsload(){
console.log('多数据视图加载完成,触发后续表单项更新');
console.log((this.$t('components.appFormDRUIPart.viewLoadComp') as string));
}
/**
......@@ -356,7 +422,7 @@ export default class AppFormDRUIPart extends Vue {
*/
public drdatasaved($event:any){
this.$emit('drdatasaved',$event);
console.log(this.viewname+'关系数据保存完成');
console.log(this.viewname+(this.$t('components.appFormDRUIPart.save') as string));
}
/**
......@@ -366,7 +432,7 @@ export default class AppFormDRUIPart extends Vue {
* @memberof AppFormDRUIPart
*/
public drdatachange(){
console.log('DEMEDITVIEW9 关系数据值变化');
console.log('DEMEDITVIEW9 '+(this.$t('components.appFormDRUIPart.change') as string));
}
/**
......@@ -376,7 +442,7 @@ export default class AppFormDRUIPart extends Vue {
* @memberof AppFormDRUIPart
*/
public viewdataschange(){
console.log('视图数据变化');
console.log((this.$t('components.appFormDRUIPart.change1') as string));
}
/**
......@@ -386,7 +452,7 @@ export default class AppFormDRUIPart extends Vue {
* @memberof AppFormDRUIPart
*/
public viewload(){
console.log('视图加载完成');
console.log((this.$t('components.appFormDRUIPart.loadComp') as string));
}
}
</script>
......
.app-form-group {
>.ivu-card-head {
>p {
>i {
......@@ -7,8 +8,12 @@
}
}
}
>.ivu-card-extra {
.item-extract-mode {
display: flex;
.item {
margin-left: 12px;
}
......@@ -17,6 +22,7 @@
}
.app-form-group.app-group-collapse-contant {
.ivu-card-body {
display: none;
}
......@@ -24,9 +30,12 @@
.app-group-flex {
height: 100%;
overflow: auto;
> .ivu-card-body {
overflow-y: auto;
overflow-x: hidden;
>.ivu-card-body {
height: calc(100% - 51px);
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
}
}
\ No newline at end of file
.app-form-item {
// margin-bottom: 16px;
>.ivu-form-item-label {
text-decoration: none;
display: block;
overflow: hidden;
white-space: nowrap;
}
>.ivu-form-item-content {
min-height: 36px;
}
height: 100%;
padding: 0 6px;
.editor {
height: 100%;
.ivu-form-item-content {
height: 100%;
min-height: 36px;
}
}
.app-form-item-label {
padding: 6px 10px 6px 0px;
}
}
.app-form-item-label-top {
>.ivu-form-item-label {
float: none;
display: inline-block;
padding: 0 0 10px;
}
.app-form-item.label-top, .app-form-item.label-bottom {
.app-form-item-label {
display: block;
}
}
.app-form-item.label-left, .app-form-item.label-right {
.app-form-item-label, .editor {
height: 100%;
}
}
.app-form-item.label-left {
.app-form-item-label {
float: left;
text-align: right;
}
}
.app-form-item.label-right {
.app-form-item-label {
float: right;
padding: 6px 0px 6px 10px;
}
}
.app-form-item.label-none {
.app-form-item-label {
display: none !important;
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
overflow: auto;
overflow: initial;
}
}
}
......
......@@ -98,6 +98,22 @@ export default class AppImageUpload extends Vue {
*/
@Prop() public data!: string;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 初始化值
*
......@@ -119,6 +135,7 @@ export default class AppImageUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
this.getParams();
this.setFiles(newval)
this.dataProcess();
}
......@@ -185,20 +202,20 @@ export default class AppImageUpload extends Vue {
@Provide() public files = [];
/**
* 上传keys
* 上传params
*
* @type {Array<any>}
* @memberof AppImageUpload
*/
public upload_keys: Array<any> = [];
public upload_params: Array<any> = [];
/**
* 导出keys
* 导出params
*
* @type {Array<any>}
* @memberof AppImageUpload
*/
public export_keys: Array<any> = [];
public export_params: Array<any> = [];
/**
* 自定义数组
......@@ -238,26 +255,31 @@ export default class AppImageUpload extends Vue {
* @memberof AppImageUpload
*/
private dataProcess(): void {
let upload_arr: Array<string> = [];
let export_arr: Array<string> = [];
const _data: any = JSON.parse(this.data);
this.upload_keys.forEach((key: string) => {
upload_arr.push(`${key}=${_data[key]}`);
});
this.export_keys.forEach((key: string) => {
export_arr.push(`${key}=${_data[key]}`);
});
let _url = `${Environment.BaseUrl}${Environment.UploadFile}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
_url = `${_url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
if (this.upload_params.length > 0 ) {
_url +='?';
this.upload_params.forEach((item:any,i:any)=>{
_url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.upload_params.length-1){
_url += '&';
}
})
}
this.uploadUrl = _url;
this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
url = `${url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
if (this.export_params.length > 0) {
url +='?';
this.export_params.forEach((item:any,i:any)=>{
url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.export_params.length-1){
url += '&';
}
})
}
file.url = url;
});
......@@ -273,6 +295,7 @@ export default class AppImageUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
......@@ -287,32 +310,47 @@ export default class AppImageUpload extends Vue {
*/
public mounted() {
this.appData = this.$store.getters.getAppData();
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
/**
*获取上传,导出参数
*
*@memberof AppImageUpload
*/
public getParams(){
let uploadparams: any = JSON.parse(JSON.stringify(this.uploadparams));
let exportparams: any = JSON.parse(JSON.stringify(this.exportparams));
let uploadparams: string = '';
let exportparams: string = '';
let upload_params: Array<string> = [];
let export_params: Array<string> = [];
let param:any = this.viewparams;
let context:any = this.context;
let _data:any = JSON.parse(this.data);
let upload_keys: Array<string> = [];
let export_keys: Array<string> = [];
let custom_arr: Array<string> = [];
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = this.uploadparams;
upload_keys = uploadparams.split(';');
upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = this.exportparams;
export_keys = exportparams.split(';');
export_params = this.$util.computedNavData(_data,param,context,exportparams);
}
if (this.customparams && !Object.is(this.customparams, '')) {
Object.keys(this.customparams).forEach((name: string) => {
custom_arr.push(`${name}=${this.customparams[name]}`);
});
this.upload_params = [];
this.export_params = [];
for (const item in upload_params) {
this.upload_params.push({
[item]:upload_params[item]
})
}
for (const item in export_params) {
this.export_params.push({
[item]:export_params[item]
})
}
this.upload_keys = upload_keys;
this.export_keys = export_keys;
this.custom_arr = custom_arr;
this.setFiles(this.value);
this.dataProcess();
}
/**
......@@ -369,7 +407,7 @@ export default class AppImageUpload extends Vue {
* @memberof AppImageUpload
*/
public onError(error: any, file: any, fileList: any) {
this.$Notice.error({ title: '上传失败' });
this.$Notice.error({ title: (this.$t('components.appImageUpload.uploadFail') as string) });
}
/**
......
.ivu-dropdown{
cursor: pointer;
}
\ No newline at end of file
<template>
<dropdown trigger='click' @on-click="selectLang">
<dropdown v-if="localList.length > 1" trigger='click' @on-click="selectLang">
<span>
{{title}}
<icon size='18' type='md-arrow-dropdown'></icon>
......
......@@ -19,10 +19,12 @@
padding-top: 2px;
padding-right: 2px;
color: #aaa;
cursor: pointer;
}
.Row {
height: 70px;
min-height: 70px;
height: auto;
border-bottom: 1px solid lightgray;
display: flex;
align-items: center;
......@@ -34,20 +36,24 @@
.column2 {
border: 0px red solid;
.process-definition-name {
font-size: 14px;
padding-top: 5px;
}
.description {
margin-top: 6px;
margin-bottom: 6px;
max-width: 95%;
}
.createtime {
padding-bottom: 5px;
}
.el-row {
display: flex;
.el-col {
flex-grow: 1;
div {
margin-bottom: 5px;
}
div:first-child {
font-weight: 500;
overflow: hidden;
......
......@@ -20,8 +20,8 @@
<el-row :draggable="false">
<el-col :span="16" :draggable="false">
<div class="process-definition-name" :draggable="false"><strong>{{myTask.processDefinitionName}}</strong></div>
<div :draggable="false">{{myTask.description}}</div>
<div :draggable="false">{{ formatDate(myTask.createTime, 'MM-DD hh:mm') }}</div>
<div class="description" :draggable="false">{{myTask.description}}</div>
<div class="createtime" :draggable="false">{{ formatDate(myTask.createTime, 'MM-DD hh:mm') }}</div>
</el-col>
<el-col :span="5" :draggable="false" style='display: flex; align-items: center'>
<el-tag :type="myTask.name.indexOf('驳回')!=-1?'danger':(myTask.name.indexOf('成功')!=-1?'success':(myTask.name.indexOf('取消')!=-1?'info':'-'))"
......@@ -54,8 +54,8 @@
<el-row :draggable="false">
<el-col :span="16" :draggable="false">
<div class="process-definition-name" :draggable="false"><strong>{{myMsg.processDefinitionName}}</strong></div>
<div :draggable="false">{{myMsg.description}}</div>
<div :draggable="false">{{ formatDate(myMsg.createTime, 'MM-DD hh:mm') }}</div>
<div class="description" :draggable="false">{{myMsg.description}}</div>
<div class="createtime" :draggable="false">{{ formatDate(myMsg.createTime, 'MM-DD hh:mm') }}</div>
</el-col>
<el-col :span="5" :draggable="false" style='display: flex; align-items: center'>
<el-tag :type="myMsg.name.indexOf('驳回')!=-1?'danger':(myMsg.name.indexOf('成功')!=-1?'success':(myMsg.name.indexOf('取消')!=-1?'info':'-'))"
......
......@@ -65,14 +65,36 @@ export default class AppOrgSector extends Vue {
* @memberof AppOrgSector
*/
public mounted() {
this.getData();
}
/**
* 获取数据
*
* @memberof AppOrgSector
*/
public getData(){
if (this.$store.getters.getAppData()) {
if (this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srforgsectorid && this.$store.getters.getAppData().context.srforgsectorname) {
let _context = this.$store.getters.getAppData().context;
let _srforgname = this.$store.getters.getAppData().context.srforgname;
let _srforgsectorname = this.$store.getters.getAppData().context.srforgsectorname;
if (_context && this.$store.getters.getAppData().context.srforgsectorid ){
this.selectedOrgId = this.$store.getters.getAppData().context.srforgsectorid;
this.selectedOrgName = this.$store.getters.getAppData().context.srforgsectorname;
} else {
return false;
}
if(_context && _srforgname && _srforgsectorname){
this.selectedOrgName = _srforgname + '-' + _srforgsectorname;
} else if (_context && _srforgname) {
this.selectedOrgName = _srforgname;
} else if (_context && _srforgsectorname) {
this.selectedOrgName = _srforgsectorname;
}
if (this.$store.getters.getAppData().srforgsections) {
this.selectedOrgArray = this.$store.getters.getAppData().srforgsections;
}
}
}
......
......@@ -22,6 +22,14 @@
.ivu-select-dropdown{
max-height: 200px;
overflow: scroll;
margin: 0;
padding: 0;
.ivu-dropdown-menu{
.view-container{
margin: 0;
padding: 0;
}
}
.tree-contant{
overflow:inherit;
}
......
......@@ -8,14 +8,17 @@
:trigger-on-focus="true" :fetch-suggestions="(query, callback) => { this.onSearch(query, callback, true) }" @select="onACSelect"
@input="onInput" @blur="onBlur" style='width:100%;'>
<template v-slot:default="{item}">
<template v-if="item.isNew">
<!-- <template v-if="item.isNew">
<div v-if="linkview" @click="newAndEdit">{{$t('components.appPicker.newAndEdit')}}</div>
</template> -->
<template v-if="item.tag">
<div @click="clickAction(item.tag)">{{item.caption}}</div>
</template>
<slot v-else name="default" :item="item"></slot>
</template>
<template v-slot:suffix>
<i v-if="curvalue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<i v-if="!Object.is(editortype, 'ac')" class='el-icon-search' @click="openView"></i>
<i v-if="!Object.is(editortype, 'ac') && showButton" class='el-icon-search' @click="openView"></i>
<icon v-if="linkview" type="ios-open-outline" @click="openLinkView"/>
</template>
</el-autocomplete>
......@@ -37,7 +40,10 @@
@change="onSelect" :disabled="disabled" style='width:100%;' clearable
@clear="onClear" @visible-change="onSelectOpen">
<template v-if="items">
<el-option v-for="_item in items" :key="_item[deKeyField]" :value="_item[deKeyField]" :label="_item[deMajorField]" :disabled="_item.disabled"></el-option>
<template v-for="_item in items">
<el-option v-if="!_item.tag" :key="_item[deKeyField]" :value="_item[deKeyField]" :label="_item[deMajorField]" :disabled="_item.disabled"></el-option>
<el-option v-else :key="_item[deKeyField]" value="action"><span @click="clickAction(_item.tag)" style="float: left; width: 100%;">{{ _item.caption }}</span></el-option>
</template>
</template>
</el-select>
<span style='position: absolute;right: 5px;color: #c0c4cc;top:0;font-size: 13px;'>
......@@ -55,7 +61,6 @@ import { AppModal } from '@/utils';
@Component({
})
export default class AppPicker extends Vue {
/**
* 视图上下文
*
......@@ -128,6 +133,14 @@ export default class AppPicker extends Vue {
*/
@Prop() public disabled?: boolean;
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof AppPicker
*/
@Prop({default:true}) public showButton?: boolean;
/**
* 类型
*
......@@ -153,12 +166,20 @@ export default class AppPicker extends Vue {
@Prop() public linkview?: any;
/**
* 表单项参数
* 局部上下文导航参数
*
* @type {any}
* @memberof AppPicker
*/
@Prop() public itemParam: any;
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppPicker
*/
@Prop() public localParam!:any;
/**
* 值项名称
......@@ -168,6 +189,23 @@ export default class AppPicker extends Vue {
*/
@Prop() public valueitem!: string;
/**
* 排序
*
* @type {string}
* @memberof AppPicker
*/
@Prop() public sort?: string;
/**
* 行为组
*
* @type {Array<any>}
* @memberof AppPicker
*/
@Prop() public actionDetails?:Array<any>;
/**
* 值
*
......@@ -234,7 +272,7 @@ export default class AppPicker extends Vue {
* @param {*} oldVal
* @memberof AppPicker
*/
@Watch('value')
@Watch('value',{immediate:true})
public onValueChange(newVal: any, oldVal: any) {
this.curvalue = newVal;
if (Object.is(this.editortype, 'dropdown') && this.valueitem) {
......@@ -257,8 +295,8 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public created() {
if(Object.is(this.editortype, 'dropdown')){
this.onSearch("", null, true);
if(!Object.is(this.editortype, 'pickup-no-ac') && !Object.is(this.editortype, 'dropdown')){
this.curvalue = this.value;
}
}
......@@ -309,7 +347,10 @@ export default class AppPicker extends Vue {
query = '';
}
this.inputState = false;
Object.assign(_param, { query: query });
if(this.sort && !Object.is(this.sort, "")) {
Object.assign(_param, { sort: this.sort });
}
Object.assign(_param, { query: query, size: 1000 });
// 错误信息国际化
let error: string = (this.$t('components.appPicker.error') as any);
let miss: string = (this.$t('components.appPicker.miss') as any);
......@@ -327,8 +368,11 @@ export default class AppPicker extends Vue {
} else {
this.items = [...response];
}
if(this.acParams && this.linkview){
this.items.push({ isNew :true });
// if(this.acParams && this.linkview){
// this.items.push({ isNew :true });
// }
if(this.acParams && this.actionDetails && this.actionDetails.length >0){
this.items = [...this.items,...this.actionDetails];
}
if (callback) {
callback(this.items);
......@@ -410,9 +454,9 @@ export default class AppPicker extends Vue {
// 判断打开方式
if (view.placement && !Object.is(view.placement, '')) {
if (Object.is(view.placement, 'POPOVER')) {
this.openPopOver($event, view, _context, data);
this.openPopOver($event, view, _context, _param);
} else {
this.openDrawer(view, _context, data);
this.openDrawer(view, _context, _param);
}
} else {
this.openPopupModal(view, _context, _param);
......@@ -639,32 +683,36 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public handlePublicParams(arg: any): boolean {
if (!this.itemParam) {
return true;
}
if (!this.data) {
this.$Notice.error({ title: (this.$t('components.appPicker.error') as any), desc: (this.$t('components.appPicker.formdataException') as any) });
return false;
}
// 合并表单参数
arg.param = JSON.parse(JSON.stringify(this.viewparams));
arg.context = JSON.parse(JSON.stringify(this.context));
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(this.data,this.itemParam.context);
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.itemParam.param) {
let _param = this.$util.formatData(this.data,this.itemParam.param);
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(this.data,this.itemParam.parentdata);
Object.assign(arg.param,_parentdata);
}
return true;
}
/**
* 触发界面行为
*
* @param {*} arg
* @returns
* @memberof AppPicker
*/
public clickAction(arg:any){
this.$emit('editoractionclick',arg);
}
/**
* 创建并编辑
*
......@@ -691,9 +739,9 @@ export default class AppPicker extends Vue {
// 判断打开方式
if (view.placement && !Object.is(view.placement, '')) {
if (Object.is(view.placement, 'POPOVER')) {
this.openPopOver($event, view, _context, data);
this.openPopOver($event, view, _context, _param);
} else {
this.openDrawer(view, _context, data);
this.openDrawer(view, _context, _param);
}
} else {
this.openPopupModal(view, _context, _param);
......
......@@ -6,7 +6,7 @@
</radio-group>
</template>
<script lang = 'ts'>
import { Component, Vue, Prop, Model } from 'vue-property-decorator';
import { Component, Vue, Prop, Model,Watch } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({})
......@@ -61,6 +61,39 @@ export default class AppRadioGroup extends Vue {
*/
@Prop() public codelistType?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof AppRadioGroup
*/
@Prop() public data?: any;
/**
* 监听表单数据变化
*
* @memberof AppRadioGroup
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
if(newVal){
if(this.tag && this.codelistType == 'DYNAMIC'){
// 公共参数处理
let data: any = {};
this.handlePublicParams(data);
// 参数处理
let _context = data.context;
let _param = data.param;
console.log("app-radio-group")
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
}).catch((error:any)=>{
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
})
}
}
}
/**
* 是否禁用
*
......@@ -69,6 +102,38 @@ export default class AppRadioGroup extends Vue {
*/
@Prop() public disabled?: boolean;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppRadioGroup
*/
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppRadioGroup
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppRadioGroup
*/
@Prop() public viewparams!: any;
/**
* 属性名称
*
......@@ -99,6 +164,28 @@ export default class AppRadioGroup extends Vue {
*/
public items: any[] = [];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppRadioGroup
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
}
/**
* vue 生命周期
*
......@@ -108,10 +195,16 @@ export default class AppRadioGroup extends Vue {
if(this.tag && this.codelistType == 'STATIC'){
this.items = this.$store.getters.getCodeListItems(this.tag);
}else if(this.tag && this.codelistType == 'DYNAMIC'){
this.codeListService.getItems(this.tag).then((data:any)=>{
this.items = data;
}).catch((data:any)=>{
console.log(`----${this.tag}----代码表不存在!`);
// 公共参数处理
let data: any = {};
this.handlePublicParams(data);
// 参数处理
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
this.items = res;
}).catch((error:any)=>{
console.log(`----${this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
})
}
}
......
......@@ -76,6 +76,7 @@ export default class AppSlider extends Vue {
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
newVal = (newVal === null) ? 0 : newVal;
this.currentVal = parseInt(newVal);
}
......
<template>
<codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator"></codelist>
<codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator" :data="data" :localContext="localContext" :localParam="localParam" :context="context" :viewparams="viewparams"></codelist>
<app-upload-file-info v-else-if="Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')" :value="value" :name="name"></app-upload-file-info>
<span class="app-span" v-else >{{text}}</span>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch, Model } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
import moment from "moment";
@Component({})
export default class DropDownList extends Vue {
export default class AppSpan extends Vue {
/**
* 当前值
......@@ -19,6 +18,38 @@ export default class DropDownList extends Vue {
*/
@Prop() public value?: any;
/**
* 数据类型
*
* @type {string}
* @memberof AppSpan
*/
@Prop() public dataType?: string;
/**
* 单位名称
*
* @type {string}
* @memberof AppSpan
*/
@Prop({default:''}) public unitName?: string;
/**
* 精度
*
* @type {number}
* @memberof AppSpan
*/
@Prop({default:'2'}) public precision?:number;
/**
* 日期值格式化
*
* @type {string}
* @memberof AppSpan
*/
@Prop() public valueFormat?: string;
/**
* 当前表单项名称
*
......@@ -46,23 +77,63 @@ export default class DropDownList extends Vue {
/**
* 获取或模式
* @type {boolean}
* @memberof SelectPicker
* @memberof AppSpan
*/
@Prop({default:"STR"}) public renderMode?: string;
/**
* 文本分隔符
* @type {boolean}
* @memberof SelectPicker
* @memberof AppSpan
*/
@Prop({default:"、"}) public textSeparator?: string;
@Prop({default:'、'}) public textSeparator?: string;
/**
* 值分隔符
* @type {boolean}
* @memberof SelectPicker
* @memberof AppSpan
*/
@Prop({default:";"}) public valueSeparator?: string;
@Prop({default:','}) public valueSeparator?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public data?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof AppSpan
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppSpan
*/
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public viewparams!: any;
/**
* 监控表单属性 data 值
......@@ -106,13 +177,65 @@ export default class DropDownList extends Vue {
* @memberof AppSpan
*/
public load(){
if(!this.value || this.tag){
if(this.tag){
return; //代码表走codelist组件
}else if(this.editorType === "ADDRESSPICKUP"){
if(this.$util.isEmpty(this.value)){
this.text = '';
}else{
JSON.parse(this.value).forEach((item:any,index:number) => {
this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext;
});
}
}else{
if(this.$util.isEmpty(this.value)){
this.text = '';
}else if(this.dataType){
this.dataFormat();
}else{
this.text = this.value;
}
}
}
/**
* 数据格式化
*
* @memberof AppSpan
*/
public dataFormat(){
if(this.valueFormat){
this.dateFormat() ;
return;
}
if(Object.is(this.dataType,"CURRENCY")){
let number:any = Number(this.value);
this.text = Number(number.toFixed(this.precision)).toLocaleString('en-US')+ ' '+ this.unitName;
}else if(Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"DECIMAL")){
let number:any = Number(this.value);
this.text = number.toFixed(this.precision);
}else {
this.text = this.value;
}
}
/**
* 日期格式化
*
* @memberof AppSpan
*/
public dateFormat(){
if(this.valueFormat){
if(this.valueFormat.indexOf('%1$t') !== -1){
this.text= moment(this.data).format("YYYY-MM-DD HH:mm:ss");
}else if(this.valueFormat.indexOf('%1$s') == -1){
this.text= moment(this.data).format(this.valueFormat);
}else{
this.text= this.value;
}
}
}
}
</script>
......
......@@ -5,11 +5,21 @@
display: none;
}
.el-transfer{
max-height: 200px;
min-width: 100% !important;
display: flex;
justify-content: space-between;
.el-transfer-panel{
min-width: 25%;
.el-transfer-panel__body{
max-height: 160px;
.el-checkbox-group{
max-height: 160px;
.el-checkbox+.el-checkbox {
margin-left: 0px;
}
}
}
}
.el-transfer__buttons{
align-self: center;
......
......@@ -36,7 +36,7 @@ export default class AppTreePicker extends Vue {
* 视图上下文
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppTreePicker
*/
@Prop() public context!: any;
......@@ -44,7 +44,7 @@ export default class AppTreePicker extends Vue {
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
* @memberof AppTreePicker
*/
@Prop() public viewparams!: any;
......@@ -52,7 +52,7 @@ export default class AppTreePicker extends Vue {
* 表单数据
*
* @type {*}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop() public data!: any;
......@@ -68,7 +68,7 @@ export default class AppTreePicker extends Vue {
* 是否启用
*
* @type {boolean}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop({default: false}) public disabled!: boolean;
......@@ -101,7 +101,7 @@ export default class AppTreePicker extends Vue {
* 值项名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop() public valueItem?: string;
......@@ -109,7 +109,7 @@ export default class AppTreePicker extends Vue {
* 关联视图名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop() public refviewname?: string;
......@@ -125,17 +125,25 @@ export default class AppTreePicker extends Vue {
* 属性项名称
*
* @type {string}
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Prop() public name!: string;
/**
* 关联视图参数
*
* @type {*}
* 局部上下文导航参数
*
* @type {any}
* @memberof AppTreePicker
*/
@Prop() public itemParam: any;
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof AppTreePicker
*/
@Prop() public localParam!:any;
/**
* 是否忽略之变化
......@@ -210,8 +218,8 @@ export default class AppTreePicker extends Vue {
*
* @memberof AppTreePicker
*/
public setViewParam(activeData: any) {
if (!this.itemParam || !activeData) {
public setViewParam() {
if (!this.data) {
return;
}
let arg: any = {};
......@@ -219,17 +227,13 @@ export default class AppTreePicker extends Vue {
let param: any = JSON.parse(JSON.stringify(this.viewparams));
let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理
if (this.itemParam.context) {
let _context = this.$util.formatData(activeData,this.itemParam.context);
Object.assign(context,_context);
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.itemParam.param) {
let _param = this.$util.formatData(activeData,this.itemParam.param);
Object.assign(param,_param);
}
if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,this.itemParam.parentdata);
Object.assign(param,_parentdata);
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
this.viewdata = JSON.stringify(context);
this.viewparam = JSON.stringify(param);
......@@ -240,13 +244,13 @@ export default class AppTreePicker extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppFormDRUIPart
* @memberof AppTreePicker
*/
@Watch('data')
onActivedataChange(newVal: any, oldVal: any) {
const newFormData: any = JSON.parse(newVal);
const oldDormData: any = JSON.parse(oldVal);
this.setViewParam(newFormData);
this.setViewParam();
if (!this.refreshitems || this.ignorefieldvaluechange) {
return;
}
......@@ -261,7 +265,7 @@ export default class AppTreePicker extends Vue {
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPicker
* @memberof AppTreePicker
*/
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
......@@ -277,7 +281,7 @@ export default class AppTreePicker extends Vue {
if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) {
this.setViewParam(JSON.parse(this.data));
this.setViewParam();
}
});
}
......@@ -286,7 +290,7 @@ export default class AppTreePicker extends Vue {
/**
* vue 生命周期
*
* @memberof SelectType
* @memberof AppTreePicker
*/
public destroyed() {
if (this.formStateEvent) {
......
......@@ -5,4 +5,7 @@
margin-right: 10px;
padding: 0 5px;
}
}
.user-dropdownMenu{
margin-top: 9px;
}
\ No newline at end of file
<template>
<div class='app-header-user'>
<dropdown @on-click="userSelect" :transfer="true">
<dropdown transfer-class-name="user-dropdownMenu" @on-click="userSelect" :transfer="true">
<div class='user'>
<span>{{user.name ? user.name : $t('components.appUser.name')}}</span>
&nbsp;&nbsp;<avatar :src="user.avatar" />
</div>
<dropdown-menu class='menu' slot='list' style='font-size: 15px !important;'>
<dropdown-item name='updatepwd' style='font-size: 15px !important;'>
<span><Icon type="ios-create-outline" style='margin-right: 8px;'/></span>
<span>{{$t('components.appUser.changepwd')}}</span>
</dropdown-item>
<dropdown-item name='logout' style='font-size: 15px !important;'>
<span><i aria-hidden='true' class='fa fa-cogs' style='margin-right: 8px;'></i></span>
<span><i aria-hidden='true' class='ivu-icon ivu-icon-md-power' style='margin-right: 8px;'></i></span>
<span>{{$t('components.appUser.logout')}}</span>
</dropdown-item>
</dropdown-menu>
......@@ -16,7 +20,7 @@
</template>
<script lang = 'ts'>
import { Vue, Component } from 'vue-property-decorator';
import { Subject } from 'rxjs';
@Component({
})
export default class AppUser extends Vue {
......@@ -46,6 +50,13 @@ export default class AppUser extends Vue {
this.logout();
}
});
}else if (Object.is(data, 'updatepwd')) {
let container: Subject<any> = this.$appmodal.openModal({ viewname: 'app-update-password', title: (this.$t('components.appUser.changepwd') as string), width: 500, height: 400, }, {}, {});
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
});
}
}
......@@ -64,6 +75,12 @@ export default class AppUser extends Vue {
_user.avatar = this.$store.getters.getAppData().context.srfusericonpath;
}
}
if(localStorage.getItem("user")){
let user:any = JSON.parse(localStorage.getItem("user") as string);
if(user && user.personname){
_user.name = user.personname;
}
}
Object.assign(this.user,_user,{
time: +new Date
});
......@@ -75,9 +92,19 @@ export default class AppUser extends Vue {
* @memberof AppUser
*/
public logout() {
localStorage.removeItem('user');
localStorage.removeItem('token');
this.$router.push({ name: 'login' });
const get: Promise<any> = this.$http.get('/v7/logout');
get.then((response:any) =>{
if (response && response.status === 200) {
localStorage.removeItem('user');
localStorage.removeItem('token');
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
this.$router.push({ name: 'login' });
}
}).catch((error: any) =>{
console.error(error);
})
}
}
</script>
......
......@@ -5,30 +5,35 @@
<span>{{data.startUserName}}{{$t('components.appWFApproval.commit')}}</span>
</div>
<div class="app-wf-approval-content" v-if="data.usertasks && data.usertasks.length >0">
<div class="approval-content-item" v-for="(usertask,index) in data.usertasks" :key="index">
<div class="approval-content-item-left">
{{usertask.userTaskName}}
</div>
<div class="approval-content-item-right">
<div class="approval-content-item-wait" v-if="usertask.identitylinks.length >0">
{{$t('components.appWFApproval.wait')}}<span v-for="(identitylink,inx) in usertask.identitylinks" :key="inx">{{identitylink.displayname}}<span v-if="inx >0"></span></span>{{$t('components.appWFApproval.handle')}}
</div>
<div class="approval-content-item-info" v-if="usertask.comments.length >0">
<div v-for="(comment,commentInx) in usertask.comments" :key="commentInx">
<div class="approval-content-item-info-item approval-content-item-info-top">
{{`【${comment.type}】${comment.fullMessage}`}}
<template v-for="(usertask,index) in data.usertasks" >
<template v-if="usertask.identitylinks.length >0">
<div class="approval-content-item" :key="index">
<div class="approval-content-item-left">
{{usertask.userTaskName}}
</div>
<div class="approval-content-item-right">
<div class="approval-content-item-wait" v-if="usertask.identitylinks.length >0">
{{$t('components.appWFApproval.wait')}}<span v-for="(identitylink,inx) in usertask.identitylinks" :key="inx">{{identitylink.displayname}}<span v-if="inx >0"></span></span>{{$t('components.appWFApproval.handle')}}
</div>
<div class="approval-content-item-info-item approval-content-item-info-bottom">
<span class="info-bottom-name">{{comment.authorName}}</span>
<span>{{comment.time}}</span>
<div class="approval-content-item-info" v-if="usertask.comments.length >0">
<div v-for="(comment,commentInx) in usertask.comments" :key="commentInx">
<div class="approval-content-item-info-item approval-content-item-info-top">
{{`【${comment.type}】${comment.fullMessage}`}}
</div>
<div class="approval-content-item-info-item approval-content-item-info-bottom">
<span class="info-bottom-name">{{comment.authorName}}</span>
<span>{{comment.time}}</span>
</div>
</div>
</div>
<div class="approval-content-item-memo" v-if="usertask.userTaskId === viewparams.userTaskId">
<el-input type="textarea" v-model="initmemo" :rows="2" @blur="handleBlur" :placeholder="$t('components.appWFApproval.placeholder')"></el-input>
</div>
</div>
</div>
<div class="approval-content-item-memo" v-if="usertask.userTaskId === viewparams.userTaskId">
<el-input type="textarea" v-model="initmemo" :rows="2" @blur="handleBlur" :placeholder="$t('components.appWFApproval.placeholder')"></el-input>
</div>
</div>
</div>
</template>
</template>
</div>
<div class="app-wf-approval-bottom">
<span v-if="data.endTime">{{data.endTime}}{{$t('components.appWFApproval.end')}}</span>
......
......@@ -37,14 +37,14 @@ export default class CodeList extends Vue {
* 代码表类型
*
* @type {string}
* @memberof AppCheckBox
* @memberof CodeList
*/
@Prop() public codelistType?: string;
/**
* 当前值
* @type {any}
* @memberof SelectPicker
* @memberof CodeList
*
*/
@Prop() public value?: string;
......@@ -52,23 +52,63 @@ export default class CodeList extends Vue {
/**
* 获取或模式
* @type {boolean}
* @memberof SelectPicker
* @memberof CodeList
*/
@Prop({default:"STR"}) public renderMode?: string;
/**
* 文本分隔符
* @type {boolean}
* @memberof SelectPicker
* @memberof CodeList
*/
@Prop({default:"、"}) public textSeparator?: string;
@Prop({default:'、'}) public textSeparator?: string;
/**
* 值分隔符
* @type {boolean}
* @memberof SelectPicker
* @memberof CodeList
*/
@Prop({default:','}) public valueSeparator?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof CodeList
*/
@Prop() public data?: any;
/**
* 局部上下文导航参数
*
* @type {any}
* @memberof CodeList
*/
@Prop() public localContext!:any;
/**
* 局部导航参数
*
* @type {any}
* @memberof CodeList
*/
@Prop() public localParam!:any;
/**
* 视图上下文
*
* @type {*}
* @memberof CodeList
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof CodeList
*/
@Prop({default:";"}) public valueSeparator?: string;
@Prop() public viewparams!: any;
/**
* 是否为空
......@@ -101,7 +141,7 @@ export default class CodeList extends Vue {
*/
public isUseLangres:boolean = false;
/**
/**
* 数据值变化
*
* @param {*} newval
......@@ -112,7 +152,18 @@ export default class CodeList extends Vue {
@Watch('value')
public onValueChange(newVal: any, oldVal: any) {
this.dataHandle();
}
/**
* 监听表单数据变化
*
* @memberof CodeList
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
if(newVal){
this.dataHandle();
}
}
/**
......@@ -131,11 +182,17 @@ export default class CodeList extends Vue {
this.ifEmpty = false;
// 动态代码表处理
if (Object.is(this.codelistType, "DYNAMIC")) {
this.codeListService.getItems(this.tag).then((res: any) => {
// 公共参数处理
let data: any = {};
this.handlePublicParams(data);
// 参数处理
let _context = data.context;
let _param = data.param;
this.codeListService.getItems(this.tag,_context,_param).then((res:any) => {
let items = res;
_this.setItems(items, _this);
}).catch((error: any) => {
console.log(`----${_this.tag}----代码表不存在`);
console.log(`----${_this.tag}----${(this.$t('app.commonWords.codeNotExist') as string)}`);
});
// 静态处理
} else if(Object.is(this.codelistType, "STATIC")){
......@@ -209,6 +266,28 @@ export default class CodeList extends Vue {
}
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof CodeList
*/
public handlePublicParams(arg: any) {
// 合并表单参数
arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.localContext && Object.keys(this.localContext).length >0) {
let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
Object.assign(arg.context,_context);
}
if (this.localParam && Object.keys(this.localParam).length >0) {
let _param = this.$util.computedNavData(this.data,arg.param,arg.param,this.localParam);
Object.assign(arg.param,_param);
}
}
}
</script>
......
.context-menu-container {
// width: 100vw;
// height: 100vh;
// z-index: -10000;
// position: absolute;
// top: 0;
// left: 0;
line-height: 1;
// width: 100vw;
// height: 100vh;
// z-index: -10000;
// position: absolute;
// top: 0;
// left: 0;
// line-height: 1;
z-index: 10001;
.context-menu-content {
z-index: 10001;
position: absolute;
background: #FFF;
// border: 1px solid #e3e3e3;
}
.context-menu-content {
position: absolute;
background: #FFF;
// border: 1px solid #e3e3e3;
.tree-right-menu{
.ivu-select-dropdown{
overflow: auto;
}
}
.ivu-divider{
width: 100%;
}
.context-menus {
}
.context-menus-item {
list-style: none;
line-height: 36px;
padding: 0 13px;
margin: 0;
font-size: 14px;
color: #606266;
cursor: pointer;
outline: none;
display: flex;
.icon {
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
width: 20px;
margin-right: 8px;
}
}
.context-menus-item:hover {
background-color: #ecf5ff;
color: #66b1ff;
}
}
.context-menus {
.context-menus-item {
list-style: none;
line-height: 36px;
padding: 0 13px;
margin: 0;
font-size: 14px;
color: #606266;
cursor: pointer;
outline: none;
display: flex;
.icon {
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
width: 20px;
margin-right: 8px;
}
}
.context-menus-item:hover {
background-color: #ecf5ff;
color: #66b1ff;
}
}
}
.context-menu {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
\ No newline at end of file
.ivu-select-multiple .ivu-select-item-selected:after{
display: none;
}
.dropdown-list-mpicker-container{
.tree-dropdown-list-mpicker{
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
}
.dropdown-list{
display: inline-block;
}
.dropdown-list-container{
.dropdown-list{
display: inline-block;
}
.tree-dropdown-list{
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
}
\ No newline at end of file
......@@ -5,4 +5,13 @@
top: 0;
right: 20px;
}
.ivu-input-number{
width: 100%;
}
.ivu-input-number-input{
text-align: left;
}
.ivu-input-number-input:hover{
padding-right:22px;
}
}
\ No newline at end of file
......@@ -20,8 +20,8 @@
:on-exceeded-size="exceededsize"
:on-progress="progress">
<div class="upload-text">
<p>将图片拖到这里替换</p>
<p><span class="text-style">本地上传</span><span class="text-style">从素材库选择</span></p>
<p>{{$t('components.uploadFile.imgMsg')}}</p>
<p><span class="text-style">{{$t('components.uploadFile.localUpload')}}</span>{{$t('components.uploadFile.or')}}<span class="text-style">{{$t('components.uploadFile.imgMsg1')}}</span></p>
</div>
</upload>
</div>
......
......@@ -36,7 +36,15 @@ export default class ChartViewEngine extends SearchViewEngine {
* @memberof ChartViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getSearchForm()) {
const tag = this.getSearchForm().name;
this.setViewState2({ tag: tag, action: 'loaddraft', viewdata: this.view.viewparams });
}else if(this.getChart() && this.isLoadDefault) {
const tag = this.getChart().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: {} });
} else {
this.isLoadDefault = true;
}
}
/**
......
......@@ -89,6 +89,7 @@ export default class EditView2Engine extends EditViewEngine {
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
this.view.formData = arg;
if (this.getDRBar()) {
const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.vieparams });
......@@ -103,6 +104,7 @@ export default class EditView2Engine extends EditViewEngine {
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
this.view.formData = arg;
if (this.getDRBar()) {
const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
......
......@@ -89,6 +89,7 @@ export default class EditView3Engine extends EditViewEngine {
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
this.view.formData = arg;
if (this.getDrTab()) {
const tag = this.getDrTab().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
......@@ -103,6 +104,7 @@ export default class EditView3Engine extends EditViewEngine {
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
this.view.formData = arg;
if (this.getDrTab()) {
const tag = this.getDrTab().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
......
......@@ -123,15 +123,6 @@ export default class ListViewEngine extends MDViewEngine {
if (!arg) {
arg = {};
}
// if (this.getParentMode()) {
// Object.assign(arg, this.getParentMode());
// }
// if (this.getParentData()) {
// Object.assign(arg, this.getParentData());
// }
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
......@@ -150,9 +141,9 @@ export default class ListViewEngine extends MDViewEngine {
arg.srfkeys = keys;
}
const grid: any = this.getMDCtrl();
if (grid) {
grid.remove(arg);
const list: any = this.getMDCtrl();
if (list) {
list.remove(arg);
}
}
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册