three-trees-ui 1.0.17 → 1.0.19

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 (45) hide show
  1. package/lib/three-trees-ui.common.js +1625 -962
  2. package/lib/three-trees-ui.css +1 -1
  3. package/lib/three-trees-ui.umd.js +1625 -962
  4. package/lib/three-trees-ui.umd.min.js +1 -1
  5. package/package.json +1 -1
  6. package/packages/Autocomplete/src/main.vue +1 -0
  7. package/packages/Avatar/src/AvatarImage.vue +1 -1
  8. package/packages/Button/src/main.vue +1 -0
  9. package/packages/Cascader/src/main.vue +1 -0
  10. package/packages/Checkbox/src/main.vue +1 -0
  11. package/packages/CustomDialog/src/customDialog.vue +488 -165
  12. package/packages/CustomDialog/src/customMobileDialog.vue +466 -155
  13. package/packages/CustomDialog/src/main.vue +204 -12
  14. package/packages/Date/src/main.vue +1 -0
  15. package/packages/DatePicker/src/main.vue +1 -0
  16. package/packages/Demension/src/main.vue +1 -1
  17. package/packages/Dictionary/src/main.vue +1 -0
  18. package/packages/DimensionSelector/src/main.vue +3 -0
  19. package/packages/DimensionSelectorInput/src/main.vue +1 -0
  20. package/packages/Divider/src/main.vue +1 -0
  21. package/packages/Editor/src/main.vue +7 -7
  22. package/packages/File/src/main.vue +1 -0
  23. package/packages/Global/src/GlobalQuery.vue +0 -1
  24. package/packages/Iframe/src/main.vue +177 -176
  25. package/packages/Image/src/main.vue +12 -9
  26. package/packages/Input/src/main.vue +1 -0
  27. package/packages/JobSelector/src/main.vue +1 -0
  28. package/packages/JobSelectorInput/src/main.vue +1 -0
  29. package/packages/OrgSelector/src/main.vue +1 -0
  30. package/packages/OrgSelectorInput/src/OrgSelectorInput.vue +1 -0
  31. package/packages/PostSelector/src/main.vue +1 -0
  32. package/packages/PostSelectorInput/src/PostSelectorInput.vue +1 -0
  33. package/packages/Radio/src/main.vue +1 -0
  34. package/packages/Rate/src/main.vue +1 -0
  35. package/packages/ReadonlyInput/src/main.vue +1 -0
  36. package/packages/RoleSelector/src/main.vue +1 -0
  37. package/packages/RoleSelectorInput/src/main.vue +1 -0
  38. package/packages/Select/src/main.vue +1 -0
  39. package/packages/SelectTree/src/SelectTree.vue +1 -0
  40. package/packages/Switch/src/main.vue +1 -0
  41. package/packages/TimePicker/src/main.vue +1 -0
  42. package/packages/TimeSelect/src/main.vue +1 -0
  43. package/packages/Tree/src/main.vue +8 -3
  44. package/packages/UserDialog/src/main.vue +1 -1
  45. package/packages/UserSelector/src/main.vue +1 -0
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :name="iframeNmae + 'Div'">
2
+ <div :name="iframeNmae + 'Div'" class="ht-iframe">
3
3
  <iframe
4
4
  id="iframeControl"
5
5
  v-if="isReday"
@@ -13,196 +13,197 @@
13
13
  </div>
14
14
  </template>
15
15
  <script>
16
- import { decode } from '@/util/base64'
17
- export default {
18
- name: 'HtIframe',
19
- componentName: 'HtIframe',
20
- props: {
21
- src: {
22
- type: String,
23
- default: '',
24
- },
25
- height: { type: String, default: '500px' },
26
- width: { type: String, default: '100%' },
27
- iframeStyle: { type: String, default: '' },
28
- iframeNmae: { type: String, default: 'iframeControl' },
29
- frameborder: { type: String, default: '1' },
30
- data: {
31
- type: Object,
32
- default: () => {
33
- return []
16
+ import { decode } from '@/util/base64'
17
+ export default {
18
+ name: 'HtIframe',
19
+ componentName: 'HtIframe',
20
+ props: {
21
+ src: {
22
+ type: String,
23
+ default: '',
34
24
  },
35
- },
36
- permission: {
37
- type: Object,
38
- default: () => {
39
- return {}
25
+ height: { type: String, default: '500px' },
26
+ width: { type: String, default: '100%' },
27
+ iframeStyle: { type: String, default: '' },
28
+ iframeNmae: { type: String, default: 'iframeControl' },
29
+ frameborder: { type: String, default: '1' },
30
+ data: {
31
+ type: Object,
32
+ default: () => {
33
+ return []
34
+ },
40
35
  },
41
- },
42
- instId: { type: String, default: '' },
43
- isBusinessForm: { type: Boolean, default: false },
44
- urlParameter: {
45
- type: [Array, Object],
46
- default: () => {
47
- return {}
36
+ permission: {
37
+ type: Object,
38
+ default: () => {
39
+ return {}
40
+ },
48
41
  },
49
- },
50
- returnParameter: {
51
- type: [Array, Object],
52
- default: () => {
53
- return {}
42
+ instId: { type: String, default: '' },
43
+ isBusinessForm: { type: Boolean, default: false },
44
+ urlParameter: {
45
+ type: [Array, Object],
46
+ default: () => {
47
+ return {}
48
+ },
49
+ },
50
+ returnParameter: {
51
+ type: [Array, Object],
52
+ default: () => {
53
+ return {}
54
+ },
54
55
  },
56
+ iframeType: {
57
+ type: String, // static dynamic
58
+ default: 'static',
59
+ },
60
+ iframeSrcJs: String, // 动态url base64格式
55
61
  },
56
- iframeType: {
57
- type: String, // static dynamic
58
- default: 'static'
62
+ data() {
63
+ return {
64
+ subPageData: {},
65
+ endSrc: '',
66
+ isReday: false,
67
+ }
59
68
  },
60
- iframeSrcJs: String // 动态url base64格式
61
- },
62
- data() {
63
- return {
64
- subPageData: {},
65
- endSrc: '',
66
- isReday: false,
67
- }
68
- },
69
- async mounted() {
70
- let _this = this
71
- //拼接url参数
72
- if (!this.src) {
73
- this.$message.error('当前URL表单地址未填写。')
74
- return
75
- }
76
- if (this.iframeType == 'dynamic') {
77
- await this.getDynamicSrc()
78
- } else {
79
- this.endSrc = this.src
80
- }
81
- if (this.isBusinessForm) {
82
- if (
83
- this.urlParameter &&
84
- this.urlParameter instanceof Array &&
85
- this.urlParameter.length > 0
86
- ) {
87
- this.disposeUrl()
69
+ async mounted() {
70
+ let _this = this
71
+ //拼接url参数
72
+ if (!this.src) {
73
+ this.$message.error('当前URL表单地址未填写。')
74
+ return
88
75
  }
89
- }
90
- //父子页面事件监听器
91
- window.addEventListener('message', (e) => {
92
- if (e.data && e.data.type && e.data.iframeNmae == this.iframeNmae) {
93
- if (e.data.type == 'getParentPageData') {
94
- _this.getParentPageDataMsg()
95
- } else if (e.data.type == 'getSubPageData') {
96
- _this.getSubPageData(e.data.data)
97
- } else if (e.data.type == 'addHeight') {
98
- _this.addHeight(e.data.height)
99
- }
76
+ if (this.iframeType == 'dynamic') {
77
+ await this.getDynamicSrc()
78
+ } else {
79
+ this.endSrc = this.src
100
80
  }
101
- })
102
- this.isReday = true
103
- },
104
- created() {},
105
- methods: {
106
- async getDynamicSrc() {
107
- if (!this.iframeSrcJs) {
108
- return
81
+ if (this.isBusinessForm) {
82
+ if (
83
+ this.urlParameter &&
84
+ this.urlParameter instanceof Array &&
85
+ this.urlParameter.length > 0
86
+ ) {
87
+ this.disposeUrl()
88
+ }
109
89
  }
110
- let _this = this
111
- let data = this.data
112
- let currentUserDetail = await this.$requestConfig.getCurrentUser()
113
- let userId = this.$requestConfig.getUserId()
114
- let account = this.$requestConfig.getAccount()
115
- let token = this.$requestConfig.getToken()
116
- const preScript = `const scriptFunction = function(_this,data,currentUserDetail,userId,account,token){
90
+ //父子页面事件监听器
91
+ window.addEventListener('message', (e) => {
92
+ if (e.data && e.data.type && e.data.iframeNmae == this.iframeNmae) {
93
+ if (e.data.type == 'getParentPageData') {
94
+ _this.getParentPageDataMsg()
95
+ } else if (e.data.type == 'getSubPageData') {
96
+ _this.getSubPageData(e.data.data)
97
+ } else if (e.data.type == 'addHeight') {
98
+ _this.addHeight(e.data.height)
99
+ }
100
+ }
101
+ })
102
+ this.isReday = true
103
+ },
104
+ created() {},
105
+ methods: {
106
+ async getDynamicSrc() {
107
+ if (!this.iframeSrcJs) {
108
+ return
109
+ }
110
+ let _this = this
111
+ let data = this.data
112
+ let currentUserDetail = await this.$requestConfig.getCurrentUser()
113
+ let userId = this.$requestConfig.getUserId()
114
+ let account = this.$requestConfig.getAccount()
115
+ let token = this.$requestConfig.getToken()
116
+ const preScript = `const scriptFunction = function(_this,data,currentUserDetail,userId,account,token){
117
117
  ${decode(this.iframeSrcJs)}
118
118
  };`
119
- this.endSrc = eval(`${preScript} scriptFunction(_this,data,currentUserDetail,userId,account,token);`)
120
- },
121
- addHeight(height) {
122
- this.height = height
123
- },
124
- async disposeUrl() {
125
- let currentUserDetail = await this.$requestConfig.getCurrentUser()
119
+ this.endSrc = eval(
120
+ `${preScript} scriptFunction(_this,data,currentUserDetail,userId,account,token);`
121
+ )
122
+ },
123
+ addHeight(height) {
124
+ this.height = height
125
+ },
126
+ async disposeUrl() {
127
+ let currentUserDetail = await this.$requestConfig.getCurrentUser()
126
128
 
127
- let vStr = ''
128
- for (let x = 0; x < this.urlParameter.length; x++) {
129
- let parma = this.urlParameter[x]
130
- if (parma.type == 1) {
131
- vStr = vStr + `&${parma.key}=${this.getFromData(parma.value)}`
132
- } else if (parma.type == 2) {
133
- vStr = vStr + `&${parma.key}=${parma.value}`
134
- } else if (parma.type == 3 && parma.value) {
135
- let _this = this
136
- const preScript = `const scriptFunction = function(_this){
129
+ let vStr = ''
130
+ for (let x = 0; x < this.urlParameter.length; x++) {
131
+ let parma = this.urlParameter[x]
132
+ if (parma.type == 1) {
133
+ vStr = vStr + `&${parma.key}=${this.getFromData(parma.value)}`
134
+ } else if (parma.type == 2) {
135
+ vStr = vStr + `&${parma.key}=${parma.value}`
136
+ } else if (parma.type == 3 && parma.value) {
137
+ let _this = this
138
+ const preScript = `const scriptFunction = function(_this){
137
139
  ${Base64.decode(parma.value)}
138
140
  };`
139
- const result = eval(`${preScript} scriptFunction(_this);`)
140
- if (result) {
141
- vStr = vStr + `&${parma.key}=${result}`
141
+ const result = eval(`${preScript} scriptFunction(_this);`)
142
+ if (result) {
143
+ vStr = vStr + `&${parma.key}=${result}`
144
+ }
145
+ } else if (parma.type == 4) {
146
+ let res = ''
147
+ if (parma.value == 1) {
148
+ res = currentUserDetail.fullname
149
+ } else if (parma.value == 2) {
150
+ res = currentUserDetail.userId
151
+ } else if (parma.value == 3) {
152
+ res = currentUserDetail.account
153
+ } else if (parma.value == 4) {
154
+ res = this.$requestConfig.getToken()
155
+ } else if (parma.value == 5) {
156
+ //得到任务id
157
+ res = this.$route.query.taskId
158
+ } else if (parma.value == 6) {
159
+ res = this.instId
160
+ }
161
+ vStr = vStr + `&${parma.key}=${res}`
142
162
  }
143
- } else if (parma.type == 4) {
144
- let res = ''
145
- if (parma.value == 1) {
146
- res = currentUserDetail.fullname
147
- } else if (parma.value == 2) {
148
- res = currentUserDetail.userId
149
- } else if (parma.value == 3) {
150
- res = currentUserDetail.account
151
- } else if (parma.value == 4) {
152
- res = this.$requestConfig.getToken()
153
- } else if (parma.value == 5) {
154
- //得到任务id
155
- res = this.$route.query.taskId
156
- } else if (parma.value == 6) {
157
- res = this.instId
158
- }
159
- vStr = vStr + `&${parma.key}=${res}`
160
163
  }
161
- }
162
- if (this.endSrc.includes('?')) {
163
- this.endSrc = this.endSrc + vStr
164
- } else {
165
- this.endSrc = this.endSrc + vStr.replace('&', '?')
166
- }
167
- },
168
- getFromData(path) {
169
- let pathAry = path.split('.')
170
- let v = this.data
171
- for (let x = 0; x < pathAry.length; x++) {
172
- v = v[pathAry[x]]
173
- }
174
- return v
175
- },
176
- getSubPageData(subPageData) {
177
- this.subPageData = subPageData
178
- console.log(subPageData)
179
- },
180
- getParentPageDataMsg() {
181
- const frm = this.getIframeDom()
182
- frm.contentWindow.postMessage(
183
- {
184
- type: 'getParentPageData',
185
- instId: this.instId,
186
- data: this.data,
187
- permission: this.permission,
188
- },
189
- '*'
190
- )
191
- },
192
- getIframeDom() {
193
- const frmControl = document.querySelectorAll(
194
- `[name='${this.iframeNmae}']`
195
- )
196
- if (!frmControl || !frmControl[0]) {
197
- this.$message.error('当前URL表单加载不正确。')
198
- return
199
- }
200
- return frmControl[0]
164
+ if (this.endSrc.includes('?')) {
165
+ this.endSrc = this.endSrc + vStr
166
+ } else {
167
+ this.endSrc = this.endSrc + vStr.replace('&', '?')
168
+ }
169
+ },
170
+ getFromData(path) {
171
+ let pathAry = path.split('.')
172
+ let v = this.data
173
+ for (let x = 0; x < pathAry.length; x++) {
174
+ v = v[pathAry[x]]
175
+ }
176
+ return v
177
+ },
178
+ getSubPageData(subPageData) {
179
+ this.subPageData = subPageData
180
+ console.log(subPageData)
181
+ },
182
+ getParentPageDataMsg() {
183
+ const frm = this.getIframeDom()
184
+ frm.contentWindow.postMessage(
185
+ {
186
+ type: 'getParentPageData',
187
+ instId: this.instId,
188
+ data: this.data,
189
+ permission: this.permission,
190
+ },
191
+ '*'
192
+ )
193
+ },
194
+ getIframeDom() {
195
+ const frmControl = document.querySelectorAll(
196
+ `[name='${this.iframeNmae}']`
197
+ )
198
+ if (!frmControl || !frmControl[0]) {
199
+ this.$message.error('当前URL表单加载不正确。')
200
+ return
201
+ }
202
+ return frmControl[0]
203
+ },
204
+ //流程系统获取业务系统的表单数据
205
+ getSubPageData() {},
201
206
  },
202
- //流程系统获取业务系统的表单数据
203
- getSubPageData() {},
204
- },
205
- }
207
+ }
206
208
  </script>
207
- <style lang="scss" scoped>
208
- </style>
209
+ <style lang="scss" scoped></style>
@@ -4,6 +4,7 @@
4
4
  :src="src"
5
5
  :style="imgStyle"
6
6
  @click="imgClick"
7
+ class="ht-image"
7
8
  />
8
9
  </template>
9
10
  <script>
@@ -45,15 +46,17 @@
45
46
  if (this.fileJson && this.$requestConfig.download) {
46
47
  var json = JSON.parse(this.fileJson)
47
48
  // 全局附件下载方法
48
- this.$requestConfig.download(json[0].id).then((response) => {
49
- const data =
50
- response instanceof ArrayBuffer ? response : response.data
51
- this.src = createObjectURL(new Blob([data]))
52
- })
53
- .catch((err) => {
54
- //表单预览,下载图片等文件失败时,提示语
55
- this.$message.error(`文件下载失败,请重新上传`)
56
- })
49
+ this.$requestConfig
50
+ .download(json[0].id)
51
+ .then((response) => {
52
+ const data =
53
+ response instanceof ArrayBuffer ? response : response.data
54
+ this.src = createObjectURL(new Blob([data]))
55
+ })
56
+ .catch((err) => {
57
+ //表单预览,下载图片等文件失败时,提示语
58
+ this.$message.error(`文件下载失败,请重新上传`)
59
+ })
57
60
  }
58
61
  } else {
59
62
  this.src = this.imgSrc
@@ -9,6 +9,7 @@
9
9
  : 'ht-form-inputs__inline',
10
10
  company ? 'has-company-box' : '',
11
11
  ]"
12
+ class="ht-input"
12
13
  >
13
14
  <el-input
14
15
  v-if="isShowInput"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-job-selector"
10
11
  >
11
12
  <div
12
13
  style="width: 100%; min-width:180px;"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-job-selector-input"
10
11
  >
11
12
  <ht-job-selector
12
13
  v-model="value"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-org-selector"
10
11
  >
11
12
  <div
12
13
  style="width: 100%; min-width:180px;"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-org-selector-input"
10
11
  >
11
12
  <ht-org-selector
12
13
  v-model="value"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-post-selector"
10
11
  >
11
12
  <div
12
13
  style="width: 100%; min-width:180px;"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-post-selector-input"
10
11
  >
11
12
  <ht-post-selector
12
13
  v-model="value"
@@ -6,6 +6,7 @@
6
6
  ? 'ht-form-inputs__block'
7
7
  : 'ht-form-inputs__inline',
8
8
  ]"
9
+ class="ht-radio"
9
10
  >
10
11
  <el-radio-group
11
12
  v-if="inputWriteable"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-rate"
10
11
  >
11
12
  <!-- 校验 -->
12
13
  <input
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-readonly-input"
10
11
  >
11
12
  <el-input
12
13
  v-show="roInputDisplayMode == 'input'"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-role-selector"
10
11
  >
11
12
  <div
12
13
  style="width: 100%; min-width:180px;"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-role-selector-input"
10
11
  >
11
12
  <ht-role-selector
12
13
  v-model="value"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-select"
10
11
  >
11
12
  <el-select
12
13
  v-if="inputWriteable"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-select-tree"
10
11
  >
11
12
  <el-select
12
13
  v-if="inputWriteable && ganged"
@@ -8,6 +8,7 @@
8
8
  ? 'ht-form-inputs__block'
9
9
  : 'ht-form-inputs__inline',
10
10
  ]"
11
+ class="ht-switch"
11
12
  >
12
13
  <el-switch
13
14
  v-if="isShowSwitch"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-time-picker"
10
11
  >
11
12
  <el-time-picker
12
13
  v-if="inputWriteable"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-time-select"
10
11
  >
11
12
  <el-time-select
12
13
  v-if="inputWriteable"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :style="containerStyle">
2
+ <div :style="containerStyle" class="ht-tree">
3
3
  <div v-if="supportFilter" class="tree-header flex">
4
4
  <slot name="custom-prefix"></slot>
5
5
  <el-input
@@ -267,13 +267,18 @@
267
267
  return (
268
268
  this.data &&
269
269
  this.data.length < 1 &&
270
- this.treeData && this.treeData.length < 1
270
+ this.treeData &&
271
+ this.treeData.length < 1
271
272
  )
272
273
  },
273
274
  },
274
275
  watch: {
275
276
  filterText(val) {
276
- this.$refs.elTree.filter(val)
277
+ if (this.lazy) {
278
+ this.$emit('loadALL', val)
279
+ } else {
280
+ this.$refs.elTree.filter(val)
281
+ }
277
282
  },
278
283
  defaultCheckedKeys(val) {
279
284
  this.$refs.elTree.setCheckedKeys(val)
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="inputs">
2
+ <div class="inputs ht-user-dialog">
3
3
  <user-selector-dialog
4
4
  v-if="!isMobile"
5
5
  ref="userSelectorDialog"
@@ -7,6 +7,7 @@
7
7
  ? 'ht-form-inputs__block'
8
8
  : 'ht-form-inputs__inline',
9
9
  ]"
10
+ class="ht-user-selector"
10
11
  >
11
12
  <div
12
13
  class="el-select"