提交 43ad3b34 authored 作者: 王鹏飞's avatar 王鹏飞

chore: upgrade to vue2.7

上级 338bedbd
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/essential', 'standard'],
extends: ['eslint:recommended', 'plugin:vue/essential'],
rules: {
'vue/comment-directive': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-mutating-props': 'off', // 暂时关闭
'space-before-function-paren': 'off'
'vue/no-mutating-props': 'off' // 暂时关闭
}
}
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"],
"vueCompilerOptions": {
"target": 2.7
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -13,30 +13,25 @@
"dependencies": {
"axios": "^0.27.2",
"blueimp-md5": "^2.19.0",
"element-ui": "^2.15.8",
"element-ui": "^2.15.12",
"lodash": "^4.17.21",
"query-string": "^7.1.1",
"vuedraggable": "^2.24.3",
"video.js": "^7.18.1",
"vue": "^2.6.14",
"video.js": "^7.20.3",
"vue": "^2.7.14",
"vue-meta": "^2.4.0",
"vue-router": "^3.5.4",
"vue-router": "^3.6.5",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@vitejs/plugin-vue2": "^2.0.1",
"ali-oss": "^6.17.1",
"chalk": "^4.1.2",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.2.0",
"eslint-plugin-vue": "^8.7.1",
"sass": "1.51.0",
"vite": "^2.9.9",
"vite-plugin-checker": "^0.4.6",
"vite-plugin-vue2": "^2.0.1",
"vue-template-compiler": "^2.6.14"
"eslint": "^8.28.0",
"eslint-plugin-vue": "^9.8.0",
"sass": "1.56.1",
"vite": "^3.2.4",
"vite-plugin-checker": "^0.5.1"
}
}
<template>
<el-select v-bind="$attrs" v-on="$listeners" style="width:220px;" :placeholder="placeholder">
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
<el-select v-bind="$attrs" v-on="$listeners" style="width: 220px" :placeholder="placeholder">
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"> </el-option>
</el-select>
</template>
<script>
......@@ -28,12 +23,11 @@ export default {
]
}
},
created() {
},
created() {},
methods: {
fetchCourseList() {
const params = {}
getCourseList(params).then(res => {})
getCourseList(params).then(() => {})
}
}
}
......
<template>
<el-select v-bind="$attrs" v-on="$listeners" :placeholder="placeholder">
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"> </el-option>
</el-select>
</template>
<script>
......@@ -28,12 +23,11 @@ export default {
]
}
},
created() {
},
created() {},
methods: {
fetchCourseList() {
const params = {}
getCourseList(params).then(res => {})
getCourseList(params).then(() => {})
}
}
}
......
......@@ -16,8 +16,7 @@
:index="currentQuestionIndex"
:disabled="disabled"
:hasResult="hasResult"
@change="handleChange"
>
@change="handleChange">
<template #index>{{ currentGroupPage }}/{{ currentGroupCount }}</template>
<template v-slot:default="data">
<slot name="question-item" v-bind="data"></slot>
......@@ -30,8 +29,7 @@
:page="currentGroupPage"
:data="currentQuestionGroup"
:list="numberGroups.length ? numberGroups : questionGroups"
@page-change="handlePageChange"
>
@page-change="handlePageChange">
<slot name="students" v-bind="{ data: currentQuestionGroup }"></slot>
</question-numbers>
</div>
......@@ -171,7 +169,7 @@ export default {
this.isCountDownEnd = true
this.$alert('考试时间结束,自动提交试卷', '', {
confirmButtonText: '确定',
callback: action => {
callback: () => {
this.submit()
}
}) // 是否显示解析
......
......@@ -5,10 +5,7 @@
<aside class="question-list-hd__aside"><slot name="index"></slot></aside>
</div>
<div class="question-list-bd">
<h2 class="question-list-title" v-if="conmonTitle" v-html="conmonTitle">
<!-- <span class="num">{{ page }}.</span> -->
<!-- {{ conmonTitle }} -->
</h2>
<h2 class="question-list-title" v-if="conmonTitle" v-html="conmonTitle"></h2>
<question-list-item
v-for="(item, i) in data.question_list"
:data="item"
......@@ -16,8 +13,7 @@
:page="data.question_list.length > 1 ? i + 1 : page"
:key="item.id"
v-bind="$attrs"
v-on="$listeners"
>
v-on="$listeners">
<slot v-bind="{ item, data }"></slot>
</question-list-item>
</div>
......
......@@ -140,7 +140,7 @@ export default {
}
},
watch: {
changeQuestionIndex(newV, oldV) {
changeQuestionIndex() {
this.$forceUpdate()
}
}
......
......@@ -19,7 +19,7 @@ export default function (blobInfo, succFun, failFun) {
failFun('上传失败')
})
})
.catch(response => {
.catch(() => {
failFun('获取Signature失败')
})
}
......@@ -7,7 +7,7 @@
</el-row>
</template>
<template v-slot:table-time="{ row }">
{{row.start_time + ' - ' + row.end_time}}
{{ row.start_time + ' - ' + row.end_time }}
</template>
<template v-slot:table-x="{ row }">
<el-button type="primary" size="mini" plain @click="onDetails(row)">查看</el-button>
......@@ -15,7 +15,12 @@
<el-button type="primary" size="mini" plain @click="onRemove(row)">删除</el-button>
</template>
</app-list>
<dialog-type v-if="isShowDialog" :info="info" :type="dialogType" :visible.sync="isShowDialog" @success="handleSuccess" />
<dialog-type
v-if="isShowDialog"
:info="info"
:type="dialogType"
:visible.sync="isShowDialog"
@success="handleSuccess" />
</app-card>
</template>
......@@ -83,7 +88,7 @@ export default {
})
},
handleSuccess() {},
fetchRemove(row) {}
fetchRemove() {}
}
}
</script>
......@@ -28,8 +28,7 @@
<el-input
v-model="params.progress_min"
style="width: 69px"
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');"
/>
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" />
<p class="percent-sign">%</p>
<p class="separator">-</p>
</template>
......@@ -37,24 +36,21 @@
<el-input
v-model="params.progress_max"
style="width: 69px"
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');"
/>
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" />
<p class="percent-sign">%</p>
</template>
<template v-slot:filter-score="{ params }">
<el-input
v-model="params.score_min"
style="width: 78px; margin-right: 10px"
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');"
/>
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" />
<p class="separator">-</p>
</template>
<template v-slot:filter-score_max="{ params }">
<el-input
v-model="params.score_max"
style="width: 78px"
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');"
/>
onkeyup="this.value = this.value.replace(/[^\d.]/g,'');" />
</template>
<template v-slot:filter-cert="{ params }">
<el-select v-model="params.has_certificate" placeholder="请选择">
......@@ -168,7 +164,7 @@ export default {
handleGiven(row) {
row.create_certificate_flag = false
this.$message('证书颁发中')
getCard({ student_id: row.id }).then(res => {
getCard({ student_id: row.id }).then(() => {
this.$refs.list.refetch()
this.$message.success('证书已颁发')
})
......
......@@ -9,8 +9,7 @@
:on-success="handleSuccess"
action="https://webapp-pub.oss-cn-beijing.aliyuncs.com"
:limit="1"
drag
>
drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
......@@ -67,11 +66,11 @@ export default {
submitUpload() {
importPeople({
file: this.fileList[0]
}).then(res => {
}).then(() => {
this.$emit('cancel')
this.$alert('正在更新...', '更新证书', {
confirmButtonText: '我知道了',
callback: action => {}
callback: () => {}
})
})
},
......
......@@ -44,7 +44,7 @@ export default {
students_id: this.form.students_id.join(','),
type: 'add'
}
addStudents(params).then(res => {
addStudents(params).then(() => {
this.$emit('update:visible', false)
this.$emit('success')
})
......
......@@ -44,7 +44,7 @@ export default {
staffs_id: this.form.staffs_id.join(','),
type: 'add'
}
addTeachers(params).then(res => {
addTeachers(params).then(() => {
this.$emit('update:visible', false)
this.$emit('success')
})
......
......@@ -57,7 +57,7 @@ export default {
handleRemove(row) {
const params = { id: this.classId, exams_id: row.exam_id, type: 'delete' }
// 删除学员
updateClassExam(params).then(res => {
updateClassExam(params).then(() => {
this.$message.success('删除成功')
this.$emit('update')
})
......
......@@ -48,7 +48,7 @@ export default {
},
handleAdd() {
const params = Object.assign({}, this.form, { id: this.classId, exams_id: this.form.exams_id.join(',') })
updateClassExam(params).then(res => {
updateClassExam(params).then(() => {
this.$message.success('添加成功')
this.$emit('update:visible', false)
this.$emit('update')
......
......@@ -119,7 +119,7 @@ export default {
})
},
changeStatus(row) {
updateCourseStatus({ class_id: this.id, course_id: row.id, is_open: row.is_open }).then(res => {
updateCourseStatus({ class_id: this.id, course_id: row.id, is_open: row.is_open }).then(() => {
this.$refs.list.refetch()
})
}
......
......@@ -85,7 +85,7 @@ export default {
},
// 删除
handleRemove(row) {
deleteClass({ id: row.id }).then(res => {
deleteClass({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......
......@@ -110,14 +110,14 @@ export default {
},
// 创建班级
create() {
createClass(this.form).then(res => {
createClass(this.form).then(() => {
this.$message.success('创建成功')
this.$router.push('/school/class')
})
},
// 编辑班级
edit() {
updateClass(Object.assign({ id: this.id }, this.form)).then(res => {
updateClass(Object.assign({ id: this.id }, this.form)).then(() => {
this.$message.success('更新成功')
this.$router.push('/school/class')
})
......
......@@ -39,8 +39,7 @@
</router-link>
<router-link
:to="{ path: 'student/update', query: { id: row.id } }"
v-permission="'menu_school_students_update'"
>
v-permission="'menu_school_students_update'">
<el-button type="success" style="margin-left: 10px" size="mini" plain>更新</el-button>
</router-link>
<el-button
......@@ -127,7 +126,7 @@ export default {
},
// 删除
handleRemove(row) {
deleteStudent({ id: row.id }).then(res => {
deleteStudent({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......
......@@ -74,7 +74,7 @@ export default {
},
// 删除
handleRemove(row) {
deleteStudent({ id: row.id }).then(res => {
deleteStudent({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......
......@@ -116,7 +116,7 @@ export default {
},
// 创建学生
create() {
createStudent(this.form).then(res => {
createStudent(this.form).then(() => {
this.$message.success('创建成功')
this.$router.go(-1)
})
......@@ -124,7 +124,7 @@ export default {
// 编辑学生
edit() {
const params = Object.assign({ id: this.id }, this.form)
updateStudent(params).then(res => {
updateStudent(params).then(() => {
this.$message.success('更新成功')
this.$router.go(-1)
})
......
......@@ -28,8 +28,7 @@
</router-link>
<router-link
:to="{ path: 'teacher/update', query: { id: row.id } }"
v-permission="'menu_school_teacher_update'"
>
v-permission="'menu_school_teacher_update'">
<el-button type="success" style="margin-left: 10px" size="mini" plain>更新</el-button>
</router-link>
<el-button
......@@ -115,7 +114,7 @@ export default {
},
// 删除
handleRemove(row) {
deleteTeacher({ id: row.id }).then(res => {
deleteTeacher({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......
......@@ -84,7 +84,7 @@ export default {
},
// 创建教师
create() {
createTeacher(this.form).then(res => {
createTeacher(this.form).then(() => {
this.$message.success('创建成功')
this.$router.push({
name: 'teacher'
......@@ -93,7 +93,7 @@ export default {
},
// 编辑教师
edit() {
updateTeacher(Object.assign({ id: this.id }, this.form)).then(res => {
updateTeacher(Object.assign({ id: this.id }, this.form)).then(() => {
this.$message.success('更新成功')
this.$router.push({
name: 'teacher'
......
import fs from 'fs'
import path from 'path'
import { defineConfig } from 'vite'
import { createVuePlugin } from 'vite-plugin-vue2'
import vue from '@vitejs/plugin-vue2'
import checker from 'vite-plugin-checker'
export default defineConfig(({ mode }) => {
return {
base: mode === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/fd-admin/' : '/',
plugins: [
checker({
eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' }
}),
createVuePlugin()
],
plugins: [vue(), checker({ eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } })],
server: {
open: true,
host: 'dev.ezijing.com',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论