园-园历 列表按活动时间倒序 前端学年学期移到最前选项
This commit is contained in:
parent
0150061301
commit
1f7bb2195c
ruoyi-ui/src/views/benyi/schoolcalendar
ruoyi/src/main/resources/mybatis/benyi
@ -2,6 +2,23 @@
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" label-width="70px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :xs="24" :ms="12" :md="5">
|
||||
<el-form-item label="学年学期" prop="xnxq">
|
||||
<el-select
|
||||
v-model="queryParams.xnxq"
|
||||
placeholder="请选择学年学期"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in xnxqOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :ms="12" :md="5">
|
||||
<el-form-item label="活动类型" prop="type">
|
||||
<el-select
|
||||
@ -36,23 +53,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :ms="12" :md="5">
|
||||
<el-form-item label="学年学期" prop="xnxq">
|
||||
<el-select
|
||||
v-model="queryParams.xnxq"
|
||||
placeholder="请选择学年学期"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in xnxqOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :ms="12" :md="5">
|
||||
<el-form-item label="活动时间" prop="activitytime">
|
||||
<el-date-picker
|
||||
@ -214,10 +214,7 @@
|
||||
<el-dialog :title="title" :visible.sync="open" class="v-dialog">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="事件名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
<el-input v-model="form.name" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动类型" prop="type">
|
||||
<el-select
|
||||
@ -281,7 +278,7 @@ import {
|
||||
delSchoolcalendar,
|
||||
addSchoolcalendar,
|
||||
updateSchoolcalendar,
|
||||
exportSchoolcalendar
|
||||
exportSchoolcalendar,
|
||||
} from "@/api/benyi/schoolcalendar";
|
||||
|
||||
export default {
|
||||
@ -318,7 +315,7 @@ export default {
|
||||
pickerOptions0: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now() - 8.64e7;
|
||||
}
|
||||
},
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
@ -331,7 +328,7 @@ export default {
|
||||
deptid: undefined,
|
||||
activitytime: undefined,
|
||||
createuserid: undefined,
|
||||
createtime: undefined
|
||||
createtime: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -339,26 +336,26 @@ export default {
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
type: [
|
||||
{ required: true, message: "活动类型不能为空", trigger: "blur" }
|
||||
{ required: true, message: "活动类型不能为空", trigger: "blur" },
|
||||
],
|
||||
scope: [
|
||||
{ required: true, message: "活动范围不能为空", trigger: "blur" }
|
||||
{ required: true, message: "活动范围不能为空", trigger: "blur" },
|
||||
],
|
||||
activitytime: [
|
||||
{ required: true, message: "活动时间不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
{ required: true, message: "活动时间不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_schoolcalendartype").then(response => {
|
||||
this.getDicts("sys_schoolcalendartype").then((response) => {
|
||||
this.schoolcalendartypeOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_yebjlx").then(response => {
|
||||
this.getDicts("sys_yebjlx").then((response) => {
|
||||
this.scopeOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_xnxq").then(response => {
|
||||
this.getDicts("sys_xnxq").then((response) => {
|
||||
this.xnxqOptions = response.data;
|
||||
});
|
||||
},
|
||||
@ -400,7 +397,7 @@ export default {
|
||||
this.loading = true;
|
||||
listSchoolcalendar(
|
||||
this.addDateRange(this.queryParams, this.dateRange)
|
||||
).then(response => {
|
||||
).then((response) => {
|
||||
this.schoolcalendarList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -418,7 +415,7 @@ export default {
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
scope: undefined,
|
||||
activitytime: undefined
|
||||
activitytime: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -435,7 +432,7 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
@ -450,7 +447,7 @@ export default {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
var myArray = new Array(2);
|
||||
getSchoolcalendar(id).then(response => {
|
||||
getSchoolcalendar(id).then((response) => {
|
||||
this.form = response.data;
|
||||
myArray[0] = response.data.activitytime;
|
||||
myArray[1] = response.data.activityendtime;
|
||||
@ -463,8 +460,8 @@ export default {
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
var arrscope = this.form.scope;
|
||||
this.form.scope = arrscope.join(";");
|
||||
@ -475,7 +472,7 @@ export default {
|
||||
this.form.activityendtime = v2;
|
||||
|
||||
if (this.form.id != undefined) {
|
||||
updateSchoolcalendar(this.form).then(response => {
|
||||
updateSchoolcalendar(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -486,7 +483,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
//console.log(this.form.activitytime[1]);
|
||||
addSchoolcalendar(this.form).then(response => {
|
||||
addSchoolcalendar(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
@ -508,17 +505,17 @@ export default {
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return delSchoolcalendar(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(function() {});
|
||||
.catch(function () {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@ -526,17 +523,17 @@ export default {
|
||||
this.$confirm("是否确认导出所有园历管理数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
type: "warning",
|
||||
})
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return exportSchoolcalendar(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
.then((response) => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
.catch(function () {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
@ -43,7 +43,7 @@
|
||||
<!-- 数据范围过滤 -->
|
||||
${dataScope}
|
||||
|
||||
order by activitytime
|
||||
order by activitytime desc
|
||||
</select>
|
||||
|
||||
<select id="selectBySchoolcalendarById" parameterType="Long" resultMap="BySchoolcalendarResult">
|
||||
|
Loading…
x
Reference in New Issue
Block a user