Compare commits

..

5 Commits

Author SHA1 Message Date
qsh 2b7d3ddf77 题库图片 8 months ago
zcx 767ec44bba 题库图片替换 8 months ago
zcx 779b6c9eba 题库图片修改 8 months ago
qsh c66b8f227e 图库 8 months ago
zcx fc92668bd1 bug 10 months ago
  1. 13
      src/api/question.js
  2. 55
      src/views/question/components/QuestionAddForm.vue
  3. 61
      src/views/question/components/QuestionForm.vue
  4. 22
      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) { export function searchQuestion(param) {
return request({ return request({
url: '/driver-api/tdQuestion/duima/list', url: '/xunjia/tdQuestion/duima/list',
method: 'get', method: 'get',
params: param params: param
}); });
@ -18,7 +18,7 @@ export function searchQuestion(param) {
export function updateQuestion(data) { export function updateQuestion(data) {
return request({ return request({
url: '/driver-api/tdQuestion/duima/update', url: '/xunjia/tdQuestion/duima/update',
method: 'put', method: 'put',
data: data data: data
}); });
@ -26,10 +26,17 @@ export function updateQuestion(data) {
export function addQuestion(data) { export function addQuestion(data) {
return request({ return request({
url: '/driver-api/tdQuestion/duima/add', url: '/xunjia/tdQuestion/duima/add',
method: 'put', method: 'put',
data: data data: data
}); });
} }
export function uploadFile(data) {
return request({
url: '/xunjia/applet/tiku/question/upload',
method: 'post',
data: data
});
}

@ -1,7 +1,14 @@
<template> <template>
<el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="900px" @close="closeDialog"> <el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="900px" @close="closeDialog">
<div> <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-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="题目" prop="question"> <el-form-item label="题目" prop="question">
@ -9,7 +16,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="选项A" prop="question"> <el-form-item label="选项A" prop="question">
<el-input v-model="dialogForm.chooseA" maxlength="200" placeholder="请输入" clearable /> <el-input v-model="dialogForm.chooseA" maxlength="200" placeholder="请输入" clearable />
@ -21,7 +28,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="选项C" prop="question"> <el-form-item label="选项C" prop="question">
<el-input v-model="dialogForm.chooseC" maxlength="200" placeholder="请输入" clearable /> <el-input v-model="dialogForm.chooseC" maxlength="200" placeholder="请输入" clearable />
@ -33,7 +40,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="选项E" prop="question"> <el-form-item label="选项E" prop="question">
<el-input v-model="dialogForm.chooseE" maxlength="200" placeholder="请输入" clearable /> <el-input v-model="dialogForm.chooseE" maxlength="200" placeholder="请输入" clearable />
@ -45,7 +52,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="选项G" prop="question"> <el-form-item label="选项G" prop="question">
<el-input v-model="dialogForm.chooseG" maxlength="200" placeholder="请输入" clearable /> <el-input v-model="dialogForm.chooseG" maxlength="200" placeholder="请输入" clearable />
@ -63,11 +70,11 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="科目" prop="subject"> <el-form-item label="科目" prop="subject">
<span v-if="dialogForm.subject == 1">科一</span> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="精选500题" prop="isVip"> <el-form-item label="精选500题" prop="isVip">
<el-radio-group v-model="dialogForm.isVip" size="small"> <el-radio-group v-model="dialogForm.isVip" size="small">
@ -132,11 +139,25 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <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> <el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -197,7 +218,7 @@ export default {
dialogFormSubmit() { dialogFormSubmit() {
this.$refs.dialogForm.validate((valid) => { this.$refs.dialogForm.validate((valid) => {
if (valid) { if (valid) {
updateQuestion(this.dialogForm).then(response => { addQuestion(this.dialogForm).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
// this.visible = true; // 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-col :span="24">
<el-form-item label="题目" prop="question"> <el-form-item label="题目" prop="question">
<div>{{ dialogForm.question }}</div> <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-form-item>
</el-col> </el-col>
</el-row> </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-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="选项" prop="question"> <el-form-item label="选项" prop="question">
<span v-if="dialogForm.chooseA">A:{{ dialogForm.chooseA }}<span> <span v-if="dialogForm.chooseA"
>A:{{ dialogForm.chooseA
}}<span>
<span v-if="dialogForm.chooseB">B:{{ dialogForm.chooseB }} </span> <span v-if="dialogForm.chooseB">B:{{ dialogForm.chooseB }} </span>
<span v-if="dialogForm.chooseC">C:{{ dialogForm.chooseC }} </span> <span v-if="dialogForm.chooseC">C:{{ dialogForm.chooseC }} </span>
<span v-if="dialogForm.chooseD">D:{{ dialogForm.chooseD }}</span> <span v-if="dialogForm.chooseD">D:{{ dialogForm.chooseD }}</span>
<span v-if="dialogForm.chooseE">E:{{ dialogForm.chooseE }}</span> <span v-if="dialogForm.chooseE">E:{{ dialogForm.chooseE }}</span>
<span v-if="dialogForm.chooseF">F:{{ dialogForm.chooseF }}</span> <span v-if="dialogForm.chooseF">F:{{ dialogForm.chooseF }}</span>
<span v-if="dialogForm.chooseG">G:{{ dialogForm.chooseG }}</span> <span v-if="dialogForm.chooseG">G:{{ dialogForm.chooseG }}</span>
</span></span></el-form-item> </span></span
></el-form-item
>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -104,18 +123,17 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <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> <el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { updateQuestion } from '@/api/question'; import { updateQuestion, uploadFile } from '@/api/question';
// import axios from 'axios';
export default { export default {
data() { data() {
return { return {
@ -146,6 +164,7 @@ export default {
// this.$refs['dialogForm'].resetFields(); // this.$refs['dialogForm'].resetFields();
if (info) { if (info) {
this.dialogForm = this.deepClone(info); this.dialogForm = this.deepClone(info);
this.fileUrl = info.imageUrl;
} }
}); });
}, },
@ -168,7 +187,7 @@ export default {
dialogFormSubmit() { dialogFormSubmit() {
this.$refs.dialogForm.validate((valid) => { this.$refs.dialogForm.validate((valid) => {
if (valid) { if (valid) {
updateQuestion(this.dialogForm).then(response => { updateQuestion(this.dialogForm).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
this.$emit('update'); 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] });
} }
} }
}; };

@ -16,6 +16,9 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-form-item>
<el-checkbox v-model="queryParams.isWatermark" :label="true">是否有水印</el-checkbox>
</el-form-item>
<el-form-item label="题目"> <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>
@ -23,7 +26,6 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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 icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button> <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -58,6 +60,11 @@
{{ row.carTypeId == 1001 ? '小车' : '摩托车' }} {{ row.carTypeId == 1001 ? '小车' : '摩托车' }}
</template> </template>
</el-table-column> </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"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-download" @click="handleEdit(scope.row)">编辑</el-button> <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" /> --> <!-- <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" /> <QuestionForm v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" @update="getList" />
<QuestionAddForm v-if="dialogAddVisible" ref="dialogAddForm" :dialog-visible="dialogAddVisible" @update="getList" /> <QuestionAddForm v-if="dialogAddVisible" ref="dialogAddForm" :dialog-visible="dialogAddVisible" @update="getList" />
</div> </div>
</template> </template>
@ -80,7 +86,8 @@ import QuestionAddForm from './components/QuestionAddForm.vue';
export default { export default {
name: 'Question', name: 'Question',
components: { components: {
QuestionForm, QuestionAddForm QuestionForm,
QuestionAddForm
}, },
data() { data() {
return { return {
@ -106,7 +113,7 @@ export default {
/** 查询文件列表 */ /** 查询文件列表 */
getList() { getList() {
this.loading = true; this.loading = true;
searchQuestion(this.queryParams).then(response => { searchQuestion(this.queryParams).then((response) => {
this.tableList = response.data; this.tableList = response.data;
// this.total = response.total; // this.total = response.total;
this.loading = false; this.loading = false;
@ -115,7 +122,7 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
if (this.queryParams.question) { if (this.queryParams.question || (this.queryParams.isWatermark != undefined && this.queryParams.isWatermark)) {
this.getList(); this.getList();
} else { } else {
this.$modal.msgWarning('请输入题目 '); this.$modal.msgWarning('请输入题目 ');
@ -135,7 +142,10 @@ export default {
handleAdd(item) { handleAdd(item) {
this.dialogAddVisible = true; this.dialogAddVisible = true;
this.$nextTick(() => { 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> </el-input>
<div class="asider" :class="showSchool ? '' : 'hidden-school'"> <div class="asider" :class="showSchool ? '' : 'hidden-school'">
<el-card class="box-card" :body-style="{ flex: 1, 'overflow-y': 'scroll', padding: 0 }"> <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 slot="header" class="clearfix">
<div class="map-card-title">驾校列表</div> <div class="map-card-title">驾校列表</div>
</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' }"> <el-card :body-style="{ padding: '10px' }">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<div class="map-card-title">{{ school.schoolName }}</div> <div class="map-card-title">{{ school.schoolName }}</div>
@ -186,7 +189,8 @@ export default {
schoolList: [], schoolList: [],
currentdeptId: undefined, currentdeptId: undefined,
placeMarkerList: [], placeMarkerList: [],
areaOptions: [] areaOptions: [],
searchValue: undefined
}; };
}, },
computed: { computed: {

@ -47,7 +47,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="线索来源" prop="source"> <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-option v-for="dict in sourceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>

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

@ -9,7 +9,7 @@
<el-dialog title="话术" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" height="700"> <el-dialog title="话术" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" height="700">
<div> <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"> <el-checkbox-group v-model="queryParams.keyList" @change="queryAnswer">
@ -49,7 +49,7 @@ export default {
content: undefined, content: undefined,
skillId: undefined, skillId: undefined,
queryParams:{ queryParams:{
question: undefined, searchValue: undefined,
keyList: [], keyList: [],
status: 2 status: 2
}, },

@ -32,7 +32,7 @@
</el-form-item> </el-form-item>
<el-form-item label="线索来源"> <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-option v-for="dict in options.sourceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>

@ -33,18 +33,18 @@ module.exports = {
port: port, port: port,
open: true, open: true,
proxy: { proxy: {
[process.env.VUE_APP_BASE_API + '/driver-api']: { [process.env.VUE_APP_BASE_API + '/xunjia']: {
// target: `http://118.31.23.45:8888/driver-api/`, // target: `http://localhost:8889/driver-api/`,
target: `http://localhost:8888/driver-api/`, target: `https://xueche.ahduima.com/duima/xunjia/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API + '/driver-api']: '' ['^' + process.env.VUE_APP_BASE_API + '/xunjia']: ''
} }
}, },
// 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]: ''

Loading…
Cancel
Save