Commit a85f04b6 by xuewengang

up

parent b7822044
......@@ -11,7 +11,7 @@
:on-change="handleChange"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:file-list="fileLists"
:auto-upload="false">
<el-button slot="trigger"
size="small"
......@@ -21,11 +21,14 @@
type="success"
@click="submitUpload">上传到服务器</el-button>
</el-upload>
<div @click="getcontent">huoqu</div>
</div>
</template>
<script>
import { testLogin, testCode, testXss } from "@/api/test.js";
import { testLogin, testCode, testXs, testXss } from "@/api/test.js";
import axios from "axios";
import qs from "qs";
export default {
name: "test",
components: {},
......@@ -34,11 +37,19 @@ export default {
xs: {
xm: '1234'
},
fileList: []
upFile: {},
fileLists: []
};
},
created () { },
methods: {
getcontent () {
testXss({
shsexsbh: "X4302000000002020100045"
}).then(res => {
console.log(res);
})
},
submitUpload () {
this.$refs.upload.submit();
this.xss()
......@@ -49,21 +60,23 @@ export default {
//this.getPicturePicture()
},
handleRemove (file, fileList) {
console.log(file, fileList);
this.fileLists = fileList
},
handlePreview (file) {
console.log(file);
},
handleChange (file, fileList) {
console.log(file);
console.log(fileList);
this.fileList.push(file.raw)
this.upFile = file.raw
this.fileLists.push(file)
console.log(this.fileLists);
},
xss () {
testXss({
"xs.xm": "123",
xsfj: this.fileList
}).then(res => {
var params = new FormData()
params.append("xs.xm", '123')
for (var i = 0; i < this.fileLists.length; i++) {
params.append('xsfj', this.fileLists[i].raw)
}
axios.post("http://192.168.0.142:8080/shsexscj/addShsexscj", params).then(res => {
console.log(res);
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment