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

Merge branch 'dev'

...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<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.isShowIcon">
<template v-if="detail.icon && !Object.is(detail.icon, '')"> <template v-if="detail.icon && !Object.is(detail.icon, '')">
<i :class="detail.icon" ></i> <i :class="detail.icon" ></i>
</template> </template>
...@@ -36,14 +37,17 @@ ...@@ -36,14 +37,17 @@
<img :src="detail.img" /> <img :src="detail.img" />
</div> </div>
</template> </template>
</template>
&nbsp; &nbsp;
<span> <span>
<template v-if="detail.isShowCaption">
<template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')"> <template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')">
{{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}} {{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}}
</template> </template>
<template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))"> <template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))">
{{detail.caption}} {{detail.caption}}
</template> </template>
</template>
</span> </span>
</span> </span>
</dropdown-item> </dropdown-item>
...@@ -55,6 +59,7 @@ ...@@ -55,6 +59,7 @@
<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.isShowIcon">
<template v-if="detail.icon && !Object.is(detail.icon, '')"> <template v-if="detail.icon && !Object.is(detail.icon, '')">
<i :class="detail.icon" ></i> <i :class="detail.icon" ></i>
</template> </template>
...@@ -63,14 +68,17 @@ ...@@ -63,14 +68,17 @@
<img :src="detail.img" /> <img :src="detail.img" />
</div> </div>
</template> </template>
</template>
&nbsp; &nbsp;
<span> <span>
<template v-if="detail.isShowCaption">
<template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')"> <template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')">
{{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}} {{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}}
</template> </template>
<template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))"> <template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))">
{{detail.caption}} {{detail.caption}}
</template> </template>
</template>
</span> </span>
</span> </span>
</div> </div>
......
.ivu-select-dropdown { .transfer-select{
.ivu-select-dropdown {
padding: 0px; padding: 0px;
.hidden { .hidden {
display: none; display: none;
} }
.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
class="transfer-select"
@on-open-change="transferRefresh" @on-open-change="transferRefresh"
@on-change="dataChange" @on-change="dataChange"
v-model="dataRight" v-model="dataRight"
:style="{width:width===undefined?'586px':width}" :style="{width:width}"
multiple :disabled="disabled"
> :placeholder="placeholder"
<Option class="hidden" :value="item" v-for="(item,i) in dataRight" :key="i">{{findLabel(item)}}</Option> multiple>
<el-transfer v-model="dataRight" :data="dataLeft" @change="dataChange" :titles="['未选择', '已选择']"></el-transfer> <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> </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";
...@@ -18,48 +27,28 @@ import { ElSelect } from "element-ui/types/select"; ...@@ -18,48 +27,28 @@ import { ElSelect } from "element-ui/types/select";
@Component({}) @Component({})
export default class AppTransfer extends Vue { export default class AppTransfer extends Vue {
/** /**
* 左侧框数据 * 传入表单数据
*/
public dataLeft: any[] = [];
/**
* 右侧框数据
*/
public dataRight: any[] = [];
/**
* 穿梭框宽度
*/
@Prop() public width: any;
/**
* 代码表服务对象
* *
* @type {CodeListService} * @type {*}
* @memberof AppTransfer * @memberof AppTransfer
*/ */
@Prop() public data:any;
public codeListService: CodeListService = new CodeListService({
$store: this.$store
});
/** /**
* 查询参数 * 穿梭框宽度
* @type {*} *
* @type {string}
* @memberof AppTransfer * @memberof AppTransfer
*/ */
public queryParam: any; @Prop() public width?: string;
/** /**
* 表单传入字符串值分隔符 * 表单传入字符串值分隔符
*/ *
@Prop() public valueSeparator!: string; * @type {string}
/**
* 当前选中值
* @type {any}
* @memberof AppTransfer * @memberof AppTransfer
*/ */
@Model("change") public itemValue!: any; @Prop() public valueSeparator?: string;
/** /**
* 代码表标识 * 代码表标识
...@@ -93,33 +82,6 @@ export default class AppTransfer extends Vue { ...@@ -93,33 +82,6 @@ export default class AppTransfer extends Vue {
*/ */
@Prop() public localParam!: any; @Prop() public localParam!: any;
/**
* 组件change事件,右侧框数据变化时
* @memberof AppTransfer
*/
dataChange(e: any) {
let _valueSeparator: any;
_valueSeparator = this.initValueSeparator(_valueSeparator);
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;
}
}
/** /**
* 视图上下文 * 视图上下文
* *
...@@ -138,6 +100,7 @@ export default class AppTransfer extends Vue { ...@@ -138,6 +100,7 @@ export default class AppTransfer extends Vue {
/** /**
* 是否禁用 * 是否禁用
*
* @type {any} * @type {any}
* @memberof AppTransfer * @memberof AppTransfer
* *
...@@ -145,22 +108,47 @@ export default class AppTransfer extends Vue { ...@@ -145,22 +108,47 @@ export default class AppTransfer extends Vue {
@Prop() public disabled?: any; @Prop() public disabled?: any;
/** /**
* 是否支持过滤 * 穿梭框提示内容
* @type {boolean} *
* @type {string}
* @memberof AppTransfer * @memberof AppTransfer
*/ */
@Prop() public filterable?: boolean; @Prop() public placeholder?: string;
/** /**
* 下拉选提示内容 * 当前选中值
* @type {string} *
* @type {any}
* @memberof AppTransfer * @memberof AppTransfer
*/ */
@Prop() public placeholder?: string; @Model("change") public itemValue!: any;
/** /**
* vue 生命周期 * 左侧框数据
*
* @memberof AppTransfer
*/
public dataLeft: any[] = [];
/**
* 右侧框数据
*
* @memberof AppTransfer
*/
public dataRight: any[] = [];
/**
* 代码表服务对象
* *
* @type {CodeListService}
* @memberof AppTransfer
*/
public codeListService: CodeListService = new CodeListService({
$store: this.$store
});
/**
* vue 生命周期
* @memberof AppTransfer * @memberof AppTransfer
*/ */
public created() { public created() {
...@@ -169,14 +157,15 @@ export default class AppTransfer extends Vue { ...@@ -169,14 +157,15 @@ export default class AppTransfer extends Vue {
/** /**
* 数据处理 * 数据处理
*
* @memberof AppTransfer
*/ */
public dataHandle() { public dataHandle() {
if (this.tag && Object.is(this.codelistType, "STATIC")) { if (this.tag && Object.is(this.codelistType, "STATIC")) {
const codelist = this.$store.getters.getCodeList(this.tag); const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) { if (codelist) {
this.dataLeft = [...JSON.parse(JSON.stringify(codelist.items))]; this.dataLeft = [...JSON.parse(JSON.stringify(codelist.items))];
this.initLeft(); this.initData()
this.initRight();
} else { } else {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
} }
...@@ -191,8 +180,7 @@ export default class AppTransfer extends Vue { ...@@ -191,8 +180,7 @@ export default class AppTransfer extends Vue {
.getItems(this.tag, _context, _param) .getItems(this.tag, _context, _param)
.then((res: any) => { .then((res: any) => {
this.dataLeft = res; this.dataLeft = res;
this.initLeft(); this.initData()
this.initRight();
}) })
.catch((error: any) => { .catch((error: any) => {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
...@@ -207,37 +195,28 @@ export default class AppTransfer extends Vue { ...@@ -207,37 +195,28 @@ export default class AppTransfer extends Vue {
* @returns * @returns
* @memberof AppTransfer * @memberof AppTransfer
*/ */
public handlePublicParams(arg: any) { public handlePublicParams(arg: any) {
// 合并表单参数 // 合并表单参数
arg.param = this.viewparams arg.param = this.viewparams? JSON.parse(JSON.stringify(this.viewparams)): {};
? JSON.parse(JSON.stringify(this.viewparams))
: {};
arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {}; arg.context = this.context ? JSON.parse(JSON.stringify(this.context)) : {};
// 附加参数处理 // 附加参数处理
if (this.localContext && Object.keys(this.localContext).length > 0) { if (this.localContext && Object.keys(this.localContext).length > 0) {
let _context = this.$util.computedNavData( let _context = this.$util.computedNavData(this.data,arg.context,arg.param,this.localContext);
this.itemValue,
arg.context,
arg.param,
this.localContext
);
Object.assign(arg.context, _context); Object.assign(arg.context, _context);
} }
if (this.localParam && Object.keys(this.localParam).length > 0) { if (this.localParam && Object.keys(this.localParam).length > 0) {
let _param = this.$util.computedNavData( let _param = this.$util.computedNavData(this.data,arg.context,arg.param,this.localParam);
this.itemValue,
arg.context,
arg.param,
this.localParam
);
Object.assign(arg.param, _param); Object.assign(arg.param, _param);
} }
} }
/** /**
* 初始化左侧框数据 * 初始化获取到的选项数据
*
* @memberof AppTransfer
*/ */
public initLeft() { public initData(){
// 初始化左侧框数据
let left: any[] = []; let left: any[] = [];
Object.assign(left, this.dataLeft); Object.assign(left, this.dataLeft);
this.dataLeft = []; this.dataLeft = [];
...@@ -249,13 +228,10 @@ export default class AppTransfer extends Vue { ...@@ -249,13 +228,10 @@ export default class AppTransfer extends Vue {
disabled: elem.disabled disabled: elem.disabled
}); });
}); });
}
/** // 初始化右侧框数据
* 初始化右侧框数据
*/
public initRight() {
let _valueSeparator: any; let _valueSeparator: any;
_valueSeparator = this.initValueSeparator(_valueSeparator); _valueSeparator = this.initValueSeparator();
let _data: any = this.itemValue; let _data: any = this.itemValue;
if (_data) { if (_data) {
let _dataRight: any = []; let _dataRight: any = [];
...@@ -270,10 +246,35 @@ export default class AppTransfer extends Vue { ...@@ -270,10 +246,35 @@ export default class AppTransfer extends Vue {
this.dataRight = _dataRight; this.dataRight = _dataRight;
} }
} }
/**
* 组件change事件,右侧框数据变化时
* @memberof AppTransfer
*/
public dataChange(e: any) {
let _valueSeparator: string;
_valueSeparator = this.initValueSeparator();
let newVal: string = e.join(`${_valueSeparator}`);
if (newVal) {
this.$emit("change", newVal);
} else {
this.$emit("change", null);
}
}
/**
* 初始化valueSeparator
* @memberof AppTransfer
*/
public initValueSeparator() {
return this.valueSeparator ? this.valueSeparator : ",";
}
/** /**
* 穿梭框打开时刷新数据 * 穿梭框打开时刷新数据
* @memberof AppTransfer
*/ */
public transferRefresh(e: any) { public transferRefresh(e: boolean) {
if (e && this.codelistType === "DYNAMIC") { if (e && this.codelistType === "DYNAMIC") {
this.dataLeft = []; this.dataLeft = [];
this.dataHandle(); this.dataHandle();
...@@ -282,6 +283,7 @@ export default class AppTransfer extends Vue { ...@@ -282,6 +283,7 @@ export default class AppTransfer extends Vue {
/** /**
* 找到dataLeft中key与dataRight中item相等的元素,返回label * 找到dataLeft中key与dataRight中item相等的元素,返回label
* @memberof AppTransfer
*/ */
public findLabel(item: any) { public findLabel(item: any) {
for (const elem of this.dataLeft) { for (const elem of this.dataLeft) {
......
...@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册