@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.
Files changed (120) hide show
  1. package/dist/bpmAudit.umd.js +1 -1
  2. package/dist/bpmDateTime.umd.js +1 -1
  3. package/dist/bpmField.umd.js +7 -1
  4. package/dist/bpmField.umd.js.LICENSE.txt +2 -0
  5. package/dist/bpmFieldsFilter.umd.js +8 -0
  6. package/dist/bpmFieldsFilter.umd.js.LICENSE.txt +1 -0
  7. package/dist/bpmFormField.umd.js +8 -0
  8. package/dist/bpmFormField.umd.js.LICENSE.txt +11 -0
  9. package/dist/bpmMulFile.umd.js +1 -1
  10. package/dist/bpmMulImage.umd.js +1 -1
  11. package/dist/bpmNumber.umd.js +1 -1
  12. package/dist/bpmSelect.umd.js +1 -1
  13. package/dist/bpmSelectCheckItem.umd.js +1 -1
  14. package/dist/bpmSelectEntranceForm.umd.js +8 -0
  15. package/dist/bpmSelectEntranceForm.umd.js.LICENSE.txt +1 -0
  16. package/dist/bpmSelectFromField.umd.js +1 -1
  17. package/dist/bpmSelectFromForm.umd.js +1 -1
  18. package/dist/bpmSelectHouseOwner.umd.js +1 -0
  19. package/dist/bpmSelectIssue.umd.js +1 -0
  20. package/dist/bpmSignature.umd.js +2 -0
  21. package/dist/bpmSignature.umd.js.LICENSE.txt +9 -0
  22. package/dist/bpmSubForm.umd.js +1 -1
  23. package/dist/bpmText.umd.js +1 -1
  24. package/dist/bpmTime.umd.js +1 -1
  25. package/dist/css/bpmAudit.css +1 -0
  26. package/dist/css/bpmMulFile.css +1 -1
  27. package/dist/css/bpmSelectEntranceForm.css +1 -0
  28. package/dist/css/bpmSelectHouseOwner.css +1 -0
  29. package/dist/css/bpmSignature.css +1 -0
  30. package/dist/css/bpmText.css +1 -1
  31. package/dist/css/common.css +1 -0
  32. package/dist/css/index.css +1 -1
  33. package/dist/demo.umd.js +1 -1
  34. package/dist/demo2.umd.js +1 -1
  35. package/dist/index.umd.js +7 -1
  36. package/dist/index.umd.js.LICENSE.txt +2 -0
  37. package/package.json +26 -20
  38. package/CHANGELOG.md +0 -27
  39. package/components/.DS_Store +0 -0
  40. package/components/css/bpmMulFile.less +0 -58
  41. package/components/css/bpmSelectCheckItem.less +0 -4
  42. package/components/css/bpmSelectFromForm.less +0 -10
  43. package/components/css/bpmSelectFromId.less +0 -33
  44. package/components/css/bpmText.less +0 -49
  45. package/components/css/demo.less +0 -3
  46. package/components/css/demo2.less +0 -3
  47. package/components/css/index.less +0 -3
  48. package/components/lib/bpmAudit/index.js +0 -7
  49. package/components/lib/bpmAudit/src/main.vue +0 -86
  50. package/components/lib/bpmAudit/src/part/editor.vue +0 -316
  51. package/components/lib/bpmAudit/src/part/reader.vue +0 -217
  52. package/components/lib/bpmDateTime/index.js +0 -7
  53. package/components/lib/bpmDateTime/src/main.vue +0 -82
  54. package/components/lib/bpmDateTime/src/part/editor.vue +0 -124
  55. package/components/lib/bpmDateTime/src/part/reader.vue +0 -55
  56. package/components/lib/bpmField/index.js +0 -7
  57. package/components/lib/bpmField/src/main.vue +0 -176
  58. package/components/lib/bpmMulFile/index.js +0 -7
  59. package/components/lib/bpmMulFile/src/main.vue +0 -86
  60. package/components/lib/bpmMulFile/src/part/editor.vue +0 -433
  61. package/components/lib/bpmMulFile/src/part/lib/compressImageUtils.js +0 -226
  62. package/components/lib/bpmMulFile/src/part/lib/utils.js +0 -281
  63. package/components/lib/bpmMulFile/src/part/reader.vue +0 -303
  64. package/components/lib/bpmMulImage/index.js +0 -7
  65. package/components/lib/bpmMulImage/src/main.vue +0 -87
  66. package/components/lib/bpmMulImage/src/part/editor.vue +0 -445
  67. package/components/lib/bpmMulImage/src/part/lib/compressImageUtils.js +0 -226
  68. package/components/lib/bpmMulImage/src/part/lib/utils.js +0 -281
  69. package/components/lib/bpmMulImage/src/part/reader.vue +0 -171
  70. package/components/lib/bpmNumber/index.js +0 -7
  71. package/components/lib/bpmNumber/src/main.vue +0 -83
  72. package/components/lib/bpmNumber/src/part/editor.vue +0 -48
  73. package/components/lib/bpmNumber/src/part/reader.vue +0 -7
  74. package/components/lib/bpmSelect/index.js +0 -7
  75. package/components/lib/bpmSelect/src/main.vue +0 -90
  76. package/components/lib/bpmSelect/src/part/editor.vue +0 -75
  77. package/components/lib/bpmSelect/src/part/reader.vue +0 -44
  78. package/components/lib/bpmSelectCheckItem/index.js +0 -7
  79. package/components/lib/bpmSelectCheckItem/src/main.vue +0 -101
  80. package/components/lib/bpmSelectCheckItem/src/part/editor.vue +0 -107
  81. package/components/lib/bpmSelectCheckItem/src/part/reader.vue +0 -7
  82. package/components/lib/bpmSelectFromField/index.js +0 -7
  83. package/components/lib/bpmSelectFromField/src/main.vue +0 -97
  84. package/components/lib/bpmSelectFromField/src/part/editor.vue +0 -82
  85. package/components/lib/bpmSelectFromField/src/part/reader.vue +0 -7
  86. package/components/lib/bpmSelectFromForm/index.js +0 -7
  87. package/components/lib/bpmSelectFromForm/src/main.vue +0 -103
  88. package/components/lib/bpmSelectFromForm/src/part/editor.vue +0 -181
  89. package/components/lib/bpmSelectFromForm/src/part/reader.vue +0 -7
  90. package/components/lib/bpmSelectFromId/index.js +0 -7
  91. package/components/lib/bpmSelectFromId/src/main.vue +0 -102
  92. package/components/lib/bpmSelectFromId/src/part/editor.vue +0 -260
  93. package/components/lib/bpmSelectFromId/src/part/reader.vue +0 -7
  94. package/components/lib/bpmSubForm/index.js +0 -7
  95. package/components/lib/bpmSubForm/src/main.vue +0 -181
  96. package/components/lib/bpmText/index.ts +0 -13
  97. package/components/lib/bpmText/src/main.vue +0 -87
  98. package/components/lib/bpmText/src/part/editor.vue +0 -104
  99. package/components/lib/bpmText/src/part/reader.vue +0 -7
  100. package/components/lib/bpmTime/index.js +0 -7
  101. package/components/lib/bpmTime/src/main.vue +0 -83
  102. package/components/lib/bpmTime/src/part/editor.vue +0 -54
  103. package/components/lib/bpmTime/src/part/reader.vue +0 -24
  104. package/components/lib/demo/index.js +0 -7
  105. package/components/lib/demo/src/main.vue +0 -11
  106. package/components/lib/demo2/index.js +0 -7
  107. package/components/lib/demo2/src/main.vue +0 -11
  108. package/components/lib/field-const.js +0 -469
  109. package/components/lib/index.ts +0 -72
  110. package/components/lib/mixins/RemoteSelectReader.vue +0 -55
  111. package/components/lib/mixins/TextReader.vue +0 -22
  112. package/components/lib/net.js +0 -21
  113. package/components/lib/utils.js +0 -89
  114. package/components/sfc.d.ts +0 -27
  115. package/dist/bpmDateTime.umd.js.LICENSE.txt +0 -38
  116. package/dist/bpmNumber.umd.js.LICENSE.txt +0 -38
  117. package/dist/bpmSelect.umd.js.LICENSE.txt +0 -38
  118. package/dist/bpmSelectUser.umd.js +0 -1
  119. package/dist/bpmText.umd.js.LICENSE.txt +0 -38
  120. 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,13 +0,0 @@
1
- import BpmText from './src/main.vue'
2
-
3
- declare module 'vue/types/vue' {
4
- interface VueConstructor {
5
- install: any
6
- }
7
- }
8
-
9
- (BpmText as any).install = function(Vue:any) {
10
- Vue.component(BpmText.name , BpmText);
11
- }
12
-
13
- export default BpmText
@@ -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,7 +0,0 @@
1
-
2
- <script>
3
- import TextReader from "../../../mixins/TextReader.vue"
4
- export default {
5
- mixins: [TextReader]
6
- }
7
- </script>
@@ -1,7 +0,0 @@
1
- import BpmTime from './src/main.vue'
2
-
3
- BpmTime.install = function(Vue) {
4
- Vue.component(BpmTime.name , BpmTime);
5
- }
6
-
7
- export default BpmTime
@@ -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>
@@ -1,7 +0,0 @@
1
- import Demo from './src/main.vue'
2
-
3
- Demo.install = function(Vue) {
4
- Vue.component(Demo.name , Demo);
5
- }
6
-
7
- export default Demo
@@ -1,11 +0,0 @@
1
- <template>
2
- <div>
3
- <h1 class="m-demo">demo1</h1>
4
- </div>
5
-
6
- </template>
7
- <script>
8
- export default {
9
- name: "Demo"
10
- }
11
- </script>
@@ -1,7 +0,0 @@
1
- import Demo2 from './src/main.vue'
2
-
3
- Demo2.install = function(Vue) {
4
- Vue.component(Demo2.name , Demo2);
5
- }
6
-
7
- export default Demo2
@@ -1,11 +0,0 @@
1
- <template>
2
- <div>
3
- <h1 class="m-demo">demo2</h1>
4
- </div>
5
-
6
- </template>
7
- <script>
8
- export default {
9
- name: "Demo2"
10
- }
11
- </script>