@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,181 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-button
|
|
4
|
-
v-if="uiType === 'table'"
|
|
5
|
-
@click="showSubForm = true"
|
|
6
|
-
type="text">查看子表单</el-button>
|
|
7
|
-
<el-table
|
|
8
|
-
v-else
|
|
9
|
-
:data="subformData"
|
|
10
|
-
:max-height="maxHeight"
|
|
11
|
-
border stripe
|
|
12
|
-
style="width: 100%;">
|
|
13
|
-
<el-table-column v-for="col in columns"
|
|
14
|
-
:prop="col.id"
|
|
15
|
-
:key="col.key"
|
|
16
|
-
:label="col.label"
|
|
17
|
-
:min-width="col.minWidth"
|
|
18
|
-
:sortable="col.sortable"
|
|
19
|
-
:sort-by="col.sortBy">
|
|
20
|
-
<template slot-scope="scope">
|
|
21
|
-
<bpm-field
|
|
22
|
-
v-model="scope.row[col.id]"
|
|
23
|
-
:type="col.data.type"
|
|
24
|
-
:fieldConf="col.data"
|
|
25
|
-
:mode="mode"
|
|
26
|
-
uiType="table"
|
|
27
|
-
:formDefId="formDefId"
|
|
28
|
-
:orgInfo="orgInfo"
|
|
29
|
-
@change="handleChange"></bpm-field>
|
|
30
|
-
</template>
|
|
31
|
-
</el-table-column>
|
|
32
|
-
</el-table>
|
|
33
|
-
|
|
34
|
-
<el-dialog
|
|
35
|
-
:title="subFormDialogTitle"
|
|
36
|
-
:visible.sync="showSubForm"
|
|
37
|
-
width="50%"
|
|
38
|
-
@close="showSubForm = false">
|
|
39
|
-
<div style="max-height: 70vh; overflow: auto;">
|
|
40
|
-
<el-table
|
|
41
|
-
:data="subformData"
|
|
42
|
-
:max-height="dialogTableMaxHeight"
|
|
43
|
-
border stripe
|
|
44
|
-
style="width: 100%;">
|
|
45
|
-
<el-table-column v-for="col in columns"
|
|
46
|
-
:prop="col.id"
|
|
47
|
-
:key="col.key"
|
|
48
|
-
:label="col.label"
|
|
49
|
-
:min-width="col.minWidth"
|
|
50
|
-
:sortable="col.sortable"
|
|
51
|
-
:sort-by="col.sortBy">
|
|
52
|
-
<template slot-scope="scope">
|
|
53
|
-
<bpm-field
|
|
54
|
-
v-model="scope.row[col.id]"
|
|
55
|
-
:type="col.data.type"
|
|
56
|
-
:fieldConf="col.data"
|
|
57
|
-
:mode="mode"
|
|
58
|
-
uiType="table"
|
|
59
|
-
:formDefId="formDefId"
|
|
60
|
-
:orgInfo="orgInfo"
|
|
61
|
-
@change="handleChange"></bpm-field>
|
|
62
|
-
</template>
|
|
63
|
-
</el-table-column>
|
|
64
|
-
</el-table>
|
|
65
|
-
</div>
|
|
66
|
-
</el-dialog>
|
|
67
|
-
</div>
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<script>
|
|
71
|
-
import { FORM_FIELDS_MAP } from '../../field-const.js'
|
|
72
|
-
|
|
73
|
-
export default {
|
|
74
|
-
name: 'BpmSubForm',
|
|
75
|
-
props: {
|
|
76
|
-
value: {
|
|
77
|
-
type: [String, Number, Object, Array]
|
|
78
|
-
},
|
|
79
|
-
type: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: 'XSubForm' // SubForm, XSubForm, OrderSubForm
|
|
82
|
-
},
|
|
83
|
-
fieldConf: {
|
|
84
|
-
type: Object,
|
|
85
|
-
default() {
|
|
86
|
-
return {}
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
mode: {
|
|
90
|
-
type: String,
|
|
91
|
-
default: 'view' // view, edit
|
|
92
|
-
},
|
|
93
|
-
uiType: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: 'default' // default,table,form,search
|
|
96
|
-
},
|
|
97
|
-
maxHeight: {
|
|
98
|
-
type: [Number, String],
|
|
99
|
-
default: 500
|
|
100
|
-
},
|
|
101
|
-
formDefId: {
|
|
102
|
-
type: String,
|
|
103
|
-
default: ''
|
|
104
|
-
},
|
|
105
|
-
orgInfo: {
|
|
106
|
-
type: Object,
|
|
107
|
-
default () {
|
|
108
|
-
return {
|
|
109
|
-
level: 'group', // group,team,project
|
|
110
|
-
level_id: 0,
|
|
111
|
-
group_id: 0
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
data() {
|
|
117
|
-
return {
|
|
118
|
-
subformData: [],
|
|
119
|
-
dialogTableMaxHeight: 500,
|
|
120
|
-
showSubForm: false
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
computed: {
|
|
124
|
-
columns () {
|
|
125
|
-
const elements = this.fieldConf.elements || []
|
|
126
|
-
const arr = []
|
|
127
|
-
elements.forEach(item => {
|
|
128
|
-
const fieldMap = FORM_FIELDS_MAP[item.type] || {}
|
|
129
|
-
if (fieldMap.hasBpmField) {
|
|
130
|
-
arr.push({
|
|
131
|
-
key: item.id,
|
|
132
|
-
id: item.id,
|
|
133
|
-
label: item.name || item.id,
|
|
134
|
-
minWidth: fieldMap.tableColWidth || 100,
|
|
135
|
-
sortable: true,
|
|
136
|
-
sortBy: item.id,
|
|
137
|
-
data: item
|
|
138
|
-
})
|
|
139
|
-
}
|
|
140
|
-
})
|
|
141
|
-
|
|
142
|
-
return arr
|
|
143
|
-
},
|
|
144
|
-
subFormDialogTitle () {
|
|
145
|
-
return this.fieldConf.name || this.fieldConf.id
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
watch: {
|
|
149
|
-
value: {
|
|
150
|
-
handler (val) {
|
|
151
|
-
if (val && _.isArray(val)) {
|
|
152
|
-
this.subformData = val
|
|
153
|
-
} else {
|
|
154
|
-
this.subformData = []
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
immediate: true
|
|
158
|
-
},
|
|
159
|
-
// subformData: {
|
|
160
|
-
// handler (val) {
|
|
161
|
-
// this.$emit('input', val)
|
|
162
|
-
// this.$emit('change', val)
|
|
163
|
-
// },
|
|
164
|
-
// deep: true
|
|
165
|
-
// }
|
|
166
|
-
},
|
|
167
|
-
created() {
|
|
168
|
-
this.dialogTableMaxHeight = Math.floor(window.innerHeight / 100 * 70 - 114)
|
|
169
|
-
},
|
|
170
|
-
methods: {
|
|
171
|
-
handleChange () {
|
|
172
|
-
this.$emit('input', this.subformData)
|
|
173
|
-
this.$emit('change', this.subformData)
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
</script>
|
|
178
|
-
|
|
179
|
-
<style lang="less" scoped>
|
|
180
|
-
|
|
181
|
-
</style>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
class="bpm-text"
|
|
4
|
-
v-model="curVal"
|
|
5
|
-
:is="curComponent"
|
|
6
|
-
:fieldConf="fieldConf"
|
|
7
|
-
:row="row"
|
|
8
|
-
:mode="mode"
|
|
9
|
-
:uiType="uiType"
|
|
10
|
-
v-bind="$attrs"
|
|
11
|
-
v-on="$listeners"
|
|
12
|
-
>
|
|
13
|
-
</component>
|
|
14
|
-
</template>
|
|
15
|
-
<script>
|
|
16
|
-
import editorComponent from "./part/editor.vue";
|
|
17
|
-
import readerComponent from "./part/reader.vue";
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
name: "BpmText",
|
|
21
|
-
components: {
|
|
22
|
-
editorComponent,
|
|
23
|
-
readerComponent
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
value: {
|
|
27
|
-
type: String,
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
fieldConf: {
|
|
31
|
-
type: Object,
|
|
32
|
-
default() {
|
|
33
|
-
return {};
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
row: {
|
|
37
|
-
type: Object,
|
|
38
|
-
default() {
|
|
39
|
-
return {};
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
mode: {
|
|
43
|
-
type: String,
|
|
44
|
-
default() {
|
|
45
|
-
return "view";
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
uiType: {
|
|
49
|
-
type: String,
|
|
50
|
-
default() {
|
|
51
|
-
return "default";
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
data () {
|
|
56
|
-
return {
|
|
57
|
-
curVal: ""
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
computed: {
|
|
61
|
-
curComponent() {
|
|
62
|
-
if (this.mode == "view") {
|
|
63
|
-
return readerComponent;
|
|
64
|
-
} else {
|
|
65
|
-
return editorComponent;
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
watch: {
|
|
70
|
-
curVal(val){
|
|
71
|
-
this.$emit("input", val)
|
|
72
|
-
this.$emit("change", val);
|
|
73
|
-
},
|
|
74
|
-
value(){
|
|
75
|
-
this.curVal = this.value
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
mounted () {
|
|
80
|
-
this.curVal = this.value
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<style lang="less" scoped>
|
|
86
|
-
@import "../../../css/bpmText.less";
|
|
87
|
-
</style>
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bpm-text-edit" style="position: relative">
|
|
3
|
-
<el-input
|
|
4
|
-
ref="component"
|
|
5
|
-
v-model="curVal"
|
|
6
|
-
:placeholder="placeholder"
|
|
7
|
-
:type="inputType"
|
|
8
|
-
:rows="2"
|
|
9
|
-
v-bind="$attrs"
|
|
10
|
-
v-on="$listeners"
|
|
11
|
-
></el-input>
|
|
12
|
-
<div class="prefab-words" v-if="prefabWords && prefabWords.length && uiType != 'table'">
|
|
13
|
-
<!-- <div>{{ $z("快捷输入", "b2.common.quick_input") }}</div> -->
|
|
14
|
-
|
|
15
|
-
<div>快捷输入</div>
|
|
16
|
-
<ul>
|
|
17
|
-
<li
|
|
18
|
-
v-for="(item, index) in prefabWords"
|
|
19
|
-
:class="selectWord == item ? 'active' : ''"
|
|
20
|
-
:key="`${index}`"
|
|
21
|
-
@click="handleAddWord(item)"
|
|
22
|
-
>
|
|
23
|
-
<span>{{ item }}</span>
|
|
24
|
-
</li>
|
|
25
|
-
</ul>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
import _ from "lodash";
|
|
32
|
-
|
|
33
|
-
import Vue from "vue";
|
|
34
|
-
|
|
35
|
-
import { Input } from "element-ui";
|
|
36
|
-
|
|
37
|
-
Vue.use(Input);
|
|
38
|
-
|
|
39
|
-
export default {
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
selectWord: "",
|
|
43
|
-
curVal: "",
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
props: ["value", "fieldConf", "row", "uiType"],
|
|
47
|
-
|
|
48
|
-
watch: {
|
|
49
|
-
curVal(val) {
|
|
50
|
-
this.$emit("input", val);
|
|
51
|
-
},
|
|
52
|
-
value() {
|
|
53
|
-
this.curVal = this.value;
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
computed: {
|
|
58
|
-
placeholder() {
|
|
59
|
-
return this.fieldConf.desc || this.fieldConf.name;
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
prefabWords() {
|
|
63
|
-
return _.get(this.fieldConf, "prefab_words", []);
|
|
64
|
-
},
|
|
65
|
-
inputType() {
|
|
66
|
-
let confType = this.fieldConf.type;
|
|
67
|
-
switch (confType) {
|
|
68
|
-
case "TextArea":
|
|
69
|
-
return "textarea";
|
|
70
|
-
default:
|
|
71
|
-
return "text";
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
methods: {
|
|
76
|
-
async handleAddWord(str) {
|
|
77
|
-
this.selectWord = str;
|
|
78
|
-
if (this.curVal) {
|
|
79
|
-
let elem = this.$refs.component.$refs.textarea;
|
|
80
|
-
if(!elem) elem = this.$refs.component.$refs.text
|
|
81
|
-
let startPos = elem.selectionStart;
|
|
82
|
-
let endPos = elem.selectionEnd;
|
|
83
|
-
let value = this.curVal;
|
|
84
|
-
let preStr = value.substring(0, startPos);
|
|
85
|
-
let endStr = value.substring(endPos, value.length);
|
|
86
|
-
let result = preStr + str + endStr;
|
|
87
|
-
this.curVal = result;
|
|
88
|
-
await this.$nextTick();
|
|
89
|
-
elem.focus();
|
|
90
|
-
|
|
91
|
-
elem.setSelectionRange(startPos + str.length, startPos + str.length);
|
|
92
|
-
} else {
|
|
93
|
-
this.curVal = str;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
this.selectWord = "";
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
mounted() {
|
|
100
|
-
this.curVal = this.value;
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
</script>
|
|
104
|
-
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
class="bpm-select"
|
|
4
|
-
v-model="curVal"
|
|
5
|
-
:is="curComponent"
|
|
6
|
-
:fieldConf="fieldConf"
|
|
7
|
-
:row="row"
|
|
8
|
-
:mode="mode"
|
|
9
|
-
:uiType="uiType"
|
|
10
|
-
v-bind="$attrs"
|
|
11
|
-
v-on="$listeners"
|
|
12
|
-
>
|
|
13
|
-
</component>
|
|
14
|
-
</template>
|
|
15
|
-
<script>
|
|
16
|
-
import editorComponent from "./part/editor.vue";
|
|
17
|
-
import readerComponent from "./part/reader.vue";
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
name: "BpmTime",
|
|
21
|
-
components: {
|
|
22
|
-
editorComponent,
|
|
23
|
-
readerComponent
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
value: {
|
|
27
|
-
type: [String, Number],
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
fieldConf: {
|
|
31
|
-
type: Object,
|
|
32
|
-
default() {
|
|
33
|
-
return {};
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
row: {
|
|
37
|
-
type: Object,
|
|
38
|
-
default() {
|
|
39
|
-
return {};
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
mode: {
|
|
43
|
-
type: String,
|
|
44
|
-
default() {
|
|
45
|
-
return "view";
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
uiType: {
|
|
49
|
-
type: String,
|
|
50
|
-
default() {
|
|
51
|
-
return "default";
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
data () {
|
|
56
|
-
return {
|
|
57
|
-
curVal: ""
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
computed: {
|
|
61
|
-
curComponent() {
|
|
62
|
-
if (this.mode == "view") {
|
|
63
|
-
return readerComponent;
|
|
64
|
-
} else {
|
|
65
|
-
return editorComponent;
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
watch: {
|
|
70
|
-
curVal(val){
|
|
71
|
-
this.$emit("input", val)
|
|
72
|
-
this.$emit("change", val);
|
|
73
|
-
},
|
|
74
|
-
value(){
|
|
75
|
-
this.curVal = this.value
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
mounted () {
|
|
80
|
-
this.curVal = this.value
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
</script>
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bpm-time-edit">
|
|
3
|
-
<el-time-select
|
|
4
|
-
ref="component"
|
|
5
|
-
v-model="curVal"
|
|
6
|
-
format-model="number"
|
|
7
|
-
:format="format"
|
|
8
|
-
:value-format="checkFormat"
|
|
9
|
-
:clearable="true"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
import _ from "lodash";
|
|
17
|
-
|
|
18
|
-
import Vue from "vue";
|
|
19
|
-
|
|
20
|
-
import { TimeSelect } from "element-ui";
|
|
21
|
-
|
|
22
|
-
Vue.use(TimeSelect);
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
data() {
|
|
26
|
-
return {
|
|
27
|
-
curVal: ""
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
props: ["value", "fieldConf", "row"],
|
|
31
|
-
watch: {
|
|
32
|
-
curVal(val) {
|
|
33
|
-
this.$emit("input", val);
|
|
34
|
-
},
|
|
35
|
-
value(){
|
|
36
|
-
this.curVal = this.value;
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
computed: {
|
|
40
|
-
format() {
|
|
41
|
-
return _.get(this.fieldConf, "view.format");
|
|
42
|
-
},
|
|
43
|
-
checkFormat() {
|
|
44
|
-
return _.get(this.fieldConf, "check.format");
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
mounted() {
|
|
48
|
-
this.curVal = this.value;
|
|
49
|
-
},
|
|
50
|
-
methods: {
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
</script>
|
|
54
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span >{{ value }}</span>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
// import _ from "lodash";
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
props: ["value", "fieldConf", "row"],
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
computed: {
|
|
15
|
-
},
|
|
16
|
-
watch: {
|
|
17
|
-
},
|
|
18
|
-
mounted() {
|
|
19
|
-
},
|
|
20
|
-
methods: {
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
</script>
|