Compare commits

...

5 Commits

Author SHA1 Message Date
qsh 2b7d3ddf77 题库图片 10 months ago
zcx 767ec44bba 题库图片替换 10 months ago
zcx 779b6c9eba 题库图片修改 10 months ago
qsh c66b8f227e 图库 10 months ago
zcx fc92668bd1 bug 12 months ago
  1. 13
      src/api/question.js
  2. 79
      src/views/question/components/QuestionAddForm.vue
  3. 73
      src/views/question/components/QuestionForm.vue
  4. 38
      src/views/question/index.vue
  5. 8
      src/views/sch/place/index.vue
  6. 2
      src/views/zs/clue/ClueForm/index.vue
  7. 5
      src/views/zs/clue/components/SearchForm.vue
  8. 4
      src/views/zs/clue/components/SkillDialog.vue
  9. 2
      src/views/zs/sign/components/SearchForm.vue
  10. 12
      vue.config.js

@ -10,7 +10,7 @@ import request from '@/utils/request';
// 获取首页统计信息
export function searchQuestion(param) {
return request({
url: '/driver-api/tdQuestion/duima/list',
url: '/xunjia/tdQuestion/duima/list',
method: 'get',
params: param
});
@ -18,7 +18,7 @@ export function searchQuestion(param) {
export function updateQuestion(data) {
return request({
url: '/driver-api/tdQuestion/duima/update',
url: '/xunjia/tdQuestion/duima/update',
method: 'put',
data: data
});
@ -26,10 +26,17 @@ export function updateQuestion(data) {
export function addQuestion(data) {
return request({
url: '/driver-api/tdQuestion/duima/add',
url: '/xunjia/tdQuestion/duima/add',
method: 'put',
data: data
});
}
export function uploadFile(data) {
return request({
url: '/xunjia/applet/tiku/question/upload',
method: 'post',
data: data
});
}

@ -1,7 +1,14 @@
<template>
<el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="900px" @close="closeDialog">
<div>
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="left" @keyup.enter.native="dialogFormSubmit()">
<el-form
ref="dialogForm"
:model="dialogForm"
:rules="dataRule"
label-width="80px"
label-position="left"
@keyup.enter.native="dialogFormSubmit()"
>
<el-row>
<el-col :span="24">
<el-form-item label="题目" prop="question">
@ -9,47 +16,47 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="选项A" prop="question">
<el-input v-model="dialogForm.chooseA" maxlength="200" placeholder="请输入" clearable />
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="选项B" prop="question">
<el-input v-model="dialogForm.chooseB" maxlength="200" placeholder="请输入" clearable />
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="选项C" prop="question">
<el-input v-model="dialogForm.chooseC" maxlength="200" placeholder="请输入" clearable />
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="选项D" prop="question">
<el-input v-model="dialogForm.chooseD" maxlength="200" placeholder="请输入" clearable />
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="选项E" prop="question">
<el-input v-model="dialogForm.chooseE" maxlength="200" placeholder="请输入" clearable />
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="选项F" prop="question">
<el-input v-model="dialogForm.chooseF" maxlength="200" placeholder="请输入" clearable />
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="选项G" prop="question">
<el-input v-model="dialogForm.chooseG" maxlength="200" placeholder="请输入" clearable />
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -63,11 +70,11 @@
<el-col :span="24">
<el-form-item label="科目" prop="subject">
<span v-if="dialogForm.subject == 1">科一</span>
<span v-if="dialogForm.subject == 4">科四</span>
<span v-else-if="dialogForm.subject == 4">科四</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="精选500题" prop="isVip">
<el-radio-group v-model="dialogForm.isVip" size="small">
@ -132,11 +139,25 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-form-item label="题目图片" prop="imageUrl">
<el-upload
action="#"
accept=".png,.jpg,.jpeg,.gif"
:limit="1"
:http-request="handleImport"
:on-exceed="handleExceed"
:show-file-list="false"
>
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" style="width: 200px;">
<i v-else class="el-icon-plus" />
</el-upload>
</el-form-item>
</el-row>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button plain @click="(visible=false)">取消</el-button>
<el-button plain @click="visible = false">取消</el-button>
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
</span>
</el-dialog>
@ -146,7 +167,7 @@
import { addQuestion } from '@/api/question';
export default {
data () {
data() {
return {
visible: false,
canSubmit: true,
@ -167,7 +188,7 @@ export default {
};
},
methods: {
init (info = undefined) {
init(info = undefined) {
// debugger
this.visible = true;
this.$nextTick(() => {
@ -178,7 +199,7 @@ export default {
}
});
},
resetDialogForm () {
resetDialogForm() {
this.dialogForm = {
questionId: undefined,
isVip: 0,
@ -190,14 +211,14 @@ export default {
examKeys: undefined
};
},
closeDialog () {
closeDialog() {
this.$emit('update:dialogVisible', false);
},
//
dialogFormSubmit () {
dialogFormSubmit() {
this.$refs.dialogForm.validate((valid) => {
if (valid) {
updateQuestion(this.dialogForm).then(response => {
addQuestion(this.dialogForm).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess('修改成功');
// this.visible = true;
@ -205,6 +226,20 @@ export default {
});
}
});
},
handleImport(opt) {
const data = new FormData();
data.append('file', opt.file);
//
// api.upload(data).then(resp => {
// if (resp.code == 200) {
// this.$modal.msgSuccess('');
// this.dialogForm.imageUrl = resp.data;
// }
// });
},
handleExceed(files) {
this.handleImport({ file: files[0] });
}
}
};

@ -6,21 +6,40 @@
<el-col :span="24">
<el-form-item label="题目" prop="question">
<div>{{ dialogForm.question }}</div>
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" width="100" alt="">
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" width="200" alt="" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="替换图片">
<el-upload
action="#"
accept=".png,.jpg,.jpeg,.gif"
:limit="1"
:http-request="handleImport"
:on-exceed="handleExceed"
:show-file-list="false"
>
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" style="width: 300px" />
<i v-else class="el-icon-plus" />
</el-upload>
</el-form-item>
</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>
<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>
@ -104,18 +123,17 @@
</el-col>
</el-row>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button plain @click="(visible = false)">取消</el-button>
<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';
import { updateQuestion, uploadFile } from '@/api/question';
// import axios from 'axios';
export default {
data() {
return {
@ -146,6 +164,7 @@ export default {
// this.$refs['dialogForm'].resetFields();
if (info) {
this.dialogForm = this.deepClone(info);
this.fileUrl = info.imageUrl;
}
});
},
@ -168,7 +187,7 @@ export default {
dialogFormSubmit() {
this.$refs.dialogForm.validate((valid) => {
if (valid) {
updateQuestion(this.dialogForm).then(response => {
updateQuestion(this.dialogForm).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess('修改成功');
this.$emit('update');
@ -177,6 +196,32 @@ export default {
});
}
});
},
handleImport(opt) {
const data = new FormData();
data.append('file', opt.file);
// axios({
// method: 'post',
// url: 'http://xj.ahduima.com/xunjia/tiku/question/upload',
// data: data
// }).then((resp) => {
// console.log(resp.data);
// if (resp.data.code == 200) {
// this.$modal.msgSuccess('');
// this.dialogForm.imageUrl = resp.data.msg;
// }
// console.log(this.dialogForm)
// });
//
uploadFile(data).then(resp => {
if (resp.code == 200) {
this.$modal.msgSuccess('文件上传成功');
this.dialogForm.imageUrl = resp.msg;
}
});
},
handleExceed(files) {
this.handleImport({ file: files[0] });
}
}
};

@ -1,5 +1,5 @@
<template>
<div class="app-container" style="text-align:center">
<div class="app-container" style="text-align: center">
<el-form size="small" :inline="true" label-width="68px" @submit.native.prevent>
<el-row :gutter="20">
<el-form-item label="车型">
@ -16,22 +16,24 @@
</el-radio-group>
</el-form-item>
</el-row>
<el-form-item>
<el-checkbox v-model="queryParams.isWatermark" :label="true">是否有水印</el-checkbox>
</el-form-item>
<el-form-item label="题目">
<el-input v-model="queryParams.question" placeholder="请输入题目" clearable style="width:400px" @keyup.enter.native="handleQuery" />
<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-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" style="width:80%;margin:auto" @row-click="handleEdit">
<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}">
<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>
@ -43,21 +45,26 @@
</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}">
<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" min-width="100">
<template slot-scope="{row}">
<template slot-scope="{ row }">
{{ row.isNew ? '是' : '' }}
</template>
</el-table-column>
<el-table-column label="车型" align="center" min-width="100">
<template slot-scope="{row}">
<template slot-scope="{ row }">
{{ row.carTypeId == 1001 ? '小车' : '摩托车' }}
</template>
</el-table-column>
<el-table-column label="图片" align="center" min-width="200">
<template slot-scope="{ row }">
<img :src="row.imageUrl" alt="" width="80px" srcset="">
</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>
@ -68,7 +75,6 @@
<!-- <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" @update="getList" />
<QuestionAddForm v-if="dialogAddVisible" ref="dialogAddForm" :dialog-visible="dialogAddVisible" @update="getList" />
</div>
</template>
@ -80,7 +86,8 @@ import QuestionAddForm from './components/QuestionAddForm.vue';
export default {
name: 'Question',
components: {
QuestionForm, QuestionAddForm
QuestionForm,
QuestionAddForm
},
data() {
return {
@ -106,7 +113,7 @@ export default {
/** 查询文件列表 */
getList() {
this.loading = true;
searchQuestion(this.queryParams).then(response => {
searchQuestion(this.queryParams).then((response) => {
this.tableList = response.data;
// this.total = response.total;
this.loading = false;
@ -115,10 +122,10 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
if (this.queryParams.question) {
if (this.queryParams.question || (this.queryParams.isWatermark != undefined && this.queryParams.isWatermark)) {
this.getList();
} else {
this.$modal.msgWarning('请输入题目');
this.$modal.msgWarning('请输入题目 ');
}
},
/** 重置按钮操作 */
@ -135,7 +142,10 @@ export default {
handleAdd(item) {
this.dialogAddVisible = true;
this.$nextTick(() => {
this.$refs.dialogAddForm.init(item);
this.$refs.dialogAddForm.init({
subject: this.queryParams.subject,
carTypeId: this.queryParams.carTypeId
});
});
}
}

@ -7,10 +7,13 @@
</el-input>
<div class="asider" :class="showSchool ? '' : 'hidden-school'">
<el-card class="box-card" :body-style="{ flex: 1, 'overflow-y': 'scroll', padding: 0 }">
<div style="margin:10px;">
<el-input v-model="searchValue" placeholder="请输入驾校名" ></el-input>
</div>
<div slot="header" class="clearfix">
<div class="map-card-title">驾校列表</div>
</div>
<div v-for="school in schoolList" :key="school.schoolId" style="margin:10px;" :class="currentdeptId == school.schoolId ? 'actived-school' : ''">
<div v-for="school in schoolList.filter(item => (searchValue == undefined || item.schoolName.includes(searchValue)))" :key="school.schoolId" style="margin:10px;" :class="currentdeptId == school.schoolId ? 'actived-school' : ''">
<el-card :body-style="{ padding: '10px' }">
<div slot="header" class="clearfix">
<div class="map-card-title">{{ school.schoolName }}</div>
@ -186,7 +189,8 @@ export default {
schoolList: [],
currentdeptId: undefined,
placeMarkerList: [],
areaOptions: []
areaOptions: [],
searchValue: undefined
};
},
computed: {

@ -47,7 +47,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="线索来源" prop="source">
<el-select style="width: 100%;" v-model="clueForm.source" placeholder="请选择" clearable>
<el-select style="width: 100%;" v-model="clueForm.source" placeholder="请选择" clearable filterable>
<el-option v-for="dict in sourceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>

@ -12,7 +12,7 @@
<el-input v-model="searchForm.name" placeholder="姓名/联系方式" clearable style="width: 200px" />
</el-form-item>
<el-form-item label="线索来源">
<el-select v-model="searchForm.source" placeholder="选择线索来源" clearable>
<el-select v-model="searchForm.source" placeholder="选择线索来源" filterable clearable>
<el-option v-for="dict in sourceOptions" :key="dict.dictValue" :value="dict.dictValue" />
</el-select>
</el-form-item>
@ -66,7 +66,8 @@ export default {
{ value: 5, label: '今日跟踪' },
{ value: 6, label: '过期线索' },
{ value: 7, label: '相关线索' },
{ value: 8, label: '撞单线索' }
{ value: 8, label: '撞单线索' },
{ value: 9, label: '待分配' }
],
intentionOptions: [],
createDateRange: [],

@ -9,7 +9,7 @@
<el-dialog title="话术" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" height="700">
<div>
<!-- 问题 -->
<el-input v-model="queryParams.question" placeholder="请输入问题" clearable @keyup.enter.native="queryAnswer" style="margin-bottom: 10px;"/>
<el-input v-model="queryParams.searchValue" placeholder="请输入问题" clearable @keyup.enter.native="queryAnswer" style="margin-bottom: 10px;"/>
<!-- 关键词 -->
<el-checkbox-group v-model="queryParams.keyList" @change="queryAnswer">
@ -49,7 +49,7 @@ export default {
content: undefined,
skillId: undefined,
queryParams:{
question: undefined,
searchValue: undefined,
keyList: [],
status: 2
},

@ -32,7 +32,7 @@
</el-form-item>
<el-form-item label="线索来源">
<el-select v-model="searchForm.source" placeholder="请选择" clearable>
<el-select v-model="searchForm.source" placeholder="请选择" filterable clearable>
<el-option v-for="dict in options.sourceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>

@ -33,18 +33,18 @@ module.exports = {
port: port,
open: true,
proxy: {
[process.env.VUE_APP_BASE_API + '/driver-api']: {
// target: `http://118.31.23.45:8888/driver-api/`,
target: `http://localhost:8888/driver-api/`,
[process.env.VUE_APP_BASE_API + '/xunjia']: {
// target: `http://localhost:8889/driver-api/`,
target: `https://xueche.ahduima.com/duima/xunjia/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API + '/driver-api']: ''
['^' + process.env.VUE_APP_BASE_API + '/xunjia']: ''
}
},
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `https://xueche.ahduima.com/duima/`,
target: `http://localhost:8086`,
target: `https://xueche.ahduima.com/duima/`,
// target: `http://localhost:8086`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save