@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,124 +0,0 @@
1
- <template>
2
- <div class="bpm-date-time-edit">
3
- <el-date-picker
4
- v-model="curVal"
5
- :format="format"
6
- :picker-options="pickerOptions"
7
- :value-format="checkFormat"
8
- :type="type"
9
- :default-value="defaultVal"
10
- >
11
- </el-date-picker>
12
- </div>
13
- </template>
14
-
15
-
16
- <script>
17
- import _ from "lodash";
18
-
19
- import Vue from "vue";
20
-
21
- import { DatePicker } from "element-ui";
22
-
23
- Vue.use(DatePicker);
24
-
25
- export default {
26
- data() {
27
- let that = this;
28
- return {
29
- curVal: "",
30
- pickerOptions: {
31
- disabledDate(date) {
32
- return date.getTime() <= that.max && date.getTime() >= that.min;
33
- },
34
- },
35
- };
36
- },
37
- props: ["value", "fieldConf", "row"],
38
- watch: {
39
- curVal(val) {
40
- console.log("val", val, this.checkFormat)
41
- this.$emit("input", val);
42
- },
43
- value(){
44
- this.curVal = this.value
45
- }
46
- },
47
- computed: {
48
- type() {
49
- let type = _.toLower(_.get(this.fieldConf, "type"));
50
- return this.isMonth ? "month" : type;
51
- },
52
- isMonth() {
53
- let rangeType = _.get(this.fieldConf, "range_type");
54
- return rangeType == "C1M";
55
- },
56
- format() {
57
- let format = _.get(this.fieldConf, "view.format")
58
- if(format){
59
- format = format.replaceAll('Y', 'y')
60
- format = format.replaceAll('D', 'd')
61
- }
62
- return format
63
- },
64
- max() {
65
- let date = this.analyzeLimit("tmax");
66
- return date;
67
- },
68
- min() {
69
- let date = this.analyzeLimit("tmin");
70
- return date;
71
- },
72
- checkFormat() {
73
- let format = _.get(this.fieldConf, "check.format")
74
- if(format){
75
- format = format.replaceAll('Y', 'y')
76
- format = format.replaceAll('D', 'd')
77
- }
78
- return format;
79
- },
80
- defaultVal() {
81
- return new Date();
82
- }
83
- },
84
- mounted() {
85
- this.curVal = this.value;
86
- },
87
- methods: {
88
- analyzeLimit(type) {
89
- let data = _.get(this.fieldConf, `check.${type}`);
90
- if (!data) return;
91
- let result = null;
92
- let now = new Date().getTime();
93
- switch (data.type) {
94
- case "LimitDateOffset":
95
- var delta = data.offset_days;
96
- result = this.deltaToDate(now, delta);
97
- break;
98
- case "LimitDateOffsetByField":
99
- var delta_1 = data.offset_days;
100
- var value = this.value;
101
- if (!value) return 0;
102
- result = this.deltaToDate(value, delta_1);
103
- break;
104
- case "LimitDateByValue":
105
- var date = data.value;
106
- date = new Date(date).getTime();
107
- this.deltaToDate(date, 0);
108
- break;
109
- default:
110
- break;
111
- }
112
- return result;
113
- },
114
- deltaToDate(date, delta) {
115
- // 获得 和今天的偏差天数对应的 date
116
- date = new Date(date)
117
- let days = date.getDate() + delta
118
- date.setDate(days)
119
- return date
120
- }
121
- },
122
- };
123
- </script>
124
-
@@ -1,55 +0,0 @@
1
- <template>
2
- <span :title="dateTimeStr">{{ dateTimeStr }}</span>
3
- </template>
4
-
5
- <script>
6
- import _ from "lodash";
7
- import fecha from "fecha"
8
- import {isMobile} from "../../../utils"
9
-
10
- export default {
11
- props: ["value", "fieldConf", "row"],
12
- data() {
13
- return {
14
- dateTimeStr: "",
15
- };
16
- },
17
- computed: {
18
- format() {
19
- let format = _.get(this.fieldConf, "view.format")
20
- return format
21
- },
22
- },
23
- watch: {
24
- ["value"]() {
25
- this.dateTimeStr = this.formatViewTime();
26
- },
27
- },
28
- mounted() {
29
- this.dateTimeStr = this.formatViewTime();
30
- },
31
- methods: {
32
- formatViewTime() {
33
- let time = this.value;
34
- if (!time) return "";
35
- if (_.isInteger(time)) {
36
- let timeStr = _.toString(time);
37
- if (timeStr.length != 13) time = time * 1000;
38
- }
39
- let timeStamp;
40
- if (isMobile()) {
41
- time = time.replace(/-/g, "/");
42
- time = time.replace(/T/g, " ");
43
- time = time.padEnd(10, "/01/01");
44
- timeStamp = new Date(time).getTime();
45
- } else {
46
- timeStamp = new Date(time).getTime();
47
- }
48
-
49
- let formattedString = fecha.format(timeStamp, this.format);
50
- return formattedString;
51
- },
52
-
53
- },
54
- };
55
- </script>
@@ -1,7 +0,0 @@
1
- import BpmField from './src/main.vue'
2
-
3
- BpmField.install = function(Vue) {
4
- Vue.component(BpmField.name , BpmField);
5
- }
6
-
7
- export default BpmField
@@ -1,176 +0,0 @@
1
- <template>
2
- <component
3
- v-if="curComponent"
4
- class="bpm-field"
5
- v-model="curVal"
6
- :is="curComponent"
7
- :type="type"
8
- :fieldConf="fieldConf"
9
- :row="row"
10
- :mode="mode"
11
- :uiType="uiType"
12
- :formDefId="formDefId"
13
- :orgInfo="orgInfo"
14
- :clearable="clearable"
15
- :disabled="disabled"
16
- :isMultiple="isMul"
17
- v-bind="$attrs"
18
- v-on="$listeners"
19
- >
20
- </component>
21
- </template>
22
- <script>
23
- import _ from "lodash";
24
- import BpmText from "../../bpmText";
25
- import BpmSelect from "../../bpmSelect";
26
- import BpmTime from "../../bpmTime";
27
- import BpmNumber from "../../bpmNumber";
28
- import BpmDateTime from "../../bpmDateTime";
29
- import BpmMulFile from "../../bpmMulFile";
30
- import BpmSelectCheckItem from "../../bpmSelectCheckItem";
31
- import BpmSelectFromField from "../../bpmSelectFromField";
32
- import BpmMulImage from "../../bpmMulImage";
33
- import BpmSelectFromForm from "../../bpmSelectFromForm";
34
- import BpmSelectFromId from "../../bpmSelectFromId";
35
- import BpmSubForm from '../../bpmSubForm';
36
- import BpmAudit from '../../bpmAudit';
37
-
38
- const bpmComponents = {
39
- BpmText,
40
- BpmSelect,
41
- BpmTime,
42
- BpmNumber,
43
- BpmDateTime,
44
- BpmMulFile,
45
- BpmSelectCheckItem,
46
- BpmSelectFromField,
47
- BpmMulImage,
48
- BpmSelectFromForm,
49
- BpmSelectFromId,
50
- BpmSubForm,
51
- 'BpmSignature': BpmMulImage,
52
- 'BpmSerialNumber': BpmText,
53
- 'BpmDate': BpmDateTime,
54
- 'BpmTextArea': BpmText,
55
- 'BpmMulSelect': BpmSelect,
56
- 'BpmStatus': BpmSelect,
57
- 'BpmMulImg': BpmMulFile,
58
- 'BpmMulSelectCheckItem': BpmSelectCheckItem,
59
- 'BpmMulSelectFromField': BpmSelectFromField,
60
- 'BpmSelectUser': BpmSelectFromField,
61
- 'BpmMulSelectUser': BpmSelectFromField,
62
- 'BpmSelectPartner': BpmSelectFromField,
63
- 'BpmMulSelectPartner': BpmSelectFromField,
64
- 'BpmSelectProject': BpmSelectFromField,
65
- 'BpmMulSelectProject': BpmSelectFromField,
66
- 'BpmSelectOrg': BpmSelectFromField,
67
- 'BpmMulSelectOrg': BpmSelectFromField,
68
- 'BpmMulSelectFromForm': BpmSelectFromForm,
69
- 'BpmMulSelectFromId': BpmSelectFromId,
70
- 'BpmMulSelectUrUser': BpmSelectFromField,
71
- 'BpmSelectUrUser': BpmSelectFromField,
72
- 'BpmSelectRootCategory': BpmSelectFromField,
73
- 'BpmMulSelectSort': BpmSelectCheckItem,
74
- 'BpmSelectSort': BpmSelectCheckItem,
75
- 'BpmXSubForm': BpmSubForm,
76
- 'BpmOrderSubform': BpmSubForm,
77
- BpmAudit
78
- };
79
-
80
- export default {
81
- name: "BpmField",
82
- components: bpmComponents,
83
- props: {
84
- value: {
85
- type: [String, Array, Number, Object],
86
-
87
- },
88
- type: {
89
- type: String,
90
- default: 'Text'
91
- },
92
- fieldConf: {
93
- type: Object,
94
- default() {
95
- return {};
96
- },
97
- },
98
- row: {
99
- type: Object,
100
- default() {
101
- return {};
102
- },
103
- },
104
- mode: {
105
- type: String,
106
- default: 'view' // view, edit
107
- },
108
- uiType: {
109
- type: String,
110
- default: 'default' // default,table,form,search
111
- },
112
- formDefId: {
113
- type: String,
114
- default: ''
115
- },
116
- orgInfo: {
117
- type: Object,
118
- default () {
119
- return {
120
- level: 'group', // group,team,project
121
- level_id: 0,
122
- group_id: 0
123
- }
124
- }
125
- },
126
- clearable: { // 仅对mode=edit有效
127
- type: Boolean,
128
- default: false
129
- },
130
- disabled: { // 仅对mode=edit有效
131
- type: Boolean,
132
- default: false
133
- },
134
- isMultiple: {
135
- type: Boolean,
136
- default() {
137
- return false;
138
- },
139
- }
140
- },
141
- data () {
142
- return {
143
- curVal: ""
144
- }
145
- },
146
- watch: {
147
- curVal(val){
148
- this.$emit("input", val)
149
- this.$emit("change", val)
150
- },
151
- value(){
152
- this.curVal = this.value
153
- }
154
- },
155
- computed: {
156
- curComponent() {
157
- let componentType = _.get(this.fieldConf, "type");
158
- if (!bpmComponents[`Bpm${componentType}`]) return
159
- return `Bpm${componentType}`;
160
- },
161
- componentType(){
162
- return _.get(this.fieldConf, "type")
163
- },
164
- isMul() {
165
- let type = this.componentType
166
- let isContainMul = type && type.indexOf("Mul") > -1;
167
- return this.isMultiple || isContainMul
168
- },
169
- },
170
- mounted () {
171
- this.$bpm.env.form_name = this.formDefId
172
- this.curVal = this.value
173
- this.$bpm.orgInfo = this.orgInfo
174
- }
175
- };
176
- </script>
@@ -1,7 +0,0 @@
1
- import BpmMulFile from './src/main.vue'
2
-
3
- BpmMulFile.install = function(Vue) {
4
- Vue.component(BpmMulFile.name , BpmMulFile);
5
- }
6
-
7
- export default BpmMulFile
@@ -1,86 +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: "BpmMulFile",
21
- components: {
22
- editorComponent,
23
- readerComponent
24
- },
25
- props: {
26
- value: {
27
- // type: Array
28
- },
29
- fieldConf: {
30
- type: Object,
31
- default() {
32
- return {};
33
- },
34
- },
35
- row: {
36
- type: Object,
37
- default() {
38
- return {};
39
- },
40
- },
41
- mode: {
42
- type: String,
43
- default() {
44
- return "view";
45
- },
46
- },
47
- uiType: {
48
- type: String,
49
- default() {
50
- return "default";
51
- },
52
- },
53
- },
54
- data () {
55
- return {
56
- curVal: ""
57
- }
58
- },
59
- computed: {
60
- curComponent() {
61
- if (this.mode == "view") {
62
- return readerComponent;
63
- } else {
64
- return editorComponent;
65
- }
66
- },
67
- },
68
- watch: {
69
- curVal(val){
70
- this.$emit("input", val)
71
- this.$emit("change", val);
72
- },
73
- value(){
74
- this.curVal = this.value
75
- },
76
-
77
- },
78
- mounted () {
79
- this.curVal = this.value
80
- }
81
- };
82
- </script>
83
-
84
- <style>
85
- @import "../../../css/bpmMulFile.less";
86
- </style>