question sort

This commit is contained in:
caoqianming 2020-05-08 21:50:26 +08:00
parent 92b3bba694
commit ab7f9a85a0
3 changed files with 5 additions and 13 deletions

View File

@ -15,12 +15,7 @@
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
}, },
"dependencies": { "dependencies": {
"@ckeditor/ckeditor5-build-classic": "^18.0.0",
"@ckeditor/ckeditor5-editor-classic": "^18.0.0",
"@ckeditor/ckeditor5-upload": "^18.0.0",
"@ckeditor/ckeditor5-vue": "^1.0.1",
"axios": "0.18.1", "axios": "0.18.1",
"ckeditor4-vue": "^0.2.0",
"echarts": "^4.7.0", "echarts": "^4.7.0",
"element-ui": "2.13.0", "element-ui": "2.13.0",
"file-saver": "^2.0.2", "file-saver": "^2.0.2",

View File

@ -3,7 +3,6 @@ import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import CKEditor from '@ckeditor/ckeditor5-vue';
import 'element-ui/lib/theme-chalk/index.css' import 'element-ui/lib/theme-chalk/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n // import locale from 'element-ui/lib/locale/lang/en' // lang i18n
@ -33,7 +32,6 @@ if (process.env.NODE_ENV === 'production') {
// Vue.use(ElementUI, { locale }) // Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui按如下方式声明 // 如果想要中文版 element-ui按如下方式声明
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(CKEditor)
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({

View File

@ -24,7 +24,7 @@
/> />
</el-select> </el-select>
<el-input <el-input
v-model="search" v-model="listQuery.search"
placeholder="输入题干进行搜索" placeholder="输入题干进行搜索"
style="width: 200px;" style="width: 200px;"
class="filter-item" class="filter-item"
@ -183,7 +183,6 @@ export default {
}, },
total: 0, total: 0,
listQuery: listQuery, listQuery: listQuery,
search:"",
tableData: [], tableData: [],
questioncatData:[], questioncatData:[],
listLoading: true, listLoading: true,
@ -234,9 +233,9 @@ export default {
this.$message.error("Excel上传失败!"); this.$message.error("Excel上传失败!");
} }
}, },
getList(query = this.listQuery) { getList() {
this.listLoading = true; this.listLoading = true;
getQuestionList(query).then(response => { getQuestionList(this.listQuery).then(response => {
this.tableData = response.data.results; this.tableData = response.data.results;
this.total = response.data.count; this.total = response.data.count;
this.listLoading = false; this.listLoading = false;
@ -257,12 +256,12 @@ export default {
this.getList(); this.getList();
}, },
resetFilter() { resetFilter() {
this.search = ""
this.listQuery = listQuery this.listQuery = listQuery
this.getList(); this.getList();
}, },
handleSearch() { handleSearch() {
this.getList({ search: this.search }); this.listQuery.page = 1
this.getList();
}, },
handleAdd() { handleAdd() {
this.$router.push({path:"/Qmanage/question/create"}) this.$router.push({path:"/Qmanage/question/create"})