@zhijiancloud/bpm 0.0.6 → 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/dist/bpmAudit.umd.js +1 -1
- package/dist/bpmDateTime.umd.js +1 -1
- package/dist/bpmField.umd.js +7 -1
- package/dist/bpmField.umd.js.LICENSE.txt +2 -0
- package/dist/bpmFieldsFilter.umd.js +8 -0
- package/dist/bpmFieldsFilter.umd.js.LICENSE.txt +1 -0
- package/dist/bpmFormField.umd.js +8 -0
- package/dist/bpmFormField.umd.js.LICENSE.txt +11 -0
- package/dist/bpmMulFile.umd.js +1 -1
- package/dist/bpmMulImage.umd.js +1 -1
- package/dist/bpmNumber.umd.js +1 -1
- package/dist/bpmSelect.umd.js +1 -1
- package/dist/bpmSelectCheckItem.umd.js +1 -1
- package/dist/bpmSelectEntranceForm.umd.js +8 -0
- package/dist/bpmSelectEntranceForm.umd.js.LICENSE.txt +1 -0
- package/dist/bpmSelectFromField.umd.js +1 -1
- package/dist/bpmSelectFromForm.umd.js +1 -1
- package/dist/bpmSelectHouseOwner.umd.js +1 -0
- package/dist/bpmSelectIssue.umd.js +1 -0
- package/dist/bpmSignature.umd.js +2 -0
- package/dist/bpmSignature.umd.js.LICENSE.txt +9 -0
- package/dist/bpmSubForm.umd.js +1 -1
- package/dist/bpmText.umd.js +1 -1
- package/dist/bpmTime.umd.js +1 -1
- package/dist/css/bpmAudit.css +1 -0
- package/dist/css/bpmMulFile.css +1 -1
- package/dist/css/bpmSelectEntranceForm.css +1 -0
- package/dist/css/bpmSelectHouseOwner.css +1 -0
- package/dist/css/bpmSignature.css +1 -0
- package/dist/css/bpmText.css +1 -1
- package/dist/css/common.css +1 -0
- package/dist/css/index.css +1 -1
- package/dist/demo.umd.js +1 -1
- package/dist/demo2.umd.js +1 -1
- package/dist/index.umd.js +7 -1
- package/dist/index.umd.js.LICENSE.txt +2 -0
- package/package.json +26 -20
- package/CHANGELOG.md +0 -27
- package/components/.DS_Store +0 -0
- package/components/css/bpmMulFile.less +0 -58
- package/components/css/bpmSelectCheckItem.less +0 -4
- package/components/css/bpmSelectFromForm.less +0 -10
- package/components/css/bpmSelectFromId.less +0 -33
- package/components/css/bpmText.less +0 -49
- package/components/css/demo.less +0 -3
- package/components/css/demo2.less +0 -3
- package/components/css/index.less +0 -3
- package/components/lib/bpmAudit/index.js +0 -7
- package/components/lib/bpmAudit/src/main.vue +0 -86
- package/components/lib/bpmAudit/src/part/editor.vue +0 -316
- package/components/lib/bpmAudit/src/part/reader.vue +0 -217
- 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 -124
- 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 -176
- package/components/lib/bpmMulFile/index.js +0 -7
- package/components/lib/bpmMulFile/src/main.vue +0 -86
- 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 -303
- package/components/lib/bpmMulImage/index.js +0 -7
- package/components/lib/bpmMulImage/src/main.vue +0 -87
- package/components/lib/bpmMulImage/src/part/editor.vue +0 -445
- 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 -171
- 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 -48
- 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 -44
- 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 -107
- package/components/lib/bpmSelectCheckItem/src/part/reader.vue +0 -7
- package/components/lib/bpmSelectFromField/index.js +0 -7
- package/components/lib/bpmSelectFromField/src/main.vue +0 -97
- package/components/lib/bpmSelectFromField/src/part/editor.vue +0 -82
- 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 -181
- 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/bpmSubForm/index.js +0 -7
- package/components/lib/bpmSubForm/src/main.vue +0 -181
- 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 -54
- 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 -469
- package/components/lib/index.ts +0 -72
- 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/sfc.d.ts +0 -27
- package/dist/bpmDateTime.umd.js.LICENSE.txt +0 -38
- package/dist/bpmNumber.umd.js.LICENSE.txt +0 -38
- package/dist/bpmSelect.umd.js.LICENSE.txt +0 -38
- package/dist/bpmSelectUser.umd.js +0 -1
- package/dist/bpmText.umd.js.LICENSE.txt +0 -38
- package/dist/bpmTime.umd.js.LICENSE.txt +0 -38
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bpm-select-edit">
|
|
3
|
-
<el-select
|
|
4
|
-
v-model="curVal"
|
|
5
|
-
:placeholder="placeholder"
|
|
6
|
-
:multiple="isMultiple"
|
|
7
|
-
clearable
|
|
8
|
-
filterable
|
|
9
|
-
v-bind="$attrs"
|
|
10
|
-
v-on="$listeners"
|
|
11
|
-
@change="onChange"
|
|
12
|
-
>
|
|
13
|
-
<el-option
|
|
14
|
-
v-for="item in options"
|
|
15
|
-
:key="item.value"
|
|
16
|
-
:label="item.label"
|
|
17
|
-
:value="item.value"
|
|
18
|
-
>
|
|
19
|
-
</el-option>
|
|
20
|
-
</el-select>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script>
|
|
25
|
-
import _ from "lodash";
|
|
26
|
-
|
|
27
|
-
import Vue from "vue";
|
|
28
|
-
|
|
29
|
-
import { Select, Option } from "element-ui";
|
|
30
|
-
|
|
31
|
-
Vue.use(Select);
|
|
32
|
-
Vue.use(Option);
|
|
33
|
-
|
|
34
|
-
export default {
|
|
35
|
-
props: ["value", "fieldConf", "row", "isMultiple"],
|
|
36
|
-
data() {
|
|
37
|
-
return {
|
|
38
|
-
curVal: "",
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
watch: {
|
|
42
|
-
value() {
|
|
43
|
-
this.curVal = this.value ? this.value : this.isMultiple ? [] : "";
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
computed: {
|
|
48
|
-
options() {
|
|
49
|
-
let rangeEnum = _.get(this.fieldConf, "range_enum");
|
|
50
|
-
return _.map(rangeEnum, (item) => {
|
|
51
|
-
return {
|
|
52
|
-
value: _.get(item, "0"),
|
|
53
|
-
label: _.get(item, "1"),
|
|
54
|
-
color: _.get(item, "2"),
|
|
55
|
-
};
|
|
56
|
-
});
|
|
57
|
-
},
|
|
58
|
-
placeholder() {
|
|
59
|
-
return this.fieldConf.desc || this.fieldConf.name;
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
created () {
|
|
63
|
-
this.curVal = this.isMultiple ? [] : ""
|
|
64
|
-
},
|
|
65
|
-
mounted() {
|
|
66
|
-
this.curVal = this.value ? this.value : this.isMultiple ? [] : "";
|
|
67
|
-
},
|
|
68
|
-
methods: {
|
|
69
|
-
onChange(val){
|
|
70
|
-
this.$emit("input", val);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
</script>
|
|
75
|
-
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span :title="label" :class="isButton && value ? 'btn-select' : ''">{{label}}</span>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import _ from "lodash"
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
props: ['value','fieldConf','row'],
|
|
10
|
-
computed: {
|
|
11
|
-
_value(){
|
|
12
|
-
return _.isArray(this.value) ? this.value : [this.value]
|
|
13
|
-
},
|
|
14
|
-
rangeEnumMap(){
|
|
15
|
-
let rangeEnum = _.get(this.fieldConf, "range_enum")
|
|
16
|
-
let map = {}
|
|
17
|
-
_.each(rangeEnum, item=>{
|
|
18
|
-
_.set(map, _.get(item, "0"), _.get(item, "1"))
|
|
19
|
-
})
|
|
20
|
-
this.setColorMap()
|
|
21
|
-
return map
|
|
22
|
-
},
|
|
23
|
-
label(){
|
|
24
|
-
let labels = _.map(this._value, val=>{
|
|
25
|
-
return _.get(this.rangeEnumMap, val)
|
|
26
|
-
})
|
|
27
|
-
return _.isEmpty(labels) ? "未指定" : _.join(labels, ", ")
|
|
28
|
-
// return _.isEmpty(labels) ? zj.z("未指定", "b2.common. not_specified") : _.join(labels, ", ")
|
|
29
|
-
},
|
|
30
|
-
isButton(){
|
|
31
|
-
return _.get(this.fieldConf, "style") == "button";
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
methods: {
|
|
35
|
-
setColorMap(){
|
|
36
|
-
let rangeEnum = _.get(this.fieldConf, "range_enum")
|
|
37
|
-
this.colorMap = {}
|
|
38
|
-
_.each(rangeEnum, item=>{
|
|
39
|
-
_.set(this.colorMap, _.get(item, "0"), _.get(item, "2"))
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</script>
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
class="bpm-select-check-item"
|
|
4
|
-
v-model="curVal"
|
|
5
|
-
:is="curComponent"
|
|
6
|
-
:fieldConf="fieldConf"
|
|
7
|
-
:row="row"
|
|
8
|
-
:orgInfo="orgInfo"
|
|
9
|
-
:formName="formName"
|
|
10
|
-
:mode="mode"
|
|
11
|
-
:isMultiple="isMultiple"
|
|
12
|
-
:uiType="uiType"
|
|
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: "BpmSelectCheckItem",
|
|
24
|
-
components: {
|
|
25
|
-
editorComponent,
|
|
26
|
-
readerComponent
|
|
27
|
-
},
|
|
28
|
-
props: {
|
|
29
|
-
value: {
|
|
30
|
-
type: [String, Array]
|
|
31
|
-
},
|
|
32
|
-
fieldConf: {
|
|
33
|
-
type: Object,
|
|
34
|
-
default() {
|
|
35
|
-
return {};
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
row: {
|
|
39
|
-
type: Object,
|
|
40
|
-
default() {
|
|
41
|
-
return {};
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
mode: {
|
|
45
|
-
type: String,
|
|
46
|
-
default() {
|
|
47
|
-
return "view";
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
uiType: {
|
|
51
|
-
type: String,
|
|
52
|
-
default() {
|
|
53
|
-
return "default";
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
orgInfo: {
|
|
57
|
-
type: Object,
|
|
58
|
-
},
|
|
59
|
-
formName:{
|
|
60
|
-
type: String
|
|
61
|
-
},
|
|
62
|
-
isMultiple: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default() {
|
|
65
|
-
return false;
|
|
66
|
-
},
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
data () {
|
|
70
|
-
return {
|
|
71
|
-
curVal: ""
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
computed: {
|
|
75
|
-
curComponent() {
|
|
76
|
-
if (this.mode == "view") {
|
|
77
|
-
return readerComponent;
|
|
78
|
-
} else {
|
|
79
|
-
return editorComponent;
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
watch: {
|
|
84
|
-
curVal(val){
|
|
85
|
-
this.$emit("input", val)
|
|
86
|
-
this.$emit("change", val)
|
|
87
|
-
},
|
|
88
|
-
value(){
|
|
89
|
-
this.curVal = this.value
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
mounted () {
|
|
94
|
-
this.curVal = this.value
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
</script>
|
|
98
|
-
|
|
99
|
-
<style>
|
|
100
|
-
@import "../../../css/bpmSelectCheckItem.less";
|
|
101
|
-
</style>
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-select
|
|
4
|
-
style="width: 100%"
|
|
5
|
-
popper-class="scaffold-select-tree"
|
|
6
|
-
v-model="curVal"
|
|
7
|
-
:multiple="isMultiple"
|
|
8
|
-
:placeholder="placeholder"
|
|
9
|
-
:multiple-limit="maxCount"
|
|
10
|
-
@change="onChange"
|
|
11
|
-
>
|
|
12
|
-
<el-tree lazy :load="loadNode" node-key="value">
|
|
13
|
-
<el-option
|
|
14
|
-
slot-scope="{ node }"
|
|
15
|
-
:value="node.data.value"
|
|
16
|
-
:label="node.label"
|
|
17
|
-
>
|
|
18
|
-
<span style="padding-right: 30px; max-width: 500px; overflow: hidden">
|
|
19
|
-
{{ node.label }}
|
|
20
|
-
</span>
|
|
21
|
-
</el-option>
|
|
22
|
-
</el-tree>
|
|
23
|
-
</el-select>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
<script>
|
|
27
|
-
import Vue from "vue";
|
|
28
|
-
import _ from "lodash";
|
|
29
|
-
import { Tree, Select, Option } from "element-ui";
|
|
30
|
-
Vue.use(Tree);
|
|
31
|
-
Vue.use(Select);
|
|
32
|
-
Vue.use(Option);
|
|
33
|
-
export default {
|
|
34
|
-
props: ["value", "fieldConf", "row", "formName", "orgInfo", "isMultiple"],
|
|
35
|
-
data() {
|
|
36
|
-
return {
|
|
37
|
-
curVal: "",
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
watch: {
|
|
41
|
-
value() {
|
|
42
|
-
this.curVal = this.value ? this.value : this.isMultiple ? [] : "";
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
|
-
placeholder() {
|
|
47
|
-
return this.fieldConf.desc || this.fieldConf.name;
|
|
48
|
-
},
|
|
49
|
-
maxCount() {
|
|
50
|
-
return _.get(this.config, "check.max_count");
|
|
51
|
-
},
|
|
52
|
-
tickStrategy() {
|
|
53
|
-
return _.get(this.config, "tree_select", "all") == "leaf_only"
|
|
54
|
-
? "leaf-filtered"
|
|
55
|
-
: "strict";
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
created() {
|
|
59
|
-
this.curVal = this.isMultiple ? [] : "";
|
|
60
|
-
},
|
|
61
|
-
mounted() {
|
|
62
|
-
this.curVal = this.value ? this.value : this.isMultiple ? [] : "";
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
async loadNode(node, resolve) {
|
|
66
|
-
let fieldId = _.get(this.fieldConf, "id");
|
|
67
|
-
let formName = this.formName;
|
|
68
|
-
let params = {
|
|
69
|
-
father: node.level === 0 ? "" : node.data.value || "",
|
|
70
|
-
};
|
|
71
|
-
params = _.merge(params, this.orgInfo);
|
|
72
|
-
let result = await zj.net.w.noapi({
|
|
73
|
-
url: `/app_flow/v1/papi/dm/assist_tree_field/${formName}/${fieldId}/search_title/`,
|
|
74
|
-
params,
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
let list = this.transformResultToTree(result.data);
|
|
78
|
-
resolve(list);
|
|
79
|
-
},
|
|
80
|
-
transformResultToTree(items) {
|
|
81
|
-
console.log("fieldConf", this.fieldConf)
|
|
82
|
-
let type = _.get(this.fieldConf, "type");
|
|
83
|
-
if (type == "SelectCheckItem" || type == "MulSelectCheckItem") {
|
|
84
|
-
return _.map(items, (item) => {
|
|
85
|
-
return {
|
|
86
|
-
value: item[0],
|
|
87
|
-
lazy: item[2],
|
|
88
|
-
label: item[1],
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
if (type == "SelectSort" || type == "MulSelectSort") {
|
|
93
|
-
return _.map(items, (item) => {
|
|
94
|
-
return {
|
|
95
|
-
value: item.value,
|
|
96
|
-
lazy: item.lazy,
|
|
97
|
-
label: item.label,
|
|
98
|
-
};
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
onChange(val) {
|
|
103
|
-
this.$emit("input", val);
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
</script>
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
class="bpm-select-form-field"
|
|
4
|
-
v-model="curVal"
|
|
5
|
-
:is="curComponent"
|
|
6
|
-
:fieldConf="fieldConf"
|
|
7
|
-
:row="row"
|
|
8
|
-
:mode="mode"
|
|
9
|
-
:orgInfo="orgInfo"
|
|
10
|
-
:formName="formName"
|
|
11
|
-
:uiType="uiType"
|
|
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: "BpmSelectFromField",
|
|
24
|
-
components: {
|
|
25
|
-
editorComponent,
|
|
26
|
-
readerComponent
|
|
27
|
-
},
|
|
28
|
-
props: {
|
|
29
|
-
value: {
|
|
30
|
-
type: [Array, Number, String],
|
|
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
|
-
mounted () {
|
|
94
|
-
this.curVal = this.value;
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
</script>
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bpm-select-edit">
|
|
3
|
-
<el-select
|
|
4
|
-
:key="isMultiple ? 'two': 'one'"
|
|
5
|
-
v-model="curVal"
|
|
6
|
-
:placeholder="placeholder"
|
|
7
|
-
:multiple="isMultiple"
|
|
8
|
-
clearable
|
|
9
|
-
filterable
|
|
10
|
-
:remote-method="search"
|
|
11
|
-
v-bind="$attrs"
|
|
12
|
-
v-on="$listeners"
|
|
13
|
-
@change="onChange"
|
|
14
|
-
>
|
|
15
|
-
<el-option
|
|
16
|
-
v-for="item in options"
|
|
17
|
-
:key="item.value"
|
|
18
|
-
:label="item.label"
|
|
19
|
-
:value="item.value"
|
|
20
|
-
>
|
|
21
|
-
</el-option>
|
|
22
|
-
</el-select>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script>
|
|
27
|
-
import _ from "lodash";
|
|
28
|
-
|
|
29
|
-
import Vue from "vue";
|
|
30
|
-
import { Select, Option } from "element-ui";
|
|
31
|
-
|
|
32
|
-
Vue.use(Select);
|
|
33
|
-
Vue.use(Option);
|
|
34
|
-
|
|
35
|
-
export default {
|
|
36
|
-
props: ["value", "fieldConf", "row", "formName", "orgInfo", "isMultiple"],
|
|
37
|
-
data() {
|
|
38
|
-
return {
|
|
39
|
-
curVal: "",
|
|
40
|
-
options: []
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
watch: {
|
|
44
|
-
value() {
|
|
45
|
-
this.curVal = this.value;
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
computed: {
|
|
50
|
-
placeholder() {
|
|
51
|
-
return this.fieldConf.desc || this.fieldConf.name;
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
created () {
|
|
55
|
-
this.curVal = this.isMultiple ? [] : ""
|
|
56
|
-
},
|
|
57
|
-
mounted() {
|
|
58
|
-
this.search();
|
|
59
|
-
this.curVal = this.value;
|
|
60
|
-
},
|
|
61
|
-
methods: {
|
|
62
|
-
async search(query = "") {
|
|
63
|
-
let formName = this.formName;
|
|
64
|
-
let fieldId = this.fieldConf.id;
|
|
65
|
-
let result = await zj.net.w.noapi({
|
|
66
|
-
url: `/app_flow/v1/papi/dm/assist_field/${formName}/${fieldId}/search_title/?q=${query}`,
|
|
67
|
-
params: this.orgInfo,
|
|
68
|
-
});
|
|
69
|
-
this.options = _.map(result.data, (item) => {
|
|
70
|
-
return {
|
|
71
|
-
value: _.get(item, "0"),
|
|
72
|
-
label: _.get(item, "1"),
|
|
73
|
-
};
|
|
74
|
-
});
|
|
75
|
-
},
|
|
76
|
-
onChange(curVal){
|
|
77
|
-
this.$emit("input", curVal)
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
</script>
|
|
82
|
-
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
class="bpm-select-from-form"
|
|
4
|
-
v-model="curVal"
|
|
5
|
-
:is="curComponent"
|
|
6
|
-
:fieldConf="fieldConf"
|
|
7
|
-
:row="row"
|
|
8
|
-
:mode="mode"
|
|
9
|
-
:formName="formName"
|
|
10
|
-
:orgInfo="orgInfo"
|
|
11
|
-
:uiType="uiType"
|
|
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: "bpmSelectFromForm",
|
|
24
|
-
components: {
|
|
25
|
-
editorComponent,
|
|
26
|
-
readerComponent
|
|
27
|
-
},
|
|
28
|
-
props: {
|
|
29
|
-
value: {
|
|
30
|
-
type: [String, Array],
|
|
31
|
-
default(){
|
|
32
|
-
return ""
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
fieldConf: {
|
|
36
|
-
type: Object,
|
|
37
|
-
default() {
|
|
38
|
-
return {};
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
row: {
|
|
42
|
-
type: Object,
|
|
43
|
-
default() {
|
|
44
|
-
return {};
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
mode: {
|
|
48
|
-
type: String,
|
|
49
|
-
default() {
|
|
50
|
-
return "view";
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
uiType: {
|
|
54
|
-
type: String,
|
|
55
|
-
default() {
|
|
56
|
-
return "default";
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
orgInfo: {
|
|
60
|
-
type: Object,
|
|
61
|
-
},
|
|
62
|
-
formName:{
|
|
63
|
-
type: String
|
|
64
|
-
},
|
|
65
|
-
isMultiple: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default() {
|
|
68
|
-
return false;
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
data () {
|
|
73
|
-
return {
|
|
74
|
-
curVal: ""
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
computed: {
|
|
78
|
-
curComponent() {
|
|
79
|
-
if (this.mode == "view") {
|
|
80
|
-
return readerComponent;
|
|
81
|
-
} else {
|
|
82
|
-
return editorComponent;
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
watch: {
|
|
87
|
-
curVal(val){
|
|
88
|
-
this.$emit("input", val)
|
|
89
|
-
},
|
|
90
|
-
value(){
|
|
91
|
-
this.curVal = this.value
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
mounted () {
|
|
96
|
-
this.curVal = this.value
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
</script>
|
|
100
|
-
<style>
|
|
101
|
-
@import "../../../css/bpmSelectFromForm.less";
|
|
102
|
-
</style>
|
|
103
|
-
|