| | |
| | | import { mapGetters, mapState, mapActions } from 'vuex' |
| | | import subjectApi from '@/api/subject' |
| | | import departmentApi from '@/api/department' |
| | | import enumItem from '@/store/modules/enumItem' |
| | | export default { |
| | | data () { |
| | | return { |
| | | depart:[], |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | |
| | | departmentApi.addData(this.form.name).then(res=>{ |
| | | console.log(res) |
| | | if (res.code ==1){ |
| | | |
| | | _this.$message.success(res.message) |
| | | _this.delCurrentView(_this).then(() => { |
| | | _this.$router.push('/education/department/list') |
| | |
| | | import Pagination from '@/components/Pagination' |
| | | import subjectApi from '@/api/subject' |
| | | import departmentApi from '@/api/department' |
| | | import enumItem from '@/store/modules/enumItem' |
| | | export default { |
| | | components: { Pagination }, |
| | | data () { |
| | | return { |
| | | depart:[], |
| | | queryParam: { |
| | | level: null, |
| | | pageIndex: 1, |
| | |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | | this.listLoading = false |
| | | |
| | | this.depart = data.response.list |
| | | console.log(this.depart) |
| | | this.depart.map(item=>{ |
| | | item.key = item.id |
| | | item.value = item.name |
| | | }) |
| | | enumItem.state.user.levelEnum = this.depart |
| | | |
| | | }) |
| | | }, |
| | | submitForm () { |
| | |
| | | let lastId = this.form.id |
| | | this.$refs['form'].resetFields() |
| | | this.form = { |
| | | aggregateSource:100, |
| | | id: null, |
| | | departmentIds: [], |
| | | subjectId: null, |
| | | subjectId: [], |
| | | paperType: 1, |
| | | limitDateTime: [], |
| | | name: '', |
| | | suggestTime: null, |
| | | titleItems: [] |
| | | titleItems: [], |
| | | subjectSource:null, |
| | | questionTypeVMS:[] |
| | | } |
| | | this.form.id = lastId |
| | | }, |