Преглед на файлове

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

新疆警官学校中职
ndbs преди 1 година
родител
ревизия
236154d685
променени са 1 файла, в които са добавени 75 реда и са изтрити 4 реда
  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 Целия файл

@@ -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>


Зареждане…
Отказ
Запис