Browse Source

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

临城职教中职
dyy 2 years ago
parent
commit
df167357bb
13 changed files with 127 additions and 29 deletions
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.cshtml
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js
  3. +11
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SYS_ReceiveMessageApi.cs
  4. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Sys_ReceiveFileApi.cs
  5. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SYS_ReceiveMessage/SYS_ReceiveMessageEntity.cs
  6. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SYS_ReceiveMessage/SYS_ReceiveMessageService.cs
  7. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs
  8. +26
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js
  9. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue
  10. +5
    -4
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/list.vue
  11. +32
    -13
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/single.vue
  12. +5
    -4
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/list.vue
  13. +19
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.cshtml View File

@@ -44,9 +44,9 @@
<div class="lr-form-item-title">联系电话<font face="宋体">*</font></div>
<input id="LinkPhone" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</div>
@*<div class="col-xs-12 lr-form-item" data-table="MeetingManagement">
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement">
<div class="lr-form-item-title">扫码签到</div>
<div id="qrCode"></div>
</div>*@
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js")

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js View File

@@ -63,7 +63,7 @@ var bootstrap = function ($, learun) {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
//扫码签到
//makeCode(data[id].Id);
makeCode(data[id].Id);
}
});
}


+ 11
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SYS_ReceiveMessageApi.cs View File

@@ -26,6 +26,7 @@ namespace Learun.Application.WebApi
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
Post["/read"] = NewsRead;
}

#region  获取数据
@@ -80,7 +81,16 @@ namespace Learun.Application.WebApi
};
return Success(jsonData);
}

/// <summary>
/// 查阅收件箱
/// <summary>
/// <returns></returns>
public Response NewsRead(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
sYS_ReceiveMessageIBLL.Read(parameter.keyValue);
return Success("查阅成功!");
}
#endregion

#region  提交数据


+ 14
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Sys_ReceiveFileApi.cs View File

@@ -28,6 +28,8 @@ namespace Learun.Application.WebApi
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
Post["/read"] = NewsRead;

}
#region  获取数据

@@ -69,6 +71,7 @@ namespace Learun.Application.WebApi
{
string keyValue = this.GetReqData();
var Sys_ReceiveFileData = sys_ReceiveFileIBLL.GetSys_ReceiveFileEntity(keyValue);
Sys_ReceiveFileData.FilePath = Sys_ReceiveFileData.Url;
if (Sys_ReceiveFileData != null)
{
var result = annexesFileIBLL.GetEntityByFolderId(Sys_ReceiveFileData.Url)?.F_FilePath;
@@ -112,6 +115,17 @@ namespace Learun.Application.WebApi
sys_ReceiveFileIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 查阅公文
/// <summary>
/// <returns></returns>
public Response NewsRead(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
sys_ReceiveFileIBLL.ReadEntity(parameter.keyValue);
return Success("查阅成功!");
}
#endregion

#region  私有类


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SYS_ReceiveMessage/SYS_ReceiveMessageEntity.cs View File

@@ -110,6 +110,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段
/// <summary>
///
/// </summary>
[NotMapped]
public string FilePath { get; set; }
#endregion
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SYS_ReceiveMessage/SYS_ReceiveMessageService.cs View File

@@ -166,6 +166,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var result = this.BaseRepository().FindEntity<SYS_ReceiveMessageEntity>(keyValue);
result.FilePath = result.URL;
result.URL = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_FolderId == result.URL)?.F_FilePath;
if (!string.IsNullOrEmpty(result.URL))
{


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs View File

@@ -149,6 +149,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

[Column("SLASTDATE")]
public DateTime? SLastDate { get; set; }
/// <summary>
/// 路径
/// </summary>
[NotMapped]
public string FilePath { get; set; }

#endregion
}


+ 26
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js View File

@@ -237,6 +237,32 @@ export default {
return await this.HTTP_GET('learun/adms/annexes/wxlist', folderId)
},
// 根据文件夹id获取图片列表
async getFileListById(folderId){
if(!folderId){
return []
}
let wxlist = await this.FETCH_FILEList(folderId),fileList = []
for (const wxfile of wxlist) {
const fileInfo = await this.FETCH_FILEINFO(wxfile.F_Id)
if (!fileInfo) {
continue
}
const fileType = fileInfo.F_FileType
const fileSize = fileInfo.F_FileSize
const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(wxfile.F_Id, true)
fileList.push({
path,
type: fileType,
uid:wxfile.F_Id,
folderId:wxfile.F_FolderId,
size: fileSize
})
}
return fileList
},

// 封装的 GET 请求,集成了验证信息
// 返回请求结果或 null


+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue View File

@@ -2,7 +2,7 @@
<view class="cu-form-group">
<view class="grid col-4 grid-square flex-sub">
<view v-for="(item, index) in imgList" @tap="viewImg(item)" :key="index" class="bg-img">
<image v-if="showfile()&&isImage(item.type)" :src="CONFIG('webHost') + item.url" mode="aspectFill">
<image v-if="showfile()&&item&&(typeof item == "string"||isImage(item.type))" :src="item.url?CONFIG('webHost') + item.url:item" mode="aspectFill">
</image>
<l-icon v-if="showfile()&&!isImage(item.type)" type="text" />
<text class="file-name">{{item.name}}</text>


+ 5
- 4
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/list.vue View File

@@ -33,7 +33,7 @@
<l-customlist-action @view="action('view', item.MESSAGEID)" />
<l-customlist-action @view="action('view', item.MESSAGEID)" :showDelete="false" @delete="action('delete', item.MESSAGEID)" :showEdit="false" @edit="action('edit', item.MESSAGEID)" />
</view>
</l-customlist>
</l-scroll-list>
@@ -70,7 +70,7 @@
</view>
</scroll-view>
<l-customlist-add v-if="!sideOpen" @click="action('add')" />
<l-customlist-add v-if="!sideOpen" @click="action('add')" />
</view>
</template>
@@ -107,7 +107,7 @@ export default {
SENDER: { type: 'text' },
TITLE: { type: 'text' },
READFLAG: { type: 'select', dataSource: '0' },
SENDTIME: { type: 'datetime', dateformat: '0' },
SENDTIME: { type: 'datetime', dateformat: '1' },
URL: { type: 'upload' },
CONTENTS: { type: 'textarea' },
},
@@ -174,7 +174,7 @@ export default {
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'MESSAGEID', sord: 'DESC' },
pagination: { rows: 10, page: this.page, sidx: 'SENDTIME', sord: 'DESC' },
queryJson: JSON.stringify(this.searchData)
},
'加载数据时出错'
@@ -235,6 +235,7 @@ export default {
async action(type, id = '') {
switch (type) {
case 'view':
this.HTTP_POST(`learun/adms/EducationalAdministration/SYS_ReceiveMessage/read`,{keyValue:id})
this.NAV_TO(`./single?type=view&id=${id}`)
return


+ 32
- 13
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/single.vue View File

@@ -13,13 +13,13 @@
:disabled="!edit"
title="主题"
/>
<l-select
<!-- <l-select
@input="setValue('SYS_ReceiveMessage.READFLAG', $event)"
:value="getValue('SYS_ReceiveMessage.READFLAG')"
:disabled="!edit"
:range="dataSource.SYS_ReceiveMessage.READFLAG"
title="状态"
/>
/> -->
<l-date-picker
@input="setValue('SYS_ReceiveMessage.SENDTIME', $event)"
:value="getValue('SYS_ReceiveMessage.SENDTIME')"
@@ -27,21 +27,26 @@
title="收件时间"
/>
<l-upload-file
@input="setValue('SYS_ReceiveMessage.URL', $event)"
:value="getValue('SYS_ReceiveMessage.URL')"
v-if="ready"
:value="fileList"
@input="(e)=>{fileList = e}"
:readonly="!edit"
:number="9"
title="附件上传"
/>
<l-textarea
<!-- <l-textarea
@input="setValue('SYS_ReceiveMessage.CONTENTS', $event)"
:value="getValue('SYS_ReceiveMessage.CONTENTS')"
:readonly="!edit"
title="邮件内容"
/>
/> -->
<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_ReceiveMessage.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 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>
@@ -49,10 +54,10 @@
</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>
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
删除
</l-button>
</l-button> -->
</view>
</view>
</template>
@@ -95,13 +100,15 @@ export default {
// 表单数据
current: {},
origin: {},
fileList:[],
// 表单项数据结构
scheme: {
SYS_ReceiveMessage: {
SENDER: { type: 'text', title: '发件人' },
TITLE: { type: 'text', title: '主题' },
READFLAG: { type: 'select', title: '状态', dataSource: '0' },
// READFLAG: { type: 'select', title: '状态', dataSource: '0' },
SENDTIME: { type: 'datetime', title: '收件时间', dateformat: '0' },
URL: { type: 'upload', title: '附件上传' },
CONTENTS: { type: 'textarea', title: '邮件内容' },
@@ -149,8 +156,17 @@ export default {
if (this.mode === 'create') {
this.origin = await this.getDefaultForm()
} else {
const result = await this.HTTP_GET('learun/adms/EducationalAdministration/SYS_ReceiveMessage/form', this.id)
this.origin = await this.formatFormData(result)
const result = await this.HTTP_GET('learun/adms/EducationalAdministration/SYS_ReceiveMessage/form', this.id)
if(result){
let fileList = await this.getFileListById(result.SYS_ReceiveMessage.FilePath)
console.log(fileList)
this.fileList = fileList
this.origin = await this.formatFormData(result)
console.log(this.origin)
}else{
return
}
}
this.current = this.COPY(this.origin)
},
@@ -168,11 +184,14 @@ export default {
break
case 'save':
console.log(this.fileList)
// return
const verifyResult = this.verifyForm()
if (verifyResult.length > 0) {
this.CONFIRM('表单验证失败', verifyResult.join('\n'))
return
}
}
if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) {
return


+ 5
- 4
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/list.vue View File

@@ -42,7 +42,7 @@
</view>
<l-customlist-action :showEdit="false" @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"
@@ -124,7 +124,7 @@ export default {
SendTime: { type: 'datetime', dateformat: '0' },
SendType: { type: 'select', itemCode: 'FileSendType', dataSource: '0' },
ReadFlag: { type: 'select', dataSource: '0' },
ReadTime: { type: 'datetime', dateformat: '0' },
ReadTime: { type: 'datetime', dateformat: '1' },
},
// 查询条件
@@ -251,6 +251,7 @@ this.searchData.ReceiverId=this.GET_GLOBAL('loginUser').userId;
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


+ 19
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue View File

@@ -33,6 +33,20 @@
:range="dataSource.Sys_ReceiveFile.SendType"
title="接收对象"
/>
<!-- <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')"
@@ -47,7 +61,7 @@
</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 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>
@@ -55,10 +69,10 @@
</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>
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
删除
</l-button>
</l-button> -->
</view>
</view
>
@@ -95,6 +109,7 @@ export default {
edit: null,
ready: false, // 表单数据
current: {},
fileList:[],
origin: {}, // 表单项数据结构
scheme: {
Sys_ReceiveFile: {
@@ -145,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);


Loading…
Cancel
Save