@zhijiancloud/bpm 0.0.7 → 0.0.8
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 +3 -4
- package/components/.DS_Store +0 -0
- package/components/api/batch-loader.js +0 -61
- package/components/api/index.js +0 -108
- package/components/css/bpmAudit.less +0 -13
- package/components/css/bpmMulFile.less +0 -62
- package/components/css/bpmSelectCheckItem.less +0 -4
- package/components/css/bpmSelectEntranceForm.less +0 -62
- package/components/css/bpmSelectFromForm.less +0 -10
- package/components/css/bpmSelectFromId.less +0 -33
- package/components/css/bpmSelectHouseOwner.less +0 -30
- package/components/css/bpmSignature.less +0 -40
- package/components/css/bpmText.less +0 -39
- package/components/css/common.less +0 -43
- package/components/css/demo.less +0 -3
- package/components/css/demo2.less +0 -3
- package/components/css/index.less +0 -8
- package/components/lib/bpmAudit/index.js +0 -7
- package/components/lib/bpmAudit/src/main.vue +0 -117
- package/components/lib/bpmAudit/src/part/auditor/audit-new.vue +0 -534
- package/components/lib/bpmAudit/src/part/auditor/audit-select.vue +0 -127
- package/components/lib/bpmAudit/src/part/auditor/audit-with-others.vue +0 -634
- package/components/lib/bpmAudit/src/part/auditor.vue +0 -54
- package/components/lib/bpmAudit/src/part/editor.vue +0 -318
- package/components/lib/bpmAudit/src/part/reader.vue +0 -218
- package/components/lib/bpmDateTime/index.js +0 -7
- package/components/lib/bpmDateTime/src/main.vue +0 -82
- package/components/lib/bpmDateTime/src/part/editor.vue +0 -126
- package/components/lib/bpmDateTime/src/part/reader.vue +0 -55
- package/components/lib/bpmField/index.js +0 -7
- package/components/lib/bpmField/src/main.vue +0 -31
- package/components/lib/bpmFieldsFilter/index.js +0 -7
- package/components/lib/bpmFieldsFilter/src/main.vue +0 -324
- package/components/lib/bpmFormField/index.js +0 -7
- package/components/lib/bpmFormField/src/lib/form_mixin.js +0 -818
- package/components/lib/bpmFormField/src/lib/mixin.js +0 -245
- package/components/lib/bpmFormField/src/main.vue +0 -35
- package/components/lib/bpmMulFile/index.js +0 -7
- package/components/lib/bpmMulFile/src/main.vue +0 -85
- package/components/lib/bpmMulFile/src/part/editor.vue +0 -433
- package/components/lib/bpmMulFile/src/part/lib/compressImageUtils.js +0 -226
- package/components/lib/bpmMulFile/src/part/lib/utils.js +0 -281
- package/components/lib/bpmMulFile/src/part/reader.vue +0 -282
- package/components/lib/bpmMulImage/index.js +0 -7
- package/components/lib/bpmMulImage/src/main.vue +0 -86
- package/components/lib/bpmMulImage/src/part/editor.vue +0 -449
- package/components/lib/bpmMulImage/src/part/lib/compressImageUtils.js +0 -226
- package/components/lib/bpmMulImage/src/part/lib/utils.js +0 -281
- package/components/lib/bpmMulImage/src/part/reader.vue +0 -181
- package/components/lib/bpmNumber/index.js +0 -7
- package/components/lib/bpmNumber/src/main.vue +0 -83
- package/components/lib/bpmNumber/src/part/editor.vue +0 -47
- package/components/lib/bpmNumber/src/part/reader.vue +0 -7
- package/components/lib/bpmSelect/index.js +0 -7
- package/components/lib/bpmSelect/src/main.vue +0 -90
- package/components/lib/bpmSelect/src/part/editor.vue +0 -75
- package/components/lib/bpmSelect/src/part/reader.vue +0 -53
- package/components/lib/bpmSelectCheckItem/index.js +0 -7
- package/components/lib/bpmSelectCheckItem/src/main.vue +0 -101
- package/components/lib/bpmSelectCheckItem/src/part/editor.vue +0 -103
- package/components/lib/bpmSelectCheckItem/src/part/reader.vue +0 -7
- package/components/lib/bpmSelectEntranceForm/index.js +0 -7
- package/components/lib/bpmSelectEntranceForm/src/main.vue +0 -529
- package/components/lib/bpmSelectFromField/index.js +0 -7
- package/components/lib/bpmSelectFromField/src/main.vue +0 -98
- package/components/lib/bpmSelectFromField/src/part/editor.vue +0 -96
- package/components/lib/bpmSelectFromField/src/part/reader.vue +0 -7
- package/components/lib/bpmSelectFromForm/index.js +0 -7
- package/components/lib/bpmSelectFromForm/src/main.vue +0 -103
- package/components/lib/bpmSelectFromForm/src/part/editor.vue +0 -178
- package/components/lib/bpmSelectFromForm/src/part/reader.vue +0 -7
- package/components/lib/bpmSelectFromId/index.js +0 -7
- package/components/lib/bpmSelectFromId/src/main.vue +0 -102
- package/components/lib/bpmSelectFromId/src/part/editor.vue +0 -260
- package/components/lib/bpmSelectFromId/src/part/reader.vue +0 -7
- package/components/lib/bpmSelectHouseOwner/index.js +0 -7
- package/components/lib/bpmSelectHouseOwner/src/main.vue +0 -102
- package/components/lib/bpmSelectHouseOwner/src/part/editor.vue +0 -101
- package/components/lib/bpmSelectHouseOwner/src/part/reader.vue +0 -17
- package/components/lib/bpmSelectIssue/index.js +0 -7
- package/components/lib/bpmSelectIssue/src/main.vue +0 -180
- package/components/lib/bpmSignature/index.js +0 -7
- package/components/lib/bpmSignature/src/main.vue +0 -248
- package/components/lib/bpmSubForm/index.js +0 -7
- package/components/lib/bpmSubForm/src/main.vue +0 -203
- package/components/lib/bpmText/index.ts +0 -13
- package/components/lib/bpmText/src/main.vue +0 -87
- package/components/lib/bpmText/src/part/editor.vue +0 -104
- package/components/lib/bpmText/src/part/reader.vue +0 -7
- package/components/lib/bpmTime/index.js +0 -7
- package/components/lib/bpmTime/src/main.vue +0 -83
- package/components/lib/bpmTime/src/part/editor.vue +0 -55
- package/components/lib/bpmTime/src/part/reader.vue +0 -24
- package/components/lib/demo/index.js +0 -7
- package/components/lib/demo/src/main.vue +0 -11
- package/components/lib/demo2/index.js +0 -7
- package/components/lib/demo2/src/main.vue +0 -11
- package/components/lib/field-const.js +0 -472
- package/components/lib/index.ts +0 -102
- package/components/lib/mixins/RemoteSelectReader.vue +0 -55
- package/components/lib/mixins/TextReader.vue +0 -22
- package/components/lib/net.js +0 -21
- package/components/lib/utils.js +0 -89
- package/components/mixins/field_base_mixin.vue +0 -188
- package/components/sfc.d.ts +0 -27
- package/components/vendor/draw.js +0 -240
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="select-from-id-editor">
|
|
3
|
-
<div>
|
|
4
|
-
<div @click="toOpen">{{ label }}</div>
|
|
5
|
-
</div>
|
|
6
|
-
<el-dialog
|
|
7
|
-
:visible.sync="opened"
|
|
8
|
-
:before-close="onHide"
|
|
9
|
-
@open="onOpen"
|
|
10
|
-
:title="fieldConf.name"
|
|
11
|
-
:fullscreen="true"
|
|
12
|
-
v-bind="$attrs"
|
|
13
|
-
custom-class="select-from-id-editor-dialog"
|
|
14
|
-
v-on="$listeners"
|
|
15
|
-
>
|
|
16
|
-
<div slot="title">
|
|
17
|
-
<div>
|
|
18
|
-
已选名单:
|
|
19
|
-
<el-tag
|
|
20
|
-
type="success"
|
|
21
|
-
v-show="index <= 5"
|
|
22
|
-
v-for="(userName, index) in selectedLabels"
|
|
23
|
-
:key="index"
|
|
24
|
-
>{{userName}}
|
|
25
|
-
<i class="fa fa-times-circle" @click="deleteSelected(index)"></i
|
|
26
|
-
></el-tag>
|
|
27
|
-
<el-button
|
|
28
|
-
:label="`查看全部${selectedLabels.length}`"
|
|
29
|
-
v-if="selectedLabels.length > 5"
|
|
30
|
-
>
|
|
31
|
-
<i class="fa fa-sort-desc" aria-hidden="true"></i>
|
|
32
|
-
<el-popover>
|
|
33
|
-
<div separator link>
|
|
34
|
-
<div
|
|
35
|
-
v-for="(itemName, index) in selectedLabels"
|
|
36
|
-
:key="index"
|
|
37
|
-
>
|
|
38
|
-
{{ itemName }}
|
|
39
|
-
<i
|
|
40
|
-
class="fa fa-times"
|
|
41
|
-
style="float: right; margin-left: 8px; font-size: 20px"
|
|
42
|
-
@click="deleteSelected(index)"
|
|
43
|
-
></i>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</el-popover>
|
|
47
|
-
</el-button>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<div class="select-box">
|
|
52
|
-
<div class="select-box-left">
|
|
53
|
-
<div class="title">选择应用</div>
|
|
54
|
-
<div>
|
|
55
|
-
<el-input
|
|
56
|
-
placeholder="请输入关键字搜索"
|
|
57
|
-
v-model="appKeyword"
|
|
58
|
-
class="input-with-select"
|
|
59
|
-
@change="debounceSearchApps"
|
|
60
|
-
:clearale="true"
|
|
61
|
-
>
|
|
62
|
-
</el-input>
|
|
63
|
-
</div>
|
|
64
|
-
<ul class="select-app">
|
|
65
|
-
<li
|
|
66
|
-
class="select-app-item"
|
|
67
|
-
v-for="item in apps"
|
|
68
|
-
@click="loadForms(item.value)"
|
|
69
|
-
:key="item.value"
|
|
70
|
-
:class="item.value == selectedApp ? 'active' : ''"
|
|
71
|
-
>
|
|
72
|
-
{{ item.label }}
|
|
73
|
-
</li>
|
|
74
|
-
</ul>
|
|
75
|
-
</div>
|
|
76
|
-
<div class="select-box-right" v-if="selectedApp">
|
|
77
|
-
<div class="title">表单选择</div>
|
|
78
|
-
<div>
|
|
79
|
-
<el-input
|
|
80
|
-
placeholder="请输入关键字搜索"
|
|
81
|
-
v-model="formKeyword"
|
|
82
|
-
class="input-with-select"
|
|
83
|
-
@change="debounceSearch"
|
|
84
|
-
:clearale="true"
|
|
85
|
-
>
|
|
86
|
-
</el-input>
|
|
87
|
-
</div>
|
|
88
|
-
<ul class="select-form">
|
|
89
|
-
<li class="select-form-item" v-for="item in formList" :key="item.value">
|
|
90
|
-
<el-checkbox v-if="isMultiple" v-model="curVal" :label="item.value">{{
|
|
91
|
-
item.label
|
|
92
|
-
}}</el-checkbox>
|
|
93
|
-
<el-radio v-else v-model="curVal" :label="item.value">{{
|
|
94
|
-
item.label
|
|
95
|
-
}}</el-radio>
|
|
96
|
-
</li>
|
|
97
|
-
</ul>
|
|
98
|
-
</div>
|
|
99
|
-
<div v-else class="select-box-right">
|
|
100
|
-
先选择表单
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<span slot="footer" class="dialog-footer">
|
|
105
|
-
<el-button type="primary" @click="onSubmit">确 定</el-button>
|
|
106
|
-
</span>
|
|
107
|
-
</el-dialog>
|
|
108
|
-
</div>
|
|
109
|
-
</template>
|
|
110
|
-
<script>
|
|
111
|
-
import Vue from "vue";
|
|
112
|
-
import _ from "lodash";
|
|
113
|
-
import { Dialog } from "element-ui";
|
|
114
|
-
Vue.use(Dialog);
|
|
115
|
-
export default {
|
|
116
|
-
props: ["value", "fieldConf", "row", "formName", "orgInfo", "isMultiple"],
|
|
117
|
-
data() {
|
|
118
|
-
return {
|
|
119
|
-
curVal: [],
|
|
120
|
-
apps: [],
|
|
121
|
-
label: "",
|
|
122
|
-
opened: false,
|
|
123
|
-
debounceSearchApps: _.debounce(_.bind(this.loadApps, this), 150, {
|
|
124
|
-
trailing: true,
|
|
125
|
-
leading: false,
|
|
126
|
-
}),
|
|
127
|
-
debounceSearch: _.debounce(_.bind(this.search, this), 150, {
|
|
128
|
-
trailing: true,
|
|
129
|
-
leading: false,
|
|
130
|
-
}),
|
|
131
|
-
selectedLabels: [],
|
|
132
|
-
formList: [],
|
|
133
|
-
appKeyword: "",
|
|
134
|
-
selectedApp: "",
|
|
135
|
-
formKeyword: "",
|
|
136
|
-
};
|
|
137
|
-
},
|
|
138
|
-
watch: {
|
|
139
|
-
curVal() {
|
|
140
|
-
this.loadSelectedLabels();
|
|
141
|
-
},
|
|
142
|
-
value() {
|
|
143
|
-
this.loadRemoteLabel()
|
|
144
|
-
this.curVal = this.value ? this.value : this.isMultiple ? [] : "";
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
computed: {
|
|
148
|
-
placeholder() {
|
|
149
|
-
return this.fieldConf.desc || this.fieldConf.name;
|
|
150
|
-
},
|
|
151
|
-
maxCount() {
|
|
152
|
-
return _.get(this.fieldConf, "check.max_count");
|
|
153
|
-
},
|
|
154
|
-
titleStyle() {
|
|
155
|
-
let conf = this.fieldConf;
|
|
156
|
-
let range_display = _.get(conf, "range_remote.range_display.title");
|
|
157
|
-
return {
|
|
158
|
-
fontSize: _.get(range_display, "size", 16) + "px",
|
|
159
|
-
color: _.get(range_display, "color", "#333"),
|
|
160
|
-
};
|
|
161
|
-
},
|
|
162
|
-
fieldStyleMap() {
|
|
163
|
-
let conf = this.fieldConf;
|
|
164
|
-
let fieldsStyle = _.get(conf, "range_remote.range_display.fields");
|
|
165
|
-
return _.keyBy(fieldsStyle, "field");
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
created () {
|
|
169
|
-
this.curVal = this.isMultiple ? [] : ""
|
|
170
|
-
},
|
|
171
|
-
mounted() {
|
|
172
|
-
this.curVal = this.value ? this.value : this.isMultiple ? [] : "";
|
|
173
|
-
this.loadRemoteLabel()
|
|
174
|
-
},
|
|
175
|
-
methods: {
|
|
176
|
-
async loadApps() {
|
|
177
|
-
let appKeyword = this.appKeyword;
|
|
178
|
-
let formName = this.formName;
|
|
179
|
-
let fieldId = _.get(this.fieldConf, "id");
|
|
180
|
-
let result = await zj.net.w.noapi({
|
|
181
|
-
url: `/app_flow/v1/papi/dm/assist_field/select_form_id/${formName}/${fieldId}/search_left_title/?q=${appKeyword}`,
|
|
182
|
-
params: this.orgInfo
|
|
183
|
-
});
|
|
184
|
-
this.apps = _.map(result.data, item=>{
|
|
185
|
-
return {
|
|
186
|
-
value: item[0],
|
|
187
|
-
label: item[1]
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
async search() {
|
|
192
|
-
let keyword = this.formKeyword;
|
|
193
|
-
let formName = this.formName;
|
|
194
|
-
let fieldId = _.get(this.fieldConf, "id");
|
|
195
|
-
let leftId = this.selectedApp;
|
|
196
|
-
let result = await zj.net.w.noapi({
|
|
197
|
-
url: `/app_flow/v1/papi/dm/assist_field/select_form_id/${formName}/${fieldId}/search_right_title/?q=${keyword}&left=${leftId}`,
|
|
198
|
-
params: this.orgInfo
|
|
199
|
-
});
|
|
200
|
-
this.formList = _.map(result.data, item=>{
|
|
201
|
-
return {
|
|
202
|
-
value: item[0],
|
|
203
|
-
label: item[1]
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
},
|
|
207
|
-
loadForms(app){
|
|
208
|
-
this.selectedApp = app
|
|
209
|
-
this.debounceSearch();
|
|
210
|
-
},
|
|
211
|
-
async loadSelectedLabels() {
|
|
212
|
-
let values = this.curVal;
|
|
213
|
-
let fieldId = _.get(this.fieldConf, "id");
|
|
214
|
-
if (!_.isEmpty(values)) {
|
|
215
|
-
let result = await zj.net.w.noapi({
|
|
216
|
-
url: `/app_flow/v1/papi/dm/assist_field/${this.formName}/${fieldId}/list_title/?values=${values}`,
|
|
217
|
-
params: this.orgInfo,
|
|
218
|
-
});
|
|
219
|
-
this.selectedLabels = _.cloneDeep(result);
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
async loadRemoteLabel() {
|
|
223
|
-
let values = this.value;
|
|
224
|
-
let fieldId = _.get(this.fieldConf, "id");
|
|
225
|
-
if (!_.isEmpty(values)) {
|
|
226
|
-
let result = await zj.net.w.noapi({
|
|
227
|
-
url: `/app_flow/v1/papi/dm/assist_field/${this.formName}/${fieldId}/list_title/?values=${values}`,
|
|
228
|
-
params: this.orgInfo,
|
|
229
|
-
});
|
|
230
|
-
let data = _.map(result.data)
|
|
231
|
-
this.label = _.join(data, ",");
|
|
232
|
-
}
|
|
233
|
-
else{
|
|
234
|
-
this.label = "未选择"
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
onHide() {
|
|
238
|
-
this.opened = false
|
|
239
|
-
},
|
|
240
|
-
onOpen() {
|
|
241
|
-
this.loadApps();
|
|
242
|
-
},
|
|
243
|
-
isChecked(val) {
|
|
244
|
-
return _.includes(this.curVal, val);
|
|
245
|
-
},
|
|
246
|
-
onSubmit() {
|
|
247
|
-
this.$emit("input", this.curVal);
|
|
248
|
-
this.opened = false
|
|
249
|
-
},
|
|
250
|
-
toOpen(){
|
|
251
|
-
this.opened = true
|
|
252
|
-
},
|
|
253
|
-
deleteSelected(index) {
|
|
254
|
-
let vals = this.curVal;
|
|
255
|
-
_.pullAt(vals, index);
|
|
256
|
-
this.curVal = _.cloneDeep(vals);
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
|
-
};
|
|
260
|
-
</script>
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
class="bpm-select-house-owner"
|
|
4
|
-
v-model="curVal"
|
|
5
|
-
:is="curComponent"
|
|
6
|
-
:fieldConf="fieldConf"
|
|
7
|
-
:row="row"
|
|
8
|
-
:mode="mode"
|
|
9
|
-
:uiType="uiType"
|
|
10
|
-
:orgInfo="orgInfo"
|
|
11
|
-
:formName="formName"
|
|
12
|
-
:isMultiple="isMultiple"
|
|
13
|
-
v-bind="$attrs"
|
|
14
|
-
v-on="$listeners"
|
|
15
|
-
>
|
|
16
|
-
</component>
|
|
17
|
-
</template>
|
|
18
|
-
<script>
|
|
19
|
-
import editorComponent from "./part/editor.vue";
|
|
20
|
-
import readerComponent from "./part/reader.vue";
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
name: "bpmSelectHouseOwner",
|
|
24
|
-
components: {
|
|
25
|
-
editorComponent,
|
|
26
|
-
readerComponent
|
|
27
|
-
},
|
|
28
|
-
props: {
|
|
29
|
-
value: {
|
|
30
|
-
type: [String, Array],
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
fieldConf: {
|
|
34
|
-
type: Object,
|
|
35
|
-
default() {
|
|
36
|
-
return {};
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
row: {
|
|
40
|
-
type: Object,
|
|
41
|
-
default() {
|
|
42
|
-
return {};
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
mode: {
|
|
46
|
-
type: String,
|
|
47
|
-
default() {
|
|
48
|
-
return "view";
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
uiType: {
|
|
52
|
-
type: String,
|
|
53
|
-
default() {
|
|
54
|
-
return "default";
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
orgInfo: {
|
|
58
|
-
type: Object,
|
|
59
|
-
},
|
|
60
|
-
formName:{
|
|
61
|
-
type: String
|
|
62
|
-
},
|
|
63
|
-
isMultiple: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default() {
|
|
66
|
-
return false;
|
|
67
|
-
},
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
data () {
|
|
71
|
-
return {
|
|
72
|
-
curVal: ""
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
computed: {
|
|
76
|
-
curComponent() {
|
|
77
|
-
if (this.mode == "view") {
|
|
78
|
-
return readerComponent;
|
|
79
|
-
} else {
|
|
80
|
-
return editorComponent;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
watch: {
|
|
85
|
-
curVal(val){
|
|
86
|
-
this.$emit("input", val)
|
|
87
|
-
this.$emit("change", val)
|
|
88
|
-
},
|
|
89
|
-
value(){
|
|
90
|
-
this.curVal = this.value
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
mounted () {
|
|
95
|
-
this.curVal = this.value
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
</script>
|
|
99
|
-
|
|
100
|
-
<style>
|
|
101
|
-
@import "../../../css/bpmSelectFromId.less";
|
|
102
|
-
</style>
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="house-owner">
|
|
3
|
-
<el-autocomplete
|
|
4
|
-
class="bpm-autocomplete"
|
|
5
|
-
v-model="curVal.name"
|
|
6
|
-
:fetch-suggestions="querySearch"
|
|
7
|
-
:placeholder="placeholder"
|
|
8
|
-
@select="handleSelect"
|
|
9
|
-
>
|
|
10
|
-
<template slot-scope="{ item }">
|
|
11
|
-
<div class="name">{{ item.value }}</div>
|
|
12
|
-
<span class="addr">{{ item.phone }}</span>
|
|
13
|
-
</template>
|
|
14
|
-
</el-autocomplete>
|
|
15
|
-
<el-input
|
|
16
|
-
style="margin-top: 10px; user-select: text"
|
|
17
|
-
class="bpm-default-input owner-phone"
|
|
18
|
-
v-model="curVal.phone"
|
|
19
|
-
:placeholder="$z('请输入业主电话', 'b2.common.select_owner_number')"
|
|
20
|
-
>
|
|
21
|
-
</el-input>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
<script>
|
|
25
|
-
import Vue from "vue";
|
|
26
|
-
import _ from "lodash";
|
|
27
|
-
import { Autocomplete } from "element-ui";
|
|
28
|
-
Vue.use(Autocomplete);
|
|
29
|
-
export default {
|
|
30
|
-
props: ["value", "fieldConf", "row", "formName", "orgInfo", "isMultiple", "selectList"],
|
|
31
|
-
data() {
|
|
32
|
-
return {
|
|
33
|
-
placeholder: zj.z("请选择或输入业主名称", "b2.common.select_owner"),
|
|
34
|
-
curValue: {
|
|
35
|
-
id: "",
|
|
36
|
-
name: "",
|
|
37
|
-
phone: "",
|
|
38
|
-
},
|
|
39
|
-
restaurants: [],
|
|
40
|
-
firstListVal: ""
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
watch: {
|
|
44
|
-
["value"]: {
|
|
45
|
-
handler(val) {
|
|
46
|
-
this.curValue = val ? val : {
|
|
47
|
-
id: null,
|
|
48
|
-
name: "",
|
|
49
|
-
phone: ""
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
deep: true,
|
|
53
|
-
},
|
|
54
|
-
curValue(val){
|
|
55
|
-
this.$emit("input", val)
|
|
56
|
-
},
|
|
57
|
-
["selectList"](val) {
|
|
58
|
-
let isEVCFirstElem =
|
|
59
|
-
_.get(this.fieldConf, "default.value.type") == "EVCFirstElem";
|
|
60
|
-
if (
|
|
61
|
-
isEVCFirstElem &&
|
|
62
|
-
(!this.curValue || (this.curValue && !this.curValue.name))
|
|
63
|
-
)
|
|
64
|
-
this.curValue = _.get(val, "0", null);
|
|
65
|
-
this.firstListVal = _.get(val, "0", null);
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
methods: {
|
|
70
|
-
querySearch(queryString, cb) {
|
|
71
|
-
var restaurants = [];
|
|
72
|
-
_.each(this.selectList, (item) => {
|
|
73
|
-
restaurants.push({
|
|
74
|
-
value: item.name,
|
|
75
|
-
phone: item.phone,
|
|
76
|
-
id: item.id,
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
var results = queryString
|
|
80
|
-
? restaurants.filter(this.createFilter(queryString))
|
|
81
|
-
: restaurants;
|
|
82
|
-
// 调用 callback 返回建议列表的数据
|
|
83
|
-
cb(results);
|
|
84
|
-
},
|
|
85
|
-
createFilter(queryString) {
|
|
86
|
-
return (restaurant) => {
|
|
87
|
-
return (
|
|
88
|
-
restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
|
|
89
|
-
0
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
handleSelect(item) {
|
|
94
|
-
let select = _.cloneDeep(item);
|
|
95
|
-
select.name = select.value;
|
|
96
|
-
delete select.value;
|
|
97
|
-
this.curValue = select;
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
</script>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<span v-if="!value" :title="value" class="qs-content">{{
|
|
4
|
-
"--"
|
|
5
|
-
}}</span>
|
|
6
|
-
<div v-else class="qs-content">
|
|
7
|
-
<div>{{ value.name }}</div>
|
|
8
|
-
<div style="margin-top: 15px">{{ value.phone }}</div>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
export default {
|
|
15
|
-
props: ["type", "value", "fieldConf", "row"],
|
|
16
|
-
};
|
|
17
|
-
</script>
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bpm-select-issue q-field-no-input">
|
|
3
|
-
<div
|
|
4
|
-
@click="toOpen()"
|
|
5
|
-
style="display: flex; max-width: 360px; cursor: pointer;"
|
|
6
|
-
>
|
|
7
|
-
<div class="select-user-label" style="flex: 1;">
|
|
8
|
-
{{ (value.length || mode === 'view') ?
|
|
9
|
-
$z("已选问题", "b2.common.selected_question") + ' ' + value.length :
|
|
10
|
-
$z("选择问题", "b2.common.choice_question") }}
|
|
11
|
-
</div>
|
|
12
|
-
<i aria-hidden="true" class="fa fa-angle-right icon-right"></i>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<el-dialog
|
|
16
|
-
:title="searchTitle"
|
|
17
|
-
:visible.sync="opened"
|
|
18
|
-
width="90%"
|
|
19
|
-
:fullscreen="true"
|
|
20
|
-
custom-class="bpm-select-issue"
|
|
21
|
-
@close="toClose">
|
|
22
|
-
<issue-list
|
|
23
|
-
ref="issue_list"
|
|
24
|
-
:category_cls="category_cls"
|
|
25
|
-
:mode="issueMode"
|
|
26
|
-
:selectItems="selectedVals"
|
|
27
|
-
@select="selectIssueList"
|
|
28
|
-
></issue-list>
|
|
29
|
-
|
|
30
|
-
<div v-if="mode === 'edit'" slot="footer" class="modal-footer">
|
|
31
|
-
<el-button @click="toClose">{{ $z('取消', 'c.cancel') }}</el-button>
|
|
32
|
-
<el-button type="primary" @click="onSubmit">{{ $z('确定', 'c.confirm') }}</el-button>
|
|
33
|
-
</div>
|
|
34
|
-
</el-dialog>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
<script>
|
|
38
|
-
export default {
|
|
39
|
-
name: "BpmSelectIssue",
|
|
40
|
-
props: {
|
|
41
|
-
value: {
|
|
42
|
-
type: Array,
|
|
43
|
-
default () {
|
|
44
|
-
return []
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
type: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: 'MulSelectIssue'
|
|
50
|
-
},
|
|
51
|
-
fieldConf: {
|
|
52
|
-
type: Object,
|
|
53
|
-
default() {
|
|
54
|
-
return {};
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
mode: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: 'view' // view, edit
|
|
60
|
-
},
|
|
61
|
-
uiType: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: 'default' // default,table,form,search
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
data() {
|
|
67
|
-
return {
|
|
68
|
-
// 结合 houseqm3/list 和原组件,有3个值:view, add, selected
|
|
69
|
-
issueMode: 'view',
|
|
70
|
-
searchTitle: zj.z("已选问题", "b2.common.selected_question"),
|
|
71
|
-
|
|
72
|
-
module_loaded: false,
|
|
73
|
-
|
|
74
|
-
loading: false,
|
|
75
|
-
opened: false,
|
|
76
|
-
selectedVals: [],
|
|
77
|
-
|
|
78
|
-
category_cls: 0,
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
|
-
watch: {
|
|
82
|
-
value (val) {
|
|
83
|
-
this.selectedVals = _.clone(val);
|
|
84
|
-
},
|
|
85
|
-
mode (val) {
|
|
86
|
-
if (val === 'view') {
|
|
87
|
-
this.issueMode = 'view'
|
|
88
|
-
this.searchTitle = zj.z("已选问题", "b2.common.selected_question")
|
|
89
|
-
} else {
|
|
90
|
-
this.issueMode = 'add'
|
|
91
|
-
this.searchTitle = zj.z("选择问题", "b2.common.choice_question")
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
computed: {
|
|
96
|
-
maxCount() {
|
|
97
|
-
return _.hasIn(this.fieldConf, "check.max_count")
|
|
98
|
-
? _.get(this.fieldConf, "check.max_count")
|
|
99
|
-
: 100;
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
mounted() {
|
|
103
|
-
//动态跨模块加载页面组件
|
|
104
|
-
setTimeout(async () => {
|
|
105
|
-
if (this.fieldConf.issue_src == "building_qm") {
|
|
106
|
-
await zj.ui.loadPageComponent("IssueList", "buildingqm3", "list");
|
|
107
|
-
this.category_cls = 23;
|
|
108
|
-
console.log("动态加载安全检查模块组件");
|
|
109
|
-
} else {
|
|
110
|
-
await zj.ui.loadPageComponent("IssueList", "houseqm3", "list");
|
|
111
|
-
this.category_cls = 28;
|
|
112
|
-
console.log("动态加载分户验收模块组件");
|
|
113
|
-
}
|
|
114
|
-
this.module_loaded = true;
|
|
115
|
-
}, 4);
|
|
116
|
-
// TODO title 哪里来
|
|
117
|
-
// if (this.title) this.searchTitle = this.title;
|
|
118
|
-
},
|
|
119
|
-
methods: {
|
|
120
|
-
selectIssueList(data) {
|
|
121
|
-
this.selectedVals = _.clone(data);
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
toClose() {
|
|
125
|
-
this.opened = false;
|
|
126
|
-
this.selectedVals = [];
|
|
127
|
-
},
|
|
128
|
-
toOpen() {
|
|
129
|
-
if (!this.module_loaded) return;
|
|
130
|
-
|
|
131
|
-
this.opened = true;
|
|
132
|
-
|
|
133
|
-
this.$nextTick(() => {
|
|
134
|
-
setTimeout(() => {
|
|
135
|
-
this.setDefaultSelected();
|
|
136
|
-
}, 4);
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
setDefaultSelected() {
|
|
141
|
-
this.selectedVals = this.value ? _.cloneDeep(this.value) : []
|
|
142
|
-
if (this.$refs.issue_list) {
|
|
143
|
-
this.$refs.issue_list.selectedIds = _.clone(this.selectedVals);
|
|
144
|
-
this.$refs.issue_list.loadIssueList();
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
onSubmit() {
|
|
148
|
-
this.$emit('input', this.selectedVals)
|
|
149
|
-
this.$emit('change', this.selectedVals)
|
|
150
|
-
|
|
151
|
-
this.toClose();
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
}
|
|
155
|
-
</script>
|
|
156
|
-
|
|
157
|
-
<style lang="less">
|
|
158
|
-
.bpm-select-issue {
|
|
159
|
-
.icon-right {
|
|
160
|
-
color: #c1c1c1;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.select-user-label {
|
|
164
|
-
overflow-x: auto;
|
|
165
|
-
white-space: normal;
|
|
166
|
-
// color: #a4a4a4;
|
|
167
|
-
}
|
|
168
|
-
.select-user-label::-webkit-scrollbar {
|
|
169
|
-
display: none;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
&.el-dialog {
|
|
173
|
-
.el-dialog__body {
|
|
174
|
-
height: calc(100vh - 54px - 70px);
|
|
175
|
-
box-sizing: border-box;
|
|
176
|
-
overflow: auto;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
</style>
|