dev_2022-05-11
yujialong 3 years ago
parent 73060fdd63
commit 3622863cbd
  1. 31
      src/pages/achievement/list/index.vue
  2. 2
      src/pages/assessment/list/index.vue
  3. 12
      src/pages/evaluation/list/index.vue

@ -8,7 +8,18 @@
<el-radio-group v-model="month" @change="initData"> <el-radio-group v-model="month" @change="initData">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio> <el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker> <el-date-picker
v-model="date"
align="right"
unlink-panels
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
clearable
style="width: 300px"
></el-date-picker>
</li> </li>
<li> <li>
<label>实验项目分类</label> <label>实验项目分类</label>
@ -27,10 +38,6 @@
></el-option> ></el-option>
</el-select> </el-select>
</li> </li>
</ul>
</div>
<div class="tool mul">
<ul class="filter">
<li> <li>
<label>课程</label> <label>课程</label>
<el-select v-model="curriculumId" @change="initData"> <el-select v-model="curriculumId" @change="initData">
@ -47,15 +54,19 @@
<el-input placeholder="请输入实验项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> <el-input placeholder="请输入实验项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</li> </li>
</ul> </ul>
</div>
<div class="tool mul">
<ul class="filter">
<div> </ul>
<div style="margin-bottom: 24px">
<el-button v-if="auth('批量删除')" type="primary" @click="delAllData">批量删除</el-button> <el-button v-if="auth('批量删除')" type="primary" @click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="disabledSelection"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="disabledSelection"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
@ -64,8 +75,7 @@
<el-table-column prop="className" label="班级" align="center"></el-table-column> <el-table-column prop="className" label="班级" align="center"></el-table-column>
<el-table-column prop="experimentalName" label="实验名称" align="center"></el-table-column> <el-table-column prop="experimentalName" label="实验名称" align="center"></el-table-column>
</template> </template>
<el-table-column prop="projectName" label="项目名称" align="center"> <el-table-column prop="projectName" label="项目名称" align="center" min-width="400"></el-table-column>
</el-table-column>
<el-table-column prop="projectPermissions" label="分类" align="center"> <el-table-column prop="projectPermissions" label="分类" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.permissions == 2 ? "竞赛" : projectType.find(n => n.id === scope.row.permissions).name }} {{ scope.row.permissions == 2 ? "竞赛" : projectType.find(n => n.id === scope.row.permissions).name }}
@ -291,4 +301,7 @@ export default {
.el-radio.is-bordered + .el-radio.is-bordered { .el-radio.is-bordered + .el-radio.is-bordered {
margin-left: 0; margin-left: 0;
} }
.el-radio-group {
white-space: nowrap;
}
</style> </style>

@ -405,7 +405,7 @@ export default {
this.getData(); this.getData();
}, },
transferTime(date) { transferTime(date) {
if (date == "0000-00-00 00:00:00") return "---"; if (date == "0000-00-00 00:00:00" || !date) return "---";
return date; return date;
} }
} }

@ -454,7 +454,7 @@ export default {
if (i.includes("isTrue")) this.topicForm[i] = false; if (i.includes("isTrue")) this.topicForm[i] = false;
} }
}, },
submitSetEva() { submitSetEva() { //
let info = this.info; let info = this.info;
if (info.evaluationType == 0) { if (info.evaluationType == 0) {
let allEmpty = true; let allEmpty = true;
@ -483,7 +483,7 @@ export default {
console.log(err); console.log(err);
}); });
}, },
saveTopics() { saveTopics() { // /
this.$refs.topicForm.validate((valid) => { this.$refs.topicForm.validate((valid) => {
if (valid) { if (valid) {
let topicForm = this.topicForm; let topicForm = this.topicForm;
@ -509,7 +509,7 @@ export default {
if (this.topicForm.id) { if (this.topicForm.id) {
this.$post(this.api.questionsUpdate, this.topicForm).then(res => { this.$post(this.api.questionsUpdate, this.topicForm).then(res => {
util.successMsg("提交成功!"); util.successMsg("编辑成功!");
this.NewTopics = false; this.NewTopics = false;
this.getData(); this.getData();
}).catch(err => { }).catch(err => {
@ -517,9 +517,11 @@ export default {
}); });
} else { } else {
this.$post(this.api.questionsSave, this.topicForm).then(res => { this.$post(this.api.questionsSave, this.topicForm).then(res => {
util.successMsg("提交成功!"); util.successMsg("新增成功!");
this.NewTopics = false; this.NewTopics = false;
this.getData(); this.subject = "";
this.keyword = "";
this.initData();
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}); });

Loading…
Cancel
Save