Commit 8b86ba0b authored by “lixuyan”'s avatar “lixuyan”

技术要求文件下载

parent 800d25df
...@@ -20,7 +20,8 @@ const disShowLadingRequestUrl = [ ...@@ -20,7 +20,8 @@ const disShowLadingRequestUrl = [
'/devServerStart', '/devServerStart',
'/JoExecutePlan/getTaskAcceptance', '/JoExecutePlan/getTaskAcceptance',
'/ExtSupportingItem/getAllMaterialConfirmation', '/ExtSupportingItem/getAllMaterialConfirmation',
'/ExtSupportingItem/findSupportingItemMaterialByAO' '/ExtSupportingItem/findSupportingItemMaterialByAO',
'/ExtProcessSkillUser/getSkillUser'
] ]
axios.defaults.baseURL = VUE_APP_BASE_API || process.env.VUE_APP_BASE_API // eslint-disable-line axios.defaults.baseURL = VUE_APP_BASE_API || process.env.VUE_APP_BASE_API // eslint-disable-line
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<div class="sub-title" style="margin:0 10px"> <div class="sub-title" style="margin:0 10px">
执行派工 执行派工
</div> </div>
<div class="group-list"> <div class="group-list" @scroll="handleScroll">
<div v-for="(item, index) in groupUserList" :key="index" class="group-list-box" :class="{'active': item.isSelect}" @click="changeGroupUser(item)"> <div v-for="(item, index) in groupUserList" :key="index" class="group-list-box" :class="{'active': item.isSelect}" @click="changeGroupUser(item)">
<div class="message"> <div class="message">
<el-tooltip placement="top"> <el-tooltip placement="top">
...@@ -174,8 +174,8 @@ ...@@ -174,8 +174,8 @@
</div> </div>
</div> </div>
<div class="more-bar"> <div class="more-bar">
<span v-if="groupUserList.length < groupUserTotal" class="more" @click="getMoreData">加载更多</span> <!-- <span v-if="groupUserList.length < groupUserTotal" class="more" @click="getMoreData">加载更多</span> -->
<span v-else-if="groupUserList.length===0">暂无数据</span> <span v-if="groupUserList.length===0">暂无数据</span>
<span v-else>已全部加载!</span> <span v-else>已全部加载!</span>
</div> </div>
</div> </div>
...@@ -186,6 +186,7 @@ ...@@ -186,6 +186,7 @@
<script> <script>
import { post } from '@/utils/http' import { post } from '@/utils/http'
export default { export default {
name: 'DeeMesInstructionsDispatch',
data() { data() {
return { return {
sortiesList: [], sortiesList: [],
...@@ -339,7 +340,8 @@ export default { ...@@ -339,7 +340,8 @@ export default {
groupUserTotal: 0, groupUserTotal: 0,
groupUserPage: 1, groupUserPage: 1,
mainUserId: null, mainUserId: null,
postionList: [] postionList: [],
isLoading: false
} }
}, },
computed: { computed: {
...@@ -367,7 +369,19 @@ export default { ...@@ -367,7 +369,19 @@ export default {
this.getStation() this.getStation()
// this.getGroup() // this.getGroup()
}, },
// mounted() {
// window.addEventListener('scroll', this.handleScroll)
// },
methods: { methods: {
handleScroll(e) {
if (this.isLoading) return
const scrollTop = e.target.scrollTop
const scrollHeight = e.target.scrollHeight
const clientHeight = e.target.clientHeight
if (scrollTop + clientHeight - scrollHeight <= 10) {
this.getMoreData()
}
},
getStories() { getStories() {
const params = { const params = {
'searchItems': { 'searchItems': {
...@@ -620,6 +634,7 @@ export default { ...@@ -620,6 +634,7 @@ export default {
} }
}, },
getGroupUser() { getGroupUser() {
this.isLoading = true
const params = { const params = {
'pageFrom': this.groupUserPage, 'pageFrom': this.groupUserPage,
'pageSize': 10, 'pageSize': 10,
...@@ -659,13 +674,14 @@ export default { ...@@ -659,13 +674,14 @@ export default {
this.groupUserList.push(item) this.groupUserList.push(item)
}) })
this.groupUserTotal = res.items.totalElements this.groupUserTotal = res.items.totalElements
this.isLoading = false
// this.groupUserList[0].isSelect = true // this.groupUserList[0].isSelect = true
} }
}) })
}, },
getMoreData() { getMoreData() {
const num = Math.ceil(this.groupUserTotal / 10) const num = Math.ceil(this.groupUserTotal / 10)
if (this.groupUserPage <= num) { if (this.groupUserPage < num) {
this.groupUserPage++ this.groupUserPage++
this.getGroupUser() this.getGroupUser()
} }
......
...@@ -103,11 +103,11 @@ export default { ...@@ -103,11 +103,11 @@ export default {
}, },
tabItems: [ tabItems: [
{ {
name: '未确认', name: '未下达',
id: '0' id: '0'
}, },
{ {
name: '已确认', name: '已下达',
id: '1' id: '1'
} }
], ],
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
</template> </template>
<script> <script>
import { downloadFile } from '@/utils/http'
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
// 加载中 // 加载中
...@@ -28,8 +28,25 @@ export default { ...@@ -28,8 +28,25 @@ export default {
{ {
title: '所需产品设计图号', title: '所需产品设计图号',
show: true, show: true,
key: 'docNumber' key: 'docNumber',
component: {
render: (h, params) => {
return h('div', [
h(
'span',
{
class: 'link-style',
on: {
click: () => {
this.downFile(params)
}
}
},
params.docNumber
)
])
}
}
}, },
{ {
title: '图样名称', title: '图样名称',
...@@ -60,6 +77,15 @@ export default { ...@@ -60,6 +77,15 @@ export default {
// this.init() // this.init()
}, },
methods: { methods: {
downFile(data) {
const params = {
number: data.docNumber,
version: data.gaceVersion
}
downloadFile(`/TestFightCat/downloadGACEModelData`, 'get', params).then((res) => {
this.$utils.downLoadFile(res, '')
})
},
// 设置默认展示列 // 设置默认展示列
setDefaultColums() { setDefaultColums() {
this.tableColums = this.colums.filter((item) => item.show) this.tableColums = this.colums.filter((item) => item.show)
......
...@@ -107,6 +107,9 @@ export default { ...@@ -107,6 +107,9 @@ export default {
params) params)
.then((res) => { .then((res) => {
if (res.message.includes('成功')) { if (res.message.includes('成功')) {
res.items.content.forEach(item => {
item.show = true
})
this.tableDesign = res.items.content || [] this.tableDesign = res.items.content || []
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.table1.init() this.$refs.table1.init()
......
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