imatrix-ui 2.9.44-dw → 2.9.46-dw

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imatrix-ui",
3
- "version": "2.9.44-dw",
3
+ "version": "2.9.46-dw",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
@@ -3,9 +3,9 @@
3
3
  <el-table
4
4
  ref="superGrid"
5
5
  :data="gridData"
6
- row-key="id"
7
6
  :row-class-name="tableRowClassName"
8
7
  :max-height="myHeight"
8
+ row-key="id"
9
9
  border
10
10
  fit
11
11
  @row-click="rowClick"
@@ -18,36 +18,49 @@
18
18
  </el-radio>
19
19
  </template>
20
20
  </el-table-column>
21
- <el-table-column v-if="multiple && isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
21
+ <el-table-column v-if="multiple && isSearchResult" :label="$t('imatrixUIPublicModel.edit')" fixed align="center" width="60px">
22
22
  <template slot-scope="scope">
23
23
  <div>
24
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="isDisable(scope.row)" circle @click="addUser(scope.$index, scope.row)" />
24
+ <el-button :disabled="isDisable(scope.row)" type="primary" size="mini" icon="el-icon-plus" circle @click="addUser(scope.$index, scope.row)" />
25
25
  </div>
26
26
  </template>
27
27
  </el-table-column>
28
- <el-table-column v-if="multiple && !isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
28
+ <el-table-column v-if="multiple && !isSearchResult" :label="$t('imatrixUIPublicModel.edit')" fixed align="center" width="60px">
29
29
  <template slot-scope="scope">
30
30
  <div>
31
31
  <el-button type="danger" size="mini" icon="el-icon-delete" circle @click="removeUser(scope.$index, scope.row)" />
32
32
  </div>
33
33
  </template>
34
34
  </el-table-column>
35
- <el-table-column v-if="multiple" :label="$t('superGrid.index')" align="center" width="60px">
35
+ <!-- <el-table-column v-if="multiple" :label="$t('superGrid.index')" align="center" width="60px">
36
36
  <template slot-scope="scope">
37
37
  {{ scope.$index+1 }}
38
38
  </template>
39
- </el-table-column>
39
+ </el-table-column> -->
40
40
  <el-table-column
41
- :label="$t('departmentUserTreeInline.name')"
42
- :width="130"
41
+ :label="$t('departmentUserTreeInline.user')"
43
42
  prop="name"
44
43
  >
45
44
  <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>
45
+ <div v-if="scope.row.enName && scope.row.enName.trim() !== ''">
46
+ <div :title="scope.row.name +'('+scope.row.enName+')' +'['+scope.row.loginName+']'">
47
+ <span>{{ scope.row.name+'('+scope.row.enName+')' }}[{{ scope.row.loginName }}]</span>
48
+ </div>
49
+ <div style="color:#ccc" :title="getDeptName(scope.row)">
50
+ {{ getDeptName(scope.row) }}
51
+ </div>
52
+ </div>
53
+ <div v-else>
54
+ <div :title="scope.row.name +'['+scope.row.loginName+']'">
55
+ <span>{{ scope.row.name }}[{{ scope.row.loginName }}]</span>
56
+ </div>
57
+ <div style="color:#ccc" :title="getDeptName(scope.row)">
58
+ {{ getDeptName(scope.row) }}
59
+ </div>
60
+ </div>
48
61
  </template>
49
62
  </el-table-column>
50
- <el-table-column
63
+ <!-- <el-table-column
51
64
  :label="$t('departmentUserTreeInline.loginName')"
52
65
  :width="110"
53
66
  prop="loginName"
@@ -64,7 +77,7 @@
64
77
  <template slot-scope="scope">
65
78
  <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
79
  </template>
67
- </el-table-column>
80
+ </el-table-column> -->
68
81
  <!--由于保密要求,邮箱不能显示,需要脱敏处理,暂时注释掉,不显示-->
69
82
  <!-- <el-table-column
70
83
  :label="$t('departmentUserTreeInline.email')"
@@ -75,7 +88,7 @@
75
88
  <span class="ellipsis cell--span" :title="scope.row.email">{{ scope.row.email }}</span>
76
89
  </template>
77
90
  </el-table-column> -->
78
- <el-table-column
91
+ <!-- <el-table-column
79
92
  v-if="containBranch"
80
93
  :label="$t('departmentUserTreeInline.branch')"
81
94
  :width="130"
@@ -84,7 +97,7 @@
84
97
  <template slot-scope="scope">
85
98
  <span class="ellipsis cell--span" :title="scope.row.subCompanyName">{{ scope.row.subCompanyName }}</span>
86
99
  </template>
87
- </el-table-column>
100
+ </el-table-column> -->
88
101
  </el-table>
89
102
  </div>
90
103
  </template>
@@ -151,6 +164,19 @@ export default {
151
164
  // this.selectedUser = row
152
165
  // // this.$emit('rowClick', row, column, event)
153
166
  // },
167
+ getDeptName(row) {
168
+ let deptName = row.superiorDeptNameFullPath
169
+ if (deptName) {
170
+ return deptName
171
+ }
172
+ if (this.language && this.language !== 'cn') {
173
+ deptName = row.mainDepartmentEnName
174
+ }
175
+ if (deptName) {
176
+ return deptName
177
+ }
178
+ return row.mainDepartmentName
179
+ },
154
180
  // 移除用户
155
181
  removeUser(index, row) {
156
182
  this.$emit('removeUser', index, row)
@@ -143,7 +143,7 @@ function validatorEntity(entity, listCode, $index, rules, isShouldRepeateValdate
143
143
  if (!listCode) {
144
144
  listCode = store.get('_list_code')
145
145
  }
146
-
146
+ console.log('superGird--validatorEntity---entity=', entity)
147
147
  const gridParams = store.get(listCode)
148
148
  validator.validate(entity, {
149
149
  first: true
@@ -110,6 +110,7 @@
110
110
  :grid-data="gridData"
111
111
  :page-grid-data="pageGridData"
112
112
  :current-page="currentPage"
113
+ @prohibitToEdit="prohibitToEdit"
113
114
  /></span>
114
115
  <span v-else-if="columnFormatter !== undefined && columnFormatter.type !== undefined && columnFormatter.type === 'secretInfo'" :id="column.prop+'DomData'+scope.$index" class="cell--span">
115
116
  <secret-info
@@ -462,7 +463,8 @@ export default {
462
463
  if (!isDynamic) {
463
464
  // 选项组保存时将数组处理为字符串
464
465
  const beforeColumnValue = param.row[this.column.prop]
465
- if (beforeColumnValue && Object.prototype.toString.apply(beforeColumnValue) === '[object Array]') {
466
+ console.log('un-edit---beforeColumnValue=', beforeColumnValue, 'this.column.prop=', this.column.prop)
467
+ if (beforeColumnValue && Array.isArray(beforeColumnValue)) {
466
468
  // 如果是数组才需要转换
467
469
  this.$set(param.row, this.column.prop, beforeColumnValue.join(','))
468
470
  }
@@ -508,7 +510,7 @@ export default {
508
510
  }
509
511
  } else {
510
512
  const beforeColumnValue = param.row[this.column.prop]
511
- if (beforeColumnValue && Object.prototype.toString.apply(beforeColumnValue) === '[object Array]') {
513
+ if (beforeColumnValue && Array.isArray(beforeColumnValue)) {
512
514
  // 如果是数组才需要转换
513
515
  this.$set(param.row, this.column.prop, beforeColumnValue.join(','))
514
516
  }
@@ -2894,6 +2894,9 @@ export default {
2894
2894
  // 设置字段禁止编辑
2895
2895
  fnProhibitToEdit(entity) {
2896
2896
  if (entity) {
2897
+ if (entity.isForceUpdate) {
2898
+ this.$emit('prohibitToEdit', entity)
2899
+ }
2897
2900
  for (const key in entity) {
2898
2901
  // console.log('key', key)
2899
2902
  // console.log('this.$refs[key]', this.$refs)
@@ -151,7 +151,8 @@ const cn = {
151
151
  branch: '所属分支',
152
152
  removeUser: '移除用户',
153
153
  email: '邮箱',
154
- loginName: '登录名'
154
+ loginName: '登录名',
155
+ user: '用户'
155
156
  },
156
157
  // 工作组树
157
158
  workgroupTree: {
@@ -148,7 +148,8 @@ const en = {
148
148
  branch: 'Branch',
149
149
  removeUser: 'Remove User',
150
150
  email: 'Email',
151
- loginName: 'Login Name'
151
+ loginName: 'Login Name',
152
+ user: 'User'
152
153
  },
153
154
  // 工作组树
154
155
  workgroupTree: {