|
@@ -32,7 +32,7 @@
|
|
|
<el-table-column align="center" prop="ctime" label="创建时间" />
|
|
<el-table-column align="center" prop="ctime" label="创建时间" />
|
|
|
<el-table-column align="center" prop="date" label="操作" width="320">
|
|
<el-table-column align="center" prop="date" label="操作" width="320">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button @click="edit(scope.row.id)" size="mini" type="primary">编辑</el-button>
|
|
|
|
|
|
|
+ <el-button @click="edit(scope.row.id)" size="mini" type="warning">编辑</el-button>
|
|
|
<el-button @click="cutpaper(scope.row.id)" size="mini" type="warning">试卷分隔</el-button>
|
|
<el-button @click="cutpaper(scope.row.id)" size="mini" type="warning">试卷分隔</el-button>
|
|
|
<el-button @click="del(scope.row.id)" size="mini" type="danger">删除</el-button>
|
|
<el-button @click="del(scope.row.id)" size="mini" type="danger">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -57,14 +57,14 @@
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
|
- <el-form-item label="试卷图片" prop>
|
|
|
|
|
|
|
+ <el-form-item label="试卷图片" prop v-if="!form.id">
|
|
|
<el-upload
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
class="upload-demo"
|
|
|
action="/api/admin/uploadfile"
|
|
action="/api/admin/uploadfile"
|
|
|
:on-success="handleSuccess"
|
|
:on-success="handleSuccess"
|
|
|
:on-remove="handleRemove"
|
|
:on-remove="handleRemove"
|
|
|
:file-list="fileList"
|
|
:file-list="fileList"
|
|
|
- list-type="picture">
|
|
|
|
|
|
|
+ list-type="picture-card">
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
@@ -153,9 +153,8 @@
|
|
|
this.form = {};
|
|
this.form = {};
|
|
|
// this.initCropper();
|
|
// this.initCropper();
|
|
|
},
|
|
},
|
|
|
- handleSuccess(res){
|
|
|
|
|
- this.fileList.push({"name":res.data.name,"url":res.data.url})
|
|
|
|
|
- console.log(this.fileList,222222222222222)
|
|
|
|
|
|
|
+ handleSuccess(e,res,fileList){
|
|
|
|
|
+ this.fileList.push({"name":res.response.data.name,"url":res.response.data.url,"status":"success"})
|
|
|
},
|
|
},
|
|
|
handleRemove(file,fileList){
|
|
handleRemove(file,fileList){
|
|
|
this.fileList = fileList
|
|
this.fileList = fileList
|
|
@@ -168,6 +167,7 @@
|
|
|
imgs.forEach((item,index)=>{
|
|
imgs.forEach((item,index)=>{
|
|
|
this.fileList.push({"name":item,"url":item})
|
|
this.fileList.push({"name":item,"url":item})
|
|
|
})
|
|
})
|
|
|
|
|
+ console.log(this.fileList,222222222222222)
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|