Compare commits

..

No commits in common. 'master' and 'master' have entirely different histories.

  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) {
return request({
url: '/xunjia/tdQuestion/duima/list',
url: '/driver-api/tdQuestion/duima/list',
method: 'get',
params: param
});
@ -18,7 +18,7 @@ export function searchQuestion(param) {
export function updateQuestion(data) {
return request({
url: '/xunjia/tdQuestion/duima/update',
url: '/driver-api/tdQuestion/duima/update',
method: 'put',
data: data
});
@ -26,17 +26,10 @@ export function updateQuestion(data) {
export function addQuestion(data) {
return request({
url: '/xunjia/tdQuestion/duima/add',
url: '/driver-api/tdQuestion/duima/add',
method: 'put',
data: data
});
}
export function uploadFile(data) {
return request({
url: '/xunjia/applet/tiku/question/upload',
method: 'post',
data: data
});
}

@ -1,14 +1,7 @@
<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-width="80px"
label-position="left"
@keyup.enter.native="dialogFormSubmit()"
>
<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">
@ -16,7 +9,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row>
<el-col :span="12">
<el-form-item label="选项A" prop="question">
<el-input v-model="dialogForm.chooseA" maxlength="200" placeholder="请输入" clearable />
@ -28,7 +21,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row>
<el-col :span="12">
<el-form-item label="选项C" prop="question">
<el-input v-model="dialogForm.chooseC" maxlength="200" placeholder="请输入" clearable />
@ -40,7 +33,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row>
<el-col :span="12">
<el-form-item label="选项E" prop="question">
<el-input v-model="dialogForm.chooseE" maxlength="200" placeholder="请输入" clearable />
@ -52,7 +45,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row>
<el-col :span="12">
<el-form-item label="选项G" prop="question">
<el-input v-model="dialogForm.chooseG" maxlength="200" placeholder="请输入" clearable />
@ -70,11 +63,11 @@
<el-col :span="24">
<el-form-item label="科目" prop="subject">
<span v-if="dialogForm.subject == 1">科一</span>
<span v-else-if="dialogForm.subject == 4">科四</span>
<span v-if="dialogForm.subject == 4">科四</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row>
<el-col :span="8">
<el-form-item label="精选500题" prop="isVip">
<el-radio-group v-model="dialogForm.isVip" size="small">
@ -139,25 +132,11 @@
</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>
@ -218,7 +197,7 @@ export default {
dialogFormSubmit () {
this.$refs.dialogForm.validate((valid) => {
if (valid) {
addQuestion(this.dialogForm).then((response) => {
updateQuestion(this.dialogForm).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('修改成功');
// this.visible = true;
@ -226,20 +205,6 @@ 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,40 +6,21 @@
<el-col :span="24">
<el-form-item label="题目" prop="question">
<div>{{ dialogForm.question }}</div>
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" width="200" alt="" />
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" width="100" 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.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></span></el-form-item>
</el-col>
</el-row>
<el-row>
@ -123,17 +104,18 @@
</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, uploadFile } from '@/api/question';
// import axios from 'axios';
import { updateQuestion } from '@/api/question';
export default {
data() {
return {
@ -164,7 +146,6 @@ export default {
// this.$refs['dialogForm'].resetFields();
if (info) {
this.dialogForm = this.deepClone(info);
this.fileUrl = info.imageUrl;
}
});
},
@ -187,7 +168,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');
@ -196,32 +177,6 @@ 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,9 +16,6 @@
</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-form-item>
@ -26,6 +23,7 @@
<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>
@ -60,11 +58,6 @@
{{ 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>
@ -75,6 +68,7 @@
<!-- <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>
@ -86,8 +80,7 @@ import QuestionAddForm from './components/QuestionAddForm.vue';
export default {
name: 'Question',
components: {
QuestionForm,
QuestionAddForm
QuestionForm, QuestionAddForm
},
data() {
return {
@ -113,7 +106,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;
@ -122,7 +115,7 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
if (this.queryParams.question || (this.queryParams.isWatermark != undefined && this.queryParams.isWatermark)) {
if (this.queryParams.question) {
this.getList();
} else {
this.$modal.msgWarning('请输入题目');
@ -142,10 +135,7 @@ export default {
handleAdd(item) {
this.dialogAddVisible = true;
this.$nextTick(() => {
this.$refs.dialogAddForm.init({
subject: this.queryParams.subject,
carTypeId: this.queryParams.carTypeId
});
this.$refs.dialogAddForm.init(item);
});
}
}

@ -7,13 +7,10 @@
</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.filter(item => (searchValue == undefined || item.schoolName.includes(searchValue)))" :key="school.schoolId" style="margin:10px;" :class="currentdeptId == school.schoolId ? 'actived-school' : ''">
<div v-for="school in schoolList" :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>
@ -189,8 +186,7 @@ export default {
schoolList: [],
currentdeptId: undefined,
placeMarkerList: [],
areaOptions: [],
searchValue: undefined
areaOptions: []
};
},
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 filterable>
<el-select style="width: 100%;" v-model="clueForm.source" placeholder="请选择" clearable>
<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="选择线索来源" filterable clearable>
<el-select v-model="searchForm.source" placeholder="选择线索来源" clearable>
<el-option v-for="dict in sourceOptions" :key="dict.dictValue" :value="dict.dictValue" />
</el-select>
</el-form-item>
@ -66,8 +66,7 @@ export default {
{ value: 5, label: '今日跟踪' },
{ value: 6, label: '过期线索' },
{ value: 7, label: '相关线索' },
{ value: 8, label: '撞单线索' },
{ value: 9, label: '待分配' }
{ value: 8, 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.searchValue" placeholder="请输入问题" clearable @keyup.enter.native="queryAnswer" style="margin-bottom: 10px;"/>
<el-input v-model="queryParams.question" 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:{
searchValue: undefined,
question: undefined,
keyList: [],
status: 2
},

@ -32,7 +32,7 @@
</el-form-item>
<el-form-item label="线索来源">
<el-select v-model="searchForm.source" placeholder="请选择" filterable clearable>
<el-select v-model="searchForm.source" placeholder="请选择" 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 + '/xunjia']: {
// target: `http://localhost:8889/driver-api/`,
target: `https://xueche.ahduima.com/duima/xunjia/`,
[process.env.VUE_APP_BASE_API + '/driver-api']: {
// target: `http://118.31.23.45:8888/driver-api/`,
target: `http://localhost:8888/driver-api/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API + '/xunjia']: ''
['^' + process.env.VUE_APP_BASE_API + '/driver-api']: ''
}
},
// 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