提交 52863844 编写于 作者: hudan's avatar hudan

部门抛值、样式调整

上级 0158293b
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
position: relative; position: relative;
.checkField { .checkField {
margin-right: 22px; margin-right: 22px;
// --padding-end: 5px !important;
.has-value { .has-value {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -178,7 +178,6 @@ export default class AppMobDepartmentSelect extends Vue { ...@@ -178,7 +178,6 @@ export default class AppMobDepartmentSelect extends Vue {
@Watch('data',{immediate:true,deep:true}) @Watch('data',{immediate:true,deep:true})
public onValueChange(newVal: any, oldVal: any) { public onValueChange(newVal: any, oldVal: any) {
if(newVal){ if(newVal){
// this.computedSelectedData();
this.$nextTick(()=>{ this.$nextTick(()=>{
this.searchNodesData(); this.searchNodesData();
}); });
...@@ -202,8 +201,8 @@ export default class AppMobDepartmentSelect extends Vue { ...@@ -202,8 +201,8 @@ export default class AppMobDepartmentSelect extends Vue {
multiple: this.multiple, multiple: this.multiple,
nodesData: this.Nodesdata nodesData: this.Nodesdata
}); });
let container: any = await this.$appmodal.openModal(view, context, param); let result: any = await this.$appmodal.openModal(view, context, param);
this.closeModal(container); this.closeModal(result.datas);
} }
/** /**
...@@ -211,15 +210,23 @@ export default class AppMobDepartmentSelect extends Vue { ...@@ -211,15 +210,23 @@ export default class AppMobDepartmentSelect extends Vue {
* *
* @memberof AppMobDepartmentSelect * @memberof AppMobDepartmentSelect
*/ */
public closeModal(result: any) { public closeModal(datas: any) {
let checkValue: any[] = []; let checkValue: any[] = [];
result.datas.forEach((item: any)=>{ datas.forEach((item: any)=>{
checkValue.push(item.label); checkValue.push(item.label);
}) })
this.selectTreeValue = JSON.stringify(result.datas); this.selectTreeValue = JSON.stringify(datas);
this.curValue = checkValue == []? '' : checkValue.join(','); this.curValue = checkValue == []? '' : checkValue.join(',');
let _value = checkValue == []? null : checkValue.join(','); if(this.fillMap && Object.keys(this.fillMap).length > 0){
this.$emit('select-change',{"name": this.fillMap.label, "value":_value }); Object.keys(this.fillMap).forEach((attribute:string) => {
let _name = this.fillMap[attribute];
let values = datas.map((item:any) => item[attribute]);
let _value = datas === "[]" ? null : values.join(",");
setTimeout(() => {
this.$emit('select-change',{name: this.fillMap[attribute], value: _value});
},0);
});
}
} }
/** /**
...@@ -230,7 +237,14 @@ export default class AppMobDepartmentSelect extends Vue { ...@@ -230,7 +237,14 @@ export default class AppMobDepartmentSelect extends Vue {
public onClear(){ public onClear(){
this.curValue = ''; this.curValue = '';
this.selectTreeValue = ''; this.selectTreeValue = '';
this.$emit('select-change',{ "name": this.fillMap.label, "value":'' }) if(this.fillMap && Object.keys(this.fillMap).length > 0){
Object.keys(this.fillMap).forEach((attribute:string) => {
let _name = this.fillMap[attribute];
setTimeout(() => {
this.$emit('select-change',{name: this.fillMap[attribute], value:null});
},0);
});
}
} }
} }
</script> </script>
......
...@@ -54,4 +54,9 @@ ...@@ -54,4 +54,9 @@
.app-mob-check-list-search{ .app-mob-check-list-search{
text-align: @form-text-align; text-align: @form-text-align;
} }
.app-mob-department-select{
.checkField{
text-align: @form-text-align;
}
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册