题库图片修改

master
zcx 8 months ago
parent c66b8f227e
commit 779b6c9eba
  1. 15
      src/api/question.js
  2. 53
      src/views/question/components/QuestionForm.vue
  3. 8
      src/views/sch/place/index.vue
  4. 2
      src/views/zs/clue/components/SearchForm.vue
  5. 4
      src/views/zs/clue/components/SkillDialog.vue
  6. 2
      src/views/zs/sign/components/SearchForm.vue
  7. 6
      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,8 +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
});
}

@ -6,7 +6,7 @@
<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="200" alt="" />
</el-form-item>
</el-col>
</el-row>
@ -20,7 +20,7 @@
:on-exceed="handleExceed"
:show-file-list="false"
>
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" style="width: 300px;">
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" style="width: 300px" />
<i v-else class="el-icon-plus" />
</el-upload>
</el-form-item>
@ -28,14 +28,18 @@
<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>
@ -119,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 {
@ -184,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');
@ -197,13 +200,25 @@ export default {
handleImport(opt) {
const data = new FormData();
data.append('file', opt.file);
//
// api.upload(data).then(resp => {
// if (resp.code == 200) {
// 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;
// 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] });

@ -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: {

@ -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>

@ -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,12 +33,12 @@ module.exports = {
port: port,
open: true,
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: `https://xueche.ahduima.com/duima/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

Loading…
Cancel
Save