实现json数据绑定
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
|
/*var data = "";
|
||||||
axios.get('http://localhost:8080/cms/download/findall')
|
axios.get('http://localhost:8080/cms/download/findall')
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response);
|
console.log(response.data);
|
||||||
resolve(response.data);
|
data = response.data;
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});*/
|
||||||
var Main = {
|
var Main = {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -18,28 +19,22 @@ var Main = {
|
|||||||
name: 'food2.jpeg',
|
name: 'food2.jpeg',
|
||||||
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
||||||
}],
|
}],
|
||||||
DownloadList: [
|
DownloadList: []
|
||||||
{
|
|
||||||
colfileid: 9,
|
|
||||||
coluserid: 0,
|
|
||||||
colip: '0:0:0:0:0:0:0:1',
|
|
||||||
colrealname: '234234',
|
|
||||||
colfilename: '10K.jpg',
|
|
||||||
colfilesize: '21.78KB',
|
|
||||||
colfilepath: 'C:\\Users\\11860\\AppData\\Local\\Temp\\tomcat-docbase.8051654935022807536.8080\\upload/10K.jpg'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
colfileid: 15,
|
|
||||||
coluserid: 0,
|
|
||||||
colip: '0:0:0:0:0:0:0:1',
|
|
||||||
colrealname: null,
|
|
||||||
colfilename: '10K.jpg',
|
|
||||||
colfilesize: '21.78KB',
|
|
||||||
colfilepath: 'F:\\JAVA Workspace\\Temp\\upload/10K.jpg'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted(){
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
var that=this;
|
||||||
|
axios.get('http://localhost:8080/cms/download/findall')
|
||||||
|
.then(function (response) {
|
||||||
|
console.log(response.data);
|
||||||
|
that.DownloadList = response.data;
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});})
|
||||||
|
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(row) {
|
handleClick(row) {
|
||||||
console.log(row.colfileid);
|
console.log(row.colfileid);
|
||||||
|
|||||||
@@ -31,11 +31,13 @@
|
|||||||
<div class="grid-content bg-purple-dark">
|
<div class="grid-content bg-purple-dark">
|
||||||
|
|
||||||
<el-table :data="DownloadList" height="250" border style="width: 100%">
|
<el-table :data="DownloadList" height="250" border style="width: 100%">
|
||||||
|
<el-table-column prop="colfileid" label="文件号" width="80">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="colfilename" label="文件名" width="180">
|
<el-table-column prop="colfilename" label="文件名" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="colfilesize" label="大小" width="80">
|
<el-table-column prop="colfilesize" label="大小" width="80">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="colfileid" label="地址">
|
<el-table-column prop="colfilepath" label="地址">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="150">
|
<el-table-column fixed="right" label="操作" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|||||||
Reference in New Issue
Block a user