@zhijiancloud/bpm 0.0.5 → 0.0.7
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/components/api/batch-loader.js +61 -0
- package/components/api/index.js +108 -0
- package/components/css/bpmAudit.less +13 -0
- package/components/css/bpmMulFile.less +13 -5
- package/components/css/bpmSelectEntranceForm.less +62 -0
- package/components/css/bpmSelectHouseOwner.less +30 -0
- package/components/css/bpmSignature.less +40 -0
- package/components/css/bpmText.less +0 -10
- package/components/css/common.less +43 -0
- package/components/css/index.less +6 -1
- package/components/lib/bpmAudit/index.js +7 -0
- package/components/lib/bpmAudit/src/main.vue +117 -0
- package/components/lib/bpmAudit/src/part/auditor/audit-new.vue +534 -0
- package/components/lib/bpmAudit/src/part/auditor/audit-select.vue +127 -0
- package/components/lib/bpmAudit/src/part/auditor/audit-with-others.vue +634 -0
- package/components/lib/bpmAudit/src/part/auditor.vue +54 -0
- package/components/lib/bpmAudit/src/part/editor.vue +318 -0
- package/components/lib/bpmAudit/src/part/reader.vue +218 -0
- package/components/lib/bpmDateTime/src/part/editor.vue +3 -1
- package/components/lib/bpmField/src/main.vue +5 -147
- package/components/lib/bpmFieldsFilter/index.js +7 -0
- package/components/lib/bpmFieldsFilter/src/main.vue +324 -0
- package/components/lib/bpmFormField/index.js +7 -0
- package/components/lib/bpmFormField/src/lib/form_mixin.js +818 -0
- package/components/lib/bpmFormField/src/lib/mixin.js +245 -0
- package/components/lib/bpmFormField/src/main.vue +35 -0
- package/components/lib/bpmMulFile/src/main.vue +0 -1
- package/components/lib/bpmMulFile/src/part/editor.vue +1 -1
- package/components/lib/bpmMulFile/src/part/reader.vue +12 -33
- package/components/lib/bpmMulImage/src/main.vue +1 -2
- package/components/lib/bpmMulImage/src/part/editor.vue +10 -6
- package/components/lib/bpmMulImage/src/part/reader.vue +14 -4
- package/components/lib/bpmNumber/src/part/editor.vue +8 -9
- package/components/lib/bpmSelect/src/part/reader.vue +11 -2
- package/components/lib/bpmSelectCheckItem/src/part/editor.vue +3 -7
- package/components/lib/bpmSelectEntranceForm/index.js +7 -0
- package/components/lib/bpmSelectEntranceForm/src/main.vue +529 -0
- package/components/lib/bpmSelectFromField/src/main.vue +1 -0
- package/components/lib/bpmSelectFromField/src/part/editor.vue +27 -13
- package/components/lib/bpmSelectFromForm/src/part/editor.vue +2 -5
- package/components/lib/bpmSelectHouseOwner/index.js +7 -0
- package/components/lib/bpmSelectHouseOwner/src/main.vue +102 -0
- package/components/lib/bpmSelectHouseOwner/src/part/editor.vue +101 -0
- package/components/lib/bpmSelectHouseOwner/src/part/reader.vue +17 -0
- package/components/lib/bpmSelectIssue/index.js +7 -0
- package/components/lib/bpmSelectIssue/src/main.vue +180 -0
- package/components/lib/bpmSignature/index.js +7 -0
- package/components/lib/bpmSignature/src/main.vue +248 -0
- package/components/lib/bpmSubForm/src/main.vue +25 -3
- package/components/lib/bpmTime/src/part/editor.vue +3 -2
- package/components/lib/field-const.js +6 -2
- package/components/lib/index.ts +57 -7
- package/components/mixins/field_base_mixin.vue +188 -0
- package/components/vendor/draw.js +240 -0
- package/dist/bpmAudit.umd.js +2 -0
- package/dist/bpmAudit.umd.js.LICENSE.txt +9 -0
- 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 -18
- package/CHANGELOG.md +0 -23
- 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
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
export default function () {
|
|
4
|
+
return {
|
|
5
|
+
props: ["container", "rowIndex", "isNew", "hideLabel"],
|
|
6
|
+
data() {
|
|
7
|
+
return {
|
|
8
|
+
optAssWatchList: [],
|
|
9
|
+
hasAddOptAssWatch: false,
|
|
10
|
+
defaultVal: null,
|
|
11
|
+
firstListVal: null,
|
|
12
|
+
loadedDefault: false
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
computed: {
|
|
16
|
+
isSubForm() {
|
|
17
|
+
return false
|
|
18
|
+
},
|
|
19
|
+
topContainer() {
|
|
20
|
+
if (this.container.isSubForm) {
|
|
21
|
+
return this.container.container
|
|
22
|
+
}
|
|
23
|
+
return this.container
|
|
24
|
+
},
|
|
25
|
+
fieldSelf() {
|
|
26
|
+
return this
|
|
27
|
+
},
|
|
28
|
+
fieldPath() {
|
|
29
|
+
return this._getFieldPath()
|
|
30
|
+
},
|
|
31
|
+
readonly() {
|
|
32
|
+
return true
|
|
33
|
+
},
|
|
34
|
+
inner() {
|
|
35
|
+
return this.$bpm.matchInnerComponent(this.fieldConf.type, this.readonly)
|
|
36
|
+
},
|
|
37
|
+
// value: {
|
|
38
|
+
// get() {
|
|
39
|
+
// return this._getValue()
|
|
40
|
+
// },
|
|
41
|
+
// set(val) {
|
|
42
|
+
// this._setValue(val)
|
|
43
|
+
// }
|
|
44
|
+
// }
|
|
45
|
+
},
|
|
46
|
+
created() {
|
|
47
|
+
|
|
48
|
+
this.topContainer.$once("beforeSchemaLoad", (form) => {
|
|
49
|
+
this.clearOptAssWatch()
|
|
50
|
+
})
|
|
51
|
+
this.topContainer.$once("dataLoaded", (form) => {
|
|
52
|
+
this.addOptAssWatch()
|
|
53
|
+
|
|
54
|
+
})
|
|
55
|
+
if (this.isNew && !this.hasAddOptAssWatch) {
|
|
56
|
+
this.addOptAssWatch()
|
|
57
|
+
|
|
58
|
+
this.$emit('update:isNew', false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
async getConfDefaultValue() {
|
|
64
|
+
// let compType = this.fieldConf.value_type
|
|
65
|
+
let defaultType = _.get(this.fieldConf, "default.value.type")
|
|
66
|
+
defaultType = defaultType ? defaultType : _.get(this.fieldConf, "default.value.type")
|
|
67
|
+
let val = _.get(this.fieldConf, "default.value.value")
|
|
68
|
+
let oldDefaultType = _.get(this.fieldConf, "default.type")
|
|
69
|
+
if(this.defaultVal || this.loadedDefault) return this.defaultVal
|
|
70
|
+
if (oldDefaultType == 'EVCConfig') {
|
|
71
|
+
val = _.get(this.fieldConf, "default.value")
|
|
72
|
+
this.defaultVal = val
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
if (defaultType == 'EVCExpression' || oldDefaultType == 'EVCExpression') {
|
|
77
|
+
this.defaultVal = await this.$bpm.loadValDefault({
|
|
78
|
+
fieldId: this.fieldConf.id,
|
|
79
|
+
params: {},
|
|
80
|
+
cusFormName: this.container.cusFormId,
|
|
81
|
+
container: this.container
|
|
82
|
+
})
|
|
83
|
+
this.loadedDefault = true
|
|
84
|
+
return this.defaultVal
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
let isEVCFirstElem = _.get(this.fieldConf, "default.value.type") == 'EVCFirstElem'
|
|
88
|
+
//let isEVCAllElem = _.get(this.fieldConf, "default.value.type") == 'EVCAllElem'
|
|
89
|
+
if (isEVCFirstElem) val = this.firstListVal
|
|
90
|
+
this.defaultVal = val
|
|
91
|
+
this.loadedDefault = true
|
|
92
|
+
return val
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
},
|
|
96
|
+
getTypeValidEmptyValue() {
|
|
97
|
+
let type = this.fieldConf.value_type
|
|
98
|
+
let compType = this.fieldConf.type
|
|
99
|
+
switch (type) {
|
|
100
|
+
case "int":
|
|
101
|
+
return 0
|
|
102
|
+
case "struct":
|
|
103
|
+
return compType.substr(0, 3) == "Mul" || compType == "OnlineEditor" || this.isSubForm ? [] : {}
|
|
104
|
+
default:
|
|
105
|
+
return compType.substr(0, 3) == "Mul" || compType == "OnlineEditor" || this.isSubForm ? [] : ""
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
removeValue() {
|
|
109
|
+
let container = this.container
|
|
110
|
+
let srcObj = container.value
|
|
111
|
+
// 从属子表单,获取成员
|
|
112
|
+
if (container.isSubForm) {
|
|
113
|
+
srcObj = _.get(srcObj, [this.rowIndex])
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// 若不存在父元素,则退出
|
|
117
|
+
if (!srcObj) return
|
|
118
|
+
|
|
119
|
+
// 移除字段
|
|
120
|
+
// let fieldName = _.last(this.fieldPath)
|
|
121
|
+
// Vue.delete(srcObj, fieldName)
|
|
122
|
+
this.value = null
|
|
123
|
+
|
|
124
|
+
},
|
|
125
|
+
_getFieldPath(isFullPath = false) {
|
|
126
|
+
if (this.container.isSubForm) { // 如果容器为子表单
|
|
127
|
+
if (isFullPath) {
|
|
128
|
+
return [this.container.fieldConf.id, this.rowIndex, this.fieldConf.id]
|
|
129
|
+
}
|
|
130
|
+
return [this.rowIndex, this.fieldConf.id]
|
|
131
|
+
}
|
|
132
|
+
return [this.fieldConf.id]
|
|
133
|
+
},
|
|
134
|
+
// TODO _getValue, _setValue 不要了吧,应该改为 emit input 事件
|
|
135
|
+
_getValue() {
|
|
136
|
+
// let defaultVal = this.getConfDefaultValue()
|
|
137
|
+
// let containerType = _.get(this.container, "conf.type")
|
|
138
|
+
// defaultVal = this.isPromise(defaultVal) || containerType == 'Quote' ? this.defaultVal : defaultVal
|
|
139
|
+
console.log("this.container",this.container)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
let value = ""
|
|
143
|
+
if(this.container){
|
|
144
|
+
value = _.get(
|
|
145
|
+
this.container.value,
|
|
146
|
+
this.fieldPath
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
}else{
|
|
150
|
+
value = "666";
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
// value = _.isObject(value) && value.type == "EVCExpression" ? defaultVal : value
|
|
156
|
+
return value
|
|
157
|
+
},
|
|
158
|
+
isPromise(e) {
|
|
159
|
+
return !!e && typeof e.then == "function";
|
|
160
|
+
},
|
|
161
|
+
_setValue(val) {
|
|
162
|
+
let container = this.container
|
|
163
|
+
|
|
164
|
+
let srcObj = _.cloneDeep(container.value)
|
|
165
|
+
if (container.isQuote) return
|
|
166
|
+
|
|
167
|
+
// 从属于子表单,设置 containerVal 为对应的数组成员
|
|
168
|
+
let fieldName = _.last(this.fieldPath)
|
|
169
|
+
if (container.isSubForm) {
|
|
170
|
+
// 确保为一个有效的数组
|
|
171
|
+
if (!srcObj) {
|
|
172
|
+
srcObj = []
|
|
173
|
+
}
|
|
174
|
+
// 确保当前 rowIndex 存在对象
|
|
175
|
+
let rowIndex = this.rowIndex
|
|
176
|
+
if (!srcObj[rowIndex]) {
|
|
177
|
+
if (container.isXSubForm) {
|
|
178
|
+
Vue.set(srcObj, rowIndex, container.getItem(rowIndex))
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
Vue.set(srcObj, rowIndex, {})
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
this.$set(container.value[rowIndex], fieldName, val)
|
|
186
|
+
return
|
|
187
|
+
}
|
|
188
|
+
srcObj = srcObj[rowIndex]
|
|
189
|
+
try {
|
|
190
|
+
Vue.set(
|
|
191
|
+
container.value,
|
|
192
|
+
rowIndex,
|
|
193
|
+
srcObj
|
|
194
|
+
)
|
|
195
|
+
} catch (error) {
|
|
196
|
+
console.log("error", container.value)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return
|
|
200
|
+
|
|
201
|
+
}
|
|
202
|
+
// 获取真正的字段名
|
|
203
|
+
|
|
204
|
+
Vue.set(
|
|
205
|
+
container.value,
|
|
206
|
+
fieldName,
|
|
207
|
+
val
|
|
208
|
+
)
|
|
209
|
+
console.log("container.value",container.value, fieldName, val)
|
|
210
|
+
|
|
211
|
+
},
|
|
212
|
+
clearOptAssWatch() {
|
|
213
|
+
this.hasAddOptAssWatch = false
|
|
214
|
+
_.each(this.optAssWatchList, unwatchItem => {
|
|
215
|
+
unwatchItem()
|
|
216
|
+
})
|
|
217
|
+
},
|
|
218
|
+
addOptAssWatch() {
|
|
219
|
+
this.hasAddOptAssWatch = true
|
|
220
|
+
let optAssMap = _.get(this.fieldConf, "optAssMap")
|
|
221
|
+
let defaultVisible = _.get(this.fieldConf, "perm.visible")
|
|
222
|
+
if (!optAssMap || _.isEmpty(optAssMap) || !defaultVisible) return
|
|
223
|
+
let i = 0
|
|
224
|
+
_.map(optAssMap, (visibleVals, field) => {
|
|
225
|
+
//多个一起联动
|
|
226
|
+
field = _.replace(field, "&", ".")
|
|
227
|
+
let unWatchItem = this.$watch(`row.f_fields.${field}`, (val) => {
|
|
228
|
+
let visible = true
|
|
229
|
+
_.map(optAssMap, (visibleVals, field) => {
|
|
230
|
+
field = _.replace(field, "&", ".")
|
|
231
|
+
let val = _.get(this.row, `f_fields.${field}`)
|
|
232
|
+
val = _.toString(val)
|
|
233
|
+
visible = visible && _.includes(visibleVals, val)
|
|
234
|
+
})
|
|
235
|
+
this.fieldConf.perm.visible = visible
|
|
236
|
+
}, {
|
|
237
|
+
immediate: i == 0
|
|
238
|
+
})
|
|
239
|
+
i++;
|
|
240
|
+
this.optAssWatchList.push(unWatchItem)
|
|
241
|
+
})
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
v-if="curComponent"
|
|
4
|
+
class="bpm-field"
|
|
5
|
+
ref="inner-component"
|
|
6
|
+
v-model="curVal"
|
|
7
|
+
:is="curComponent"
|
|
8
|
+
:type="type"
|
|
9
|
+
:fieldConf="fieldConf"
|
|
10
|
+
:row="row"
|
|
11
|
+
:mode="fieldMode"
|
|
12
|
+
:uiType="uiType"
|
|
13
|
+
:formDefId="formDefId"
|
|
14
|
+
:orgInfo="orgInfo"
|
|
15
|
+
:clearable="clearable"
|
|
16
|
+
:disabled="fieldDisabled"
|
|
17
|
+
:isMultiple="isMul"
|
|
18
|
+
:container="container"
|
|
19
|
+
v-bind="$attrs"
|
|
20
|
+
v-on="$listeners"
|
|
21
|
+
>
|
|
22
|
+
</component>
|
|
23
|
+
</template>
|
|
24
|
+
<script>
|
|
25
|
+
|
|
26
|
+
//依赖联动关系
|
|
27
|
+
import buildFormMixin from "./lib/form_mixin"
|
|
28
|
+
|
|
29
|
+
import fieldBaseMixin from "../../../mixins/field_base_mixin.vue"
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
name: "BpmFormField",
|
|
33
|
+
mixins:[fieldBaseMixin,buildFormMixin()]
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
@@ -38,23 +38,17 @@
|
|
|
38
38
|
{{ item.name }}
|
|
39
39
|
</div>
|
|
40
40
|
<div class="operation-box">
|
|
41
|
-
<a href="javascript:;" v-if="!isDwg(item)" @click="preview(item)"
|
|
41
|
+
<a href="javascript:;" class="operation-btn" v-if="!isDwg(item)" @click="preview(item)"
|
|
42
42
|
>预览</a
|
|
43
43
|
>
|
|
44
|
-
<span v-if="!
|
|
45
|
-
<a
|
|
46
|
-
v-if="!is_mobile"
|
|
44
|
+
<span v-if="!isDwg(item)">|</span>
|
|
45
|
+
<a
|
|
47
46
|
href="javascript:;"
|
|
47
|
+
class="operation-btn"
|
|
48
48
|
@click="download(item)"
|
|
49
49
|
>下载</a
|
|
50
50
|
>
|
|
51
|
-
|
|
52
|
-
<a
|
|
53
|
-
v-if="is_mobile"
|
|
54
|
-
href="javascript:;"
|
|
55
|
-
@click="share(item)"
|
|
56
|
-
>分享</a
|
|
57
|
-
>
|
|
51
|
+
|
|
58
52
|
</div>
|
|
59
53
|
</span>
|
|
60
54
|
</span>
|
|
@@ -85,7 +79,7 @@ Vue.use(Dialog);
|
|
|
85
79
|
|
|
86
80
|
import "viewerjs/dist/viewer.css";
|
|
87
81
|
// import {wvAgent} from "./lib/utils"
|
|
88
|
-
import {urlAppendParam
|
|
82
|
+
import {urlAppendParam} from "../../../utils"
|
|
89
83
|
import { showGPSInfo, getFileType, gethashcode } from "./lib/utils";
|
|
90
84
|
|
|
91
85
|
Vue.use(Viewer);
|
|
@@ -121,9 +115,7 @@ export default {
|
|
|
121
115
|
};
|
|
122
116
|
},
|
|
123
117
|
computed: {
|
|
124
|
-
|
|
125
|
-
return isMobile()
|
|
126
|
-
}
|
|
118
|
+
|
|
127
119
|
},
|
|
128
120
|
watch: {
|
|
129
121
|
value() {
|
|
@@ -206,9 +198,9 @@ export default {
|
|
|
206
198
|
return result;
|
|
207
199
|
},
|
|
208
200
|
reviewOnMobile(item) {
|
|
209
|
-
if (this.is_mobile) {
|
|
210
|
-
|
|
211
|
-
}
|
|
201
|
+
// if (this.is_mobile) {
|
|
202
|
+
// this.preview(item);
|
|
203
|
+
// }
|
|
212
204
|
},
|
|
213
205
|
async preview(item) {
|
|
214
206
|
let res = await zj.net.w.noapi({
|
|
@@ -241,9 +233,7 @@ export default {
|
|
|
241
233
|
let index = preview_url.lastIndexOf(".com");
|
|
242
234
|
preview_url = preview_url.substring(index + 4, preview_url.length);
|
|
243
235
|
preview_url = encodeURIComponent(preview_url);
|
|
244
|
-
|
|
245
|
-
url = `/public/app3/bpm/view_pdf.html?url=${preview_url}`;
|
|
246
|
-
else url = `/public/bpm/app/view_pdf.html?url=${preview_url}`;
|
|
236
|
+
url = `/public/bpm/app/view_pdf.html?url=${preview_url}`;
|
|
247
237
|
}
|
|
248
238
|
|
|
249
239
|
this.officeUrl = url;
|
|
@@ -255,18 +245,7 @@ export default {
|
|
|
255
245
|
let res = await zj.net.w.noapi({
|
|
256
246
|
url: `/platform/v1/papi/app_file/download/?file_md5=${item.md5}&webp=0`,
|
|
257
247
|
});
|
|
258
|
-
|
|
259
|
-
//如果是移动平台,调用客户端预览页面
|
|
260
|
-
if (this.is_mobile) {
|
|
261
|
-
let fileInfo = {
|
|
262
|
-
share_url: _.get(res, "url_list.0.path.0"),
|
|
263
|
-
title: item.name,
|
|
264
|
-
logo_url: "",
|
|
265
|
-
context: item.name,
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
this.toShare(fileInfo);
|
|
269
|
-
}
|
|
248
|
+
return res
|
|
270
249
|
},
|
|
271
250
|
|
|
272
251
|
//打开预览页
|
|
@@ -108,6 +108,10 @@ Viewer.setDefaults({
|
|
|
108
108
|
var AMap = null;
|
|
109
109
|
export default {
|
|
110
110
|
props: {
|
|
111
|
+
type: {
|
|
112
|
+
type: String,
|
|
113
|
+
default: 'MulImage'
|
|
114
|
+
},
|
|
111
115
|
value: {},
|
|
112
116
|
fieldConf: {},
|
|
113
117
|
row: {},
|
|
@@ -128,10 +132,6 @@ export default {
|
|
|
128
132
|
};
|
|
129
133
|
},
|
|
130
134
|
watch: {
|
|
131
|
-
curVal(val) {
|
|
132
|
-
let result = this.isSign ? _.get(val, "0.md5", "") : val;
|
|
133
|
-
this.$emit("input", result);
|
|
134
|
-
},
|
|
135
135
|
value() {
|
|
136
136
|
this.curVal =
|
|
137
137
|
this.isSign && _.isString(this.value) && this.value
|
|
@@ -150,7 +150,7 @@ export default {
|
|
|
150
150
|
return "/platform/v1/papi/app_file/upload/";
|
|
151
151
|
},
|
|
152
152
|
isSign() {
|
|
153
|
-
return this.fieldConf.type == "Signature";
|
|
153
|
+
return this.type === 'Signature' || this.fieldConf.type == "Signature";
|
|
154
154
|
},
|
|
155
155
|
photo() {
|
|
156
156
|
let list = [];
|
|
@@ -427,11 +427,15 @@ export default {
|
|
|
427
427
|
md5: _.get(response, "data.file_md5"),
|
|
428
428
|
});
|
|
429
429
|
this.curVal = _.cloneDeep(items);
|
|
430
|
-
|
|
430
|
+
let result = this.isSign ? _.get( this.curVal, "0.md5", "") : this.curVal;
|
|
431
|
+
this.$emit("input", result);
|
|
432
|
+
|
|
431
433
|
},
|
|
432
434
|
remove(md5) {
|
|
433
435
|
this.curVal = _.filter(this.curVal, (item) => item.md5 != md5);
|
|
434
436
|
this.$refs.uploader.queue = [];
|
|
437
|
+
let result = this.isSign ? _.get( this.curVal, "0.md5", "") : this.curVal;
|
|
438
|
+
this.$emit("input", result);
|
|
435
439
|
},
|
|
436
440
|
onHide() {
|
|
437
441
|
this.opened = false;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="bpm-mul-image-reader">
|
|
3
3
|
<div v-show="!curVal || curVal.length == 0">暂无图片</div>
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
<template v-if="isSignature && curVal && curVal[0]">
|
|
6
|
+
<img :src="fileLink(curVal[0])" alt="电子签名" width="100%" height="100%">
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<viewer v-else :images="photo" rebuild @inited="inited" ref="viewer">
|
|
5
10
|
<span v-for="item in curVal" :key="item.md5">
|
|
6
11
|
<div class="file-box" v-if="isImageFile(item)">
|
|
7
12
|
<div class="file-icon" style="height: 20px;border: 1px dashed #ececec;">
|
|
@@ -50,7 +55,10 @@ Viewer.setDefaults({
|
|
|
50
55
|
});
|
|
51
56
|
|
|
52
57
|
export default {
|
|
53
|
-
props: [
|
|
58
|
+
props: [
|
|
59
|
+
'type',
|
|
60
|
+
"value", "fieldConf", "row"
|
|
61
|
+
],
|
|
54
62
|
data() {
|
|
55
63
|
return {
|
|
56
64
|
vueLightId1: null,
|
|
@@ -58,14 +66,16 @@ export default {
|
|
|
58
66
|
curVal: [],
|
|
59
67
|
officeUrl: "",
|
|
60
68
|
opened: false,
|
|
61
|
-
windowH: 0
|
|
62
|
-
type: "small",
|
|
69
|
+
windowH: 0
|
|
63
70
|
};
|
|
64
71
|
},
|
|
65
72
|
computed: {
|
|
66
73
|
is_mobile() {
|
|
67
74
|
return isMobile();
|
|
68
75
|
},
|
|
76
|
+
isSignature () {
|
|
77
|
+
return this.type === 'Signature'
|
|
78
|
+
}
|
|
69
79
|
},
|
|
70
80
|
watch: {
|
|
71
81
|
value() {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="position: relative">
|
|
3
|
-
<el-input-number
|
|
3
|
+
<el-input-number
|
|
4
|
+
ref="component"
|
|
5
|
+
v-model="curVal"
|
|
6
|
+
:precision="precision"
|
|
7
|
+
@change="handleChange"></el-input-number>
|
|
4
8
|
</div>
|
|
5
9
|
</template>
|
|
6
10
|
|
|
@@ -22,9 +26,6 @@ export default {
|
|
|
22
26
|
props: ['value','fieldConf', 'row'],
|
|
23
27
|
|
|
24
28
|
watch: {
|
|
25
|
-
curVal() {
|
|
26
|
-
this.$emit("input",this.curVal)
|
|
27
|
-
},
|
|
28
29
|
value(){
|
|
29
30
|
|
|
30
31
|
this.curVal = this.value
|
|
@@ -37,11 +38,9 @@ export default {
|
|
|
37
38
|
}
|
|
38
39
|
},
|
|
39
40
|
methods: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
console.log("input-value", this.value)
|
|
44
|
-
this.curVal = this.value ;
|
|
41
|
+
handleChange () {
|
|
42
|
+
this.$emit("input",this.curVal)
|
|
43
|
+
}
|
|
45
44
|
}
|
|
46
45
|
};
|
|
47
46
|
</script>
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span
|
|
2
|
+
<span v-if="isStatus && rangeEnumMap[value]" :style="{ background: colorMap[value] }" class="bpm-status_tag-status">{{ rangeEnumMap[value] }}</span>
|
|
3
|
+
<span v-else :title="label" :class="isButton && value ? 'btn-select' : ''">{{label}}</span>
|
|
3
4
|
</template>
|
|
4
5
|
|
|
5
6
|
<script>
|
|
6
7
|
import _ from "lodash"
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
|
-
props: ['value','fieldConf','row'],
|
|
10
|
+
props: ['type', 'value','fieldConf','row'],
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
colorMap: {}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
10
16
|
computed: {
|
|
11
17
|
_value(){
|
|
12
18
|
return _.isArray(this.value) ? this.value : [this.value]
|
|
@@ -29,6 +35,9 @@ export default {
|
|
|
29
35
|
},
|
|
30
36
|
isButton(){
|
|
31
37
|
return _.get(this.fieldConf, "style") == "button";
|
|
38
|
+
},
|
|
39
|
+
isStatus () {
|
|
40
|
+
return this.type === 'Status' || this.fieldConf.type === 'Status'
|
|
32
41
|
}
|
|
33
42
|
},
|
|
34
43
|
methods: {
|
|
@@ -69,16 +69,12 @@ export default {
|
|
|
69
69
|
father: node.level === 0 ? "" : node.data.value || "",
|
|
70
70
|
};
|
|
71
71
|
params = _.merge(params, this.orgInfo);
|
|
72
|
-
let result = await
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
let list = this.transformResultToTree(result.data);
|
|
72
|
+
let result = await this.$bpm.searchSelectOpts(fieldId, "", formName, this, false, params)
|
|
73
|
+
|
|
74
|
+
let list = this.transformResultToTree(result);
|
|
78
75
|
resolve(list);
|
|
79
76
|
},
|
|
80
77
|
transformResultToTree(items) {
|
|
81
|
-
console.log("fieldConf", this.fieldConf)
|
|
82
78
|
let type = _.get(this.fieldConf, "type");
|
|
83
79
|
if (type == "SelectCheckItem" || type == "MulSelectCheckItem") {
|
|
84
80
|
return _.map(items, (item) => {
|