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

Merge branch 'dev'

...@@ -28,21 +28,25 @@ ...@@ -28,21 +28,25 @@
<dropdown-menu slot='list' v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)"> <dropdown-menu slot='list' v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)">
<dropdown-item v-for="(detail,index) in (uiActionGroup.details)" :key="index" :name="detail.name"> <dropdown-item v-for="(detail,index) in (uiActionGroup.details)" :key="index" :name="detail.name">
<span class='item' @click="doUIAction($event, detail)"> <span class='item' @click="doUIAction($event, detail)">
<template v-if="detail.icon && !Object.is(detail.icon, '')"> <template v-if="detail.isShowIcon">
<i :class="detail.icon" ></i> <template v-if="detail.icon && !Object.is(detail.icon, '')">
</template> <i :class="detail.icon" ></i>
<template v-if="!(detail.icon && !Object.is(detail.icon, ''))"> </template>
<div v-if="detail.img && !Object.is(detail.img, '')"> <template v-if="!(detail.icon && !Object.is(detail.icon, ''))">
<img :src="detail.img" /> <div v-if="detail.img && !Object.is(detail.img, '')">
</div> <img :src="detail.img" />
</div>
</template>
</template> </template>
&nbsp; &nbsp;
<span> <span>
<template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')"> <template v-if="detail.isShowCaption">
{{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}} <template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')">
</template> {{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}}
<template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))"> </template>
{{detail.caption}} <template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))">
{{detail.caption}}
</template>
</template> </template>
</span> </span>
</span> </span>
...@@ -55,21 +59,25 @@ ...@@ -55,21 +59,25 @@
<template v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)"> <template v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)">
<div v-for="(detail,index) in uiActionGroup.details" :key="index"> <div v-for="(detail,index) in uiActionGroup.details" :key="index">
<span class='item' @click="doUIAction($event, detail)"> <span class='item' @click="doUIAction($event, detail)">
<template v-if="detail.icon && !Object.is(detail.icon, '')"> <template v-if="detail.isShowIcon">
<i :class="detail.icon" ></i> <template v-if="detail.icon && !Object.is(detail.icon, '')">
</template> <i :class="detail.icon" ></i>
<template v-if="!(detail.icon && !Object.is(detail.icon, ''))"> </template>
<div v-if="detail.img && !Object.is(detail.img, '')"> <template v-if="!(detail.icon && !Object.is(detail.icon, ''))">
<img :src="detail.img" /> <div v-if="detail.img && !Object.is(detail.img, '')">
</div> <img :src="detail.img" />
</template> </div>
</template>
</template>
&nbsp; &nbsp;
<span> <span>
<template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')"> <template v-if="detail.isShowCaption">
{{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}} <template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')">
</template> {{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}}
<template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))"> </template>
{{detail.caption}} <template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))">
{{detail.caption}}
</template>
</template> </template>
</span> </span>
</span> </span>
......
.ivu-select-dropdown { .transfer-select{
padding: 0px; .ivu-select-dropdown {
.hidden { padding: 0px;
display: none; .hidden {
} display: none;
} }
\ No newline at end of file .el-transfer{
min-width: 100% !important;
display: flex;
justify-content: space-between;
.el-transfer-panel{
min-width: 25%;
}
.el-transfer__buttons{
align-self: center;
}
}
}
}
<template> <template>
<Select <Select
@on-open-change="transferRefresh" class="transfer-select"
@on-change="dataChange" @on-open-change="transferRefresh"
v-model="dataRight" @on-change="dataChange"
:style="{width:width===undefined?'586px':width}" v-model="dataRight"
multiple :style="{width:width}"
> :disabled="disabled"
<Option class="hidden" :value="item" v-for="(item,i) in dataRight" :key="i">{{findLabel(item)}}</Option> :placeholder="placeholder"
<el-transfer v-model="dataRight" :data="dataLeft" @change="dataChange" :titles="['未选择', '已选择']"></el-transfer> multiple>
</Select> <Option class="hidden" :value="item" v-for="(item,i) in dataRight" :key="i">
{{findLabel(item)}}
</Option>
<el-transfer
v-model="dataRight"
:data="dataLeft"
@change="dataChange"
:titles="['未选择', '已选择']"/>
</Select>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Vue, Component, Watch, Prop, Model } from "vue-property-decorator"; import { Vue, Component, Watch, Prop, Model } from "vue-property-decorator";
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
...@@ -17,277 +26,270 @@ import { ElSelect } from "element-ui/types/select"; ...@@ -17,277 +26,270 @@ import { ElSelect } from "element-ui/types/select";
@Component({}) @Component({})
export default class AppTransfer extends Vue { export default class AppTransfer extends Vue {
/** /**
* 左侧框数据 * 传入表单数据
*/ *
public dataLeft: any[] = []; * @type {*}
* @memberof AppTransfer
*/
@Prop() public data:any;
/** /**
* 右侧框数据 * 穿梭框宽度
*/ *
public dataRight: any[] = []; * @type {string}
* @memberof AppTransfer
*/
@Prop() public width?: string;
/** /**
* 穿梭框宽度 * 表单传入字符串值分隔符
*/ *
@Prop() public width: any; * @type {string}
* @memberof AppTransfer
*/
@Prop() public valueSeparator?: string;
/** /**
* 代码表服务对象 * 代码表标识
* *
* @type {CodeListService} * @type {string}
* @memberof AppTransfer * @memberof AppTransfer
*/ */
@Prop() public tag?: string;
public codeListService: CodeListService = new CodeListService({ /**
$store: this.$store * 代码表类型
}); *
* @type {string}
* @memberof AppTransfer
*/
@Prop() public codelistType?: string;
/** /**
* 查询参数 * 局部上下文导航参数
* @type {*} *
* @memberof AppTransfer * @type {*}
*/ * @memberof AppTransfer
public queryParam: any; */
@Prop() public localContext!: any;
/** /**
* 表单传入字符串值分隔符 * 局部导航参数
*/ *
@Prop() public valueSeparator!: string; * @type {*}
/** * @memberof AppTransfer
* 当前选中值 */
* @type {any} @Prop() public localParam!: any;
* @memberof AppTransfer
*/
@Model("change") public itemValue!: any;
/** /**
* 代码表标识 * 视图上下文
* *
* @type {string} * @type {*}
* @memberof AppTransfer * @memberof AppAutocomplete
*/ */
@Prop() public tag?: string; @Prop() public context!: any;
/** /**
* 代码表类型 * 视图参数
* *
* @type {string} * @type {*}
* @memberof AppTransfer * @memberof AppFormDRUIPart
*/ */
@Prop() public codelistType?: string; @Prop() public viewparams!: any;
/** /**
* 局部上下文导航参数 * 是否禁用
* *
* @type {*} * @type {any}
* @memberof AppTransfer * @memberof AppTransfer
*/ *
@Prop() public localContext!: any; */
@Prop() public disabled?: any;
/** /**
* 局部导航参数 * 穿梭框提示内容
* *
* @type {*} * @type {string}
* @memberof AppTransfer * @memberof AppTransfer
*/ */
@Prop() public localParam!: any; @Prop() public placeholder?: string;
/** /**
* 组件change事件,右侧框数据变化时 * 当前选中值
* @memberof AppTransfer *
*/ * @type {any}
dataChange(e: any) { * @memberof AppTransfer
let _valueSeparator: any; */
_valueSeparator = this.initValueSeparator(_valueSeparator); @Model("change") public itemValue!: any;
let newVal: any;
newVal = e.join(`${_valueSeparator}`);
if (newVal) {
this.$emit("change", newVal);
} else {
this.$emit("change", null);
}
}
/**
* 初始化valueSeparator
*/
public initValueSeparator(_valueSeparator: any) {
if (this.valueSeparator === undefined) {
return ",";
} else {
return this.valueSeparator;
}
}
/**
* 左侧框数据
*
* @memberof AppTransfer
*/
public dataLeft: any[] = [];
/** /**
* 视图上下文 * 右侧框数据
* *
* @type {*} * @memberof AppTransfer
* @memberof AppAutocomplete */
*/ public dataRight: any[] = [];
@Prop() public context!: any;
/** /**
* 视图参数 * 代码表服务对象
* *
* @type {*} * @type {CodeListService}
* @memberof AppFormDRUIPart * @memberof AppTransfer
*/ */
@Prop() public viewparams!: any; public codeListService: CodeListService = new CodeListService({
$store: this.$store
});
/** /**
* 是否禁用 * vue 生命周期
* @type {any} * @memberof AppTransfer
* @memberof AppTransfer */
* public created() {
*/ this.dataHandle();
@Prop() public disabled?: any; }
/** /**
* 是否支持过滤 * 数据处理
* @type {boolean} *
* @memberof AppTransfer * @memberof AppTransfer
*/ */
@Prop() public filterable?: boolean; public dataHandle() {
if (this.tag && Object.is(this.codelistType, "STATIC")) {
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
this.dataLeft = [...JSON.parse(JSON.stringify(codelist.items))];
this.initData()
} else {
console.log(`----${this.tag}----代码表不存在`);
}
} else if (this.tag && Object.is(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.dataLeft = res;
this.initData()
})
.catch((error: any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}
}
/** /**
* 下拉选提示内容 * 公共参数处理
* @type {string} *
* @memberof AppTransfer * @param {*} arg
*/ * @returns
@Prop() public placeholder?: string; * @memberof AppTransfer
*/
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.context,arg.param,this.localParam);
Object.assign(arg.param, _param);
}
}
/** /**
* vue 生命周期 * 初始化获取到的选项数据
* *
* @memberof AppTransfer * @memberof AppTransfer
*/ */
public created() { public initData(){
this.dataHandle(); // 初始化左侧框数据
} let left: any[] = [];
Object.assign(left, this.dataLeft);
this.dataLeft = [];
left.forEach((elem: any, i: any) => {
this.dataLeft.push({
key: elem.id,
value: elem.value,
label: elem.text,
disabled: elem.disabled
});
});
/** // 初始化右侧框数据
* 数据处理 let _valueSeparator: any;
*/ _valueSeparator = this.initValueSeparator();
public dataHandle() { let _data: any = this.itemValue;
if (this.tag && Object.is(this.codelistType, "STATIC")) { if (_data) {
const codelist = this.$store.getters.getCodeList(this.tag); let _dataRight: any = [];
if (codelist) { let newData: any[] = _data.split(`${_valueSeparator}`);
this.dataLeft = [...JSON.parse(JSON.stringify(codelist.items))]; this.dataLeft.forEach((elem: any) => {
this.initLeft(); newData.forEach((item: any) => {
this.initRight(); if (item === elem.value) {
} else { _dataRight.push(elem.key);
console.log(`----${this.tag}----代码表不存在`); }
} });
} else if (this.tag && Object.is(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.dataLeft = res;
this.initLeft();
this.initRight();
})
.catch((error: any) => {
console.log(`----${this.tag}----代码表不存在`);
}); });
this.dataRight = _dataRight;
}
} }
}
/**
* 公共参数处理
*
* @param {*} arg
* @returns
* @memberof AppTransfer
*/
public handlePublicParams(arg: any) { /**
// 合并表单参数 * 组件change事件,右侧框数据变化时
arg.param = this.viewparams * @memberof AppTransfer
? JSON.parse(JSON.stringify(this.viewparams)) */
: {}; public dataChange(e: any) {
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {}; let _valueSeparator: string;
// 附加参数处理 _valueSeparator = this.initValueSeparator();
if (this.localContext && Object.keys(this.localContext).length > 0) { let newVal: string = e.join(`${_valueSeparator}`);
let _context = this.$util.computedNavData( if (newVal) {
this.itemValue, this.$emit("change", newVal);
arg.context, } else {
arg.param, this.$emit("change", null);
this.localContext }
);
Object.assign(arg.context, _context);
} }
if (this.localParam && Object.keys(this.localParam).length > 0) {
let _param = this.$util.computedNavData( /**
this.itemValue, * 初始化valueSeparator
arg.context, * @memberof AppTransfer
arg.param, */
this.localParam public initValueSeparator() {
); return this.valueSeparator ? this.valueSeparator : ",";
Object.assign(arg.param, _param);
}
}
/**
* 初始化左侧框数据
*/
public initLeft() {
let left: any[] = [];
Object.assign(left, this.dataLeft);
this.dataLeft = [];
left.forEach((elem: any, i: any) => {
this.dataLeft.push({
key: elem.id,
value: elem.value,
label: elem.text,
disabled: elem.disabled
});
});
}
/**
* 初始化右侧框数据
*/
public initRight() {
let _valueSeparator: any;
_valueSeparator = this.initValueSeparator(_valueSeparator);
let _data: any = this.itemValue;
if (_data) {
let _dataRight: any = [];
let newData: any[] = _data.split(`${_valueSeparator}`);
this.dataLeft.forEach((elem: any) => {
newData.forEach((item: any) => {
if (item === elem.value) {
_dataRight.push(elem.key);
}
});
});
this.dataRight = _dataRight;
} }
}
/** /**
* 穿梭框打开时刷新数据 * 穿梭框打开时刷新数据
*/ * @memberof AppTransfer
public transferRefresh(e: any) { */
if (e && this.codelistType === "DYNAMIC") { public transferRefresh(e: boolean) {
this.dataLeft = []; if (e && this.codelistType === "DYNAMIC") {
this.dataHandle(); this.dataLeft = [];
this.dataHandle();
}
} }
}
/** /**
* 找到dataLeft中key与dataRight中item相等的元素,返回label * 找到dataLeft中key与dataRight中item相等的元素,返回label
*/ * @memberof AppTransfer
public findLabel(item: any) { */
for (const elem of this.dataLeft) { public findLabel(item: any) {
if (elem.key === item) return elem.label; for (const elem of this.dataLeft) {
if (elem.key === item) return elem.label;
}
} }
}
} }
</script> </script>
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<div class='form-con'> <div class='form-con'>
<i-form ref='loginForm' :rules="rules" :model="form"> <i-form ref='loginForm' :rules="rules" :model="form">
<form-item prop='loginname'> <form-item prop='loginname'>
<p>用户名</p>
<i-input <i-input
size='large' size='large'
prefix='ios-contact' prefix='ios-contact'
...@@ -20,7 +19,6 @@ ...@@ -20,7 +19,6 @@
</i-input> </i-input>
</form-item> </form-item>
<form-item prop='password'> <form-item prop='password'>
<p>密码</p>
<i-input <i-input
size='large' size='large'
prefix='ios-key' prefix='ios-key'
......
// .ibiz-page-tag {
// position: relative;
// box-sizing: border-box;
// // width: calc(100% + 30px);
// height: 38px;
// padding: 0 60px 0 30px;
// background: #f6f6f6;
// .tags-body {
// position: relative;
// width: 100%;
// height: 100%;
// overflow: hidden;
// .tags-container {
// position: absolute;
// overflow: visible;
// white-space: nowrap;
// transition: left .3s ease;
// .ivu-tag {
// margin: 0;
// height: 38px;
// line-height: 38px;
// border: 0;
// border-radius: 0;
// border-right: 1px solid #ddd;
// font-size: 14px;
// .text-icon {
// height: 16px;
// margin-bottom: -3px;
// }
// .ivu-icon-ios-close {
// visibility: hidden;
// }
// .tag-text {
// display: table-cell;
// .ivu-tooltip {
// display: block;
// .ivu-tooltip-rel {
// display: block;
// max-width: 200px;
// overflow: hidden;
// text-overflow: ellipsis;
// }
// }
// }
// }
// .ivu-tag.tag-is-active {
// background: #fff;
// }
// .ivu-tag:hover,.ivu-tag.tag-is-active {
// .ivu-icon-ios-close {
// visibility: initial;
// }
// }
// }
// }
// .move-btn {
// font-size: 18px;
// width: 30px;
// height: 38px;
// line-height: 38px;
// border-left: 1px solid #ddd;
// border-right: 1px solid #ddd;
// text-align: center;
// cursor: pointer;
// }
// .move-btn:hover {
// background: #efefef;
// }
// .move-left, .move-right, .ivu-dropdown{
// position: absolute;
// top: 0;
// }
// .move-left {
// left: 0;
// }
// .move-right {
// right: 30px;
// }
// .ivu-dropdown {
// right: 0;
// }
// }
// .tags-transition-move {
// transition: transform .3s;
// }
// .tags-transition-enter,.tags-transition-leave-to{
// opacity: 0;
// }
.ibiz-page-tag { .ibiz-page-tag {
position: relative; position: relative;
.left{ .left{
......
/**
* 提交统一资源数据
*
* @param param0
* @param data
*/
export const commitResourceData = ({ commit, state }: { commit: any, state: any }, { unires, enablepermissionvalid }: { unires: Array<any>, enablepermissionvalid: boolean }) => {
if(unires && unires.length > 0){
commit('setResourceData', unires);
}
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((obj: any, objIndex: any, objs: any) => {
return Object.is(obj.unirescode, resourcetag);
})
return itemIndex === -1 ? false : true;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export const getEnablePermissionValid = (state: any) => {
return state.enablePermissionValid;
}
\ 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 setEnablePermissionValid = (state: any, enablepermissionvalid:boolean) => {
state.enablePermissionValid = enablepermissionvalid;
}
/**
* 所有资源状态
*/
export const resourcestate: any = {
// 统一资源数据
resourceData: [],
// 是否开启权限认证
enablePermissionValid: false
}
\ No newline at end of file
...@@ -92,7 +92,7 @@ export class StudioActionUtil { ...@@ -92,7 +92,7 @@ export class StudioActionUtil {
const config: any = await this.getConfig(viewName); const config: any = await this.getConfig(viewName);
if (config) { if (config) {
const context: string = `视图模块:${config.viewmodule}\n视图标识:${config.viewname}\n视图类型:${config.viewtype}\n`; const context: string = `视图模块:${config.viewmodule}\n视图标识:${config.viewname}\n视图类型:${config.viewtype}\n`;
window.open(`${Environment.ProjectUrl}/issues/`, '_blank'); window.open(`${Environment.ProjectUrl}/issues/new?issue[title]=${encodeURIComponent('问题')}&issue[description]=${encodeURIComponent(context)}`, '_blank');
} }
} }
......
...@@ -5238,10 +5238,10 @@ human-signals@^1.1.1: ...@@ -5238,10 +5238,10 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
ibiz-gantt-elastic@^1.0.16: ibiz-gantt-elastic@^1.0.17:
version "1.0.16" version "1.0.17"
resolved "https://registry.npm.taobao.org/ibiz-gantt-elastic/download/ibiz-gantt-elastic-1.0.16.tgz#e2de7e8d4bdb3c292cfbc97c4f970c8ecfe6c43b" resolved "https://registry.yarnpkg.com/ibiz-gantt-elastic/-/ibiz-gantt-elastic-1.0.17.tgz#447cce5db2e0127d2336c20370fc251992520c6f"
integrity sha1-4t5+jUvbPCks+8l8T5cMjs/mxDs= integrity sha512-AJOYXZGM020wafn60RJLM2yKmtT2BjCpBKkZ0PONcxdqW/kCyXOqEo3c3/PBtFEkJx/8KGTayB013BOdGI1+uQ==
dependencies: dependencies:
dayjs "^1.8.16" dayjs "^1.8.16"
resize-observer-polyfill "^1.5.1" resize-observer-polyfill "^1.5.1"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册