优化
This commit is contained in:
parent
ec7f9e81ed
commit
67fe169c17
@ -57,7 +57,7 @@
|
|||||||
margin-top: 6vh !important;
|
margin-top: 6vh !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table .el-table__header-wrapper th {
|
.el-table th {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
background-color: #f8f8f9;
|
background-color: #f8f8f9;
|
||||||
color: #515a6e;
|
color: #515a6e;
|
||||||
|
@ -1,80 +1,87 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-form :model="queryParams" ref="queryForm" label-width="70px">
|
||||||
:model="queryParams"
|
<el-row :gutter="10">
|
||||||
ref="queryForm"
|
<el-col :xs="24" :ms="12" :md="5">
|
||||||
:inline="true"
|
<el-form-item label="活动类型" prop="type">
|
||||||
label-width="68px"
|
<el-select
|
||||||
>
|
v-model="queryParams.type"
|
||||||
<el-form-item label="活动类型" prop="type">
|
placeholder="请选择活动类型"
|
||||||
<el-select
|
clearable
|
||||||
v-model="queryParams.type"
|
size="small"
|
||||||
placeholder="请选择活动类型"
|
>
|
||||||
clearable
|
<el-option
|
||||||
size="small"
|
v-for="dict in schoolcalendartypeOptions"
|
||||||
>
|
:key="dict.dictValue"
|
||||||
<el-option
|
:label="dict.dictLabel"
|
||||||
v-for="dict in schoolcalendartypeOptions"
|
:value="dict.dictValue"
|
||||||
:key="dict.dictValue"
|
/>
|
||||||
:label="dict.dictLabel"
|
</el-select>
|
||||||
:value="dict.dictValue"
|
</el-form-item>
|
||||||
/>
|
</el-col>
|
||||||
</el-select>
|
<el-col :xs="24" :ms="12" :md="5">
|
||||||
</el-form-item>
|
<el-form-item label="适用范围" prop="scope">
|
||||||
<el-form-item label="适用范围" prop="scope">
|
<el-select
|
||||||
<el-select
|
v-model="queryParams.scope"
|
||||||
v-model="queryParams.scope"
|
placeholder="请选择适用范围"
|
||||||
placeholder="请选择适用范围"
|
clearable
|
||||||
clearable
|
size="small"
|
||||||
size="small"
|
>
|
||||||
>
|
<el-option
|
||||||
<el-option
|
v-for="dict in scopeOptions"
|
||||||
v-for="dict in scopeOptions"
|
:key="dict.dictValue"
|
||||||
:key="dict.dictValue"
|
:label="dict.dictLabel"
|
||||||
:label="dict.dictLabel"
|
:value="dict.dictValue"
|
||||||
:value="dict.dictValue"
|
/>
|
||||||
/>
|
</el-select>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="学年学期" prop="xnxq">
|
<el-col :xs="24" :ms="12" :md="5">
|
||||||
<el-select
|
<el-form-item label="学年学期" prop="xnxq">
|
||||||
v-model="queryParams.xnxq"
|
<el-select
|
||||||
placeholder="请选择学年学期"
|
v-model="queryParams.xnxq"
|
||||||
clearable
|
placeholder="请选择学年学期"
|
||||||
size="small"
|
clearable
|
||||||
>
|
size="small"
|
||||||
<el-option
|
>
|
||||||
v-for="dict in xnxqOptions"
|
<el-option
|
||||||
:key="dict.dictValue"
|
v-for="dict in xnxqOptions"
|
||||||
:label="dict.dictLabel"
|
:key="dict.dictValue"
|
||||||
:value="dict.dictValue"
|
:label="dict.dictLabel"
|
||||||
/>
|
:value="dict.dictValue"
|
||||||
</el-select>
|
/>
|
||||||
</el-form-item>
|
</el-select>
|
||||||
<el-form-item label="活动时间" prop="activitytime">
|
</el-form-item>
|
||||||
<el-date-picker
|
</el-col>
|
||||||
v-model="dateRange"
|
<el-col :xs="24" :ms="12" :md="5">
|
||||||
size="small"
|
<el-form-item label="活动时间" prop="activitytime">
|
||||||
style="width: 240px"
|
<el-date-picker
|
||||||
value-format="yyyy-MM-dd"
|
class="my-date-picker"
|
||||||
type="daterange"
|
v-model="dateRange"
|
||||||
range-separator="-"
|
size="small"
|
||||||
start-placeholder="开始日期"
|
value-format="yyyy-MM-dd"
|
||||||
end-placeholder="结束日期"
|
type="daterange"
|
||||||
></el-date-picker>
|
range-separator="-"
|
||||||
</el-form-item>
|
start-placeholder="开始日期"
|
||||||
<el-form-item>
|
end-placeholder="结束日期"
|
||||||
<el-button
|
></el-date-picker>
|
||||||
type="primary"
|
</el-form-item>
|
||||||
icon="el-icon-search"
|
</el-col>
|
||||||
size="mini"
|
<el-col :xs="24" :ms="12" :md="4">
|
||||||
@click="handleQuery"
|
<el-form-item class="no-margin">
|
||||||
>搜索</el-button
|
<el-button
|
||||||
>
|
type="primary"
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
icon="el-icon-search"
|
||||||
>重置</el-button
|
size="mini"
|
||||||
>
|
@click="handleQuery"
|
||||||
</el-form-item>
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div class="mb8 btn-list">
|
<div class="mb8 btn-list">
|
||||||
@ -122,7 +129,7 @@
|
|||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
width="55"
|
width="38"
|
||||||
align="center"
|
align="center"
|
||||||
:selectable="checkSelectable"
|
:selectable="checkSelectable"
|
||||||
/>
|
/>
|
||||||
@ -172,8 +179,8 @@
|
|||||||
fixed="right"
|
fixed="right"
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
width="120"
|
width="60"
|
||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width edit-btns"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -278,7 +285,7 @@ import {
|
|||||||
delSchoolcalendar,
|
delSchoolcalendar,
|
||||||
addSchoolcalendar,
|
addSchoolcalendar,
|
||||||
updateSchoolcalendar,
|
updateSchoolcalendar,
|
||||||
exportSchoolcalendar,
|
exportSchoolcalendar
|
||||||
} from "@/api/benyi/schoolcalendar";
|
} from "@/api/benyi/schoolcalendar";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -315,7 +322,7 @@ export default {
|
|||||||
pickerOptions0: {
|
pickerOptions0: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return time.getTime() < Date.now() - 8.64e7;
|
return time.getTime() < Date.now() - 8.64e7;
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -328,7 +335,7 @@ export default {
|
|||||||
deptid: undefined,
|
deptid: undefined,
|
||||||
activitytime: undefined,
|
activitytime: undefined,
|
||||||
createuserid: undefined,
|
createuserid: undefined,
|
||||||
createtime: undefined,
|
createtime: undefined
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -336,26 +343,26 @@ export default {
|
|||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: "活动类型不能为空", trigger: "blur" },
|
{ required: true, message: "活动类型不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
scope: [
|
scope: [
|
||||||
{ required: true, message: "活动范围不能为空", trigger: "blur" },
|
{ required: true, message: "活动范围不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
activitytime: [
|
activitytime: [
|
||||||
{ required: true, message: "活动时间不能为空", trigger: "blur" },
|
{ required: true, message: "活动时间不能为空", trigger: "blur" }
|
||||||
],
|
]
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getDicts("sys_schoolcalendartype").then((response) => {
|
this.getDicts("sys_schoolcalendartype").then(response => {
|
||||||
this.schoolcalendartypeOptions = response.data;
|
this.schoolcalendartypeOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getDicts("sys_yebjlx").then((response) => {
|
this.getDicts("sys_yebjlx").then(response => {
|
||||||
this.scopeOptions = response.data;
|
this.scopeOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getDicts("sys_xnxq").then((response) => {
|
this.getDicts("sys_xnxq").then(response => {
|
||||||
this.xnxqOptions = response.data;
|
this.xnxqOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -397,7 +404,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
listSchoolcalendar(
|
listSchoolcalendar(
|
||||||
this.addDateRange(this.queryParams, this.dateRange)
|
this.addDateRange(this.queryParams, this.dateRange)
|
||||||
).then((response) => {
|
).then(response => {
|
||||||
this.schoolcalendarList = response.rows;
|
this.schoolcalendarList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -415,7 +422,7 @@ export default {
|
|||||||
name: undefined,
|
name: undefined,
|
||||||
type: undefined,
|
type: undefined,
|
||||||
scope: undefined,
|
scope: undefined,
|
||||||
activitytime: undefined,
|
activitytime: undefined
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -432,7 +439,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map((item) => item.id);
|
this.ids = selection.map(item => item.id);
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
@ -447,7 +454,7 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
var myArray = new Array(2);
|
var myArray = new Array(2);
|
||||||
getSchoolcalendar(id).then((response) => {
|
getSchoolcalendar(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
myArray[0] = response.data.activitytime;
|
myArray[0] = response.data.activitytime;
|
||||||
myArray[1] = response.data.activityendtime;
|
myArray[1] = response.data.activityendtime;
|
||||||
@ -460,8 +467,8 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
var arrscope = this.form.scope;
|
var arrscope = this.form.scope;
|
||||||
this.form.scope = arrscope.join(";");
|
this.form.scope = arrscope.join(";");
|
||||||
@ -472,7 +479,7 @@ export default {
|
|||||||
this.form.activityendtime = v2;
|
this.form.activityendtime = v2;
|
||||||
|
|
||||||
if (this.form.id != undefined) {
|
if (this.form.id != undefined) {
|
||||||
updateSchoolcalendar(this.form).then((response) => {
|
updateSchoolcalendar(this.form).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -483,7 +490,7 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//console.log(this.form.activitytime[1]);
|
//console.log(this.form.activitytime[1]);
|
||||||
addSchoolcalendar(this.form).then((response) => {
|
addSchoolcalendar(this.form).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -505,17 +512,17 @@ export default {
|
|||||||
{
|
{
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(function () {
|
.then(function() {
|
||||||
return delSchoolcalendar(ids);
|
return delSchoolcalendar(ids);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.msgSuccess("删除成功");
|
this.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(function () {});
|
.catch(function() {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
@ -523,16 +530,33 @@ export default {
|
|||||||
this.$confirm("是否确认导出所有园历管理数据项?", "警告", {
|
this.$confirm("是否确认导出所有园历管理数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning"
|
||||||
})
|
})
|
||||||
.then(function () {
|
.then(function() {
|
||||||
return exportSchoolcalendar(queryParams);
|
return exportSchoolcalendar(queryParams);
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then(response => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
})
|
})
|
||||||
.catch(function () {});
|
.catch(function() {});
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.my-date-picker {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.edit-btns {
|
||||||
|
.el-button {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.no-margin ::v-deep.el-form-item__content {
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -89,7 +89,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.text {
|
.text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:8083`,
|
// target: `http://localhost:8083`,
|
||||||
// target: `http://120.53.14.147:9990/`,
|
target: `http://120.53.14.147:9990/`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user