commit
This commit is contained in:
+1
@@ -140,6 +140,7 @@ public class ActivityReimbursementMineController {
|
||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||
}
|
||||
// cnd.groupBy("t.id");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = activityReimbursementService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.activity.workscollection.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -25,6 +26,7 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -47,8 +49,6 @@ public class ActivityWorksCollectionUploadController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param pageForm 分页
|
||||
* @param activityId 活动id
|
||||
@@ -161,6 +161,8 @@ public class ActivityWorksCollectionUploadController {
|
||||
Dao extDao = Daos.ext(dao, FieldFilter.create(Activity_works_collection.class, "id|name|"));
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(Activity_works_collection::getEnable,"=",1);
|
||||
cnd.and(Activity_works_collection::getStartDateTime,"<=", DateUtil.now());
|
||||
cnd.and(Activity_works_collection::getEndDateTime,">=", DateUtil.now());
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or(Activity_works_collection::getActivityGroupId,"=","");
|
||||
seg.or(Activity_works_collection::getActivityGroupId,"is",null);
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<!-- 完全自定义卡片容器,复刻el-card样式 -->
|
||||
<div
|
||||
class="el-card custom-card"
|
||||
:style="{ width: width || '100%' }"
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<!-- 卡片头部 - 独立节点 -->
|
||||
<div v-if="$slots.header" class="el-card__header card-header">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
|
||||
<!-- 可滚动内容区域 - 独立节点 -->
|
||||
<div class="el-card__body card-body">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<!-- 卡片底部 - 独立节点 -->
|
||||
<div v-if="$slots.footer" class="el-card__footer card-footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: 'CustomCard',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
// 保留el-card的核心属性,保证使用体验一致
|
||||
width: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
shadow: {
|
||||
type: String,
|
||||
default: 'hover', // 同el-card默认值
|
||||
validator: (val) => ['always', 'hover', 'never'].includes(val)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 根据shadow属性动态设置阴影样式
|
||||
shadowClass() {
|
||||
return {
|
||||
'el-card--shadow-always': this.shadow === 'always',
|
||||
'el-card--shadow-hover': this.shadow === 'hover',
|
||||
'el-card--shadow-never': this.shadow === 'never'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 卡片核心样式 - 完全复刻el-card */
|
||||
.custom-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 84px); /* 关键:卡片高度撑满父容器 */
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
/* 继承el-card的字体样式 */
|
||||
color: var(--el-text-color-primary);
|
||||
font-size: 14px;
|
||||
transition: box-shadow 0.3s ease-in-out;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 阴影样式 - 完全对齐el-card */
|
||||
:deep(.el-card--shadow-always) {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
:deep(.el-card--shadow-hover):hover {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
:deep(.el-card--shadow-never) {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* 头部样式 - 固定高度,不滚动 */
|
||||
.card-header {
|
||||
flex-shrink: 0; /* 关键:不被压缩 */
|
||||
padding: 18px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 内容区域 - 自动填充剩余空间,可滚动 */
|
||||
.card-body {
|
||||
flex: 1; /* 关键:占满剩余高度 */
|
||||
padding: 20px;
|
||||
overflow-y: auto; /* 垂直滚动 */
|
||||
overflow-x: hidden; /* 隐藏水平滚动 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 底部样式 - 固定高度,不滚动 */
|
||||
.card-footer {
|
||||
flex-shrink: 0; /* 关键:不被压缩 */
|
||||
padding: 18px 20px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* 兼容el-card的默认样式覆盖 */
|
||||
:deep(.el-card__header) {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
:deep(.el-card__body) {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -56,6 +56,11 @@ module.exports = {
|
||||
default: "url",
|
||||
required: false
|
||||
},
|
||||
upload_size: {
|
||||
type: Number,
|
||||
default: 1024 * 1024 * 10,
|
||||
required: false
|
||||
},
|
||||
// 上传返回分类 数组或字符串逗号隔离 interval | array
|
||||
upload_result_category: {
|
||||
type: String,
|
||||
@@ -142,7 +147,39 @@ module.exports = {
|
||||
this.$emit("update:value", this.fileList)
|
||||
},
|
||||
beforeRead(file) {
|
||||
return true
|
||||
debugger
|
||||
console.log(file)
|
||||
console.log(this.upload_size)
|
||||
if (file.size > this.upload_size) {
|
||||
this.$toast("文件过大,请上传小于" + (this.upload_size / 1024 / 1024).toFixed(2) + "M的文件!")
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.accept || typeof this.accept !== "string") {
|
||||
return true
|
||||
}
|
||||
|
||||
// 去除前后空格并转换为数组
|
||||
const acceptTypes = this.accept
|
||||
.trim()
|
||||
.split(",")
|
||||
.map((type) => type.trim().toUpperCase())
|
||||
|
||||
let fileType
|
||||
const dotIndex = file.name.lastIndexOf(".")
|
||||
if (dotIndex !== -1) {
|
||||
fileType = file.name.substring(dotIndex).toUpperCase()
|
||||
} else {
|
||||
this.$toast("文件必须包含有效的扩展名!")
|
||||
return false
|
||||
}
|
||||
|
||||
const valid = acceptTypes.includes(fileType)
|
||||
if (valid) {
|
||||
return true
|
||||
}
|
||||
this.$toast(`文件只能是 ${this.accept} 格式!`)
|
||||
return false
|
||||
},
|
||||
afterRead(files) {
|
||||
this.fileList.map((f) => {
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
:accept="fileAccept"
|
||||
:multiple="true"
|
||||
list-type="picture-card"
|
||||
:class="{ hide: hideUpload }"
|
||||
>
|
||||
<i class="el-icon-plus"></i>
|
||||
<!-- <div class="el-upload__tip" v-if="fileList.length < upload_number">-->
|
||||
@@ -212,10 +213,14 @@ module.exports = {
|
||||
tips = tips + '不限格式;'
|
||||
}
|
||||
if (fileSize) {
|
||||
tips = tips + `单个文件大小不能超过<span style="color: red">${fileSize / 1024 / 1024}</span>M;`
|
||||
tips = tips + `单个文件大小不能超过<span style="color: red">${(fileSize / 1024 / 1024).toFixed(2)}</span>M;`
|
||||
}
|
||||
return tips
|
||||
}
|
||||
},
|
||||
hideUpload() {
|
||||
// 实时根据文件列表长度和限制数量计算
|
||||
return this.fileList.length >= this.upload_number;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildFileObject(url, id) {
|
||||
@@ -309,38 +314,35 @@ module.exports = {
|
||||
beforeUpload(file) {
|
||||
|
||||
if (file.size > this.upload_size) {
|
||||
this.$message.error("文件过大,请上传小于" + (this.upload_size / 1024 / 1024).toFixed(0) + "M的文件!")
|
||||
this.$message.error("文件过大,请上传小于" + (this.upload_size / 1024 / 1024).toFixed(2) + "M的文件!")
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.fileAccept || typeof this.fileAccept !== "string") {
|
||||
return true
|
||||
}
|
||||
|
||||
return true
|
||||
// 去除前后空格并转换为数组
|
||||
const acceptTypes = this.fileAccept
|
||||
.trim()
|
||||
.split(",")
|
||||
.map((type) => type.trim().toUpperCase())
|
||||
|
||||
// if (!this.fileAccept || typeof this.fileAccept !== "string") {
|
||||
// return true
|
||||
// }
|
||||
//
|
||||
// // 去除前后空格并转换为数组
|
||||
// const acceptTypes = this.fileAccept
|
||||
// .trim()
|
||||
// .split(",")
|
||||
// .map((type) => type.trim().toUpperCase())
|
||||
//
|
||||
// let fileType
|
||||
// const dotIndex = file.name.lastIndexOf(".")
|
||||
// if (dotIndex !== -1) {
|
||||
// fileType = file.name.substring(dotIndex).toUpperCase()
|
||||
// } else {
|
||||
// this.$message.error("文件必须包含有效的扩展名!")
|
||||
// return false
|
||||
// }
|
||||
//
|
||||
// const valid = acceptTypes.includes(fileType)
|
||||
// if (valid) {
|
||||
// return true
|
||||
// }
|
||||
// this.$message.error(`文件只能是 ${this.fileAccept} 格式!`)
|
||||
// return false
|
||||
let fileType
|
||||
const dotIndex = file.name.lastIndexOf(".")
|
||||
if (dotIndex !== -1) {
|
||||
fileType = file.name.substring(dotIndex).toUpperCase()
|
||||
} else {
|
||||
this.$message.error("文件必须包含有效的扩展名!")
|
||||
return false
|
||||
}
|
||||
|
||||
const valid = acceptTypes.includes(fileType)
|
||||
if (valid) {
|
||||
return true
|
||||
}
|
||||
this.$message.error(`文件只能是 ${this.fileAccept} 格式!`)
|
||||
return false
|
||||
},
|
||||
|
||||
// 预览图片
|
||||
@@ -643,4 +645,7 @@ module.exports = {
|
||||
height: var(--upload-height, 148px);
|
||||
}
|
||||
|
||||
.hide .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -392,6 +392,7 @@
|
||||
Vue.component("excel-import", httpVueLoader("/components/plugins/sysImport/excelImport.vue?v=" + new Date().getTime()))
|
||||
Vue.component("flow-form-button", httpVueLoader("/components/plugins/flowable/formButton.vue?v=" + new Date().getTime()))
|
||||
Vue.component("snaker-flow", httpVueLoader("/components/plugins/snaker/snakerFlow.vue?v=" + new Date().getTime()))
|
||||
Vue.component("custom-card", httpVueLoader("/components/plugins/sysCard/index.vue?v=" + new Date().getTime()))
|
||||
Vue.component(
|
||||
"snaker-flow-task-form-action",
|
||||
httpVueLoader("/components/plugins/snaker/snakerFlowTaskFormAction.vue?v=" + new Date().getTime())
|
||||
|
||||
@@ -536,12 +536,6 @@ const basicForm = {
|
||||
}
|
||||
this.formData.isDisabled = false
|
||||
await this.doHandle('提交')
|
||||
} else {
|
||||
if(Object.keys(errMsg).length > 0) {
|
||||
this.$message.warning(errMsg[Object.keys(errMsg)[0]][0].message)
|
||||
return
|
||||
}
|
||||
this.$message.warning("存在必填项未填写")
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -230,12 +230,14 @@ layout("/layouts/platform.html"){
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button @click="close">取消</el-button>
|
||||
<el-button type="primary" v-if="formData.isSubmit!=true" plain @click="doSave">保存</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确定</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template #edit_footer>
|
||||
<el-button @click="close">取消</el-button>
|
||||
<el-button type="primary" v-if="formData.isSubmit!=true" plain @click="doSave">保存</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确定</el-button>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
<drawer-user-scope :group_id.sync="formData.activityGroupId" @group_change="getActivityGroup"
|
||||
|
||||
@@ -39,6 +39,7 @@ const AU_FORM_TEMPLATE = {
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
:accept="fileAccept"
|
||||
:upload_size="(chooseWorksType?.allowSingleFileSize / 1024 * 1024 * 1024) || 10 * 1024 * 1024"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -225,10 +225,11 @@ layout("/layouts/platform.html"){
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="end" style="justify-content: end" type="flex">
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="save" type="primary" v-loading="submitLoading">提交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template #edit_footer>
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="save" type="primary" v-loading="submitLoading">提交</el-button>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
@@ -180,13 +180,11 @@ const optionSelect = {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="sign" label="签字">
|
||||
<el-form-item prop="userSign" label="签字" :required="projectInfo.signMode == 2">
|
||||
<pc-signature v-model="contactForm.userSign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -250,6 +248,13 @@ const optionSelect = {
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
const validateUserSign = (rule, value, callback) => {
|
||||
if (this.projectInfo.signMode === 2 && !value) {
|
||||
callback(new Error("请签字"))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}
|
||||
return {
|
||||
projectId: null, // 项目ID
|
||||
userId: null, // 用户id 代选的时候用得到
|
||||
@@ -279,6 +284,9 @@ const optionSelect = {
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
userSign: [
|
||||
{validator: validateUserSign, message: "请签字", trigger: "blur"}
|
||||
]
|
||||
},
|
||||
addressOptions: []
|
||||
|
||||
@@ -84,6 +84,7 @@ const applyForm = {
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
:accept="fileAccept"
|
||||
:upload_size="(chooseWorksType?.allowSingleFileSize / 1024 * 1024 * 1024) || 10 * 1024 * 1024"
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
@@ -128,7 +128,14 @@ layout("/layouts/platform_h5.html"){
|
||||
"pdf-preview": httpVueLoader("/components/plugins/sysFilePreview/PdfIndex.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
onApply(row) {
|
||||
async onApply(row) {
|
||||
const res = await this.$axios.post('/platform/activity/basic/scope/getScopeUser', {
|
||||
activityGroupId: Number(row.activityGroupId)
|
||||
})
|
||||
if (res.data === 0) {
|
||||
this.$toast.fail("您没有权限参与此活动")
|
||||
return
|
||||
}
|
||||
if (this.$moment().isBefore(this.$moment(row.startDateTime))) {
|
||||
this.onView(row)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user