@@ -3,6 +3,8 @@ using Learun.Cache.Factory; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
namespace Learun.Application.Organization | |||
{ | |||
/// <summary> | |||
@@ -515,6 +517,24 @@ namespace Learun.Application.Organization | |||
return res; | |||
} | |||
public List<PostEntity> GetAllList() | |||
{ | |||
try | |||
{ | |||
return postService.GetAllList().ToList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -94,5 +94,8 @@ namespace Learun.Application.Organization | |||
/// <param name="level">级数</param> | |||
/// <returns></returns> | |||
List<string> GetDownIdList(string strPostIds, int level); | |||
List<PostEntity> GetAllList(); | |||
} | |||
} |
@@ -235,5 +235,33 @@ namespace Learun.Application.Organization | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取部门列表信息(根据公司Id) | |||
/// </summary> | |||
/// <returns></returns> | |||
public IEnumerable<PostEntity> GetAllList() | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(fieldSql); | |||
strSql.Append(" FROM LR_BASE_POST t WHERE t.F_DeleteMark = 0 "); | |||
return this.BaseRepository().FindList<PostEntity>(strSql.ToString()); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -4,12 +4,12 @@ | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | |||
<div class="lr-form-item-title">联系方式</div> | |||
<input id="Mobile" type="text" class="form-control" /> | |||
<div class="lr-form-item-title">联系方式<font face="宋体">*</font></div> | |||
<input id="Mobile" type="text" class="form-control" isvalid="yes" checkexpession="Mobile"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | |||
<div class="lr-form-item-title">年龄</div> | |||
<input id="Age" type="text" class="form-control" /> | |||
<div class="lr-form-item-title">年龄<font face="宋体">*</font></div> | |||
<input id="Age" type="number" class="form-control" isvalid="yes" checkexpession="NotNull"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="MSRIntentionManagement"> | |||
<div class="lr-form-item-title">身高</div> | |||
@@ -4,8 +4,8 @@ | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="MSRMilitaryRecord"> | |||
<div class="lr-form-item-title">参军记录</div> | |||
<input id="Record" type="text" class="form-control" /> | |||
<div class="lr-form-item-title">参军记录<font face="宋体">*</font></div> | |||
<input id="Record" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="MSRMilitaryRecord"> | |||
<div class="lr-form-item-title">备注</div> | |||
@@ -8,6 +8,7 @@ using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using System.Text; | |||
using System.Data; | |||
using Learun.Application.OA; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.WebApi.Modules | |||
{ | |||
@@ -15,6 +16,8 @@ namespace Learun.Application.WebApi.Modules | |||
public class NewsApi : BaseApi | |||
{ | |||
private NoticeIBLL noticeIBLL = new NoticeBLL(); | |||
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | |||
private PostIBLL postIBLL = new PostBLL(); | |||
public NewsApi() | |||
: base("/learun/news") | |||
@@ -33,7 +36,7 @@ namespace Learun.Application.WebApi.Modules | |||
{ | |||
var userinfo = LoginUserInfo.Get(); | |||
Pagination paginationobj = new Pagination(); | |||
var newsList = noticeIBLL.GetList("", userinfo.userId,(Request.Query["F_CategoryId"]!=null?Request.Query["F_CategoryId"].ToString():"")); | |||
var newsList = noticeIBLL.GetList("", userinfo.userId, (Request.Query["F_CategoryId"] != null ? Request.Query["F_CategoryId"].ToString() : "")); | |||
var newsListOfSelf = new List<NewsEntity>(); | |||
foreach (var newsitemEntity in newsList) | |||
@@ -95,6 +98,38 @@ namespace Learun.Application.WebApi.Modules | |||
{ | |||
NoticeEntity parameter = this.GetReqData<NoticeEntity>(); | |||
var shlist = noticeIBLL.GetEntityByProcessId(parameter.ProgressId); | |||
//if (!shlist.F_SendDeptId.IsEmpty()) | |||
//{ | |||
var Array = shlist.F_SendPostId.Split(','); | |||
var deept = departmentIBLL.GetAllList(); | |||
foreach (var item in Array) | |||
{ | |||
for (int i = 0; i < deept.Count; i++) | |||
{ | |||
if (item == deept[i].F_CompanyId) | |||
{ | |||
shlist.F_SendDeptId += deept[i].F_FullName + ","; | |||
} | |||
} | |||
} | |||
shlist.F_SendDeptId.Trim(','); | |||
//} | |||
//if (!shlist.F_SendDeptId.IsEmpty()) | |||
//{ | |||
var Array1 = shlist.F_SendPostId.Split(','); | |||
var post = postIBLL.GetAllList(); | |||
foreach (var item in Array1) | |||
{ | |||
for (int i = 0; i < post.Count; i++) | |||
{ | |||
if (item == post[i].F_CompanyId) | |||
{ | |||
shlist.F_SendDeptId += post[i].F_Name + ","; | |||
} | |||
} | |||
} | |||
shlist.F_SendDeptId.Trim(','); | |||
//} | |||
return Success(shlist); | |||
} | |||
#region 私有类 | |||
@@ -102,7 +137,7 @@ namespace Learun.Application.WebApi.Modules | |||
private class NoticeEntity | |||
{ | |||
public string ProgressId { get; set; } | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -106,6 +106,10 @@ export default { | |||
}, | |||
async fileClick(index) { | |||
if(typeof this.value[index] == "string"){ | |||
uni.previewImage({ urls: this.value.filter(item=>typeof this.value[index] == "string"), current: this.value[index] }) | |||
return | |||
} | |||
const { path, type, uid, size = 0 } = this.value[index] | |||
if (this.isImgFile(type)) { | |||
uni.previewImage({ urls: [path], current: path }) | |||
@@ -21,10 +21,10 @@ export default { | |||
// "http://192.168.2.98:8088/" | |||
// ], | |||
"apiHost": [ | |||
"http://localhost:31173/" | |||
//"http://192.168.10.68:8002/" | |||
// "http://localhost:31173/" | |||
"http://192.168.10.58:8012/" | |||
], | |||
"webHost":"http://localhost:20472/", | |||
"webHost":"http://192.168.10.58:20472/", | |||
// 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 | |||
"devAccount": [ | |||
// 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 | |||
@@ -1008,7 +1008,16 @@ | |||
], | |||
,{ | |||
"path" : "pages/LR_OAModule/noticeExamine", | |||
"style" : | |||
{ | |||
"navigationBarTitleText": "通知公告", | |||
"enablePullDownRefresh": false | |||
} | |||
} | |||
], | |||
// 全局样式 | |||
"globalStyle": { | |||
@@ -0,0 +1,210 @@ | |||
<template> | |||
<view id="notice" class="page"> | |||
<!-- 顶部页签 --> | |||
<l-nav v-model="tab" :items="['表单信息', '流程信息']" type="flex" class="solid-bottom" /> | |||
<view v-if="ready && tab == 0"> | |||
<l-input v-model="formData.F_FullHead" title="公告标题" disabled></l-input> | |||
<l-select v-model="formData.IsSend" :range="[{value:'1',text:'是'},{value:'0',text:'否'}]" title="下发官网" disabled></l-select> | |||
<l-input v-model="formData.F_Category" title="公告类别" disabled></l-input> | |||
<l-input v-model="formData.F_ReleaseTime" title="发布时间" disabled></l-input> | |||
<l-input v-model="formData.F_SourceName" title="信息来源" disabled></l-input> | |||
<l-input v-model="formData.F_SourceAddress" title="来源地址" disabled></l-input> | |||
<l-input v-model="formData.F_SendDeptId" title="接收部门" disabled></l-input> | |||
<l-input v-model="formData.F_SendPostId" title="接受岗位" disabled></l-input> | |||
<l-select v-model="formData.F_IsSendFX" :range="[{value:true,text:'是'},{value:false,text:'否'}]" title="下发飞星" disabled></l-select> | |||
<l-upload-file | |||
:value="[API + '/learun/adms/annexes/wxdown?' + URL_QUERY(formData.F_NewsImage, true)]" | |||
:readonly="true" | |||
title="标题图片" | |||
/> | |||
<!-- :number="9" --> | |||
<!-- @input="setValue('MeetingManagement.Files', $event)" --> | |||
<l-input title="公告内容" disabled style="border-bottom: none;"></l-input> | |||
<view class="padding text-lg" style="background-color: #fff;"> | |||
<u-parse v-if="ready" :imageProp="{ domain: apiRoot }" :content="content"></u-parse> | |||
</view> | |||
<l-workflow-action | |||
@audit="audit" | |||
@action="action" | |||
:type="type" | |||
:currentNode="currentNode" | |||
:currentTask="currentTask" | |||
/> | |||
</view> | |||
<view v-if="ready && tab == 1" class="progress"><l-workflow-timeline :processList="processList" /></view> | |||
<!-- <view class="padding-sm text-grey notice-info"> | |||
<view class="text-right">本页内容发布于 {{ time }}</view> | |||
<view class="text-right">{{ date }}</view> | |||
</view> --> | |||
</view> | |||
</template> | |||
<script> | |||
import moment from 'moment' | |||
export default { | |||
data() { | |||
return { | |||
tab:0, | |||
type:'view', | |||
currentNode:null, | |||
currentTask:null, | |||
taskId:'', | |||
processId:'', | |||
processInfo:null, | |||
processList:[], | |||
formData:{}, | |||
ready: false, | |||
content: '', | |||
time: '', | |||
date: '' | |||
} | |||
}, | |||
async onLoad({type}) { | |||
await this.init(type) | |||
}, | |||
methods: { | |||
async init(type) { | |||
if(type){this.type = type} | |||
this.LOADING('加载中…') | |||
const noticeItem = this.GET_PARAM() | |||
this.processList = noticeItem.logList | |||
this.currentNode = noticeItem.currentNode | |||
this.currentTask = noticeItem.currentTask | |||
this.processInfo = noticeItem.processInfo | |||
this.taskId = this.currentTask.F_TaskId | |||
this.processId = this.currentTask.F_Id | |||
this.LOADING('加载数据中…') | |||
await this.getFormData(this.processList[0].F_ProcessId) | |||
this.HIDE_LOADING(); | |||
// this.content = this.CONVERT_HTML(noticeItem.f_content) | |||
// this.time = moment(noticeItem.f_time).format('HH : mm') | |||
// this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日') | |||
// this.SET_TITLE(noticeItem.f_title) | |||
// this.HIDE_LOADING() | |||
}, | |||
// 获取表单数据 | |||
getFormData(ProgressId){ | |||
return this.HTTP_GET("learun/news/shList",{ProgressId},"加载数据时出错").then(res=>{ | |||
if(res){ | |||
this.formData = res | |||
this.content = res.F_NewsContent | |||
this.ready = true | |||
} | |||
}) | |||
}, | |||
// 点击审批相关按钮 | |||
async audit(action) { | |||
this.LOADING('加载中…') | |||
const currentTask = this.processInfo.task.find(t => t.F_NodeId === this.currentNode.id) | |||
const postData = await this.getPostData(this.formValue, this.scheme) | |||
const pageParam = { | |||
type: 'sign', | |||
processId: currentTask.F_ProcessId, | |||
taskId: currentTask.F_Id, | |||
formreq: postData.formreq, | |||
taskName: this.currentTask.F_Title | |||
} | |||
// 不是加签 | |||
if (action.code !== '__sign__') { | |||
Object.assign(pageParam, action) | |||
pageParam.type = 'verify' | |||
pageParam.auditors = JSON.stringify({}) | |||
pageParam.isFromSignAudit = Number(this.currentTask.F_TaskType) === 3 | |||
} | |||
this.HIDE_LOADING() | |||
this.NAV_TO('/pages/nworkflow/myflow/sign', pageParam, true) | |||
}, | |||
// 点击操作按钮(非审批类按钮) | |||
async action(taskType) { | |||
switch (taskType) { | |||
// 点击「催办」/「撤销流程」/「标记已阅」按钮 | |||
case 'urge': | |||
case 'revoke': | |||
case 'refer': | |||
const actionText = { urge: '催办', revoke: '撤销', refer: '已阅' }[taskType] | |||
const actionUrl = { urge: '/urge', revoke: '/revoke', refer: '/refer' }[taskType] | |||
let actionData = this.processId | |||
if (taskType === 'refer') { | |||
actionData = { processId: this.processId, taskId: this.taskId } | |||
} | |||
if (!(await this.CONFIRM(`${actionText}确认`, `确定要提交${actionText}吗?`, true))) { | |||
return | |||
} | |||
this.LOADING(`提交${actionText}中…`) | |||
this.HTTP_POST(`/newwf${actionUrl}`, actionData, `提交${actionText}失败`).then(success => { | |||
this.HIDE_LOADING() | |||
if (success) { | |||
this.EMIT('task-list-change') | |||
this.TOAST(`成功提交${actionText}`, 'success') | |||
if (taskType === 'revoke') { | |||
this.NAV_BACK() | |||
} | |||
} | |||
}) | |||
break | |||
// 点击「提交草稿」按钮 | |||
case 'draft': | |||
this.CONFIRM('不支持此操作') | |||
return | |||
if (!(await this.CONFIRM('提交确认', '确定要提交草稿吗?', true))) { | |||
return | |||
} | |||
this.LOADING('正在提交…') | |||
const draftFormValue = this.$refs.form.getFormValue() | |||
const draftPostData = await this.getPostData(draftFormValue, this.scheme) | |||
this.HTTP_POST('/newwf/draft', draftPostData, '提交草稿失败').then(success => { | |||
this.HIDE_LOADING() | |||
if (success) { | |||
this.EMIT('task-list-change') | |||
this.NAV_BACK() | |||
this.TOAST('草稿已保存', 'success') | |||
} | |||
}) | |||
break | |||
// 点击「发起流程」按钮 | |||
case 'submit': | |||
this.CONFIRM('不支持此操作') | |||
return | |||
const verifyResult = this.$refs.form.verifyValue() | |||
if (verifyResult.length > 0) { | |||
this.CONFIRM('表单验证失败', verifyResult.join('\n')) | |||
return | |||
} | |||
if (!(await this.CONFIRM('提交确认', '确定要发起流程吗?', true))) { | |||
return | |||
} | |||
this.LOADING('正在提交…') | |||
const formValue = this.$refs.form.getFormValue() | |||
const postData = await this.getPostData(formValue, this.scheme) | |||
postData.auditors = JSON.stringify({}) | |||
if (this.type === 'child') { | |||
postData.parentProcessId = this.processId | |||
postData.parentTaskId = this.taskId | |||
} | |||
const errorTips = '流程发起失败' | |||
this.HTTP_POST('/newwf/createchildflow', postData, errorTips).then(success => { | |||
this.HIDE_LOADING() | |||
if (success) { | |||
this.EMIT('task-list-change') | |||
this.NAV_BACK() | |||
this.TOAST('流程发起成功', 'success') | |||
} | |||
}) | |||
break | |||
default: | |||
break | |||
} | |||
}, | |||
} | |||
} | |||
</script> |
@@ -108,7 +108,8 @@ export default { | |||
this.sysFormJump(appSysPage.appurl, { | |||
currentNode: this.currentNode, | |||
currentTask: this.currentTask, | |||
logList: this.processList | |||
logList: this.processList, | |||
processInfo:this.processInfo | |||
}) | |||
return | |||
} | |||