mali-applet-ui 1.0.117 → 1.0.119
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.
|
@@ -170,21 +170,32 @@ export default {
|
|
|
170
170
|
this.selectedUserIds = ((isCopy ? this.selectFlowItem?.copyUsers : this.selectFlowItem?.users) || []).map(item => item.id)
|
|
171
171
|
this.showPopup = true
|
|
172
172
|
},
|
|
173
|
+
mergeMemberIdsByRoleId (list) {
|
|
174
|
+
const userList = []
|
|
175
|
+
const roleIds = []
|
|
176
|
+
list.forEach(item => {
|
|
177
|
+
const [memberId, roleId] = item.id?.split('_')
|
|
178
|
+
const index = roleIds.indexOf(roleId)
|
|
179
|
+
if (index > -1) {
|
|
180
|
+
userList[index].memberIds += `,${memberId}`
|
|
181
|
+
} else {
|
|
182
|
+
roleIds.push(roleId)
|
|
183
|
+
userList.push({
|
|
184
|
+
memberIds: memberId,
|
|
185
|
+
memberNames: item.name,
|
|
186
|
+
roleId: roleId
|
|
187
|
+
})
|
|
188
|
+
}
|
|
189
|
+
})
|
|
190
|
+
return userList
|
|
191
|
+
},
|
|
173
192
|
updateFlowHandlers () {
|
|
174
193
|
const flowHandlers = this.flowItems.map(item => {
|
|
194
|
+
|
|
175
195
|
return {
|
|
176
|
-
copierList: (item.copyUsers || [])
|
|
177
|
-
memberIds: user.id?.split('_')[0],
|
|
178
|
-
memberNames: user.name,
|
|
179
|
-
roleId: user.id?.split('_')[1]
|
|
180
|
-
})),
|
|
196
|
+
copierList: mergeMemberIdsByRoleId(item.copyUsers || []),
|
|
181
197
|
flowItemSettingId: item.id,
|
|
182
|
-
userList: (item.users || [])
|
|
183
|
-
// approveFlag: false,
|
|
184
|
-
memberIds: user.id?.split('_')[0],
|
|
185
|
-
memberNames: user.name,
|
|
186
|
-
roleId: user.id?.split('_')[1]
|
|
187
|
-
}))
|
|
198
|
+
userList: this.mergeMemberIdsByRoleId(item.users || [])
|
|
188
199
|
}
|
|
189
200
|
})
|
|
190
201
|
this.approvalData.flowHandlers = flowHandlers
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</view>
|
|
23
23
|
<view v-if="headerData && headerData.length" class="table-body-top">
|
|
24
24
|
<view class="table-tr" v-for="(row, rowIndex) in headerData" :key="rowIndex">
|
|
25
|
-
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="
|
|
25
|
+
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="getColTdStyles(column)" @click="cellHeaderTdClick({ type: 'header', row, rowIndex, column, columnIndex })">
|
|
26
26
|
<view :class="['table-cell', column.align ? `align-${column.align}` : '', getHeaderCellClass({ type: 'header', row, rowIndex, column, columnIndex })]">
|
|
27
27
|
<ml-amount-text v-if="column.cellRender && column.cellRender.name === 'MlAmountText'" :value="row[column.field]" :simplify="column.cellRender.props ? column.cellRender.props.simplify : false"></ml-amount-text>
|
|
28
28
|
<text v-else>{{ getHeaderCellValue({ type: 'header', row, rowIndex, column, columnIndex }) }}</text>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</view>
|
|
34
34
|
<view class="table-body-contnet">
|
|
35
35
|
<view class="table-tr" v-for="(row, rowIndex) in tableData" :key="rowIndex">
|
|
36
|
-
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="
|
|
36
|
+
<view class="table-td" v-for="(column, columnIndex) in tableColumn" :key="columnIndex" :style="getColTdStyles(column)" @click="cellTdClick({ type: 'body', row, rowIndex, column, columnIndex })">
|
|
37
37
|
<view :class="['table-cell', column.align ? `align-${column.align}` : '', getCellClass({ type: 'body', row, rowIndex, column, columnIndex })]">
|
|
38
38
|
<text v-if="column.type === 'seq'">{{ rowIndex + 1 }}</text>
|
|
39
39
|
<text v-else-if="column.cellRender && column.cellRender.name === 'Underline'" class="is-underline">{{ getCellValue({ type: 'body', row, rowIndex, column, columnIndex }) }}</text>
|
|
@@ -95,6 +95,10 @@ export default {
|
|
|
95
95
|
columns: Array,
|
|
96
96
|
showMore: Boolean,
|
|
97
97
|
loadStatus: String,
|
|
98
|
+
rowConfig: {
|
|
99
|
+
type: Object,
|
|
100
|
+
defaule: () => ({})
|
|
101
|
+
},
|
|
98
102
|
sortConfig: {
|
|
99
103
|
type: Object,
|
|
100
104
|
defaule: () => ({})
|
|
@@ -218,6 +222,14 @@ export default {
|
|
|
218
222
|
}
|
|
219
223
|
return ''
|
|
220
224
|
},
|
|
225
|
+
getColTdStyles (column) {
|
|
226
|
+
const wSty = `width: ${this.getColWidth(column)};`
|
|
227
|
+
let hSty = ''
|
|
228
|
+
if (this.rowConfig && this.rowConfig.height) {
|
|
229
|
+
hSty = `height: ${this.rowConfig.height};`
|
|
230
|
+
}
|
|
231
|
+
return `${wSty || ''}${hSty || ''}`
|
|
232
|
+
},
|
|
221
233
|
sort (fieldOrColumn, order) {
|
|
222
234
|
const column = fieldOrColumn ? this.tableColumn.find(item => item.colid === fieldOrColumn.colid || item.field === fieldOrColumn) : null
|
|
223
235
|
if (column) {
|