imatrix-ui 2.9.15-dw-tmp2 → 2.9.16-boe10

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 (194) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +2 -2
  4. package/src/api/sso-service.js +19 -1
  5. package/src/assets/nonemessage.png +0 -0
  6. package/src/i18n/i18n.js +1 -1
  7. package/src/i18n/langs/cn.js +18 -6
  8. package/src/i18n/langs/en.js +20 -7
  9. package/src/permission.js +2 -2
  10. package/src/plugins.js +3 -3
  11. package/src/router/index.js +10 -0
  12. package/src/store/modules/tab-content.js +6 -0
  13. package/src/store/modules/user.js +32 -2
  14. package/src/styles/display-layout.scss +1 -1
  15. package/src/styles/index.scss +74 -4
  16. package/src/styles/theme/black/font-style.scss +70 -0
  17. package/src/styles/theme/black/index.scss +6 -30
  18. package/src/styles/theme/blue/font-style.scss +37 -0
  19. package/src/styles/theme/blue/index.scss +2 -18
  20. package/src/styles/theme/blue2/font-style.scss +70 -0
  21. package/src/styles/theme/blue2/index.scss +3 -13
  22. package/src/styles/theme/dark-blue/card.scss +4 -6
  23. package/src/styles/theme/dark-blue/form.scss +7 -4
  24. package/src/styles/theme/dark-blue/index.scss +30 -5
  25. package/src/styles/theme/dark-blue/message.scss +8 -0
  26. package/src/styles/theme/dark-blue/radio.scss +13 -0
  27. package/src/styles/theme/dark-blue/sidebar.scss +7 -37
  28. package/src/styles/theme/dark-blue/tab.scss +4 -1
  29. package/src/styles/theme/dark-blue/table.scss +1 -1
  30. package/src/styles/theme/dark-blue/tree.scss +35 -10
  31. package/src/styles/theme/gray/card-style.scss +13 -1
  32. package/src/styles/theme/gray/font-style.scss +38 -0
  33. package/src/styles/theme/gray/index.scss +13 -25
  34. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  35. package/src/styles/theme/gray/sidebar.scss +7 -14
  36. package/src/utils/auth-api.js +47 -1
  37. package/src/utils/common-util.js +22 -81
  38. package/src/utils/jump-page-utils.js +8 -10
  39. package/src/utils/range-selector.js +185 -0
  40. package/src/utils/request.js +6 -3
  41. package/src/utils/util.js +13 -11
  42. package/src/utils/workflow-util.js +3 -0
  43. package/src/views/dsc-component/Sidebar/Item.vue +7 -5
  44. package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
  45. package/src/views/dsc-component/Sidebar/index.vue +12 -20
  46. package/src/views/dsc-component/tabs/tab-content.vue +8 -9
  47. package/src/views/layout/EmptyLayout.vue +4 -1
  48. package/src/views/layout/NewLayout.vue +6 -65
  49. package/src/views/layout/components/AppMain.vue +2 -1
  50. package/src/views/layout/components/Menubar/Item.vue +23 -7
  51. package/src/views/layout/components/Menubar/Link.vue +11 -2
  52. package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
  53. package/src/views/layout/components/Menubar/index.vue +51 -16
  54. package/src/views/layout/components/tabs/tab-content.vue +162 -0
  55. package/src/views/layout/tab-content-iframe-index.vue +31 -0
  56. package/src/views/layout/tab-content-index.vue +85 -0
  57. package/src/views/login/index.vue +1 -1
  58. package/packages/breadcrumb/index.js +0 -6
  59. package/packages/breadcrumb/src/breadcrumb.vue +0 -71
  60. package/packages/department-tree/index.js +0 -6
  61. package/packages/department-tree/src/department-tree.vue +0 -108
  62. package/packages/department-tree-inline/index.js +0 -6
  63. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -408
  64. package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -290
  65. package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
  66. package/packages/department-tree-inline/src/department-tree-service.js +0 -273
  67. package/packages/department-tree-inline/src/search-result.vue +0 -176
  68. package/packages/department-user-tree/index.js +0 -6
  69. package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
  70. package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
  71. package/packages/department-user-tree/src/department-user-tree.vue +0 -101
  72. package/packages/department-user-tree-inline/index.js +0 -6
  73. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -636
  74. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -271
  75. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
  76. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -248
  77. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -142
  78. package/packages/department-user-tree-inline/src/search-result.vue +0 -197
  79. package/packages/directives/prevent-reclick.js +0 -19
  80. package/packages/dynamic-source-select/index.js +0 -6
  81. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
  82. package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
  83. package/packages/dynamic-source-select/src/events.js +0 -55
  84. package/packages/fs-preview/index.js +0 -6
  85. package/packages/fs-preview/src/fs-preview.vue +0 -226
  86. package/packages/fs-upload/index.js +0 -6
  87. package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
  88. package/packages/fs-upload/src/fs-upload-single.vue +0 -312
  89. package/packages/fs-upload/src/fs-upload.vue +0 -189
  90. package/packages/fs-upload/src/see-big-picture.vue +0 -55
  91. package/packages/fs-upload-list/index.js +0 -6
  92. package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
  93. package/packages/hamburger/index.js +0 -6
  94. package/packages/hamburger/src/hamburger.vue +0 -38
  95. package/packages/index.js +0 -121
  96. package/packages/multipart-upload/index.js +0 -6
  97. package/packages/multipart-upload/src/index.vue +0 -73
  98. package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
  99. package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
  100. package/packages/organization-input/index.js +0 -6
  101. package/packages/organization-input/src/organization-input.vue +0 -542
  102. package/packages/plugins/export-data-new.js +0 -466
  103. package/packages/plugins/export-data.js +0 -361
  104. package/packages/plugins/index.js +0 -15
  105. package/packages/plugins/public-method.js +0 -43
  106. package/packages/remove-department/index.js +0 -6
  107. package/packages/remove-department/src/remove-department.vue +0 -172
  108. package/packages/remove-department/src/remove-dept-service.js +0 -20
  109. package/packages/remove-user/index.js +0 -6
  110. package/packages/remove-user/src/remove-user-service.js +0 -20
  111. package/packages/remove-user/src/remove-user.vue +0 -195
  112. package/packages/remove-workgroup/index.js +0 -6
  113. package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
  114. package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
  115. package/packages/rich-editor/index.js +0 -7
  116. package/packages/rich-editor/index.vue +0 -278
  117. package/packages/rich-editor/langs/zh-Hans.js +0 -1
  118. package/packages/rich-editor/viewer.vue +0 -103
  119. package/packages/scan-code-input/index.js +0 -6
  120. package/packages/scan-code-input/src/events.js +0 -33
  121. package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
  122. package/packages/scan-code-input/src/scan-code-input.vue +0 -116
  123. package/packages/secret-info/index.js +0 -7
  124. package/packages/secret-info/index.vue +0 -90
  125. package/packages/super-grid/index.js +0 -7
  126. package/packages/super-grid/src/apis.js +0 -820
  127. package/packages/super-grid/src/columns-config.vue +0 -335
  128. package/packages/super-grid/src/custom-formatter.js +0 -278
  129. package/packages/super-grid/src/dynamic-input.vue +0 -1279
  130. package/packages/super-grid/src/eventBus.js +0 -2
  131. package/packages/super-grid/src/events.js +0 -55
  132. package/packages/super-grid/src/formValidatorUtil.js +0 -226
  133. package/packages/super-grid/src/formatter.js +0 -181
  134. package/packages/super-grid/src/group-column.vue +0 -100
  135. package/packages/super-grid/src/header-context-menu.vue +0 -87
  136. package/packages/super-grid/src/index-column.vue +0 -51
  137. package/packages/super-grid/src/normal-column.vue +0 -771
  138. package/packages/super-grid/src/public-methods.js +0 -31
  139. package/packages/super-grid/src/row-operation.vue +0 -161
  140. package/packages/super-grid/src/search-button.vue +0 -66
  141. package/packages/super-grid/src/search-condition-input.vue +0 -61
  142. package/packages/super-grid/src/search-condition-list.vue +0 -59
  143. package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
  144. package/packages/super-grid/src/search-form-dialog.vue +0 -79
  145. package/packages/super-grid/src/search-form-item.vue +0 -404
  146. package/packages/super-grid/src/search-form-number.vue +0 -38
  147. package/packages/super-grid/src/search-form-open.vue +0 -170
  148. package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -196
  149. package/packages/super-grid/src/search-form.vue +0 -642
  150. package/packages/super-grid/src/search-methods.js +0 -448
  151. package/packages/super-grid/src/selection-column.vue +0 -43
  152. package/packages/super-grid/src/store.js +0 -3
  153. package/packages/super-grid/src/super-grid-service.js +0 -593
  154. package/packages/super-grid/src/super-grid.vue +0 -2882
  155. package/packages/super-grid/src/utils.js +0 -762
  156. package/packages/super-grid/src/view-image-dialog.vue +0 -130
  157. package/packages/super-nine-grid/index.js +0 -7
  158. package/packages/super-nine-grid/src/apis.js +0 -103
  159. package/packages/super-nine-grid/src/custom-formatter.js +0 -66
  160. package/packages/super-nine-grid/src/formatter.js +0 -132
  161. package/packages/super-nine-grid/src/search-form-number.vue +0 -38
  162. package/packages/super-nine-grid/src/search-form.vue +0 -430
  163. package/packages/super-nine-grid/src/search-methods.js +0 -134
  164. package/packages/super-nine-grid/src/store.js +0 -3
  165. package/packages/super-nine-grid/src/super-grid-service.js +0 -91
  166. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
  167. package/packages/super-nine-grid/src/utils.js +0 -261
  168. package/packages/svg-icon/index.js +0 -6
  169. package/packages/svg-icon/src/svg-icon.vue +0 -43
  170. package/packages/utils/memory-cache-utils.js +0 -90
  171. package/packages/utils/utils.js +0 -152
  172. package/packages/utils/value-set.js +0 -86
  173. package/packages/valid-code/index.js +0 -7
  174. package/packages/valid-code/src/valid-code.vue +0 -95
  175. package/packages/workflow-button/index.js +0 -6
  176. package/packages/workflow-button/src/workflow-button.vue +0 -325
  177. package/packages/workflow-history-list/index.js +0 -6
  178. package/packages/workflow-history-list/src/api.js +0 -7
  179. package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
  180. package/packages/workgroup-tree/index.js +0 -6
  181. package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
  182. package/packages/workgroup-tree-inline/index.js +0 -6
  183. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
  184. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
  185. package/packages/workgroup-user-tree/index.js +0 -6
  186. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
  187. package/packages/workgroup-user-tree-inline/index.js +0 -6
  188. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
  189. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
  190. package/packages/year-range-picker/index.js +0 -6
  191. package/packages/year-range-picker/src/year-range-picker.vue +0 -51
  192. package/report.20190716.140129.216348.001.json +0 -354
  193. package/src/index.js +0 -93
  194. package/src/styles/theme/gray/form-style.scss +0 -41
@@ -1,142 +0,0 @@
1
- import Vue from 'vue'
2
- import localStorage from '../../../src/utils/local-storage'
3
- import { getI18n } from '../../../src/utils/util'
4
- const departmentUserTreeSingleService = {
5
- // 后台查询部门,并拼接树节点
6
- filterAppendNodes(value) {
7
- this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/search-users', this.searchParam).then(result => {
8
- if (result) {
9
- this.searchResult = result
10
- if (result.length === 0) {
11
- this.searchResult = []
12
- this.$message({
13
- showClose: true,
14
- type: 'error',
15
- message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
16
- })
17
- return
18
- }
19
- } else {
20
- this.searchResult = []
21
- if (result.length === 0) {
22
- this.$message({
23
- showClose: true,
24
- type: 'error',
25
- message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
26
- })
27
- return
28
- }
29
- }
30
- })
31
- },
32
- querySearch(queryString, cb) {
33
- if (!this.filterText && this.filterText.length === 0) {
34
- this.memorySearch(queryString, cb)
35
- } else {
36
- this.search(this.filterText)
37
- cb([])
38
- }
39
- },
40
- handleSelect(item) {
41
- // this.handleSelectUtil(item, localStorage)
42
- // 查询最新用户信息替换,缓存为历史数据 数据库可能发生变化
43
- this.$http.get(Vue.prototype.baseAPI + '/api/users?loginName=' + item.loginName).then(userDTO => {
44
- if (userDTO !== null) {
45
- for (const dtoKey in userDTO) {
46
- if (item.hasOwnProperty(dtoKey)) {
47
- item[dtoKey] = userDTO[dtoKey]
48
- }
49
- }
50
- }
51
- this.filterText = ''
52
- this.searchValue = ''
53
- this.packageSelectResult(item)
54
- this.setMemoryCacheData(item, 'departmentUser')
55
- // 关闭弹窗
56
- this.$emit('result', this.selectNodeInfo)
57
- })
58
- },
59
- search(value) {
60
- this.searchValue = value
61
- let mySearchValue = value
62
- if (mySearchValue) {
63
- mySearchValue = mySearchValue.trim()
64
- }
65
- this.searchParam.searchValue = mySearchValue
66
- this.searchParam.departmentInfo = this.departmentInfo
67
- // this.searchParam.userField = this.searchField
68
- // 后台查询部门,并拼接树节点
69
- this.filterAppendNodes(value)
70
- },
71
- // 点击查询按钮调用的方法
72
- clickSearch() {
73
- this.selectNodeInfo = null
74
- this.storeSeachValue(localStorage, this.searchStoreKey, this.filterText)
75
- this.search(this.filterText)
76
- },
77
- // 初始化部门人员树
78
- initLoadDepartment(parentId, node, resolve, checkedKeys, parentNodeId) {
79
- var children = []
80
- if (node.data && node.data.children) {
81
- children = node.data.children
82
- }
83
- if (children && children.length > 0) {
84
- // 表示加载过该父节点的子节点,只需重新更新一下
85
- resolve(children)
86
- // 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
87
- if (checkedKeys && checkedKeys.indexOf(parentNodeId) > -1) {
88
- // 点击部门名称前的三角标识展开节点时,保持当前节点的选中状态
89
- // 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
90
- this.checkedChildrenUserNodes(node.data, node.data.children)
91
- }
92
- } else {
93
- // 表示没有加载过该父节点的子节点集合时
94
- const param = {
95
- parentId: parentId,
96
- needVirtualUser: this.isNeedVirtualUser
97
- }
98
- if (node.data) {
99
- param.branchId = node.data.branchId
100
- }
101
- this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/department-users', param).then(data => {
102
- resolve(data)
103
- // 更新当前点击的节点的子节点,必须加该方法,否则会导致子节点无法选中
104
- this.$refs.deparmentUserTree.updateKeyChildren(parentNodeId, data)
105
- if (parentId === 0) {
106
- // 初始化树时,展开公司节点
107
- const tenantData = data[0].data
108
- this.tenantInfo = JSON.parse(tenantData)
109
- this.containBranch = data[0].containBranch
110
- if (this.departmentInfo && this.departmentInfo.length > 0) {
111
- // 加载指定部门时,展开公司节点
112
- this.loadPointDepartments(this)
113
- } else {
114
- // 加载整个组织结构树时,展开公司节点
115
- this.loadDepartment(this.tenantNodeId, this.tenantNodeId + '')
116
- }
117
- }
118
- })
119
- }
120
- },
121
- loadDepartment(parentId, parentNodeId, isSearch, searchValue) {
122
- const param = {
123
- parentId: parentId,
124
- needVirtualUser: this.isNeedVirtualUser
125
- }
126
- this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/department-users', param).then(children => {
127
- this.$refs.deparmentUserTree.updateKeyChildren(parentNodeId, children)
128
- if (this.$refs.deparmentUserTree.store.nodesMap[parentNodeId]) {
129
- this.$refs.deparmentUserTree.store.nodesMap[parentNodeId].expanded = true
130
- }
131
- })
132
- },
133
- loadPointDepartments() {
134
- this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/point-department-users', this.departmentInfo).then(children => {
135
- this.$refs.deparmentUserTree.updateKeyChildren(this.tenantNodeId, children)
136
- if (this.$refs.deparmentUserTree.store.nodesMap[this.tenantNodeId]) {
137
- this.$refs.deparmentUserTree.store.nodesMap[this.tenantNodeId].expanded = true
138
- }
139
- })
140
- }
141
- }
142
- export default departmentUserTreeSingleService
@@ -1,197 +0,0 @@
1
- <template>
2
- <div style="height: 100%">
3
- <el-table
4
- ref="superGrid"
5
- :data="gridData"
6
- row-key="id"
7
- :row-class-name="tableRowClassName"
8
- :max-height="myHeight"
9
- border
10
- fit
11
- @row-click="rowClick"
12
- @row-dblclick="rowDblclick"
13
- >
14
- <el-table-column v-if="multiple === false" width="60" fixed>
15
- <template slot-scope="scope">
16
- <el-radio v-model="singleUserIndex" :label="scope.$index" @change="selectUser">
17
- {{ scope.$index+1 }}
18
- </el-radio>
19
- </template>
20
- </el-table-column>
21
- <el-table-column v-if="multiple && isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
22
- <template slot-scope="scope">
23
- <div>
24
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="isDisable(scope.row)" circle @click="addUser(scope.$index, scope.row)" />
25
- </div>
26
- </template>
27
- </el-table-column>
28
- <el-table-column v-if="multiple && !isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
29
- <template slot-scope="scope">
30
- <div>
31
- <el-button type="danger" size="mini" icon="el-icon-delete" circle @click="removeUser(scope.$index, scope.row)" />
32
- </div>
33
- </template>
34
- </el-table-column>
35
- <el-table-column v-if="multiple" :label="$t('superGrid.index')" align="center" width="60px">
36
- <template slot-scope="scope">
37
- {{ scope.$index+1 }}
38
- </template>
39
- </el-table-column>
40
- <el-table-column
41
- :label="$t('departmentUserTreeInline.name')"
42
- :width="130"
43
- prop="name"
44
- >
45
- <template slot-scope="scope">
46
- <span v-if="scope.row.enName && scope.row.enName.trim() !== ''" class="ellipsis cell--span" :title="scope.row.name+'('+scope.row.enName+')'">{{ scope.row.name+'('+scope.row.enName+')' }}</span>
47
- <span v-else class="ellipsis cell--span" :title="scope.row.name">{{ scope.row.name }}</span>
48
- </template>
49
- </el-table-column>
50
- <el-table-column
51
- :label="$t('departmentUserTreeInline.loginName')"
52
- :width="110"
53
- prop="loginName"
54
- >
55
- <template slot-scope="scope">
56
- <span class="ellipsis cell--span" :title="scope.row.loginName">{{ scope.row.loginName }}</span>
57
- </template>
58
- </el-table-column>
59
- <el-table-column
60
- :label="$t('departmentUserTreeInline.department')"
61
- :min-width="160"
62
- prop="mainDepartmentName"
63
- >
64
- <template slot-scope="scope">
65
- <span class="ellipsis cell--span" :title="language && language !== 'cn' && scope.row.mainDepartmentEnName ? scope.row.mainDepartmentEnName : scope.row.mainDepartmentName">{{ language && language !== 'cn' && scope.row.mainDepartmentEnName ? scope.row.mainDepartmentEnName : scope.row.mainDepartmentName }}</span>
66
- </template>
67
- </el-table-column>
68
- <!--由于保密要求,邮箱不能显示,需要脱敏处理,暂时注释掉,不显示-->
69
- <!-- <el-table-column
70
- :label="$t('departmentUserTreeInline.email')"
71
- :width="130"
72
- prop="email"
73
- >
74
- <template slot-scope="scope">
75
- <span class="ellipsis cell--span" :title="scope.row.email">{{ scope.row.email }}</span>
76
- </template>
77
- </el-table-column> -->
78
- <el-table-column
79
- v-if="containBranch"
80
- :label="$t('departmentUserTreeInline.branch')"
81
- :width="130"
82
- prop="subCompanyName"
83
- >
84
- <template slot-scope="scope">
85
- <span class="ellipsis cell--span" :title="scope.row.subCompanyName">{{ scope.row.subCompanyName }}</span>
86
- </template>
87
- </el-table-column>
88
- </el-table>
89
- </div>
90
- </template>
91
- <style>
92
- .searchResult {
93
- color:red
94
- }
95
- .inline-select-custom {
96
- width : 100px
97
- }
98
- .inline-input-custom {
99
- width : 98%
100
- }
101
- </style>
102
- <script>
103
- export default {
104
- name: 'UserResult',
105
- props: {
106
- gridData: {
107
- type: Array,
108
- default: null
109
- },
110
- containBranch: {
111
- type: Boolean,
112
- default: false
113
- },
114
- multiple: {
115
- type: Boolean,
116
- default: false
117
- },
118
- // 多选树时是否是查询结果列表,用于控制“操作”列按钮的显示
119
- isSearchResult: {
120
- type: Boolean,
121
- default: true
122
- },
123
- height: {
124
- type: String,
125
- default: '300px'
126
- },
127
- selectResult: {
128
- type: Array,
129
- default: function() {
130
- return []
131
- }
132
- }
133
-
134
- },
135
- data() {
136
- let tableHeight = this.height
137
- tableHeight = tableHeight.substring(0, tableHeight.indexOf('px'))
138
- const myHeight = (parseInt(tableHeight) + 30) + 'px'
139
- return {
140
- singleUserIndex: null, // 选中的用户序号
141
- selectedUser: null,
142
- myHeight,
143
- language: !window.$locale ? 'cn' : window.$locale
144
- }
145
- },
146
- created() {
147
- },
148
- methods: {
149
- // 单选树时,点击行事件
150
- // rowClick(row, column, event) {
151
- // this.selectedUser = row
152
- // // this.$emit('rowClick', row, column, event)
153
- // },
154
- // 移除用户
155
- removeUser(index, row) {
156
- this.$emit('removeUser', index, row)
157
- },
158
- // 添加用户
159
- addUser(index, row) {
160
- this.$emit('addUser', index, row)
161
- },
162
- selectUser(selectVal) {
163
- // console.log('selectUser', selectVal)
164
- this.$emit('selectResult', this.gridData[selectVal])
165
- },
166
- rowClick(row, column, event) {
167
- this.singleUserIndex = row.row_index
168
- this.$emit('selectResult', row)
169
- },
170
- tableRowClassName({ row, rowIndex }) {
171
- row.row_index = rowIndex
172
- },
173
- rowDblclick(row, column, event) {
174
- if (this.multiple) {
175
- this.$emit('addUser', null, row)
176
- } else {
177
- this.$emit('resultRowDblclick', row)
178
- }
179
- },
180
- isDisable(row) {
181
- if (this.selectResult) {
182
- const containUsers = this.selectResult.filter(this.filterDept(row))
183
- if (containUsers && containUsers.length > 0) {
184
- return true
185
- }
186
- }
187
- return false
188
- },
189
- // 判断用户是否存在的过滤器
190
- filterDept(queryDept) {
191
- return (dept) => {
192
- return (dept.id === queryDept.id)
193
- }
194
- }
195
- }
196
- }
197
- </script>
@@ -1,19 +0,0 @@
1
- function enableButton(el) {
2
- el.disabled = false
3
- el.classList.remove('is-disabled')
4
- }
5
- export default {
6
- // 插入dom 时做的事情
7
- inserted: function(el, bind) {
8
- el.addEventListener('click', () => {
9
- el.disabled = true
10
- el.classList.add('is-disabled')
11
- bind.value().then(res => {
12
- enableButton(el)
13
- }).catch(error => {
14
- enableButton(el)
15
- console.log('Error', error.message)
16
- })
17
- })
18
- }
19
- }
@@ -1,6 +0,0 @@
1
- import DynamicSourceSelect from './src/dynamic-source-select.vue'
2
- DynamicSourceSelect.install = function(Vue) {
3
- Vue.component(DynamicSourceSelect.name, DynamicSourceSelect)
4
- }
5
-
6
- export default DynamicSourceSelect
@@ -1,70 +0,0 @@
1
- import Vue from 'vue'
2
- const dynamicSourceSelectService = {
3
- findDynamicDataSourceByCode(dynamicSourceCode, entity, searchParam, additionalParameterStr, backendUrl) {
4
- let searchText
5
- let watchAttrValue
6
- let parentEntity
7
- let listCode
8
- let formCode
9
- let tableName
10
- if (searchParam) {
11
- searchText = searchParam.searchText
12
- if (searchText === undefined || searchText === null) {
13
- searchText = ''
14
- }
15
- watchAttrValue = searchParam.watchAttrValue
16
- if (watchAttrValue === undefined || watchAttrValue === null) {
17
- watchAttrValue = ''
18
- }
19
- parentEntity = searchParam.parent
20
- listCode = searchParam._listCode
21
- formCode = searchParam._formCode
22
- tableName = searchParam._tableName
23
- }
24
- const params = {
25
- searchText,
26
- watchAttrValue,
27
- parent: parentEntity
28
-
29
- }
30
- if (additionalParameterStr && additionalParameterStr !== '') {
31
- params.additionalParamMap = JSON.parse(additionalParameterStr)
32
- }
33
- if (params.additionalParamMap === undefined) {
34
- params.additionalParamMap = {}
35
- }
36
- if (listCode) {
37
- params.additionalParamMap._listCode = listCode
38
- }
39
- if (formCode) {
40
- params.additionalParamMap._formCode = formCode
41
- }
42
- if (tableName) {
43
- params.additionalParamMap._tableName = tableName
44
- }
45
- if (entity && entity !== null) {
46
- params.entity = entity
47
- }
48
- if (!backendUrl) {
49
- backendUrl = Vue.prototype.baseURL
50
- }
51
-
52
- return new Promise((resolve, reject) => {
53
- this.$http.post(backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(result => {
54
- if (result.backendUrl) {
55
- // result.backendUrl表示需要使用动态数据源所属的系统路径重新获得一次数据
56
- this.$http.post(result.backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(finallyResult => {
57
- resolve(finallyResult)
58
- }).catch(error => {
59
- reject(error)
60
- })
61
- } else {
62
- resolve(result)
63
- }
64
- }).catch(error => {
65
- reject(error)
66
- })
67
- })
68
- }
69
- }
70
- export default dynamicSourceSelectService