提交 5d43aa7c 编写于 作者: tony001's avatar tony001

2020.6.5 更新

上级 cd032404
## v7.0.0-alpha.6 [2020-6-5]
### Bug修复
修复树右键菜单事件传值bug
修复树节点图标样式
修复viewdata和viewparams解析不同步
修复界面行为多主键分隔符由";"改为","
修复多层导航失效
数据选择,自动填充编辑器参数处理,动态代码表编辑器参数
修复富文本国际化bug
修复坐标轴的自定义参数
修复分页面板配置导航参数
修复实体处理逻辑
修复应用级context对象特性丢失的问题
修复新建逻辑
修复动态代码表传递上下文、参数逻辑
### 功能新增及优化
#### 模板
树选择双击
列表快速分组和快速搜索表单
数据视图快速分组和快速搜索表单
日历图例、日历快速分组和批处理工具栏
实体国际化路径调整
面板界面行为支持
列表,数据视图下拉加载
增加图表名称代码表识别、雷达图支持
uaa菜单权限
增加数据看板动态模型数据存库
应用样式调整
#### 基础文件
人员选择标准控件样式调整
应用样式调整
表格EX报错修复
注销
## v7.0.0-alpha.5 [2020-5-28] ## v7.0.0-alpha.5 [2020-5-28]
### Bug修复 ### Bug修复
......
...@@ -76,6 +76,7 @@ import AppDepartmentSelect from './components/app-department-select/app-departme ...@@ -76,6 +76,7 @@ import AppDepartmentSelect from './components/app-department-select/app-departme
import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-select.vue' import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-select.vue'
import IBizGroupPicker from './components/ibiz-group-picker/ibiz-group-picker.vue' import IBizGroupPicker from './components/ibiz-group-picker/ibiz-group-picker.vue'
import AppWFApproval from './components/app-wf-approval/app-wf-approval.vue' import AppWFApproval from './components/app-wf-approval/app-wf-approval.vue'
import Breadcrumb from './components/app-breadcrumb/app-breadcrumb.vue';
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -161,5 +162,6 @@ export const AppComponents = { ...@@ -161,5 +162,6 @@ export const AppComponents = {
v.component('ibiz-group-select',IBizGroupSelect); v.component('ibiz-group-select',IBizGroupSelect);
v.component('ibiz-group-picker',IBizGroupPicker); v.component('ibiz-group-picker',IBizGroupPicker);
v.component('app-wf-approval',AppWFApproval); v.component('app-wf-approval',AppWFApproval);
v.component('app-breadcrumb',Breadcrumb);
}, },
}; };
\ No newline at end of file
...@@ -173,29 +173,22 @@ export default class AppAutocomplete extends Vue { ...@@ -173,29 +173,22 @@ export default class AppAutocomplete extends Vue {
* @param callback * @param callback
*/ */
public onSearch(query: any, callback: any): void { 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; query = !query ? '' : query;
if (!this.inputState && Object.is(query, this.value)) { if (!this.inputState && Object.is(query, this.value)) {
query = ''; query = '';
} }
this.inputState = false; this.inputState = false;
// 合并视图上下文参数和视图参数 Object.assign(_param, { query: query });
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);
}
// 错误信息国际化 // 错误信息国际化
let error: string = (this.$t('components.appAutocomplete.error') as any); let error: string = (this.$t('components.appAutocomplete.error') as any);
let miss: string = (this.$t('components.appAutocomplete.miss') as any); let miss: string = (this.$t('components.appAutocomplete.miss') as any);
...@@ -208,7 +201,7 @@ export default class AppAutocomplete extends Vue { ...@@ -208,7 +201,7 @@ export default class AppAutocomplete extends Vue {
} else if(!this.acParams.interfaceName) { } else if(!this.acParams.interfaceName) {
this.$Notice.error({ title: error, desc: miss+'interfaceName' }); this.$Notice.error({ title: error, desc: miss+'interfaceName' });
} else { } 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) { if (!response) {
this.$Notice.error({ title: error, desc: requestException }); this.$Notice.error({ title: error, desc: requestException });
} else { } else {
...@@ -274,6 +267,34 @@ export default class AppAutocomplete extends Vue { ...@@ -274,6 +267,34 @@ export default class AppAutocomplete extends Vue {
this.$forceUpdate(); this.$forceUpdate();
} }
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppAutocomplete
*/
public handlePublicParams(arg: any): boolean {
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 = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理
if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
Object.assign(arg.context,_context);
}
if (this.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(arg.param,_param);
}
return true;
}
} }
</script> </script>
......
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
font-weight: 400 !important;
}
.app-breadcrumb.el-breadcrumb {
display: inline-block;
font-size: 14px;
line-height: 50px;
margin-left: 8px;
.no-redirect {
color: #97a8be;
cursor: text;
}
}
\ No newline at end of file
<template>
<el-breadcrumb
class="app-breadcrumb"
separator="/"
>
<transition-group name="breadcrumb">
<el-breadcrumb-item
v-for="(item, index) in breadcrumbs"
:key="item.path"
>
<span
v-if="item.redirect === 'noredirect' || index === breadcrumbs.length-1"
class="no-redirect"
>{{ $t(item.meta.caption) }}</span>
<a
v-else
@click.prevent="handleLink(item)"
>{{ $t(item.meta.caption) }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>
<script lang="ts">
import { compile } from 'path-to-regexp'
import { Component, Vue, Watch, Prop } from 'vue-property-decorator'
import { RouteRecord, Route } from 'vue-router'
@Component({
name: 'Breadcrumb'
})
export default class extends Vue {
private breadcrumbs: RouteRecord[] = []
@Prop() public defPSAppView?: any;
@Watch('$route')
private onRouteChange(route: Route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) {
return
}
this.getBreadcrumb()
}
created() {
this.getBreadcrumb()
}
private getBreadcrumb() {
let matched = this.$route.matched.filter((item) => item.meta && item.meta.caption)
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: "/index/:index?", meta: {
caption: 'app.views.index.caption',
viewType: 'APPINDEX',
parameters: [
{ pathName: 'index', parameterName: 'index' },
],
requireAuth: true, } } as RouteRecord].concat(matched)
}
this.breadcrumbs = matched.filter((item) => {
return item.meta && item.meta.caption && item.meta.breadcrumb !== false
})
}
private isDashboard(route: RouteRecord) {
const name = route && route.meta.parameters[0].pathName;
if (!name) {
return false
}
return name.trim().toLocaleLowerCase() === 'index'.toLocaleLowerCase()
}
private pathCompile(item: any) {
const { params, path, query } = item;
return { params, path, query };
}
private handleLink(item: any) {
this.$router.push(this.pathCompile(item)).catch(err => {
console.warn(err);
});
}
}
</script>
<style lang='less'>
@import "./app-breadcrumb.less";
</style>
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</template> </template>
<script lang="ts"> <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"; import CodeListService from "@service/app/codelist-service";
@Component({ @Component({
...@@ -53,6 +53,38 @@ export default class AppCheckBox extends Vue { ...@@ -53,6 +53,38 @@ export default class AppCheckBox extends Vue {
*/ */
@Prop() disabled?: boolean; @Prop() disabled?: boolean;
/**
* 传入表单数据
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public data?: any;
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public itemParam?: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/** /**
* 获取启用禁用状态 * 获取启用禁用状态
* *
...@@ -166,6 +198,28 @@ export default class AppCheckBox extends Vue { ...@@ -166,6 +198,28 @@ export default class AppCheckBox extends Vue {
*/ */
public items: any[] = []; public items: any[] = [];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownList
*/
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.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
Object.assign(arg.context,_context);
}
if (this.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(arg.param,_param);
}
}
/** /**
* vue 生命周期 * vue 生命周期
* *
...@@ -181,7 +235,13 @@ export default class AppCheckBox extends Vue { ...@@ -181,7 +235,13 @@ export default class AppCheckBox extends Vue {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`); console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
} }
} else if (Object.is(this.codelistType,"DYNAMIC")) { } 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; this.items = res;
}).catch((error:any) => { }).catch((error:any) => {
console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`); console.log(`----${this.tag}----$t('components.appCheckBox.notExist')`);
...@@ -190,6 +250,29 @@ export default class AppCheckBox extends Vue { ...@@ -190,6 +250,29 @@ export default class AppCheckBox extends Vue {
} }
} }
/**
* 监听表单数据变化
*
* @memberof AppOrgSelect
*/
@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}----代码表不存在!`);
})
}
}
}
} }
</script> </script>
......
...@@ -279,8 +279,8 @@ export default class AppColumnLink extends Vue { ...@@ -279,8 +279,8 @@ export default class AppColumnLink extends Vue {
return false; return false;
} }
// 合并表单参数 // 合并表单参数
arg.param = JSON.parse(JSON.stringify(this.viewparams)); arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = JSON.parse(JSON.stringify(this.context)); arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
return true; return true;
} }
......
...@@ -170,15 +170,15 @@ export default class AppEmbedPicker extends Vue { ...@@ -170,15 +170,15 @@ export default class AppEmbedPicker extends Vue {
let context: any = JSON.parse(JSON.stringify(this.context)); let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理 // 附加参数处理
if (this.itemParam.context) { if (this.itemParam.context) {
let _context = this.$util.formatData(activeData,this.itemParam.context); let _context = this.$util.formatData(activeData,context,this.itemParam.context);
Object.assign(context,_context); Object.assign(context,_context);
} }
if (this.itemParam.param) { if (this.itemParam.param) {
let _param = this.$util.formatData(activeData,this.itemParam.param); let _param = this.$util.formatData(activeData,param,this.itemParam.param);
Object.assign(param,_param); Object.assign(param,_param);
} }
if (this.itemParam.parentdata) { if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,this.itemParam.parentdata); let _parentdata = this.$util.formatData(activeData,param,this.itemParam.parentdata);
Object.assign(param,_parentdata); Object.assign(param,_parentdata);
} }
this.viewdata = JSON.stringify(context); this.viewdata = JSON.stringify(context);
......
...@@ -44,6 +44,14 @@ export default class AppMpicker extends Vue { ...@@ -44,6 +44,14 @@ export default class AppMpicker extends Vue {
*/ */
@Prop() curvalue?: any; @Prop() curvalue?: any;
/**
* 表单项参数
*
* @type {any}
* @memberof AppPicker
*/
@Prop() public itemParam: any;
/** /**
* 表单项名称 * 表单项名称
*/ */
...@@ -147,9 +155,18 @@ export default class AppMpicker extends Vue { ...@@ -147,9 +155,18 @@ export default class AppMpicker extends Vue {
* @memberof AppMpicker * @memberof AppMpicker
*/ */
public onSearch(query: any) { public onSearch(query: any) {
let param: any = { query: query }; // 公共参数处理
let data: any = {};
const bcancel: boolean = this.handlePublicParams(data);
if (!bcancel) {
return;
}
// 参数处理
let _context = data.context;
let _param = data.param;
Object.assign(_param ,{ query: query });
if (this.activeData) { if (this.activeData) {
Object.assign(param, { srfreferdata: this.activeData }); Object.assign(_param, { srfreferdata: this.activeData });
} }
// 错误信息国际化 // 错误信息国际化
let error: string = (this.$t('components.appMpicker.error') as any); let error: string = (this.$t('components.appMpicker.error') as any);
...@@ -162,7 +179,7 @@ export default class AppMpicker extends Vue { ...@@ -162,7 +179,7 @@ export default class AppMpicker extends Vue {
} else if(!this.acParams.interfaceName) { } else if(!this.acParams.interfaceName) {
this.$Notice.error({ title: error, desc: miss+'interfaceName' }); this.$Notice.error({ title: error, desc: miss+'interfaceName' });
} else { } else {
this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, param).then((response: any) => { this.service.getItems(this.acParams.serviceName,this.acParams.interfaceName, _context, _param).then((response: any) => {
if (!response) { if (!response) {
this.$Notice.error({ title: error, desc: requestException }); this.$Notice.error({ title: error, desc: requestException });
} else { } else {
...@@ -216,6 +233,33 @@ export default class AppMpicker extends Vue { ...@@ -216,6 +233,33 @@ export default class AppMpicker extends Vue {
} }
} }
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppMpicker
*/
public handlePublicParams(arg: any): boolean {
if (!this.activeData) {
this.$Notice.error({ title: (this.$t('components.appPicker.error') as any), desc: (this.$t('components.appPicker.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.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.activeData,arg.context,this.itemParam.context);
Object.assign(arg.context,_context);
}
if (this.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.activeData,arg.param,this.itemParam.param);
Object.assign(arg.param,_param);
}
return true;
}
/** /**
* 打开视图 * 打开视图
* *
...@@ -229,8 +273,15 @@ export default class AppMpicker extends Vue { ...@@ -229,8 +273,15 @@ export default class AppMpicker extends Vue {
if (this.pickupView && Object.keys(this.pickupView).length > 0) { if (this.pickupView && Object.keys(this.pickupView).length > 0) {
// 参数处理 // 参数处理
const view = { ...this.pickupView }; const view = { ...this.pickupView };
let _viewparams = JSON.parse(JSON.stringify(this.viewparams)); // 公共参数处理
let _context = JSON.parse(JSON.stringify(this.context)); let data: any = {};
const bcancel: boolean = this.handlePublicParams(data);
if (!bcancel) {
return;
}
// 参数处理
let _context = data.context;
let _viewparams = data.param;
let _selectItems = JSON.parse(JSON.stringify(this.selectItems)); let _selectItems = JSON.parse(JSON.stringify(this.selectItems));
if(!Object.is(this.deKeyField,"srfkey")){ if(!Object.is(this.deKeyField,"srfkey")){
_selectItems.forEach((item:any, index:number)=>{ _selectItems.forEach((item:any, index:number)=>{
......
...@@ -22,6 +22,14 @@ ...@@ -22,6 +22,14 @@
.ivu-select-dropdown{ .ivu-select-dropdown{
max-height: 200px; max-height: 200px;
overflow: scroll; overflow: scroll;
margin: 0;
padding: 0;
.ivu-dropdown-menu{
.view-container{
margin: 0;
padding: 0;
}
}
.tree-contant{ .tree-contant{
overflow:inherit; overflow:inherit;
} }
......
...@@ -255,21 +255,17 @@ export default class AppPickerSelectView extends Vue { ...@@ -255,21 +255,17 @@ export default class AppPickerSelectView extends Vue {
return false; return false;
} }
// 合并表单参数 // 合并表单参数
arg.param = JSON.parse(JSON.stringify(this.viewparams)); arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = JSON.parse(JSON.stringify(this.context)); arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理 // 附加参数处理
if (this.itemParam.context) { if (this.itemParam.context) {
let _context = this.$util.formatData(this.data,this.itemParam.context); let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam.param) { if (this.itemParam.param) {
let _param = this.$util.formatData(this.data,this.itemParam.param); let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(arg.param,_param); 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; return true;
} }
......
...@@ -410,9 +410,9 @@ export default class AppPicker extends Vue { ...@@ -410,9 +410,9 @@ export default class AppPicker extends Vue {
// 判断打开方式 // 判断打开方式
if (view.placement && !Object.is(view.placement, '')) { if (view.placement && !Object.is(view.placement, '')) {
if (Object.is(view.placement, 'POPOVER')) { if (Object.is(view.placement, 'POPOVER')) {
this.openPopOver($event, view, _context, data); this.openPopOver($event, view, _context, _param);
} else { } else {
this.openDrawer(view, _context, data); this.openDrawer(view, _context, _param);
} }
} else { } else {
this.openPopupModal(view, _context, _param); this.openPopupModal(view, _context, _param);
...@@ -647,21 +647,17 @@ export default class AppPicker extends Vue { ...@@ -647,21 +647,17 @@ export default class AppPicker extends Vue {
return false; return false;
} }
// 合并表单参数 // 合并表单参数
arg.param = JSON.parse(JSON.stringify(this.viewparams)); arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
arg.context = JSON.parse(JSON.stringify(this.context)); arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理 // 附加参数处理
if (this.itemParam.context) { if (this.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,this.itemParam.context); let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
Object.assign(arg.context,_context); Object.assign(arg.context,_context);
} }
if (this.itemParam.param) { if (this.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,this.itemParam.param); let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(arg.param,_param); 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; return true;
} }
...@@ -691,9 +687,9 @@ export default class AppPicker extends Vue { ...@@ -691,9 +687,9 @@ export default class AppPicker extends Vue {
// 判断打开方式 // 判断打开方式
if (view.placement && !Object.is(view.placement, '')) { if (view.placement && !Object.is(view.placement, '')) {
if (Object.is(view.placement, 'POPOVER')) { if (Object.is(view.placement, 'POPOVER')) {
this.openPopOver($event, view, _context, data); this.openPopOver($event, view, _context, _param);
} else { } else {
this.openDrawer(view, _context, data); this.openDrawer(view, _context, _param);
} }
} else { } else {
this.openPopupModal(view, _context, _param); this.openPopupModal(view, _context, _param);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</radio-group> </radio-group>
</template> </template>
<script lang = 'ts'> <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"; import CodeListService from "@service/app/codelist-service";
@Component({}) @Component({})
...@@ -61,6 +61,39 @@ export default class AppRadioGroup extends Vue { ...@@ -61,6 +61,39 @@ export default class AppRadioGroup extends Vue {
*/ */
@Prop() public codelistType?: string; @Prop() public codelistType?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public data?: any;
/**
* 监听表单数据变化
*
* @memberof AppOrgSelect
*/
@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}----代码表不存在!`);
})
}
}
}
/** /**
* 是否禁用 * 是否禁用
* *
...@@ -69,6 +102,30 @@ export default class AppRadioGroup extends Vue { ...@@ -69,6 +102,30 @@ export default class AppRadioGroup extends Vue {
*/ */
@Prop() public disabled?: boolean; @Prop() public disabled?: boolean;
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public itemParam?: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/** /**
* 属性名称 * 属性名称
* *
...@@ -99,6 +156,28 @@ export default class AppRadioGroup extends Vue { ...@@ -99,6 +156,28 @@ export default class AppRadioGroup extends Vue {
*/ */
public items: any[] = []; public items: any[] = [];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownList
*/
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.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
Object.assign(arg.context,_context);
}
if (this.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(arg.param,_param);
}
}
/** /**
* vue 生命周期 * vue 生命周期
* *
...@@ -108,9 +187,15 @@ export default class AppRadioGroup extends Vue { ...@@ -108,9 +187,15 @@ export default class AppRadioGroup extends Vue {
if(this.tag && this.codelistType == 'STATIC'){ if(this.tag && this.codelistType == 'STATIC'){
this.items = this.$store.getters.getCodeListItems(this.tag); this.items = this.$store.getters.getCodeListItems(this.tag);
}else if(this.tag && this.codelistType == 'DYNAMIC'){ }else if(this.tag && this.codelistType == 'DYNAMIC'){
this.codeListService.getItems(this.tag).then((data:any)=>{ // 公共参数处理
this.items = data; let data: any = {};
}).catch((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}----代码表不存在!`); console.log(`----${this.tag}----代码表不存在!`);
}) })
} }
......
...@@ -104,7 +104,7 @@ export default class AppRichTextEditor extends Vue { ...@@ -104,7 +104,7 @@ export default class AppRichTextEditor extends Vue {
* @type {*} * @type {*}
* @memberof AppRichTextEditor * @memberof AppRichTextEditor
*/ */
public langu: any = localStorage.getItem('local') ? localStorage.getItem('local') : 'zh_CN' ; public langu: any = localStorage.getItem('local') ? localStorage.getItem('local') : 'zh-CN' ;
/** /**
* 语言映射文件 * 语言映射文件
......
<template> <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" :itemParam="itemParam" :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> <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> <span class="app-span" v-else >{{text}}</span>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Vue, Component, Prop, Watch, Model } from 'vue-property-decorator'; import { Vue, Component, Prop, Watch, Model } from 'vue-property-decorator';
import CodeListService from "@service/app/codelist-service";
@Component({}) @Component({})
export default class AppSpan extends Vue { export default class AppSpan extends Vue {
...@@ -64,6 +63,38 @@ export default class AppSpan extends Vue { ...@@ -64,6 +63,38 @@ export default class AppSpan extends Vue {
*/ */
@Prop({default:','}) public valueSeparator?: string; @Prop({default:','}) public valueSeparator?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public data?: any;
/**
* 传入额外参数
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public itemParam?: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppSpan
*/
@Prop() public viewparams!: any;
/** /**
* 监控表单属性 data 值 * 监控表单属性 data 值
* *
......
...@@ -220,15 +220,15 @@ export default class AppTreePicker extends Vue { ...@@ -220,15 +220,15 @@ export default class AppTreePicker extends Vue {
let context: any = JSON.parse(JSON.stringify(this.context)); let context: any = JSON.parse(JSON.stringify(this.context));
// 附加参数处理 // 附加参数处理
if (this.itemParam.context) { if (this.itemParam.context) {
let _context = this.$util.formatData(activeData,this.itemParam.context); let _context = this.$util.formatData(activeData,context,this.itemParam.context);
Object.assign(context,_context); Object.assign(context,_context);
} }
if (this.itemParam.param) { if (this.itemParam.param) {
let _param = this.$util.formatData(activeData,this.itemParam.param); let _param = this.$util.formatData(activeData,param,this.itemParam.param);
Object.assign(param,_param); Object.assign(param,_param);
} }
if (this.itemParam.parentdata) { if (this.itemParam.parentdata) {
let _parentdata = this.$util.formatData(activeData,this.itemParam.parentdata); let _parentdata = this.$util.formatData(activeData,param,this.itemParam.parentdata);
Object.assign(param,_parentdata); Object.assign(param,_parentdata);
} }
this.viewdata = JSON.stringify(context); this.viewdata = JSON.stringify(context);
......
...@@ -37,14 +37,14 @@ export default class CodeList extends Vue { ...@@ -37,14 +37,14 @@ export default class CodeList extends Vue {
* 代码表类型 * 代码表类型
* *
* @type {string} * @type {string}
* @memberof AppCheckBox * @memberof CodeList
*/ */
@Prop() public codelistType?: string; @Prop() public codelistType?: string;
/** /**
* 当前值 * 当前值
* @type {any} * @type {any}
* @memberof SelectPicker * @memberof CodeList
* *
*/ */
@Prop() public value?: string; @Prop() public value?: string;
...@@ -52,24 +52,56 @@ export default class CodeList extends Vue { ...@@ -52,24 +52,56 @@ export default class CodeList extends Vue {
/** /**
* 获取或模式 * 获取或模式
* @type {boolean} * @type {boolean}
* @memberof SelectPicker * @memberof CodeList
*/ */
@Prop({default:"STR"}) public renderMode?: string; @Prop({default:"STR"}) public renderMode?: string;
/** /**
* 文本分隔符 * 文本分隔符
* @type {boolean} * @type {boolean}
* @memberof SelectPicker * @memberof CodeList
*/ */
@Prop({default:'、'}) public textSeparator?: string; @Prop({default:'、'}) public textSeparator?: string;
/** /**
* 值分隔符 * 值分隔符
* @type {boolean} * @type {boolean}
* @memberof SelectPicker * @memberof CodeList
*/ */
@Prop({default:','}) public valueSeparator?: string; @Prop({default:','}) public valueSeparator?: string;
/**
* 传入表单数据
*
* @type {*}
* @memberof CodeList
*/
@Prop() public data?: any;
/**
* 传入额外参数
*
* @type {*}
* @memberof CodeList
*/
@Prop() public itemParam?: any;
/**
* 视图上下文
*
* @type {*}
* @memberof CodeList
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof CodeList
*/
@Prop() public viewparams!: any;
/** /**
* 是否为空 * 是否为空
* *
...@@ -101,7 +133,7 @@ export default class CodeList extends Vue { ...@@ -101,7 +133,7 @@ export default class CodeList extends Vue {
*/ */
public isUseLangres:boolean = false; public isUseLangres:boolean = false;
/** /**
* 数据值变化 * 数据值变化
* *
* @param {*} newval * @param {*} newval
...@@ -112,7 +144,18 @@ export default class CodeList extends Vue { ...@@ -112,7 +144,18 @@ export default class CodeList extends Vue {
@Watch('value') @Watch('value')
public onValueChange(newVal: any, oldVal: any) { public onValueChange(newVal: any, oldVal: any) {
this.dataHandle(); this.dataHandle();
}
/**
* 监听表单数据变化
*
* @memberof CodeList
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
if(newVal){
this.dataHandle();
}
} }
/** /**
...@@ -131,7 +174,13 @@ export default class CodeList extends Vue { ...@@ -131,7 +174,13 @@ export default class CodeList extends Vue {
this.ifEmpty = false; this.ifEmpty = false;
// 动态代码表处理 // 动态代码表处理
if (Object.is(this.codelistType, "DYNAMIC")) { 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; let items = res;
_this.setItems(items, _this); _this.setItems(items, _this);
}).catch((error: any) => { }).catch((error: any) => {
...@@ -209,6 +258,28 @@ export default class CodeList extends Vue { ...@@ -209,6 +258,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.itemParam && this.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
Object.assign(arg.context,_context);
}
if (this.itemParam && this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(arg.param,_param);
}
}
} }
</script> </script>
......
.context-menu-container { .context-menu-container {
// width: 100vw; // width: 100vw;
// height: 100vh; // height: 100vh;
// z-index: -10000; // z-index: -10000;
// position: absolute; // position: absolute;
// top: 0; // top: 0;
// left: 0; // left: 0;
line-height: 1; // line-height: 1;
z-index: 10001;
.context-menu-content { .context-menu-content {
z-index: 10001; position: absolute;
position: absolute; background: #FFF;
background: #FFF; // border: 1px solid #e3e3e3;
// border: 1px solid #e3e3e3; .ivu-divider{
} width: 100%;
}
.context-menus { }
.context-menus-item { .context-menus {
list-style: none;
line-height: 36px; .context-menus-item {
padding: 0 13px; list-style: none;
margin: 0; line-height: 36px;
font-size: 14px; padding: 0 13px;
color: #606266; margin: 0;
cursor: pointer; font-size: 14px;
outline: none; color: #606266;
display: flex; cursor: pointer;
outline: none;
.icon { display: flex;
display: flex;
justify-content: center; .icon {
align-items: center; display: flex;
font-size: 16px; justify-content: center;
width: 20px; align-items: center;
margin-right: 8px; font-size: 16px;
} width: 20px;
} margin-right: 8px;
}
.context-menus-item:hover { }
background-color: #ecf5ff;
color: #66b1ff; .context-menus-item:hover {
} background-color: #ecf5ff;
} color: #66b1ff;
}
}
} }
.context-menu { .context-menu {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
\ No newline at end of file
...@@ -81,7 +81,7 @@ export default class DropDownListDynamic extends Vue { ...@@ -81,7 +81,7 @@ export default class DropDownListDynamic extends Vue {
@Watch('data',{ deep: true }) @Watch('data',{ deep: true })
onDataChange(newVal: any, val: any){ onDataChange(newVal: any, val: any){
if(newVal){ if(newVal){
this.handleOtherParam();
} }
} }
...@@ -145,26 +145,40 @@ export default class DropDownListDynamic extends Vue { ...@@ -145,26 +145,40 @@ export default class DropDownListDynamic extends Vue {
public items: any[] = []; public items: any[] = [];
/** /**
* 处理额外参数 * 视图上下文
*/ *
public handleOtherParam(){ * @type {*}
if(this.itemParam){ * @memberof AppAutocomplete
this.queryParam = {}; */
this.otherParam = this.itemParam.parentdata; @Prop() public context!: any;
if(this.otherParam && Object.keys(this.otherParam).length >0){
Object.keys(this.otherParam).forEach((item:any) =>{ /**
let value: string | null = this.otherParam[item]; * 视图参数
if (value && value.startsWith('%') && value.endsWith('%')) { *
const key = value.substring(1, value.length - 1); * @type {*}
if (this.data && this.data.hasOwnProperty(key)) { * @memberof AppFormDRUIPart
value = (this.data[key] !== null && this.data[key] !== undefined) ? this.data[key] : null; */
} else { @Prop() public viewparams!: any;
value = null;
} /**
} * 公共参数处理
Object.assign(this.queryParam,{[item]:value}); *
}) * @param {*} arg
} * @returns
* @memberof DropDownListDynamic
*/
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.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
Object.assign(arg.context,_context);
}
if (this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(arg.param,_param);
} }
} }
...@@ -182,7 +196,13 @@ export default class DropDownListDynamic extends Vue { ...@@ -182,7 +196,13 @@ export default class DropDownListDynamic extends Vue {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
} }
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){ }else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag,{},this.queryParam).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; this.items = res;
}).catch((error:any) => { }).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
...@@ -199,7 +219,13 @@ export default class DropDownListDynamic extends Vue { ...@@ -199,7 +219,13 @@ export default class DropDownListDynamic extends Vue {
public onClick($event:any){ public onClick($event:any){
if($event){ if($event){
if(this.tag && Object.is(this.codelistType,"DYNAMIC")){ if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag,{},this.queryParam).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; this.items = res;
}).catch((error:any) => { }).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
......
...@@ -84,6 +84,38 @@ export default class DropDownListMpicker extends Vue { ...@@ -84,6 +84,38 @@ export default class DropDownListMpicker extends Vue {
*/ */
@Prop() public placeholder?: string; @Prop() public placeholder?: string;
/**
* 传入额外参数
*
* @type {*}
* @memberof DropDownListMpicker
*/
@Prop() public itemParam?: any;
/**
* 视图上下文
*
* @type {*}
* @memberof DropDownListMpicker
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof DropDownListMpicker
*/
@Prop() public viewparams!: any;
/**
* 传入表单数据
*
* @type {*}
* @memberof DropDownListMpicker
*/
@Prop() public data?: any;
/** /**
* 计算属性(当前值) * 计算属性(当前值)
* @type {any} * @type {any}
...@@ -113,6 +145,28 @@ export default class DropDownListMpicker extends Vue { ...@@ -113,6 +145,28 @@ export default class DropDownListMpicker extends Vue {
*/ */
public items: any[] = []; public items: any[] = [];
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof DropDownList
*/
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.itemParam.context) {
let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
Object.assign(arg.context,_context);
}
if (this.itemParam.param) {
let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(arg.param,_param);
}
}
/** /**
* vue 生命周期 * vue 生命周期
* *
...@@ -127,7 +181,13 @@ export default class DropDownListMpicker extends Vue { ...@@ -127,7 +181,13 @@ export default class DropDownListMpicker extends Vue {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
} }
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){ }else if(this.tag && 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; this.items = res;
}).catch((error:any) => { }).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
...@@ -143,7 +203,13 @@ export default class DropDownListMpicker extends Vue { ...@@ -143,7 +203,13 @@ export default class DropDownListMpicker extends Vue {
*/ */
public onClick($event:any){ public onClick($event:any){
if(this.tag && Object.is(this.codelistType,"DYNAMIC")){ if(this.tag && 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; this.items = res;
}).catch((error:any) => { }).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
......
...@@ -81,7 +81,7 @@ export default class DropDownList extends Vue { ...@@ -81,7 +81,7 @@ export default class DropDownList extends Vue {
@Watch('data',{ deep: true }) @Watch('data',{ deep: true })
onDataChange(newVal: any, val: any){ onDataChange(newVal: any, val: any){
if(newVal){ if(newVal){
this.handleOtherParam();
} }
} }
...@@ -93,6 +93,22 @@ export default class DropDownList extends Vue { ...@@ -93,6 +93,22 @@ export default class DropDownList extends Vue {
*/ */
@Prop() public itemParam?: any; @Prop() public itemParam?: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/** /**
* 是否禁用 * 是否禁用
* @type {any} * @type {any}
...@@ -145,26 +161,24 @@ export default class DropDownList extends Vue { ...@@ -145,26 +161,24 @@ export default class DropDownList extends Vue {
public items: any[] = []; public items: any[] = [];
/** /**
* 处理额外参数 * 公共参数处理
*/ *
public handleOtherParam(){ * @param {*} arg
if(this.itemParam){ * @returns
this.queryParam = {}; * @memberof DropDownList
this.otherParam = this.itemParam.parentdata; */
if(this.otherParam && Object.keys(this.otherParam).length >0){ public handlePublicParams(arg: any) {
Object.keys(this.otherParam).forEach((item:any) =>{ // 合并表单参数
let value: string | null = this.otherParam[item]; arg.param = this.viewparams ? JSON.parse(JSON.stringify(this.viewparams)) : {};
if (value && value.startsWith('%') && value.endsWith('%')) { arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
const key = value.substring(1, value.length - 1); // 附加参数处理
if (this.data && this.data.hasOwnProperty(key)) { if (this.itemParam && this.itemParam.context) {
value = (this.data[key] !== null && this.data[key] !== undefined) ? this.data[key] : null; let _context = this.$util.formatData(this.data,arg.context,this.itemParam.context);
} else { Object.assign(arg.context,_context);
value = null; }
} if (this.itemParam && this.itemParam.param) {
} let _param = this.$util.formatData(this.data,arg.param,this.itemParam.param);
Object.assign(this.queryParam,{[item]:value}); Object.assign(arg.param,_param);
})
}
} }
} }
...@@ -182,7 +196,13 @@ export default class DropDownList extends Vue { ...@@ -182,7 +196,13 @@ export default class DropDownList extends Vue {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
} }
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){ }else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag,{},this.queryParam).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; this.items = res;
}).catch((error:any) => { }).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
...@@ -199,7 +219,13 @@ export default class DropDownList extends Vue { ...@@ -199,7 +219,13 @@ export default class DropDownList extends Vue {
public onClick($event:any){ public onClick($event:any){
if($event){ if($event){
if(this.tag && Object.is(this.codelistType,"DYNAMIC")){ if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag,{},this.queryParam).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; this.items = res;
}).catch((error:any) => { }).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
</div> </div>
</div> </div>
<div class="ibiz-group-footer"> <div class="ibiz-group-footer">
<el-button size="small" type="primary" style="color: #fff;font-size: 14px; background-color: #2d8cf0; border-color: #2d8cf0;" @click="onOK">确认</el-button> <el-button size="small" type="primary" @click="onOK">确认</el-button>
<el-button size="small" style="font-size: 14px;" @click="onCancel">取消</el-button> <el-button size="small" @click="onCancel">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -293,15 +293,6 @@ export default class IBizGroupPicker extends Vue { ...@@ -293,15 +293,6 @@ export default class IBizGroupPicker extends Vue {
padding: 0 10px; padding: 0 10px;
overflow: auto; overflow: auto;
height: 100%; height: 100%;
.ibiz-group-card{
.ibiz-group-card-item:hover {
border-color: #2d8cf0;
color: #2d8cf0;
}
.ibiz-group-card-item.is-select:hover{
color: #FFFFFF;
}
}
} }
} }
.ibiz-group-footer { .ibiz-group-footer {
...@@ -309,21 +300,5 @@ export default class IBizGroupPicker extends Vue { ...@@ -309,21 +300,5 @@ export default class IBizGroupPicker extends Vue {
text-align: right; text-align: right;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }
div::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 10px !important;
}
div::-webkit-scrollbar-thumb {
/*滚动条颜色*/
border-radius : 10px !important;
background-color: #cecece !important;
}
div::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
background : #ededed !important;
border-radius: 10px !important;
}
} }
</style> </style>
\ No newline at end of file
...@@ -122,6 +122,14 @@ export class ChartSeries { ...@@ -122,6 +122,14 @@ export class ChartSeries {
*/ */
public seriesLayoutBy:string = "column"; public seriesLayoutBy:string = "column";
/**
* 序列代码表
*
* @type {*}
* @memberof ChartSeries
*/
public seriesCodeList:any;
/** /**
* Creates an instance of ChartSeries. * Creates an instance of ChartSeries.
* ChartSeries 实例 * ChartSeries 实例
...@@ -144,6 +152,7 @@ export class ChartSeries { ...@@ -144,6 +152,7 @@ export class ChartSeries {
this.dataSetFields = opts.dataSetFields ? opts.dataSetFields:[]; this.dataSetFields = opts.dataSetFields ? opts.dataSetFields:[];
this.seriesMap = opts.seriesMap ? opts.seriesMap:null; this.seriesMap = opts.seriesMap ? opts.seriesMap:null;
this.seriesIndex = opts.seriesIndex? opts.seriesIndex:0; this.seriesIndex = opts.seriesIndex? opts.seriesIndex:0;
this.seriesCodeList = opts.seriesCodeList?opts.seriesCodeList:null;
} }
/** /**
...@@ -285,4 +294,14 @@ export class ChartSeries { ...@@ -285,4 +294,14 @@ export class ChartSeries {
public setSeriesIndex(state: number): void { public setSeriesIndex(state: number): void {
this.seriesIndex = state; this.seriesIndex = state;
} }
/**
* 设置序列代码表
*
* @param {any} state
* @memberof ChartSeries
*/
public setSeriesCodeList(state: any): void {
this.seriesCodeList = state;
}
} }
\ No newline at end of file
...@@ -637,6 +637,36 @@ export default class EntityService { ...@@ -637,6 +637,36 @@ export default class EntityService {
} }
} }
/**
* getDynaModel(获取动态模型)接口方法
*
* @param {*} [context={}]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async getDynaModel(context: any = {},data: any, isloading?: boolean):Promise<any> {
if(data && data.configType && data.targetType){
return Http.getInstance().get(`/configs/${data.configType}/${data.targetType}`);
}
}
/**
* setDynaModel(设置动态模型)接口方法
*
* @param {*} [context={}]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async setDynaModel(context: any = {},data: any, isloading?: boolean):Promise<any> {
if(data && data.configType && data.targetType){
return Http.getInstance().put(`/configs/${data.configType}/${data.targetType}`,{model:data.model});
}
}
/** /**
* WFStart接口方法 * WFStart接口方法
* *
......
...@@ -7,7 +7,7 @@ import * as mutations from './mutations'; ...@@ -7,7 +7,7 @@ import * as mutations from './mutations';
import * as getters from './getters'; import * as getters from './getters';
import viewaction from './modules/view-action' import viewaction from './modules/view-action'
import unifiedresource from './modules/unified-resource' import authresource from './modules/auth-resource'
const state = { const state = {
...rootstate ...rootstate
...@@ -22,7 +22,7 @@ const store = new Vuex.Store({ ...@@ -22,7 +22,7 @@ const store = new Vuex.Store({
getters, getters,
modules: { modules: {
viewaction, viewaction,
unifiedresource authresource
}, },
}); });
......
/**
* 提交统一资源数据
*
* @param param0
* @param data
*/
export const commitAuthData = ({ commit, state }: { commit: any, state: any }, { unires,appmenu,enablepermissionvalid }: { unires: Array<any>, appmenu: Array<any>, enablepermissionvalid: boolean }) => {
if(unires && unires.length > 0){
commit('setResourceData', unires);
}
if(appmenu && appmenu.length >0){
commit('setMenuData', appmenu);
}
if(enablepermissionvalid){
commit('setEnablePermissionValid', enablepermissionvalid);
}
}
\ No newline at end of file
/**
* 判断指定统一资源是否存在
*
* @param state
*/
export const getResourceData = (state: any) => (resourcetag: string) => {
let itemIndex: any = state.resourceData.findIndex((unirescode: any, objIndex: any, objs: any) => {
return Object.is(unirescode, resourcetag);
})
return itemIndex === -1 ? false : true;
}
/**
* 判断指定菜单权限是否存在
*
* @param state
*/
export const getMenuData = (state: any) => (menutag: string) => {
let itemIndex: any = state.menuData.findIndex((menucode: any, objIndex: any, objs: any) => {
return Object.is(menucode, menutag);
})
return itemIndex === -1 ? false : true;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export const getEnablePermissionValid = (state: any) => {
return state.enablePermissionValid;
}
/**
* 判断指定菜单是否显示
*
* @param state
*/
export const getAuthMenu = (state: any) => (menu:any) =>{
// 存在权限
let resourceIndex: any;
let menuIndex:any;
if(state.enablePermissionValid){
resourceIndex= state.resourceData.findIndex((resourcetag: any, objIndex: any, objs: any) => {
return Object.is(menu.resourcetag, resourcetag);
})
}
menuIndex= state.menuData.findIndex((menutag: any, objIndex: any, objs: any) => {
return Object.is(menu.authtag, menutag);
})
return (resourceIndex !== -1 || menuIndex !== -1)?true:false;
}
\ No newline at end of file
import { resourcestate } from './state';
import * as actions from './actions';
import * as mutations from './mutations';
import * as getters from './getters';
const state = {
...resourcestate
}
export default {
namespaced: true,
state,
getters,
actions,
mutations
}
\ No newline at end of file
/**
* 设置统一资源数据
*
* @param state
* @param resourceArray
*/
export const setResourceData = (state: any, resourceArray:Array<any>) => {
if(resourceArray && resourceArray.length === 0){
return;
}
state.resourceData = resourceArray;
}
/**
* 设置菜单数据
*
* @param state
* @param resourceArray
*/
export const setMenuData = (state: any, menuArray:Array<any>) => {
if(menuArray && menuArray.length === 0){
return;
}
state.menuData = menuArray;
}
/**
* 设置是否开启权限认证
*
* @param state
* @param resourceArray
*/
export const setEnablePermissionValid = (state: any, enablepermissionvalid:boolean) => {
state.enablePermissionValid = enablepermissionvalid;
}
/**
* 所有资源状态
*/
export const resourcestate: any = {
// 统一资源数据
resourceData: [],
// 菜单数据
menuData:[],
// 是否开启权限认证
enablePermissionValid: false
}
\ No newline at end of file
...@@ -67,7 +67,7 @@ export class AuthGuard { ...@@ -67,7 +67,7 @@ export class AuthGuard {
} }
router.app.$store.commit('addAppData', data); router.app.$store.commit('addAppData', data);
// 提交统一资源数据 // 提交统一资源数据
router.app.$store.dispatch('unifiedresource/commitResourceData', data); router.app.$store.dispatch('authresource/commitAuthData', data);
} }
} }
resolve(true); resolve(true);
......
...@@ -117,16 +117,18 @@ export declare interface Util { ...@@ -117,16 +117,18 @@ export declare interface Util {
* @memberof Util * @memberof Util
*/ */
srfFilePath2(name: string): string; srfFilePath2(name: string): string;
/** /**
* 附加参数格式化 * 附加参数格式化
* *
* @static * @static
* @param {any} arg 表单数据 * @param {any} arg 表单数据
* @param {any} parent 外层context或viewparams
* @param {any} params 附加参数 * @param {any} params 附加参数
* @returns {any} * @returns {any}
* @memberof Util * @memberof Util
*/ */
formatData(arg: any, params: any): any formatData(arg: any,parent:any, params: any): any ;
/** /**
* 日期格式化 * 日期格式化
......
...@@ -79,7 +79,7 @@ export class UIActionTool { ...@@ -79,7 +79,7 @@ export class UIActionTool {
}); });
} }
if(values.length !== noPropertyNum){ if(values.length !== noPropertyNum){
Object.assign(_data, { [name]: values.length > 0 ? values.join(';') : value }); Object.assign(_data, { [name]: values.length > 0 ? values.join(',') : value });
} }
}); });
} }
......
...@@ -293,11 +293,12 @@ export class Util { ...@@ -293,11 +293,12 @@ export class Util {
* *
* @static * @static
* @param {any} arg 表单数据 * @param {any} arg 表单数据
* @param {any} parent 外层context或viewparams
* @param {any} params 附加参数 * @param {any} params 附加参数
* @returns {any} * @returns {any}
* @memberof Util * @memberof Util
*/ */
public static formatData(arg: any, params: any): any { public static formatData(arg: any,parent:any, params: any): any {
let _data: any = {}; let _data: any = {};
Object.keys(params).forEach((name: string) => { Object.keys(params).forEach((name: string) => {
if (!name) { if (!name) {
...@@ -307,7 +308,13 @@ export class Util { ...@@ -307,7 +308,13 @@ export class Util {
if (value && value.startsWith('%') && value.endsWith('%')) { if (value && value.startsWith('%') && value.endsWith('%')) {
const key = value.substring(1, value.length - 1); const key = value.substring(1, value.length - 1);
if (arg && arg.hasOwnProperty(key)) { if (arg && arg.hasOwnProperty(key)) {
value = (arg[key] !== null && arg[key] !== undefined) ? arg[key] : null; if(arg[key] !== null && arg[key] !== undefined){
value = arg[key];
}else if(parent[key] !== null && parent[key] !== undefined){
value = parent[key];
}else{
value = null;
}
} else { } else {
value = null; value = null;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册