cloud-web-corejs 1.0.54-dev.123 → 1.0.54-dev.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/advancedSearchDialog/mixins.js +28 -1
- package/src/components/table/tableForm.vue +1 -2
- package/src/components/table/tableFormMixin.js +13 -3
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -2103
- package/src/views/user/company_info/dialog.vue +164 -164
- package/src/views/user/role/dialog.vue +1 -1
- package/src/views/user/sale_org/dialog.vue +1 -1
- package/src/views/user/user/dialog.vue +1 -1
@@ -1,164 +1,164 @@
|
|
1
|
-
<template>
|
2
|
-
<el-dialog
|
3
|
-
:title="title || $t1('组织列表')"
|
4
|
-
:append-to-body="true"
|
5
|
-
:modal-append-to-body="true"
|
6
|
-
:close-on-click-modal="falseValue"
|
7
|
-
:visible.sync="showDialog"
|
8
|
-
:modal="falseValue"
|
9
|
-
custom-class="dialog-style list-dialog dialog-checkbox pd_0"
|
10
|
-
width="1200px"
|
11
|
-
:before-close="handleBeforeClose"
|
12
|
-
@close="dialogClose"
|
13
|
-
v-el-drag-dialog
|
14
|
-
v-el-dialog-center
|
15
|
-
>
|
16
|
-
<div class="cont" style="height:
|
17
|
-
<vxe-grid
|
18
|
-
class="is-pointer"
|
19
|
-
ref="table-m1"
|
20
|
-
v-bind="vxeOption"
|
21
|
-
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
22
|
-
@custom="$vxeTableUtil.customHandle"
|
23
|
-
@checkbox-change="addDataTable"
|
24
|
-
@checkbox-all="checkAll"
|
25
|
-
@cell-dblclick="checkWithSubmit"
|
26
|
-
>
|
27
|
-
<template #form>
|
28
|
-
<div class="clearfix screen-btns">
|
29
|
-
<div class="fr">
|
30
|
-
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
31
|
-
plain>{{ $t1('重置') }}
|
32
|
-
</vxe-button>
|
33
|
-
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
34
|
-
{{ $t1('搜索') }}
|
35
|
-
</vxe-button>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
<vxe-form class="screen-box" title-width="92px" title-align="right" :data="formData" @submit="searchEvent"
|
39
|
-
@reset="resetEvent">
|
40
|
-
<vxe-form-item :title="$t1('组织名称')+':'" field="companyName">
|
41
|
-
<template v-slot>
|
42
|
-
<el-input v-model="formData.companyName" size="small" clearable/>
|
43
|
-
</template>
|
44
|
-
</vxe-form-item>
|
45
|
-
<vxe-button type="submit" @click="searchEvent" v-show="false"></vxe-button>
|
46
|
-
</vxe-form>
|
47
|
-
</template>
|
48
|
-
</vxe-grid>
|
49
|
-
</div>
|
50
|
-
<label id="labBtn" class="transverse">
|
51
|
-
<div class="icon">
|
52
|
-
<i class="el-icon-more"></i>
|
53
|
-
<i class="el-icon-more"></i>
|
54
|
-
</div>
|
55
|
-
</label>
|
56
|
-
<div class="multipleChoice">
|
57
|
-
<el-tooltip :enterable="false" effect="dark" :content="$t1('全部删除')" placement="top"><a
|
58
|
-
class="allDel icon-quanbushanchu" @click="clearChecked()"></a></el-tooltip>
|
59
|
-
<div class="list">
|
60
|
-
<div class="item" v-for="(checkRow, index) in checkRows" :key="index">
|
61
|
-
<p>{{ checkRow.companyName }}</p>
|
62
|
-
<a class="el-icon-close" @click="clearTable1Select(index)"></a>
|
63
|
-
</div>
|
64
|
-
</div>
|
65
|
-
</div>
|
66
|
-
<span slot="footer" class="dialog-footer">
|
67
|
-
<span class="fl tips" v-if="!selectMulti">{{ $t1('注:双击确认选择(单选)') }}</span>
|
68
|
-
<el-button type="primary" plain class="button-sty" @click="dialogCancel">
|
69
|
-
<i class="el-icon-close el-icon"></i>
|
70
|
-
{{ $t1('取 消') }}
|
71
|
-
</el-button>
|
72
|
-
<el-button type="primary" @click="dialogPrimary" class="button-sty">
|
73
|
-
<i class="el-icon-check el-icon"></i>
|
74
|
-
{{ $t1('确 定') }}
|
75
|
-
</el-button>
|
76
|
-
</span>
|
77
|
-
</el-dialog>
|
78
|
-
</template>
|
79
|
-
|
80
|
-
<script>
|
81
|
-
import {selectDialogMixins} from '@base/mixins/selectDialog/index.js';
|
82
|
-
|
83
|
-
export default {
|
84
|
-
name: 'company_info_dialog',
|
85
|
-
props: ['title', 'visiable', 'multi', 'rows', 'param', 'firstEnabled', 'allCompany'],
|
86
|
-
mixins: [selectDialogMixins],
|
87
|
-
created() {
|
88
|
-
if (this.$attrs.fieldKey) this.fieldKey = this.$attrs.fieldKey;
|
89
|
-
this.initSetting();
|
90
|
-
},
|
91
|
-
mounted() {
|
92
|
-
this.initTableM1();
|
93
|
-
},
|
94
|
-
data() {
|
95
|
-
return {
|
96
|
-
showDialog: true,
|
97
|
-
falseValue: false,
|
98
|
-
selectMulti: true,
|
99
|
-
formData: {},
|
100
|
-
vxeOption: {},
|
101
|
-
};
|
102
|
-
},
|
103
|
-
methods: {
|
104
|
-
initTableM1() {
|
105
|
-
let that = this;
|
106
|
-
let path = USER_PREFIX + '/user_company_info/getCurrentList';
|
107
|
-
let treeNodeUrl = USER_PREFIX + '/user_company_info/getChildren';
|
108
|
-
if (this.allCompany) {
|
109
|
-
path = USER_PREFIX + '/company_info/getRoot';
|
110
|
-
treeNodeUrl = USER_PREFIX + '/company_info/getChildren';
|
111
|
-
}
|
112
|
-
let tableOption = {
|
113
|
-
vue: that,
|
114
|
-
tableRef: 'table-m1',
|
115
|
-
tableName: 'basic_ompany_info_dialog_list',
|
116
|
-
path: path,
|
117
|
-
treeNodeUrl: treeNodeUrl,
|
118
|
-
treeNodeParam: function (row) {
|
119
|
-
return {enabled: true, parentCompanyCode: row.companyCode};
|
120
|
-
},
|
121
|
-
param: () => {
|
122
|
-
return {
|
123
|
-
enabled: true,
|
124
|
-
...this.formData
|
125
|
-
}
|
126
|
-
},
|
127
|
-
columns: [
|
128
|
-
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
129
|
-
{title: this.$t1('组织名称'), field: 'companyName', width: 250, fixed: 'left', treeNode: true},
|
130
|
-
{title: this.$t1('组织编码'), field: 'companyCode', width: 200},
|
131
|
-
{
|
132
|
-
width: 47,
|
133
|
-
fixed: 'right',
|
134
|
-
title: '',
|
135
|
-
sortable: false
|
136
|
-
}
|
137
|
-
],
|
138
|
-
config: {
|
139
|
-
checkboxConfig: {
|
140
|
-
checkStrictly: true,
|
141
|
-
showHeader: this.selectMulti,
|
142
|
-
trigger: 'row',
|
143
|
-
checkMethod: ({row}) => {
|
144
|
-
if (this.firstEnabled === 'true' || this.firstEnabled === true) {
|
145
|
-
return true;
|
146
|
-
} else {
|
147
|
-
if (!row.parentCompanyCode) {
|
148
|
-
return false;
|
149
|
-
} else {
|
150
|
-
return true;
|
151
|
-
}
|
152
|
-
}
|
153
|
-
}
|
154
|
-
}
|
155
|
-
}
|
156
|
-
};
|
157
|
-
|
158
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
159
|
-
that.vxeOption = opts;
|
160
|
-
});
|
161
|
-
}
|
162
|
-
}
|
163
|
-
};
|
164
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<el-dialog
|
3
|
+
:title="title || $t1('组织列表')"
|
4
|
+
:append-to-body="true"
|
5
|
+
:modal-append-to-body="true"
|
6
|
+
:close-on-click-modal="falseValue"
|
7
|
+
:visible.sync="showDialog"
|
8
|
+
:modal="falseValue"
|
9
|
+
custom-class="dialog-style list-dialog dialog-checkbox pd_0"
|
10
|
+
width="1200px"
|
11
|
+
:before-close="handleBeforeClose"
|
12
|
+
@close="dialogClose"
|
13
|
+
v-el-drag-dialog
|
14
|
+
v-el-dialog-center
|
15
|
+
>
|
16
|
+
<div class="cont" style="height:65vh">
|
17
|
+
<vxe-grid
|
18
|
+
class="is-pointer"
|
19
|
+
ref="table-m1"
|
20
|
+
v-bind="vxeOption"
|
21
|
+
@resizable-change="$vxeTableUtil.onColumnWitchChange"
|
22
|
+
@custom="$vxeTableUtil.customHandle"
|
23
|
+
@checkbox-change="addDataTable"
|
24
|
+
@checkbox-all="checkAll"
|
25
|
+
@cell-dblclick="checkWithSubmit"
|
26
|
+
>
|
27
|
+
<template #form>
|
28
|
+
<div class="clearfix screen-btns">
|
29
|
+
<div class="fr">
|
30
|
+
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
31
|
+
plain>{{ $t1('重置') }}
|
32
|
+
</vxe-button>
|
33
|
+
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
34
|
+
{{ $t1('搜索') }}
|
35
|
+
</vxe-button>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
<vxe-form class="screen-box" title-width="92px" title-align="right" :data="formData" @submit="searchEvent"
|
39
|
+
@reset="resetEvent">
|
40
|
+
<vxe-form-item :title="$t1('组织名称')+':'" field="companyName">
|
41
|
+
<template v-slot>
|
42
|
+
<el-input v-model="formData.companyName" size="small" clearable/>
|
43
|
+
</template>
|
44
|
+
</vxe-form-item>
|
45
|
+
<vxe-button type="submit" @click="searchEvent" v-show="false"></vxe-button>
|
46
|
+
</vxe-form>
|
47
|
+
</template>
|
48
|
+
</vxe-grid>
|
49
|
+
</div>
|
50
|
+
<label id="labBtn" class="transverse">
|
51
|
+
<div class="icon">
|
52
|
+
<i class="el-icon-more"></i>
|
53
|
+
<i class="el-icon-more"></i>
|
54
|
+
</div>
|
55
|
+
</label>
|
56
|
+
<div class="multipleChoice">
|
57
|
+
<el-tooltip :enterable="false" effect="dark" :content="$t1('全部删除')" placement="top"><a
|
58
|
+
class="allDel icon-quanbushanchu" @click="clearChecked()"></a></el-tooltip>
|
59
|
+
<div class="list">
|
60
|
+
<div class="item" v-for="(checkRow, index) in checkRows" :key="index">
|
61
|
+
<p>{{ checkRow.companyName }}</p>
|
62
|
+
<a class="el-icon-close" @click="clearTable1Select(index)"></a>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
<span slot="footer" class="dialog-footer">
|
67
|
+
<span class="fl tips" v-if="!selectMulti">{{ $t1('注:双击确认选择(单选)') }}</span>
|
68
|
+
<el-button type="primary" plain class="button-sty" @click="dialogCancel">
|
69
|
+
<i class="el-icon-close el-icon"></i>
|
70
|
+
{{ $t1('取 消') }}
|
71
|
+
</el-button>
|
72
|
+
<el-button type="primary" @click="dialogPrimary" class="button-sty">
|
73
|
+
<i class="el-icon-check el-icon"></i>
|
74
|
+
{{ $t1('确 定') }}
|
75
|
+
</el-button>
|
76
|
+
</span>
|
77
|
+
</el-dialog>
|
78
|
+
</template>
|
79
|
+
|
80
|
+
<script>
|
81
|
+
import {selectDialogMixins} from '@base/mixins/selectDialog/index.js';
|
82
|
+
|
83
|
+
export default {
|
84
|
+
name: 'company_info_dialog',
|
85
|
+
props: ['title', 'visiable', 'multi', 'rows', 'param', 'firstEnabled', 'allCompany'],
|
86
|
+
mixins: [selectDialogMixins],
|
87
|
+
created() {
|
88
|
+
if (this.$attrs.fieldKey) this.fieldKey = this.$attrs.fieldKey;
|
89
|
+
this.initSetting();
|
90
|
+
},
|
91
|
+
mounted() {
|
92
|
+
this.initTableM1();
|
93
|
+
},
|
94
|
+
data() {
|
95
|
+
return {
|
96
|
+
showDialog: true,
|
97
|
+
falseValue: false,
|
98
|
+
selectMulti: true,
|
99
|
+
formData: {},
|
100
|
+
vxeOption: {},
|
101
|
+
};
|
102
|
+
},
|
103
|
+
methods: {
|
104
|
+
initTableM1() {
|
105
|
+
let that = this;
|
106
|
+
let path = USER_PREFIX + '/user_company_info/getCurrentList';
|
107
|
+
let treeNodeUrl = USER_PREFIX + '/user_company_info/getChildren';
|
108
|
+
if (this.allCompany) {
|
109
|
+
path = USER_PREFIX + '/company_info/getRoot';
|
110
|
+
treeNodeUrl = USER_PREFIX + '/company_info/getChildren';
|
111
|
+
}
|
112
|
+
let tableOption = {
|
113
|
+
vue: that,
|
114
|
+
tableRef: 'table-m1',
|
115
|
+
tableName: 'basic_ompany_info_dialog_list',
|
116
|
+
path: path,
|
117
|
+
treeNodeUrl: treeNodeUrl,
|
118
|
+
treeNodeParam: function (row) {
|
119
|
+
return {enabled: true, parentCompanyCode: row.companyCode};
|
120
|
+
},
|
121
|
+
param: () => {
|
122
|
+
return {
|
123
|
+
enabled: true,
|
124
|
+
...this.formData
|
125
|
+
}
|
126
|
+
},
|
127
|
+
columns: [
|
128
|
+
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
129
|
+
{title: this.$t1('组织名称'), field: 'companyName', width: 250, fixed: 'left', treeNode: true},
|
130
|
+
{title: this.$t1('组织编码'), field: 'companyCode', width: 200},
|
131
|
+
{
|
132
|
+
width: 47,
|
133
|
+
fixed: 'right',
|
134
|
+
title: '',
|
135
|
+
sortable: false
|
136
|
+
}
|
137
|
+
],
|
138
|
+
config: {
|
139
|
+
checkboxConfig: {
|
140
|
+
checkStrictly: true,
|
141
|
+
showHeader: this.selectMulti,
|
142
|
+
trigger: 'row',
|
143
|
+
checkMethod: ({row}) => {
|
144
|
+
if (this.firstEnabled === 'true' || this.firstEnabled === true) {
|
145
|
+
return true;
|
146
|
+
} else {
|
147
|
+
if (!row.parentCompanyCode) {
|
148
|
+
return false;
|
149
|
+
} else {
|
150
|
+
return true;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
};
|
157
|
+
|
158
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
159
|
+
that.vxeOption = opts;
|
160
|
+
});
|
161
|
+
}
|
162
|
+
}
|
163
|
+
};
|
164
|
+
</script>
|