| | |
| | | |
| | | export default { |
| | | list: query => post('/api/admin/subject/list'), |
| | | pageList: query => post('/api/admin/education/subject/page', query), |
| | | pageList: query => post('/api/admin/subject/page', query), |
| | | edit: query => post('/api/admin/education/subject/edit', query), |
| | | select: id => post('/api/admin/education/subject/select/' + id), |
| | | deleteSubject: id => post('/api/admin/education/subject/delete/' + id) |
| | |
| | | const actions = { |
| | | initSubject ({ commit }, action) { |
| | | subjectApi.list().then(re => { |
| | | commit('setSubjects', re.response) |
| | | commit('setSubjects', re.data) |
| | | if (action !== undefined) { |
| | | action() |
| | | } |
| | |
| | | const actions = { |
| | | initUserInfo ({ commit }) { |
| | | userApi.getCurrentUser().then(re => { |
| | | commit('setUserInfo', re.response) |
| | | commit('setUserInfo', re.data) |
| | | }) |
| | | } |
| | | } |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | examPaperAnswerApi.page(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | let _this = this |
| | | this.loading = true |
| | | dashboardApi.index().then(re => { |
| | | let response = re.response |
| | | let response = re.data |
| | | _this.examPaperCount = response.examPaperCount |
| | | _this.questionCount = response.questionCount |
| | | _this.doExamPaperCount = response.doExamPaperCount |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | subjectApi.pageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | examPaperApi.pageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | if (id && parseInt(id) !== 0) { |
| | | _this.formLoading = true |
| | | questionApi.select(id).then(re => { |
| | | _this.form = re.response |
| | | _this.form = re.data |
| | | _this.formLoading = false |
| | | }) |
| | | } |
| | |
| | | if (id && parseInt(id) !== 0) { |
| | | _this.formLoading = true |
| | | questionApi.select(id).then(re => { |
| | | _this.form = re.response |
| | | _this.form = re.data |
| | | _this.formLoading = false |
| | | }) |
| | | } |
| | |
| | | if (id && parseInt(id) !== 0) { |
| | | _this.formLoading = true |
| | | questionApi.select(id).then(re => { |
| | | _this.form = re.response |
| | | _this.form = re.data |
| | | _this.formLoading = false |
| | | }) |
| | | } |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | questionApi.pageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | userApi.getUserEventPageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | messageApi.pageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | _this.selectLoading = true |
| | | userApi.selectByUserName(query).then(re => { |
| | | _this.selectLoading = false |
| | | _this.options = re.response |
| | | _this.options = re.data |
| | | }) |
| | | } else { |
| | | _this.options = [] |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | taskApi.pageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | if (id && parseInt(id) !== 0) { |
| | | _this.formLoading = true |
| | | userApi.selectUser(id).then(re => { |
| | | _this.form = re.response |
| | | _this.form = re.data |
| | | _this.formLoading = false |
| | | }) |
| | | } |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | userApi.getUserPageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | let _this = this |
| | | userApi.changeStatus(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | row.status = re.response |
| | | row.status = re.data |
| | | _this.$message.success(re.message) |
| | | } else { |
| | | _this.$message.error(re.message) |
| | |
| | | if (id && parseInt(id) !== 0) { |
| | | _this.formLoading = true |
| | | userApi.selectUser(id).then(re => { |
| | | _this.form = re.response |
| | | _this.form = re.data |
| | | _this.formLoading = false |
| | | }) |
| | | } |
| | |
| | | search () { |
| | | this.listLoading = true |
| | | userApi.getUserPageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | const re = data.data |
| | | this.tableData = re.list |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | |
| | | let _this = this |
| | | userApi.changeStatus(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | row.status = re.response |
| | | row.status = re.data |
| | | _this.$message.success(re.message) |
| | | } else { |
| | | _this.$message.error(re.message) |