server_commit

This commit is contained in:
zhaoxinyu
2024-08-28 09:14:20 +08:00
parent b2816d25fc
commit 1f408391f9
13 changed files with 175 additions and 100 deletions
@@ -6,6 +6,7 @@ import cn.wizzer.framework.page.Pagination;
import io.v.nutz.annontation.ViReturn;
import io.v.nutz.base.result.Result;
import io.v.nutz.base.utils.Roles;
import io.v.nutz.base.utils.Vi;
import io.v.nutz.modules.models.PageForm;
import io.v.nutz.sys.models.Sys_file;
import io.v.nutz.sys.models.Sys_user_role;
@@ -92,11 +93,11 @@ public class WakesHomeDataRevelController {
Cnd cnd = Cnd.NEW();
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
List<Sys_user_role> data = dao.query(Sys_user_role.class, Cnd.where("userId", "=", ShiroUtil.getUserId()).and("roleId", "=", Roles.UNION_MANGER));
List<String> unionIds = data.stream().map(Sys_user_role::getUnionid).distinct().collect(Collectors.toList());
cnd.and("un.id", "in", unionIds);
/* List<Sys_user_role> data = dao.query(Sys_user_role.class, Cnd.where("userId", "=", ShiroUtil.getUserId()).and("roleId", "=", Roles.UNION_MANGER));
List<String> unionIds = data.stream().map(Sys_user_role::getUnionid).distinct().collect(Collectors.toList());*/
cnd.and("un.id", "=", Vi.getUnionId());
}
cnd.and("un.isEnable","=",true);
// cnd.and("un.isEnable","=",true);
cnd.asc("un.unioncode");
sql.setCondition(cnd);
nutMap.setv("child", wakesHomeInfoService.listMap(sql));
@@ -146,10 +146,11 @@ public class MWakesHomeReviewController {
@At
@ViReturn
@Aop(TransAop.READ_COMMITTED)
public Object doSubmit(WakesHomeVo wakesHomeVo) {
try {
User user = baseService.dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUser()));
User user = baseService.dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
CommentPeo peo = new CommentPeo();
if (Strings.isNotBlank(wakesHomeVo.getEvaluatedPersonId())) {
peo.setEvaluatedPersonId(wakesHomeVo.getEvaluatedPersonId());
@@ -181,7 +182,7 @@ public class MWakesHomeReviewController {
return Result.success();
} catch (Exception e) {
e.printStackTrace();
return Result.error();
throw new RuntimeException();
}
}
+4 -4
View File
@@ -1,17 +1,17 @@
nutz.application.name=union_hhu
server.port=8080
server.port=8081
server.host=0.0.0.0
jetty.contextPath=/
jetty.threadpool.idleTimeout=100000
jetty.threadpool.minThreads=10
jetty.threadpool.maxThreads=20000
jetty.threadpool.maxThreads=20000
jetty.page.403=/error/403.htmla
jetty.page.404=/error/404.html
jetty.page.500=/error/500.html
#结合ftp使用,或用nginx代理ftp路径
jetty.staticPath=D://files
#开发模式静态资源
jetty.staticPathLocal=E:/project/UNION_HHU/src/main/resources/static
jetty.staticPathLocal=
nutz.mvc.ignore=^(.+[.])(jsp|png|gif|jpg|js|css|jpeg|html|mp3|mp4|ico|svg)$
nutz.mvc.exclusions=/favicon/*,/assets/*,/druid/*,/upload/*
ftp.enabled=true
@@ -86,7 +86,7 @@ shiro.url.login=/platform
shiro.url.logout_redirect=/platform
shiro.url.unauth=/platform
#开发时设置本地路径,便于调试
beetl.RESOURCE.rootLocal=E:/project/UNION_HHU/src/main/resources/views/
beetl.RESOURCE.rootLocal=
beetl.RESOURCE.root=views/
beetl.DELIMITER_STATEMENT_START=<!--#
beetl.DELIMITER_STATEMENT_END=#-->
@@ -10,8 +10,8 @@
<van-cell-group>
<van-field readonly :value="viewData.username" label="姓名"></van-field>
<van-field readonly :value="viewData.loginname" label="工资号"></van-field>
<van-field readonly :value="viewData.unitname" label="单位"></van-field>
<van-field readonly :value="viewData.unionname" label="工会"></van-field>
<van-field readonly :value="viewData.dwname" label="单位"></van-field>
<van-field readonly :value="viewData.ghname" label="工会"></van-field>
</van-cell-group>
<div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">
@@ -19,88 +19,143 @@
</div>
</div>
<van-cell-group>
<van-field readonly name="type" :value="viewData.hdsbzpzt" label="作品主题"></van-field>
<van-field readonly name="type" :value="viewData.lname" label="活动类别"></van-field>
<van-field readonly name="type" :value="viewData.hdname" label="作品主题"></van-field>
<van-field readonly name="type" :value="viewData.hdlbname" label="活动类别"></van-field>
<van-field readonly name="type" :value="viewData.step_count" label="健步走步数"
v-if="viewData.step_count"></van-field>
<van-field readonly name="type" :value="viewData.zname" label="作品类别" v-if="viewData.zname"></van-field>
<van-field readonly :value="viewData.hdsbzpms" label="简介"
<van-field readonly name="type" :value="viewData.zname" label="作品类别"
v-if="viewData.zname"></van-field>
<van-field readonly :value="viewData.hdsbzpms" label="创作说明"
input-align="left"
style="flex-flow: column"
rows="2" maxlength="200" type="textarea" show-word-limit autosize></van-field>
rows="2" type="textarea" show-word-limit autosize></van-field>
<van-field label="照片" style="flex-flow: column" input-align="left">
<template #label>
<div class="mb10">照&emsp;&emsp;片</div>
</template>
<van-field label="作品" style="flex-flow: column" input-align="left">
<template #input>
<vant-file-upload :files.sync="img2List" view :del="false"
v-if="img2List&&img2List.length>0"></vant-file-upload>
<div v-if="img2List.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
<div v-if="img2List.length===0"
style="text-align: center;color: #c2bbbb;font-size: 10px;">
没有照片。
</div>
</template>
</van-field>
<!--
<van-field label="视频" style="flex-flow: column" input-align="left">
<template #label>
<div class="mb10">视&emsp;&emsp;频</div>
</template>
<template #input>
<div v-if="videoList.length>0">
<div v-for="item in videoList" class="mt10">
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls
preload="auto"
width="640" height="264"
data-setup="{}" webkit-playsinline='true' playsinline='true'
x-webkit-airplay='true'
x5-video-player-type='h5' x5-video-player-fullscreen='true'
x5-video-ignore-metadata='true'>
<source :src="item.url" type="video/mp4">
</video>
</div>
</div>
<div v-if="videoList.length===0"
style="text-align: center;color: #c2bbbb;font-size: 10px;">
没有视频。
</div>
<van-field label="视频" style="flex-flow: column" input-align="left">
<template #label>
<div class="mb10">视&emsp;&emsp;频</div>
</template>
<template #input>
<div v-if="videoList.length>0">
<div v-for="item in videoList" class="mt10">
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
width="640" height="264"
data-setup="{}" webkit-playsinline='true' playsinline='true' x-webkit-airplay='true'
x5-video-player-type='h5' x5-video-player-fullscreen='true' x5-video-ignore-metadata='true'>
<source :src="item.url" type="video/mp4">
</video>
</div>
</div>
<div v-if="videoList.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
没有视频。
</div>
</template>
</van-field>
</template>
</van-field>
<van-field label="音频" style="flex-flow: column" input-align="left">
<template #label>
<div class="mb10">音&emsp;&emsp;频</div>
</template>
<template #input>
<div v-if="audioList&&audioList.length>0">
<div v-for="audio in audioList" class="mt10">
<audio id="amusic" preload="auto" controls>
<source :src="FILE_DOMAIN+audio.url"/>
</audio>
</div>
</div>
<div style="text-align: center;color: #c2bbbb;font-size: 10px;"
v-if="audioList.length===0">
没有音频。
</div>
</template>
</van-field>
<van-field label="音频" style="flex-flow: column" input-align="left">
<template #label>
<div class="mb10">音&emsp;&emsp;频</div>
</template>
<template #input>
<div v-if="audioList&&audioList.length>0">
<div v-for="audio in audioList" class="mt10">
<audio id="amusic" preload="auto" controls>
<source :src="FILE_DOMAIN+audio.url"/>
</audio>
</div>
</div>
<div style="text-align: center;color: #c2bbbb;font-size: 10px;" v-if="audioList.length===0">
没有音频。
</div>
</template>
</van-field>
<van-field label="文档" style="flex-flow: column" input-align="left">
<template #label>
<div class="mb10">文&emsp;&emsp;档</div>
</template>
<template #input>
<div v-for="(item,index) in docList" v-if="docList&&docList.length>0">
<div class="text-nowrap color-puple"
@click="previewFile(item.filepath,item.filename,docList,index,item.id)">
{{ item.filename }}
</div>
</div>
<div v-if="docList.length===0" style="text-align: center;color: #c2bbbb;font-size: 10px;">
没有文档。
</div>
</template>
</van-field>
<van-field label="文档" style="flex-flow: column" input-align="left">
<template #label>
<div class="mb10">文&emsp;&emsp;档</div>
</template>
<template #input>
<div v-for="(item,index) in docList" v-if="docList&&docList.length>0">
<div class="text-nowrap color-puple"
@click="viewFile(docList)">
{{ item.filename }}
</div>
</div>
<div v-if="docList.length===0"
style="text-align: center;color: #c2bbbb;font-size: 10px;">
没有文档。
</div>
</template>
</van-field>-->
</van-cell-group>
<template v-if="viewData.union">
<div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">
分工会审核信息
</div>
</div>
<van-cell-group>
<van-field readonly name="type" :value="viewData.union.username" label="审核人"></van-field>
<van-field label="审核时间" :value="viewData.union.auditTime" left-icon="clock-o"
readonly></van-field>
<van-field label="审核意见" left-icon="chat-o"
:value="viewData.union.auditOpinion ? viewData.union.auditOpinion : '暂无'"
readonly></van-field>
<van-field name="sign" label="签字">
<template #input>
<van-image width="200" height="100" :src="viewData.union.auditSign"
v-if="viewData.union.auditSign"></van-image>
<span v-else>暂无</span>
</template>
</van-field>
</van-cell-group>
</template>
<template v-if="viewData.school">
<div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">
校工会审核信息
</div>
</div>
<van-cell-group>
<van-field readonly name="type" :value="viewData.school.username" label="审核人"></van-field>
<van-field label="审核时间" :value="viewData.school.auditTime" left-icon="clock-o"
readonly></van-field>
<van-field label="审核意见" left-icon="chat-o"
:value="viewData.school.auditOpinion ? viewData.school.auditOpinion : '暂无'"
readonly></van-field>
<van-field name="sign" label="签字">
<template #input>
<van-image width="200" height="100" :src="viewData.school.auditSign"
v-if="viewData.school.auditSign"></van-image>
<span v-else>暂无</span>
</template>
</van-field>
</van-cell-group>
</template>
</van-form>
@@ -145,12 +200,30 @@ module.exports = {
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
},
methods: {
viewFile(docList) {
if (docList && docList.length > 0) {
let pdfStreamUrl = encodeURIComponent(FILE_STREAM_PREVIEW_ADDRESS + '?id=' + docList[0].id) //将路径转码
window.open('/assets/platform/plugins/pdfJs/web/viewer.html?file=' + pdfStreamUrl, docList[0].filename)
} else {
this.$modal.msg('没有可查阅的文件')
}
},
async getInfo(id) {
const toast = vant.Toast.loading({
duration: 0,
forbidClick: true,
overlay: true,
message: '数据查询中...',
})
const {data, code, msg} = await $.get("/platform/hd/wmhd/findOneById", {id})
const refs = await $.get("/mobile/wmhd/list/findOne", {id})
const refs = await $.get("/platform/hd/wmhd/findxxById", {id})
if (refs) {
this.viewData = refs[0]
this.viewData = refs.data
this.videoList = []
this.img2List = []
this.docList = []
this.audioList = []
data.forEach(val => {
val.fjname = val.filename
val.fjurl = val.filepath
@@ -172,6 +245,7 @@ module.exports = {
this.viewData = {}
this.$toast.fail('获取信息失败');
}
toast.clear()
},
},
async created() {
@@ -193,4 +267,4 @@ module.exports = {
}
</style>
</style>
@@ -96,7 +96,7 @@
<td colspan="3">{{ schoolAudit.auditOpinion }}</td>
</tr>
<tr>
<!-- <tr>
<th>签字</th>
<td colspan="3">
<div>
@@ -105,7 +105,7 @@
<span v-else>暂无</span>
</div>
</td>
</tr>
</tr>-->
</table>
</border-table>
</el-tab-pane>
@@ -182,10 +182,10 @@
</template>
</el-table-column>
<el-table-column label="测评标准" prop="inspection" header-align="center" align="center">
<el-table-column label="测评标准" prop="inspection" >
<template scope="{row}">
<el-input v-if="!is_view" v-model="row.inspection" placeholder="请填写测评标准"></el-input>
<span v-else>{{ row.inspection }}</span>
<el-input v-if="!is_view" v-model="row.inspection" placeholder="请填写测评标准" type="textarea" rows="4"></el-input>
<div v-else style="white-space:break-spaces">{{ row.inspection }}</div>
</template>
</el-table-column>
@@ -265,12 +265,12 @@ layout("/layouts/platform.html"){
<el-table-column align="center" header-align="center" label="上传时间" prop="hdsbsj"
show-overflow-tooltip>
</el-table-column>
<el-table-column align="center" header-align="center" label="申请状态"
<!--<el-table-column align="center" header-align="center" label="申请状态"
prop="auditState" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.statecolor">{{scope.row.statename}}</span>
</template>
</el-table-column>
</el-table-column>-->
<!-- <el-table-column align="center" header-align="center" label="总点赞数"
prop="dz_znum" sortable>
<template scope="scope">
@@ -721,9 +721,9 @@ layout("/layouts/platform.html"){
// this.getActivitybxAgenda();
this.getDifficultAgenda();
this.getCondolenceAgenda();
this.getTaAgenda();
// this.getTaAgenda();
this.getRxdjAgenda();
this.getMemberAgenda();
// this.getMemberAgenda();
this.getSyrAgenda();
this.getOfferAdviceAgenda()
}
@@ -187,7 +187,7 @@ layout("/layouts/platform.html"){
</span>
</el-dialog>
<el-dialog title="资料阅览" :visible.sync="viewDialogVisible">
<el-dialog title="资料阅览" :visible.sync="viewDialogVisible" :modal-append-to-body="false">
<el-descriptions class="margin-top" title="" :column="2" border>
<el-descriptions-item span="2">
<template slot="label">资料名称</template>
@@ -193,11 +193,11 @@ layout("/layouts/platform.html"){
<el-col :lg="24" :sm="24">
<el-form-item required label="附件上传" prop="files">
<file-upload :files.sync="formData.files" card :max="10"
:type="['doc','docx','xls','xlsx','pdf','ppt','mp4', 'jpg', 'png', 'jpeg']">
:type="['doc','docx','xls','xlsx','pdf','ppt', 'jpg', 'png', 'jpeg']">
<template #el-upload__tip>
</template>
</file-upload>
<div class="el-upload__tip">可上传照片、视频、文档等资料,视频只能上传MP4格式</div>
<div class="el-upload__tip">可上传照片、文档等资料</div>
</el-form-item>
</el-col>
</el-row>
@@ -248,7 +248,7 @@ layout("/layouts/platform.html"){
if (resp.code === 0) {
this.notifySuccess(resp.msg)
setTimeout(() => {
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
sublime.jumpPagePjax('/platform/wakeshome/info/mine')
}, 500)
} else {
this.notifyWarning(resp.msg)
@@ -270,7 +270,7 @@ layout("/layouts/platform.html"){
if (resp.code === 0) {
this.notifySuccess(resp.msg)
setTimeout(() => {
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
sublime.jumpPagePjax('/platform/wakeshome/info/mine')
}, 500)
} else {
this.notifyWarning(resp.msg)
@@ -296,7 +296,7 @@ layout("/layouts/platform.html"){
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
} else {
const resp = await $.get('/platform/wakeshome/declaration/mine/getInfoById',{id:this.id})
const resp = await $.get('/platform/wakeshome/info/mine/getInfoById',{id:this.id})
if (resp.code === 0){
this.formData = {...resp.data}
}
@@ -70,7 +70,7 @@ layout("/layouts/platform.html"){
</el-button>
<el-button @click="openEdit(row)"
size="mini" type="primary"
v-if="[8100].includes(row.state) || !row.state">编辑
v-if="[8100,8125].includes(row.state) || !row.state">编辑
</el-button>
<el-button @click="doDelete(row)"
size="mini" type="danger"
@@ -143,7 +143,7 @@ layout("/layouts/platform.html"){
},
openEdit(row) {
sublime.jumpPagePjax('/platform/wakeshome/declaration/apply?id=' + row.id)
sublime.jumpPagePjax('/platform/wakeshome/info/apply?id=' + row.id)
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
@@ -164,7 +164,7 @@ layout("/layouts/platform.html"){
align="center">
<template scope="{row}">
<el-input v-model="row.inspection"
readonly></el-input>
readonly type="textarea" rows="4"></el-input>
</template>
</el-table-column>
@@ -286,7 +286,7 @@ layout("/layouts/platform.html"){
'union-comment-zb': httpVueLoader('/components/wakeshome/review/UnionCommentZb.vue?v=' + moment(new Date()).unix()),
'wakes-home-review': httpVueLoader('/components/wakeshome/review/ReviewResult.vue?v=' + moment(new Date()).unix()),
},
methods: {
methods: async {
async openReview(row){
const resp = await $.get(loc() + "/getPeoId",{id:row.id})
if (resp.code === 0) {
@@ -376,7 +376,7 @@ layout("/layouts/platform.html"){
bzList.push(o)
})
})
this.formData.bzList = bzList
this.formData.bzList = JSON.stringify(bzList)
this.formData.id = this.id
this.formData.president = this.president
this.formData.files = JSON.stringify(this.formData.files)
-1
View File
@@ -13,7 +13,6 @@ import io.v.nutz.sys.models.User;
import io.v.nutz.sys.services.SysConfigService;
import io.v.nutz.sys.services.SysUserRoleService;
import io.v.nutz.sys.services.SysUserService;
import org.apache.commons.validator.GenericValidator;
import org.apache.shiro.crypto.hash.Sha256Hash;
import org.apache.shiro.util.ByteSource;
import org.junit.Assert;