Kaynağa Gözat

app2.0公文查看

娄底高职分支
ndbs 2 yıl önce
ebeveyn
işleme
e03e6de8a9
2 değiştirilmiş dosya ile 76 ekleme ve 30 silme
  1. +28
    -22
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/list.vue
  2. +48
    -8
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue

+ 28
- 22
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/list.vue Dosyayı Görüntüle

@@ -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 "未查阅"
}
}
}
}


+ 48
- 8
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue Dosyayı Görüntüle

@@ -1,12 +1,19 @@
<template>
<view class="page">
<view v-if="ready">
<l-input
<l-input
@input="setValue('Sys_ReceiveFile.Sender', $event)"
:value="getValue('Sys_ReceiveFile.Sender')"
:disabled="!edit"
title="发送人"
/>
<!-- <l-organize-picker
@input="setValue('Sys_ReceiveFile.Sender', $event)"
:value="getValue('Sys_ReceiveFile.Sender')"
:readonly="!edit"
type="user"
title="发送人"
/> -->
<l-input
@input="setValue('Sys_ReceiveFile.Title', $event)"
:value="getValue('Sys_ReceiveFile.Title')"
@@ -26,16 +33,47 @@
:range="dataSource.Sys_ReceiveFile.SendType"
title="接收对象"
/>
<l-textarea
<!-- <l-upload-file
@input="setValue('Sys_ReceiveFile.RUrl', $event)"
:value="getValue('Sys_ReceiveFile.RUrl')"
:readonly="!edit"
:number="9"
title="附件上传"
/> -->
<l-upload-file
v-if="ready"
:value="fileList"
:readonly="!edit"
:number="9"
title="附件上传"
/>
<!-- <l-textarea
@input="setValue('Sys_ReceiveFile.Contents', $event)"
:value="getValue('Sys_ReceiveFile.Contents')"
:disabled="!edit"
readonly="readonly"
:range="dataSource.Sys_ReceiveFile.Contents"
title="内容"
/>
</view
>
/> -->
<view class="bg-white" style="padding: 15px;color: #333333;font-size: 15px;">内容</view>
<view class="bg-white" style="padding: 15px;padding-top: 0px;">
<u-parse v-if="ready" :imageProp="{ domain: apiRoot }" :content="getValue('Sys_ReceiveFile.Contents')" noData="暂无内容"></u-parse>
</view>
</view>
<!-- <view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block>
提交保存
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block>
编辑本页
</l-button>
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block>
取消编辑
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
删除
</l-button>
</view> -->
</view
>
</template>
@@ -71,12 +109,13 @@ export default {
edit: null,
ready: false, // 表单数据
current: {},
fileList:[],
origin: {}, // 表单项数据结构
scheme: {
Sys_ReceiveFile: {
Sender: { type: "text", title: "发送人" },
Title: { type: "text", title: "主题" },
SendTime: { type: "datetime", title: "发送时间", dateformat: "0" },
SendTime: { type: "datetime", title: "发送时间", dateformat: "1" },
SendType: {
type: "select",
title: "接收对象",
@@ -85,7 +124,7 @@ export default {
},
Contents: { type: "textarea", title: "内容" },
ReadFlag: { type: "select", title: "状态", dataSource: "0" },
ReadTime: { type: "datetime", title: "查阅时间", dateformat: "0" },
ReadTime: { type: "datetime", title: "查阅时间", dateformat: "1" },
},
}, // 数据源
dataSource: {
@@ -121,6 +160,7 @@ export default {
"learun/adms/EducationalAdministration/Sys_ReceiveFile/form",
this.id
);
this.fileList = await this.getFileListById(result.Sys_ReceiveFile.FilePath)
this.origin = await this.formatFormData(result);
}
this.current = this.COPY(this.origin);
@@ -151,7 +191,7 @@ export default {
}
this.LOADING("正在提交...");
const postData = await this.getPostData(this.id);
adms(
this.HTTP_POST(
"learun/adms/EducationalAdministration/Sys_ReceiveFile/save",
postData,
"表单提交保存失败"


Yükleniyor…
İptal
Kaydet