|
@@ -44,13 +44,27 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column prop="title" width="400" label="表单名称">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="typeN" width="200" label="所属栏目">
|
|
|
+ <el-table-column prop="typeN" width="200" :filters="typeFilterList" :filter-method="typeFilterFn" label="所属栏目">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="uname"
|
|
|
width="150"
|
|
|
label="创建人"
|
|
|
- ></el-table-column>
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="scope">
|
|
|
+ <div class="creator_column">
|
|
|
+ <el-dropdown trigger="click" @command="creatorFilterFn">
|
|
|
+ <span class="creator_column_span">
|
|
|
+ 创建人<i class="el-icon-caret-bottom el-icon--right"></i>
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item v-for="item in creatorFilterList" :key="item.value" :command="item.value">{{ item.text }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="look" width="150" label="表单状态">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ getLook(scope.row) }}</span>
|
|
@@ -59,6 +73,7 @@
|
|
|
<el-table-column
|
|
|
prop="worksCount"
|
|
|
width="150"
|
|
|
+ sortable
|
|
|
label="提交数量"
|
|
|
></el-table-column>
|
|
|
<el-table-column fixed="right" label="操作" min-width="300">
|
|
@@ -142,54 +157,6 @@
|
|
|
/>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
- <!--<el-button
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="editForm(scope.row)"
|
|
|
- v-if="
|
|
|
- scope.row.userid == userId ||
|
|
|
- (scope.row.course_teacher &&
|
|
|
- scope.row.course_teacher.indexOf(userId) !== -1) ||
|
|
|
- role == '1'
|
|
|
- "
|
|
|
- >编辑</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="checkForm(scope.row.courseId)"
|
|
|
- >查看</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="copyForm(scope.row.courseId)"
|
|
|
- >复制</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- @click="warnForm(scope.row)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- v-if="
|
|
|
- scope.row.userid == userId ||
|
|
|
- (scope.row.course_teacher &&
|
|
|
- scope.row.course_teacher.indexOf(userId) !== -1) ||
|
|
|
- role == '1'
|
|
|
- "
|
|
|
- >提醒</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="deleteForm(scope.row.courseId)"
|
|
|
- v-if="
|
|
|
- scope.row.userid == userId ||
|
|
|
- (scope.row.course_teacher &&
|
|
|
- scope.row.course_teacher.indexOf(userId) !== -1) ||
|
|
|
- role == '1'
|
|
|
- "
|
|
|
- >删除</el-button
|
|
|
- >-->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -231,16 +198,6 @@
|
|
|
{{ getTType(item.id, scope.row.cclassid) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column
|
|
|
- prop="class"
|
|
|
- width="200"
|
|
|
- label="年级"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="teachingAge"
|
|
|
- width="200"
|
|
|
- label="教龄"
|
|
|
- ></el-table-column> -->
|
|
|
<el-table-column
|
|
|
prop="worksCount"
|
|
|
width="200"
|
|
@@ -304,7 +261,14 @@ export default {
|
|
|
role: this.$route.query.role,
|
|
|
tableLoading: false,
|
|
|
teaType: [],
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+ creatorFilterList:[{
|
|
|
+ text:"我的",
|
|
|
+ value:0,
|
|
|
+ },{
|
|
|
+ text:"所有人",
|
|
|
+ value:4
|
|
|
+ }],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -390,6 +354,27 @@ export default {
|
|
|
}))
|
|
|
: null;
|
|
|
};
|
|
|
+ },
|
|
|
+ typeFilterList(){
|
|
|
+ let _result = [];
|
|
|
+
|
|
|
+ if(this.typeList.length){
|
|
|
+ _result = this.typeList.map(i=>{
|
|
|
+ let _list = [];
|
|
|
+ if(i.pidList){
|
|
|
+ _list = i.pidList.split(",")
|
|
|
+ }
|
|
|
+ _list.push(i.id);
|
|
|
+
|
|
|
+ return {
|
|
|
+ text:i.name,
|
|
|
+ value:_list.join(',')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ return _result;
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -483,6 +468,13 @@ export default {
|
|
|
filterTType(value, row, index) {
|
|
|
return row.cclassid && row.cclassid.indexOf(value) != -1;
|
|
|
},
|
|
|
+ typeFilterFn(value,row){
|
|
|
+ return row.typeid && value.indexOf(row.typeid)!=-1;
|
|
|
+ },
|
|
|
+ creatorFilterFn(value){
|
|
|
+ this.displayRange = value;
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
checkPerson(uid) {
|
|
|
this.$router.push(
|
|
|
"/checkToTest2?uid=" +
|
|
@@ -698,4 +690,9 @@ export default {
|
|
|
margin-right: 25px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+
|
|
|
+.creator_column_span{
|
|
|
+ cursor: pointer;
|
|
|
+ color: #909399;
|
|
|
+}
|
|
|
</style>
|