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

Merge branch 'dev'

...@@ -25,6 +25,7 @@ import AppForm from './components/app-form/app-form.vue' ...@@ -25,6 +25,7 @@ import AppForm from './components/app-form/app-form.vue'
import APPAutocomplete from './components/app-autocomplete/app-autocomplete.vue' import APPAutocomplete from './components/app-autocomplete/app-autocomplete.vue'
import AppFormDruipart from './components/app-form-druipart/app-form-druipart.vue' import AppFormDruipart from './components/app-form-druipart/app-form-druipart.vue'
import DropdownList from './components/dropdown-list/dropdown-list.vue' import DropdownList from './components/dropdown-list/dropdown-list.vue'
import DropdownListHidden from './components/dropdown-list-hidden/dropdown-list-hidden.vue'
import UploadFile from './components/upload-file/upload-file.vue' import UploadFile from './components/upload-file/upload-file.vue'
import ContextMenuContainer from './components/context-menu-container/context-menu-container.vue' import ContextMenuContainer from './components/context-menu-container/context-menu-container.vue'
import AppCheckboxList from './components/app-checkbox-list/app-checkbox-list.vue' import AppCheckboxList from './components/app-checkbox-list/app-checkbox-list.vue'
...@@ -45,6 +46,7 @@ import AppFormGroup2 from './components/app-form-group2/app-form-group2.vue' ...@@ -45,6 +46,7 @@ import AppFormGroup2 from './components/app-form-group2/app-form-group2.vue'
import AppFormItem2 from './components/app-form-item2/app-form-item2.vue' import AppFormItem2 from './components/app-form-item2/app-form-item2.vue'
import CodeList from './components/codelist/codelist.vue' import CodeList from './components/codelist/codelist.vue'
import AppQuickMenus from './components/app-quick-menus/app-quick-menus.vue' import AppQuickMenus from './components/app-quick-menus/app-quick-menus.vue'
import AppIconMenus from './components/app-icon-menus/app-icon-menus.vue'
import AppCheckbox from './components/app-checkbox/app-checkbox.vue' import AppCheckbox from './components/app-checkbox/app-checkbox.vue'
import AppColumnRender from './components/app-column-render/app-column-render.vue' import AppColumnRender from './components/app-column-render/app-column-render.vue'
import AppPickerSelectView from './components/app-picker-select-view/app-picker-select-view.vue' import AppPickerSelectView from './components/app-picker-select-view/app-picker-select-view.vue'
...@@ -150,6 +152,7 @@ export const AppComponents = { ...@@ -150,6 +152,7 @@ export const AppComponents = {
v.component('app-autocomplete', APPAutocomplete); v.component('app-autocomplete', APPAutocomplete);
v.component('app-form-druipart', AppFormDruipart); v.component('app-form-druipart', AppFormDruipart);
v.component('dropdown-list', DropdownList); v.component('dropdown-list', DropdownList);
v.component('dropdown-list-hidden', DropdownListHidden);
v.component('upload-file', UploadFile); v.component('upload-file', UploadFile);
v.component('context-menu-container', ContextMenuContainer); v.component('context-menu-container', ContextMenuContainer);
v.component('app-checkbox-list',AppCheckboxList); v.component('app-checkbox-list',AppCheckboxList);
...@@ -171,6 +174,7 @@ export const AppComponents = { ...@@ -171,6 +174,7 @@ export const AppComponents = {
v.component('app-form-item2', AppFormItem2); v.component('app-form-item2', AppFormItem2);
v.component('codelist', CodeList); v.component('codelist', CodeList);
v.component('app-quick-menus', AppQuickMenus); v.component('app-quick-menus', AppQuickMenus);
v.component('app-icon-menus', AppIconMenus);
v.component('app-checkbox',AppCheckbox); v.component('app-checkbox',AppCheckbox);
v.component('app-column-render',AppColumnRender); v.component('app-column-render',AppColumnRender);
v.component('app-picker-select-view',AppPickerSelectView); v.component('app-picker-select-view',AppPickerSelectView);
......
.app-icon-menus{
display: flex;
.el-card{
margin-left: 16px;
.el-card__body{
padding: 0;
width: 200px;
height: 122px;
margin: 0;
.menuIcon{
width: 100%;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
border: 1px rgb(210,238,255) solid;
background-color: rgb(240,249,255);
border-radius: 3px;
cursor: pointer;
&:hover{
border-color: rgb(53,152,220) ;
}
span{
font-size: 40px;
color: rgb(55,155,222);
}
img{
width: 46px;
height: 46px;
// margin-top: 12px;
}
h4{
font-weight: 500;
font-size: 16px;
}
}
}
}
}
<template>
<div class="app-icon-menus">
<template v-for="(item,index) in menus">
<div :bordered="false" v-if="item.items && Array.isArray(item.items)" :key="index" :class="item.textcls">
<p @click="$emit('menuClick',item.name, [item.name])">
<span>{{$t('app.menus.' + ctrlName + '.' + item.name)}}</span>
<span class="line"></span>
</p>
<p style=" display: 'flex' ">
<app-icon-menus :menus="item.items" :ctrlName = "ctrlName" @menuClick="menuClick"></app-icon-menus>
</p>
</div>
<el-card
:key="index"
shadow="never"
:class="item.textcls"
v-else
>
<div @click="menuClick(item.name,[item.name])" class="menuIcon" >
<span v-if="isIcon(item.icon,item.iconcls)">
<i :class="item.icon" v-if="!Object.is(item.icon, '')" />
<i :class="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
<i class="fa fa-cogs" v-else></i>
</span>
<span v-else>
<img :src="item.icon" v-if="!Object.is(item.icon, '')" />
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
<i class="fa fa-cogs" v-else></i>
</span>
<h4>{{$t('app.menus.' + ctrlName + '.' + item.name)}}</h4>
</div>
</el-card>
</template>
</div>
</template>
<script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
@Component({})
export default class AppQuickMenus extends Vue {
public isIcon( icon: string,iconcls: string) {
if (icon.indexOf("fa") == 0 || iconcls.indexOf("fa") == 0) {
return true;
}else {
return false;
}
}
public menuClick(index: any,indexs: any[]) {
this.$emit("menuClick",index,indexs);
}
/**
* 菜单数据
*
* @type {*}
* @memberof AppQuickMenus
*/
@Prop({ default: [] }) public menus!: any;
/**
* 部件名称
*
* @type {String}
* @memberof AppQuickMenus
*/
@Prop() public ctrlName!:String;
}
</script>
<style lang='less'>
@import "./app-icon-menus.less";
</style>
\ No newline at end of file
<template> <template>
<div class="app-menus"> <div class="app-menus">
<template v-for="(item,index) in menus"> <template v-for="(item,index) in menus">
<card :bordered="false" dis-hover v-if="item.items && Array.isArray(item.items)" :key="index"> <card :bordered="false" dis-hover v-if="item.items && Array.isArray(item.items)" :key="index">
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<span class="line"></span> <span class="line"></span>
</p> </p>
<p style=" display: 'flex' "> <p style=" display: 'flex' ">
<app-quick-menus :menus="item.items" :ctrlName = "ctrlName"></app-quick-menus> <app-quick-menus :menus="item.items" :ctrlName="ctrlName"></app-quick-menus>
</p> </p>
</card> </card>
<card <card
:key="index" :key="index"
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
</template> </template>
</div> </div>
</template> </template>
<script lang='ts'> <script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator"; import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
@Component({}) @Component({})
export default class AppQuickMenus extends Vue { export default class AppQuickMenus extends Vue {
/** /**
* 菜单数据 * 菜单数据
* *
...@@ -58,7 +58,7 @@ export default class AppQuickMenus extends Vue { ...@@ -58,7 +58,7 @@ export default class AppQuickMenus extends Vue {
@Prop({ default: [] }) public menus!: any; @Prop({ default: [] }) public menus!: any;
/** /**
* 部件名称 * 部件名称
* *
* @type {String} * @type {String}
* @memberof AppQuickMenus * @memberof AppQuickMenus
......
...@@ -349,7 +349,7 @@ export default class CodeList extends Vue { ...@@ -349,7 +349,7 @@ export default class CodeList extends Vue {
max-height: 32px; max-height: 32px;
padding: 0px 3px; padding: 0px 3px;
> img{ > img{
max-height: 32px; max-height: 24px;
width: auto; width: auto;
margin-right: 6px; margin-right: 6px;
border-radius: 50%; border-radius: 50%;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
:file-list="uploadFileList" :file-list="uploadFileList"
:show-file-list="false" :show-file-list="false"
:http-request="customUploadFile"> :http-request="customUploadFile">
<el-button type="primary" size="small" icon="el-icon-upload"> <el-button type="primary" size="small" icon="el-icon-upload" :disabled="disabled">
{{$t('components.diskFileUpload.clickUpload')}} {{$t('components.diskFileUpload.clickUpload')}}
</el-button> </el-button>
</el-upload> </el-upload>
......
.dropdown-list-hidden-container{
.dropdown-list-hidden{
display: inline-block;
}
.tree-dropdown-list{
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
}
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
:filterable="filterable" :filterable="filterable"
@on-open-change="onClick" @on-open-change="onClick"
:placeholder="placeholder?placeholder:$t('components.dropDownList.placeholder')"> :placeholder="placeholder?placeholder:$t('components.dropDownList.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option> <i-option v-for="(item, index) in items" :key="index" :disabled="item.disabled" :class="item.class" :value="item.value">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select> </i-select>
<ibiz-select-tree v-if="hasChildren" class="tree-dropdown-list" :disabled="disabled" :NodesData="items" v-model="currentVal" :multiple="false"></ibiz-select-tree> <ibiz-select-tree v-if="hasChildren" class="tree-dropdown-list" :disabled="disabled" :NodesData="items" v-model="currentVal" :multiple="false"></ibiz-select-tree>
</div> </div>
...@@ -61,6 +61,24 @@ export default class DropDownList extends Vue { ...@@ -61,6 +61,24 @@ export default class DropDownList extends Vue {
*/ */
@Model('change') readonly itemValue!: any; @Model('change') readonly itemValue!: any;
/**
* 监控值变化,根据属性类型强制转换
*
* @memberof DropDownList
*/
@Watch('itemValue')
public valueWatch() {
try {
this.readyValue();
// 代码表集合中不存在改选项,重新准备集合
if (this.value && !this.items.find((item: any) => Object.is(this.value, item.value))) {
this.loadData();
}
} catch (error) {
console.log('下拉列表,值转换失败');
}
}
/** /**
* 代码表标识 * 代码表标识
* *
...@@ -102,7 +120,7 @@ export default class DropDownList extends Vue { ...@@ -102,7 +120,7 @@ export default class DropDownList extends Vue {
*/ */
protected formStateEvent: Subscription | undefined; protected formStateEvent: Subscription | undefined;
/** /**
* 监听表单数据 * 监听表单数据
* *
* @memberof DropDownList * @memberof DropDownList
......
...@@ -110,6 +110,10 @@ ...@@ -110,6 +110,10 @@
font-size: 18px; font-size: 18px;
color: #1890ff; color: #1890ff;
flex-shrink: 0; flex-shrink: 0;
max-width: 50%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
> .toolbar-container{ > .toolbar-container{
margin-left: auto; margin-left: auto;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册