优化
This commit is contained in:
parent
ec7f9e81ed
commit
67fe169c17
@ -57,7 +57,7 @@
|
||||
margin-top: 6vh !important;
|
||||
}
|
||||
|
||||
.el-table .el-table__header-wrapper th {
|
||||
.el-table th {
|
||||
word-break: break-word;
|
||||
background-color: #f8f8f9;
|
||||
color: #515a6e;
|
||||
|
@ -1,11 +1,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<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="type">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
@ -21,6 +18,8 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :ms="12" :md="5">
|
||||
<el-form-item label="适用范围" prop="scope">
|
||||
<el-select
|
||||
v-model="queryParams.scope"
|
||||
@ -36,6 +35,8 @@
|
||||
/>
|
||||
</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"
|
||||
@ -51,11 +52,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :ms="12" :md="5">
|
||||
<el-form-item label="活动时间" prop="activitytime">
|
||||
<el-date-picker
|
||||
class="my-date-picker"
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
@ -63,7 +66,9 @@
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :ms="12" :md="4">
|
||||
<el-form-item class="no-margin">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@ -75,6 +80,8 @@
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="mb8 btn-list">
|
||||
@ -122,7 +129,7 @@
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
width="38"
|
||||
align="center"
|
||||
:selectable="checkSelectable"
|
||||
/>
|
||||
@ -172,8 +179,8 @@
|
||||
fixed="right"
|
||||
label="操作"
|
||||
align="center"
|
||||
width="120"
|
||||
class-name="small-padding fixed-width"
|
||||
width="60"
|
||||
class-name="small-padding fixed-width edit-btns"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -278,7 +285,7 @@ import {
|
||||
delSchoolcalendar,
|
||||
addSchoolcalendar,
|
||||
updateSchoolcalendar,
|
||||
exportSchoolcalendar,
|
||||
exportSchoolcalendar
|
||||
} from "@/api/benyi/schoolcalendar";
|
||||
|
||||
export default {
|
||||
@ -315,7 +322,7 @@ export default {
|
||||
pickerOptions0: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now() - 8.64e7;
|
||||
},
|
||||
}
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
@ -328,7 +335,7 @@ export default {
|
||||
deptid: undefined,
|
||||
activitytime: undefined,
|
||||
createuserid: undefined,
|
||||
createtime: undefined,
|
||||
createtime: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -336,26 +343,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;
|
||||
});
|
||||
},
|
||||
@ -397,7 +404,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;
|
||||
@ -415,7 +422,7 @@ export default {
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
scope: undefined,
|
||||
activitytime: undefined,
|
||||
activitytime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -432,7 +439,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;
|
||||
},
|
||||
@ -447,7 +454,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;
|
||||
@ -460,8 +467,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(";");
|
||||
@ -472,7 +479,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;
|
||||
@ -483,7 +490,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;
|
||||
@ -505,17 +512,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() {
|
||||
@ -523,16 +530,33 @@ 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>
|
||||
.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>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.text {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8083`,
|
||||
// target: `http://120.53.14.147:9990/`,
|
||||
// target: `http://localhost:8083`,
|
||||
target: `http://120.53.14.147:9990/`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user