Ver a proveniência

我的审批添加部门和发起人

新疆警官学校中职
lb01 há 1 ano
ascendente
cometimento
c8a9898b44
1 ficheiros alterados com 75 adições e 4 eliminações
  1. +75
    -4
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/list.vue

+ 75
- 4
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/list.vue Ver ficheiro

@@ -40,7 +40,11 @@
{{ item.F_Title || '(草稿 · 待编辑)' }}
<l-icon v-if="item.F_EnabledMark === 2" type="edit" />
</view>
<view class="item-desc">{{ item.F_SchemeName }}</view>
<view class="item-desc">
{{ item.F_SchemeName }}
<text style="margin-left: 15px;">{{item.F_CreateUserName}}</text>
<text style="margin-left: 15px;">{{ displayListItem(item, 'F_DepartmentId')}}</text>
</view>

<!-- tag 区 -->
<view class="tag-bar">
@@ -53,6 +57,12 @@
{{ tag.text }}
</view>
</view>
</view>
</l-list-item>
</l-list>
@@ -84,7 +94,7 @@

<script>
import moment from 'moment'
import get from 'lodash/get'
let currentScroll = 0

export default {
@@ -105,7 +115,19 @@ export default {
modal: false,
selectItem: null,

pageHeight: ''
pageHeight: '',
// 数据源
dataSource: {
F_DepartmentId: []
},
// 数据项的数据类型、结构
scheme: {
F_DepartmentId: {
type: "select",
dataSource: '1',
dataSourceId: 'ApplyDept'
}
},
}
},

@@ -121,6 +143,19 @@ export default {
// 初始化页面
async init() {
this.ON('task-list-change', this.refreshList)
// 拉取加载列表和数据源
await Promise.all([
this.FETCH_DATASOURCE('classdata').then(result => {
console.log(result)
this.dataSource.F_DepartmentId = result.data.map(t => ({
text: t.name,
value: t.id
}));
}),
() => {}
])
await this.fetchList()
},

@@ -337,7 +372,43 @@ export default {
// 滚动时记录当前滚动的位置
listScroll(e) {
currentScroll = e.detail.scrollTop
}
},
// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field]
const value = item[field]
switch (fieldItem.type) {
case 'currentInfo':
case 'organize':
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType),
`${value}.name`, '')
case 'radio':
case 'select':
const selectItem = this.dataSource[field].find(t => t.value === String(value))
console.log(selectItem)
return get(selectItem, 'text', '')
case 'checkbox':
if (!value || value.split(',').length <= 0) {
return ''
}
const checkboxItems = value.split(',')
return this.dataSource[field].filter(t => checkboxItems.includes(t.value)).map(t => t.text).join(
',')
case 'datetime':
if (!value) {
return ''
}
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' :
'YYYY-MM-DD HH:mm')
default:
return value === null || value === undefined ? '' : value
}
},
}
}
</script>


Carregando…
Cancelar
Guardar