Compare commits
4 Commits
dev-zcx
...
50a64770ee
| Author | SHA1 | Date | |
|---|---|---|---|
| 50a64770ee | |||
| 25cd675698 | |||
| 15622a2e5a | |||
| ca533e85e3 |
@@ -1,3 +1,10 @@
|
|||||||
|
###
|
||||||
|
# @Author: riverQiu
|
||||||
|
# @Date: 2023-08-16 22:04:23
|
||||||
|
# @LastEditors: riverQiu
|
||||||
|
# @LastEditTime: 2023-08-18 23:22:27
|
||||||
|
# @Description:
|
||||||
|
###
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 莳松管理系统
|
VUE_APP_TITLE = 莳松管理系统
|
||||||
|
|
||||||
@@ -7,5 +14,7 @@ ENV = 'development'
|
|||||||
# 莳松管理系统/开发环境
|
# 莳松管理系统/开发环境
|
||||||
VUE_APP_BASE_API = '/dev-api'
|
VUE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
|
JWL_API = ''
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -95,10 +95,10 @@
|
|||||||
<script src="/loading/index.js"></script>
|
<script src="/loading/index.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window._AMapSecurityConfig = {
|
window._AMapSecurityConfig = {
|
||||||
securityJsCode:'420463f2f8c849ab78b9d29548aff7d3',
|
securityJsCode:'f653df5a2c5f44ae68faaab6f6a6b8ab',
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
|
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
|
||||||
<script src="https://webapi.amap.com/maps?v=1.4.15&key=ec6b7ebe38f7ff27126f7088d87a9091&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
<script src="https://webapi.amap.com/maps?v=1.4.15&key=713d839ff505943b0f18e6df45f3b0dc&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
35
src/api/question.js
Normal file
35
src/api/question.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* @Author: riverQiu
|
||||||
|
* @Date: 2023-08-17 20:30:56
|
||||||
|
* @LastEditors: riverQiu
|
||||||
|
* @LastEditTime: 2023-08-19 00:26:04
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
// 获取首页统计信息
|
||||||
|
export function searchQuestion(param) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdQuestion/duima/list',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateQuestion(data) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdQuestion/duima/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addQuestion(data) {
|
||||||
|
return request({
|
||||||
|
url: '/driver-api/tdQuestion/duima/add',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ NProgress.configure({
|
|||||||
showSpinner: false
|
showSpinner: false
|
||||||
});
|
});
|
||||||
|
|
||||||
const whiteList = ['/login', '/auth-redirect', '/bind', '/register'];
|
const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/question'];
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ export const constantRoutes = [{
|
|||||||
component: () => import('@/views/register'),
|
component: () => import('@/views/register'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/question',
|
||||||
|
component: () => import('@/views/question'),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
component: () => import('@/views/error/404'),
|
component: () => import('@/views/error/404'),
|
||||||
|
|||||||
174
src/views/question/components/QuestionAddForm.vue
Normal file
174
src/views/question/components/QuestionAddForm.vue
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" @close="closeDialog">
|
||||||
|
<div>
|
||||||
|
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="left" @keyup.enter.native="dialogFormSubmit()">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="题目" prop="question">
|
||||||
|
<el-input v-model="dialogForm.question" maxlength="200" placeholder="请输入题目" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="选项" prop="question">
|
||||||
|
A:<el-input v-model="dialogForm.chooseA" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
B:<el-input v-model="dialogForm.chooseB" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
C:<el-input v-model="dialogForm.chooseC" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
D:<el-input v-model="dialogForm.chooseD" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
E:<el-input v-model="dialogForm.chooseE" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
F:<el-input v-model="dialogForm.chooseF" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
G:<el-input v-model="dialogForm.chooseG" maxlength="200" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="答案" prop="trueAnswer">
|
||||||
|
<span>{{ dialogForm.trueAnswer }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="科目" prop="subject">
|
||||||
|
<span v-if="dialogForm.subject == 1">科一</span>
|
||||||
|
<span v-if="dialogForm.subject == 4">科四</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="精选500题" prop="isVip">
|
||||||
|
<el-radio-group v-model="dialogForm.isVip" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="精选600题" prop="isVip2">
|
||||||
|
<el-radio-group v-model="dialogForm.isVip2" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否易错题" prop="isError">
|
||||||
|
<el-radio-group v-model="dialogForm.isError" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否新规" prop="isNew">
|
||||||
|
<el-radio-group v-model="dialogForm.isNew" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否密卷1" prop="isExam1">
|
||||||
|
<el-radio-group v-model="dialogForm.isExam1" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否密卷2" prop="isExam2">
|
||||||
|
<el-radio-group v-model="dialogForm.isExam2" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="考点" prop="examKeys">
|
||||||
|
<el-input v-model="dialogForm.examKeys" maxlength="200" placeholder="请输入考点" clearable />
|
||||||
|
<span style="color:red;">包含多个考点,以英文";"分割!</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button plain @click="(visible=false)">取消</el-button>
|
||||||
|
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { addQuestion } from '@/api/question';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
canSubmit: true,
|
||||||
|
dialogForm: {
|
||||||
|
questionId: undefined,
|
||||||
|
isVip: 0,
|
||||||
|
isVip2: 0,
|
||||||
|
isError: 0,
|
||||||
|
isNew: 0,
|
||||||
|
isExam1: 0,
|
||||||
|
isExam2: 0,
|
||||||
|
examKeys: undefined
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
schoolName: [{ required: true, message: '驾校名称不能为空', trigger: 'blur' }],
|
||||||
|
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (info = undefined) {
|
||||||
|
// debugger
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetDialogForm();
|
||||||
|
// this.$refs['dialogForm'].resetFields();
|
||||||
|
if (info) {
|
||||||
|
this.dialogForm = this.deepClone(info);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetDialogForm () {
|
||||||
|
this.dialogForm = {
|
||||||
|
questionId: undefined,
|
||||||
|
isVip: 0,
|
||||||
|
isVip2: 0,
|
||||||
|
isError: 0,
|
||||||
|
isNew: 0,
|
||||||
|
isExam1: 0,
|
||||||
|
isExam2: 0,
|
||||||
|
examKeys: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
closeDialog () {
|
||||||
|
this.$emit('update:dialogVisible', false);
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dialogFormSubmit () {
|
||||||
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
updateQuestion(this.dialogForm).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
// this.visible = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
174
src/views/question/components/QuestionForm.vue
Normal file
174
src/views/question/components/QuestionForm.vue
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" @close="closeDialog">
|
||||||
|
<div>
|
||||||
|
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="left" @keyup.enter.native="dialogFormSubmit()">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="题目" prop="question">
|
||||||
|
<span>{{ dialogForm.question }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="选项" prop="question">
|
||||||
|
<span v-if="dialogForm.chooseA">a:{{ dialogForm.chooseA }}<span>
|
||||||
|
<span v-if="dialogForm.chooseB">b:{{ dialogForm.chooseB }} </span>
|
||||||
|
<span v-if="dialogForm.chooseC">c:{{ dialogForm.chooseC }} </span>
|
||||||
|
<span v-if="dialogForm.chooseD">d:{{ dialogForm.chooseD }}</span>
|
||||||
|
<span v-if="dialogForm.chooseE">e:{{ dialogForm.chooseE }}</span>
|
||||||
|
<span v-if="dialogForm.chooseF">f:{{ dialogForm.chooseF }}</span>
|
||||||
|
<span v-if="dialogForm.chooseG">g:{{ dialogForm.chooseG }}</span>
|
||||||
|
</span></span></el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="答案" prop="trueAnswer">
|
||||||
|
<span>{{ dialogForm.trueAnswer }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="科目" prop="subject">
|
||||||
|
<span v-if="dialogForm.subject == 1">科一</span>
|
||||||
|
<span v-if="dialogForm.subject == 4">科四</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="精选500题" prop="isVip">
|
||||||
|
<el-radio-group v-model="dialogForm.isVip" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="精选600题" prop="isVip2">
|
||||||
|
<el-radio-group v-model="dialogForm.isVip2" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否易错题" prop="isError">
|
||||||
|
<el-radio-group v-model="dialogForm.isError" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否新规" prop="isNew">
|
||||||
|
<el-radio-group v-model="dialogForm.isNew" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否密卷1" prop="isExam1">
|
||||||
|
<el-radio-group v-model="dialogForm.isExam1" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="是否密卷2" prop="isExam2">
|
||||||
|
<el-radio-group v-model="dialogForm.isExam2" size="small">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="考点" prop="examKeys">
|
||||||
|
<el-input v-model="dialogForm.examKeys" maxlength="200" placeholder="请输入考点" clearable />
|
||||||
|
<span style="color:red;">包含多个考点,以英文";"分割!</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button plain @click="(visible=false)">取消</el-button>
|
||||||
|
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateQuestion } from '@/api/question';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
canSubmit: true,
|
||||||
|
dialogForm: {
|
||||||
|
questionId: undefined,
|
||||||
|
isVip: 0,
|
||||||
|
isVip2: 0,
|
||||||
|
isError: 0,
|
||||||
|
isNew: 0,
|
||||||
|
isExam1: 0,
|
||||||
|
isExam2: 0,
|
||||||
|
examKeys: undefined
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
schoolName: [{ required: true, message: '驾校名称不能为空', trigger: 'blur' }],
|
||||||
|
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (info = undefined) {
|
||||||
|
// debugger
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resetDialogForm();
|
||||||
|
// this.$refs['dialogForm'].resetFields();
|
||||||
|
if (info) {
|
||||||
|
this.dialogForm = this.deepClone(info);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetDialogForm () {
|
||||||
|
this.dialogForm = {
|
||||||
|
questionId: undefined,
|
||||||
|
isVip: 0,
|
||||||
|
isVip2: 0,
|
||||||
|
isError: 0,
|
||||||
|
isNew: 0,
|
||||||
|
isExam1: 0,
|
||||||
|
isExam2: 0,
|
||||||
|
examKeys: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
closeDialog () {
|
||||||
|
this.$emit('update:dialogVisible', false);
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dialogFormSubmit () {
|
||||||
|
this.$refs.dialogForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
updateQuestion(this.dialogForm).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
// this.visible = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
111
src/views/question/index.vue
Normal file
111
src/views/question/index.vue
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container" style="text-align:center">
|
||||||
|
<el-form size="small" :inline="true" label-width="68px">
|
||||||
|
<el-form-item label="题目">
|
||||||
|
<el-input v-model="queryParams.question" placeholder="请输入题目" clearable style="width:400px" @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableList" style="width:80%;margin:auto" @row-click="handleEdit">
|
||||||
|
<el-table-column type="index" width="55" align="center" />
|
||||||
|
<el-table-column label="题目" align="center" prop="question" min-width="140" />
|
||||||
|
<el-table-column label="选项" align="center" min-width="140">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<p v-if="row.chooseA">a:{{ row.chooseA }}</p>
|
||||||
|
<p v-if="row.chooseB">b:{{ row.chooseB }}</p>
|
||||||
|
<p v-if="row.chooseC">c:{{ row.chooseC }}</p>
|
||||||
|
<p v-if="row.chooseD">d:{{ row.chooseD }}</p>
|
||||||
|
<p v-if="row.chooseE">e:{{ row.chooseE }}</p>
|
||||||
|
<p v-if="row.chooseF">f:{{ row.chooseF }}</p>
|
||||||
|
<p v-if="row.chooseG">g:{{ row.chooseG }}</p>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="答案" align="center" prop="trueAnswer" min-width="100" />
|
||||||
|
<el-table-column label="科目" align="center" prop="subject" min-width="100">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
<p v-if="row.subject == 1">科一</p>
|
||||||
|
<p v-if="row.subject == 4">科四</p>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-download" @click="handleEdit(scope.row)">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
|
||||||
|
<QuestionForm v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" @refreshDataList="getList" />
|
||||||
|
<QuestionAddForm v-if="dialogAddVisible" ref="dialogAddForm" :dialog-visible="dialogAddVisible" @refreshDataList="getList" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { searchQuestion } from '@/api/question';
|
||||||
|
import QuestionForm from './components/QuestionForm.vue';
|
||||||
|
import QuestionAddForm from './components/QuestionAddForm.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Question',
|
||||||
|
components: {
|
||||||
|
QuestionForm,QuestionAddForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
tableList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
question: ''
|
||||||
|
},
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogAddVisible: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
// this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询文件列表 */
|
||||||
|
getList () {
|
||||||
|
this.loading = true;
|
||||||
|
searchQuestion(this.queryParams).then(response => {
|
||||||
|
this.tableList = response.data;
|
||||||
|
// this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery () {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery () {
|
||||||
|
this.queryParams.question = '';
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
handleEdit (item) {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.dialogForm.init(item);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAdd (item) {
|
||||||
|
this.dialogAddVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.dialogAddForm.init(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -281,7 +281,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 导入地图
|
// 导入地图
|
||||||
importMap() {
|
importMap() {
|
||||||
const url = 'https://webapi.amap.com/maps?v=1.4.15&key=f2f35d6adc4a16bb879d303cead56237&callback=onLoad';
|
const url = 'https://webapi.amap.com/maps?v=1.4.15&key=0e62be0896c6b8d27d453445f0fb8bc4&callback=onLoad';
|
||||||
var jsapi = document.createElement('script');
|
var jsapi = document.createElement('script');
|
||||||
jsapi.charset = 'utf-8';
|
jsapi.charset = 'utf-8';
|
||||||
jsapi.src = url;
|
jsapi.src = url;
|
||||||
@@ -546,7 +546,7 @@ export default {
|
|||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
const element = this.tableData[i];
|
const element = this.tableData[i];
|
||||||
const tempSchool = this.schoolList.filter((item) => item.schoolId === element.schoolId)[0];
|
const tempSchool = this.schoolList.filter((item) => item.schoolId === element.schoolId)[0];
|
||||||
if (!tempSchool.showInMap || !element.showInMap) {
|
if (!element.schoolShow || !element.showInMap) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const tmpMarker = new AMap.Marker({
|
const tmpMarker = new AMap.Marker({
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" :options="options" />
|
<SearchForm v-show="showSearch" ref="SearchForm" :options="options" @search="_getTableList" />
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" icon="el-icon-plus" v-hasPermi="['zs:sign:add']" @click="handleAddAndUpdate(undefined)">新增</el-button>
|
<el-button v-hasPermi="['zs:sign:add']" type="primary" icon="el-icon-plus" @click="handleAddAndUpdate(undefined)">新增</el-button>
|
||||||
<el-button v-if="admin == 'true'" type="warning" v-hasPermi="['zs:sign:export']" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
<el-button v-if="admin == 'true'" v-hasPermi="['zs:sign:export']" type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -15,24 +15,24 @@
|
|||||||
<template v-for="item in columns">
|
<template v-for="item in columns">
|
||||||
<el-table-column v-if="item.visible && item.prop === 'state'" :key="item.prop" :label="item.label" align="center" :width="item.width" :prop="item.prop">
|
<el-table-column v-if="item.visible && item.prop === 'state'" :key="item.prop" :label="item.label" align="center" :width="item.width" :prop="item.prop">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button type="success" size="mini" v-if="row.state">全款</el-button>
|
<el-button v-if="row.state" type="success" size="mini">全款</el-button>
|
||||||
<el-button type="warning" size="mini" v-else>未全款</el-button>
|
<el-button v-else type="warning" size="mini">未全款</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-else-if="item.visible" :key="item.prop" :label="item.label" align="center" :width="item.width" :prop="item.prop" :show-overflow-tooltip="item.overflow" />
|
<el-table-column v-else-if="item.visible" :key="item.prop" :label="item.label" align="center" :width="item.width" :prop="item.prop" :show-overflow-tooltip="item.overflow" />
|
||||||
</template>
|
</template>
|
||||||
<el-table-column align="center" width="100" fixed="right" label="审核状态">
|
<el-table-column align="center" width="100" fixed="right" label="审核状态">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button type="danger" size="mini" v-if="row.checkState == 1">待审核</el-button>
|
<el-button v-if="row.checkState == 1" type="danger" size="mini">待审核</el-button>
|
||||||
<el-button type="success" size="mini" v-else-if="row.checkState == 2">已审核</el-button>
|
<el-button v-else-if="row.checkState == 2" type="success" size="mini">已审核</el-button>
|
||||||
<el-button type="warning" size="mini" v-else-if="row.checkState == 3">驳回</el-button>
|
<el-button v-else-if="row.checkState == 3" type="warning" size="mini">驳回</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" v-hasPermi="['zs:sign:edit']" v-if="scope.row.signEdit" icon="el-icon-edit" @click="handleAddAndUpdate(scope.row)">修改</el-button>
|
<el-button v-if="scope.row.checkState == 0||scope.row.checkState == 3" v-hasPermi="['zs:sign:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleAddAndUpdate(scope.row)">修改</el-button>
|
||||||
<el-button size="mini" type="text" v-hasPermi="['zs:sign:check']" v-if="scope.row.checkState == 1 " @click="handleCheck(scope.row)">审核</el-button>
|
<el-button v-if="scope.row.checkState == 1 " v-hasPermi="['zs:sign:check']" size="mini" type="text" @click="handleCheck(scope.row)">审核</el-button>
|
||||||
<el-button size="mini" type="text" v-hasPermi="['zs:sign:remove']" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button v-hasPermi="['zs:sign:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -50,17 +50,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getSignList, exportData, deleteSign } from '@/api/zs/sign'
|
import { getSignList, exportData, deleteSign } from '@/api/zs/sign';
|
||||||
import empApi from '@/api/system/employee'
|
import empApi from '@/api/system/employee';
|
||||||
import CheckDialog from './components/CheckDialog'
|
import CheckDialog from './components/CheckDialog';
|
||||||
import SearchForm from './components/SearchForm.vue'
|
import SearchForm from './components/SearchForm.vue';
|
||||||
import SignFormDialog from './components/SignFormDialog.vue'
|
import SignFormDialog from './components/SignFormDialog.vue';
|
||||||
import { defaultColumns } from './columns.js';
|
import { defaultColumns } from './columns.js';
|
||||||
import UploadDialog from './components/UploadDialog.vue'
|
import UploadDialog from './components/UploadDialog.vue';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Sign',
|
name: 'Sign',
|
||||||
@@ -68,7 +65,7 @@ export default {
|
|||||||
SearchForm,
|
SearchForm,
|
||||||
CheckDialog,
|
CheckDialog,
|
||||||
SignFormDialog,
|
SignFormDialog,
|
||||||
UploadDialog,
|
UploadDialog
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -76,7 +73,7 @@ export default {
|
|||||||
userId: localStorage.getItem('userId'),
|
userId: localStorage.getItem('userId'),
|
||||||
searchForm: {
|
searchForm: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
columns: [],
|
columns: [],
|
||||||
@@ -88,12 +85,12 @@ export default {
|
|||||||
percentageOptions: [
|
percentageOptions: [
|
||||||
{
|
{
|
||||||
value: '驾校已结算',
|
value: '驾校已结算',
|
||||||
label: '驾校已结算',
|
label: '驾校已结算'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '提成已发放',
|
value: '提成已发放',
|
||||||
label: '提成已发放',
|
label: '提成已发放'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
areaOptions: [],
|
areaOptions: [],
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
@@ -109,32 +106,32 @@ export default {
|
|||||||
moneyStateOptions: [],
|
moneyStateOptions: [],
|
||||||
sourceOptions: []
|
sourceOptions: []
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
const str = localStorage.getItem(`${this.$route.name}-table-columns`);
|
const str = localStorage.getItem(`${this.$route.name}-table-columns`);
|
||||||
this.columns = str ? JSON.parse(str) : defaultColumns;
|
this.columns = str ? JSON.parse(str) : defaultColumns;
|
||||||
// 回款状态
|
// 回款状态
|
||||||
this.getDicts('dm_money_state').then((response) => {
|
this.getDicts('dm_money_state').then((response) => {
|
||||||
this.options.moneyStateOptions = response.data
|
this.options.moneyStateOptions = response.data;
|
||||||
})
|
});
|
||||||
// s所属区域
|
// s所属区域
|
||||||
this.getDicts('dm_area').then((response) => {
|
this.getDicts('dm_area').then((response) => {
|
||||||
this.options.areaOptions = response.data
|
this.options.areaOptions = response.data;
|
||||||
})
|
});
|
||||||
// s所属区域
|
// s所属区域
|
||||||
this.getDicts('dm_source').then((response) => {
|
this.getDicts('dm_source').then((response) => {
|
||||||
this.options.sourceOptions = response.data
|
this.options.sourceOptions = response.data;
|
||||||
})
|
});
|
||||||
this.getSchools()
|
this.getSchools();
|
||||||
this._getTableList()
|
this._getTableList();
|
||||||
this.getEmployee()
|
this.getEmployee();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 搜索
|
// 搜索
|
||||||
handleQuery () {
|
handleQuery () {
|
||||||
this.searchForm.pageNum = 1
|
this.searchForm.pageNum = 1;
|
||||||
this._getTableList()
|
this._getTableList();
|
||||||
},
|
},
|
||||||
_getTableList () {
|
_getTableList () {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -142,16 +139,16 @@ export default {
|
|||||||
const params = { ...this.searchForm, ...tempForm };
|
const params = { ...this.searchForm, ...tempForm };
|
||||||
getSignList(params).then(
|
getSignList(params).then(
|
||||||
(response) => {
|
(response) => {
|
||||||
this.tableDataList = response.rows
|
this.tableDataList = response.rows;
|
||||||
this.total = response.total
|
this.total = response.total;
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
},
|
},
|
||||||
getSchools () {
|
getSchools () {
|
||||||
empApi.pageList().then((resp) => {
|
empApi.pageList().then((resp) => {
|
||||||
this.options.schoolOptions = resp.data
|
this.options.schoolOptions = resp.data;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
@@ -159,46 +156,46 @@ export default {
|
|||||||
this.$confirm('是否确认导出所有成交记录项?', '警告', {
|
this.$confirm('是否确认导出所有成交记录项?', '警告', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||||
this.download('zs/sign/export', tempForm, `登记信息_${new Date().getTime()}.xlsx`);
|
this.download('zs/sign/export', tempForm, `登记信息_${new Date().getTime()}.xlsx`);
|
||||||
})
|
})
|
||||||
.catch(function () { })
|
.catch(function () { });
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
handleImport () {
|
handleImport () {
|
||||||
this.upload.title = '成交记录导入'
|
this.upload.title = '成交记录导入';
|
||||||
this.upload.open = true
|
this.upload.open = true;
|
||||||
},
|
},
|
||||||
/** 查询员工 */
|
/** 查询员工 */
|
||||||
getEmployee () {
|
getEmployee () {
|
||||||
empApi.getEmployee().then((resp) => {
|
empApi.getEmployee().then((resp) => {
|
||||||
if (resp.code == 200) {
|
if (resp.code == 200) {
|
||||||
this.options.userOptions = resp.data
|
this.options.userOptions = resp.data;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
changeSort (val) {
|
changeSort (val) {
|
||||||
if (val.order) {
|
if (val.order) {
|
||||||
this.searchForm.orderName = val.prop
|
this.searchForm.orderName = val.prop;
|
||||||
if (val.order == 'ascending') {
|
if (val.order == 'ascending') {
|
||||||
this.searchForm.orderType = 'asc'
|
this.searchForm.orderType = 'asc';
|
||||||
} else {
|
} else {
|
||||||
this.searchForm.orderType = 'desc'
|
this.searchForm.orderType = 'desc';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.searchForm.orderName = ''
|
this.searchForm.orderName = '';
|
||||||
this.searchForm.orderType = ''
|
this.searchForm.orderType = '';
|
||||||
}
|
}
|
||||||
this.getPageList()
|
this.getPageList();
|
||||||
},
|
},
|
||||||
handleAddAndUpdate (item) {
|
handleAddAndUpdate (item) {
|
||||||
this.dialog.signVisible = true
|
this.dialog.signVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.signDialogForm.init(item)
|
this.$refs.signDialogForm.init(item);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleDelete (item) {
|
handleDelete (item) {
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
@@ -207,30 +204,30 @@ export default {
|
|||||||
{
|
{
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
deleteSign({ signId: item.signId }).then((resp) => {
|
deleteSign({ signId: item.signId }).then((resp) => {
|
||||||
if (resp.code == 200) {
|
if (resp.code == 200) {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功');
|
||||||
this.getPageList()
|
this.getPageList();
|
||||||
} else {
|
} else {
|
||||||
// this.$message.error("删除失败:" + resp.msg);
|
// this.$message.error("删除失败:" + resp.msg);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
})
|
.catch(function () { });
|
||||||
.catch(function () { })
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleCheck (item) {
|
handleCheck (item) {
|
||||||
this.dialog.checkVisible = true
|
this.dialog.checkVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.checkDialogForm.init(item)
|
this.$refs.checkDialogForm.init(item);
|
||||||
})
|
});
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
|||||||
@@ -33,15 +33,24 @@ module.exports = {
|
|||||||
port: port,
|
port: port,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
|
[process.env.VUE_APP_BASE_API + '/driver-api']: {
|
||||||
|
// target: `https://xueche.ahduima.com/duima/`,
|
||||||
|
target: `http://localhost:8888/driver-api/`,
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: {
|
||||||
|
['^' + process.env.VUE_APP_BASE_API + '/driver-api']: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
// target: `https://xueche.ahduima.com/duima/`,
|
target: `https://xueche.ahduima.com/duima/`,
|
||||||
target: `http://localhost:8086`,
|
// target: `http://localhost:8086`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
disableHostCheck: true
|
disableHostCheck: true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user