提交 a6ece57a authored 作者: zax's avatar zax

合并分支 'zax' 到 'master'

软件清单 查看合并请求 !54
...@@ -78,17 +78,19 @@ ...@@ -78,17 +78,19 @@
<script> <script>
export default { export default {
name: 'document', name: 'document',
props: ['value'],
data () { data () {
return { return {
searchVal: '', searchVal: '',
allData: [{name:'1',roleName: '123',unitName: '1',number: '1'}], allData: [{name:'1',roleName: '123',unitName: '1',number: '1'}],
currentPage: 1, // 分页第一页 currentPage: 1, // 分页第一页
pageSize: 8, // 每页个数 pageSize: 8, // 每页个数
totleLength: 0, // 获取后台传的所有数据的长度 totalLength: 0, // 获取后台传的所有数据的长度
} }
}, },
mounted() { mounted() {
this.search(); this.search();
console.log(this.$store.getters.getUserData)
}, },
methods: { methods: {
// 查询 // 查询
...@@ -96,10 +98,14 @@ export default { ...@@ -96,10 +98,14 @@ export default {
let data = { let data = {
page: this.currentPage, page: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
t: {} t: {
projectId: this.value.id
}
} }
this.$server.postFileSearch(data).then(res => { this.$server.postFileSearch(data).then(res => {
console.log(res) console.log(res.data.data.rows)
this.totalLength = res.data.data.total;
this.allData = res.data.data.rows;
}) })
}, },
// 点击分页 // 点击分页
...@@ -111,7 +117,17 @@ export default { ...@@ -111,7 +117,17 @@ export default {
// console.log(`当前页: ${val}`); // console.log(`当前页: ${val}`);
this.currentPage = val; this.currentPage = val;
}, },
uploadFile(file) {} uploadFile(file) {
let formdata = new FormData();
formdata.append('file', file);
let data = {
id: this.value.id,
value: formdata
}
this.$server.postFileUpload(this.value.id).then(res => {
console.log(res)
})
}
} }
} }
</script> </script>
......
...@@ -153,7 +153,7 @@ const server = { ...@@ -153,7 +153,7 @@ const server = {
method: 'get' method: 'get'
}); });
}, },
postProduceUpload(data) { // 单位导入 postProduceUpload(data) { // 产品导入
return axios('/produce/upload', { return axios('/produce/upload', {
method: 'post', method: 'post',
data: data, data: data,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论