|
|
@@ -42,7 +42,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<l-customlist-action showEdit @edit="action('edit', item.RFileId)" showDelete @delete="action('delete', item.RFileId)" @view="action('view', item.RFileId)" /> |
|
|
|
<l-customlist-action :showEdit="false" @edit="action('edit', item.RFileId)" :showDelete="false" @delete="action('delete', item.RFileId)" @view="action('view', item.RFileId)" /> |
|
|
|
</view> |
|
|
|
</l-customlist> |
|
|
|
</l-scroll-list> |
|
|
@@ -65,12 +65,12 @@ |
|
|
|
class="margin-bottom" |
|
|
|
/> |
|
|
|
|
|
|
|
<l-input |
|
|
|
<!-- <l-input |
|
|
|
v-model="queryData.Sender" |
|
|
|
@change="searchChange" |
|
|
|
title ="发送人" |
|
|
|
placeholder="按发送人查询" |
|
|
|
/> |
|
|
|
/> --> |
|
|
|
<l-input |
|
|
|
v-model="queryData.Title" |
|
|
|
@change="searchChange" |
|
|
@@ -121,10 +121,10 @@ export default { |
|
|
|
scheme: { |
|
|
|
Sender: { type: 'text' }, |
|
|
|
Title: { type: 'text' }, |
|
|
|
SendTime: { type: 'datetime', dateformat: '0' }, |
|
|
|
SendTime: { type: 'datetime', dateformat: '1' }, |
|
|
|
SendType: { type: 'select', itemCode: 'FileSendType', dataSource: '0' }, |
|
|
|
ReadFlag: { type: 'select', dataSource: '0' }, |
|
|
|
ReadTime: { type: 'datetime', dateformat: '0' }, |
|
|
|
ReadTime: { type: 'datetime', dateformat: '1' }, |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询条件 |
|
|
@@ -163,6 +163,11 @@ export default { |
|
|
|
onUnload() { |
|
|
|
this.OFF('EducationalAdministrationSys_ReceiveFile-list-change') |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
if(this.list.length){ |
|
|
|
this.refreshList(false) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
// 页面初始化 |
|
|
@@ -182,15 +187,15 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 拉取列表 |
|
|
|
async fetchList() { |
|
|
|
async fetchList(isConcat=true) { |
|
|
|
if (this.page > this.total) { return } |
|
|
|
this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; |
|
|
|
this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; |
|
|
|
const result = await this.HTTP_GET( |
|
|
|
'learun/adms/EducationalAdministration/Sys_ReceiveFile/pagelist', |
|
|
|
{ |
|
|
|
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) |
|
|
|
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序 |
|
|
|
pagination: { rows: 10, page: this.page, sidx: 'RFileId', sord: 'DESC' }, |
|
|
|
pagination: { rows: 10, page: this.page, sidx: 'SendStatus asc,SendTime desc', sord: 'DESC' }, |
|
|
|
queryJson: JSON.stringify(this.searchData) |
|
|
|
}, |
|
|
|
'加载数据时出错' |
|
|
@@ -200,19 +205,19 @@ this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; |
|
|
|
|
|
|
|
this.total = result.total |
|
|
|
this.page = result.page + 1 |
|
|
|
this.list = this.list.concat(result.rows) |
|
|
|
this.list = isConcat?this.list.concat(result.rows):result.rows |
|
|
|
|
|
|
|
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` |
|
|
|
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' |
|
|
|
}, |
|
|
|
|
|
|
|
// 刷新清空列表 |
|
|
|
async refreshList() { |
|
|
|
async refreshList(isConcat=true) { |
|
|
|
this.page = 1 |
|
|
|
this.total = 2 |
|
|
|
this.list = [] |
|
|
|
|
|
|
|
await this.fetchList() |
|
|
|
await this.fetchList(isConcat) |
|
|
|
}, |
|
|
|
|
|
|
|
// 列表下拉 |
|
|
@@ -237,20 +242,21 @@ this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; |
|
|
|
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) |
|
|
|
|
|
|
|
this.searchData = result |
|
|
|
await this.refreshList() |
|
|
|
await this.refreshList(false) |
|
|
|
}, |
|
|
|
|
|
|
|
// 点击「清空查询条件」按钮 |
|
|
|
reset() { |
|
|
|
this.queryData = this.COPY(this.defaultQueryData) |
|
|
|
this.$refs.datefilter.changeDateRange('all') |
|
|
|
this.queryData = this.COPY(this.defaultQueryData) |
|
|
|
this.searchChange() |
|
|
|
// this.searchChange() |
|
|
|
}, |
|
|
|
|
|
|
|
// 点击「编辑」、「查看」、「添加」、「删除」按钮 |
|
|
|
async action(type, id = '') { |
|
|
|
switch (type) { |
|
|
|
case 'view': |
|
|
|
this.HTTP_POST(`learun/adms/EducationalAdministration/Sys_ReceiveFile/read`,{keyValue:id}) |
|
|
|
this.NAV_TO(`./single?type=view&id=${id}`) |
|
|
|
return |
|
|
|
|
|
|
@@ -306,14 +312,14 @@ this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId; |
|
|
|
default: return value === null || value === undefined ? '' : value |
|
|
|
} |
|
|
|
}, |
|
|
|
showStatus(item){ |
|
|
|
console.log(item); |
|
|
|
if(item.SendStatus==true){ |
|
|
|
return "已查阅"; |
|
|
|
}else{ |
|
|
|
return "未查阅" |
|
|
|
} |
|
|
|
} |
|
|
|
showStatus(item){ |
|
|
|
console.log(item); |
|
|
|
if(item.SendStatus==true){ |
|
|
|
return "已查阅"; |
|
|
|
}else{ |
|
|
|
return "未查阅" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|