Browse Source

【前端pc】pad库移页面需求更改

ag_report_nev
安虹睿 10 months ago
parent
commit
dcbfc14fa6
  1. 3
      fe/PC/src/mixins/padListPageMixins.js
  2. 5
      fe/PC/src/views/padManage/components/padListPage/index.vue
  3. 107
      fe/PC/src/views/padManage/isPadForTransferLibJob.vue

3
fe/PC/src/mixins/padListPageMixins.js

@ -58,8 +58,9 @@ export const padListPageMixins = {
}
},
// 获取列表
getPadList(page=1){
getPadList(page=1,beforeCallback){
if(this.padListLoading)return
if(beforeCallback)beforeCallback()
console.log('请求页数',page)
if(page != 1 && (Number(page) > Number(this.padListPager.totalPage)))return
this.padListLoading = true

5
fe/PC/src/views/padManage/components/padListPage/index.vue

@ -1,5 +1,5 @@
<template>
<div class="padListPage">
<div class="padListPage" v-loading="padListLoading">
<!-- 搜索头部 -->
<div class="padListHeader">
<div class="leftSearchHeader" v-if="searchForm && searchForm.length > 0">
@ -41,6 +41,7 @@
:type="btnItem.type"
v-show="typeof btnItem.hide == 'function' ? !btnItem.hide() : !btnItem.hide"
@click="headerButtonClick(btnItem,btnIndex)"
:class="btnItem.class || null"
>{{ btnItem.label }}</el-button>
</el-form-item>
</el-form>
@ -111,7 +112,7 @@
</div>
</div>
<!-- 无数据且正在加载 -->
<div class="padListCard" v-if="(!padListData || padListData.length <= 0) && padListLoading" v-loading="padListLoading"></div>
<!-- <div class="padListCard" v-if="(!padListData || padListData.length <= 0) && padListLoading" v-loading="padListLoading"></div> -->
<!-- 无数据且加载完成 -->
<el-empty v-if="(!padListData || padListData.length <= 0) && !padListLoading" description="暂无数据"></el-empty>
<!-- 页脚 -->

107
fe/PC/src/views/padManage/isPadForTransferLibJob.vue

@ -119,10 +119,16 @@ export default {
],
components: { padListPage,currenForm,currenDescriptions },
computed: {
//
hideButton: function () {
// ()
hideButton_canHandle: function () {
return function (val) {
return this.showFilterSta == val
return this.showFilterSta_canHandle == val
}
},
// ()
hideButton_compelete: function () {
return function (val) {
return this.showFilterSta_compelete == val
}
},
//
@ -146,22 +152,36 @@ export default {
requestNumber:"",
},
searchForm:[
{label:'传入申请单号',prop:'callRequestNumber',type:'input',width:'140px',action:'Like'},
{label:'传入任务单号',prop:'callJobNumber',type:'input',width:'140px',action:'Like'},
{label:'传入申请单号',prop:'callRequestNumber',type:'input',width:'130px',action:'Like'},
{label:'传入任务单号',prop:'callJobNumber',type:'input',width:'130px',action:'Like'},
],
showFilterSta:false,
showFilterSta_canHandle:false,//
showFilterSta_compelete:false,//
headerButton:[
{
type: 'warning',
label: '查看待执行数据',
name: "showCanHandle",
hide: () => { return this.hideButton(true) },
hide: () => { return this.hideButton_canHandle(true) },
},
{
type: 'danger',
label: '重置[待执行]数据',
name: "showAllData",
hide: () => { return this.hideButton(false) },
hide: () => { return this.hideButton_canHandle(false) },
},
{
type: 'success',
label: '查看已完成数据',
name: "showCompelete",
class:"showCompeleteBtn",
hide: () => { return this.hideButton_compelete(true) },
},
{
type: 'danger',
label: '重置[已完成]数据',
name: "showAllData2",
hide: () => { return this.hideButton_compelete(false) },
},
],
padMainColumn:[
@ -353,28 +373,49 @@ export default {
//
headerButtonClick(item,index){
if(item.name == 'showCanHandle'){
this.showCanHandleFunc()
this.showFilterSta_canHandle = true
this.showFilterSta_compelete = false
this.showFasterFunc(1)
}
if(item.name == 'showCompelete'){
this.showFilterSta_compelete = true
this.showFilterSta_canHandle = false
this.showFasterFunc(2)
}
else if(item.name == 'showAllData'){
this.showFilterSta = false
else if(item.name == 'showAllData' || item.name == 'showAllData2'){
if(item.name == 'showAllData')this.showFilterSta_canHandle = false
if(item.name == 'showAllData2')this.showFilterSta_compelete = false
document.getElementById("padListCard").scrollTop = 0
this.clearSearchHandle(true)
this.getPadList();
this.getPadList(1,()=>{this.padListParams.sorting = null});
}
},
//
showCanHandleFunc(){
this.showFilterSta = true
let _filters = [{
// type=1: type=2
showFasterFunc(type){
let _obj = {
logic:"And",
column:"jobStatus",
action:"In",
value: JSON.stringify([1,2,4,30])
}]
}
if(type == '2'){
_obj = {
logic:"And",
column:"jobStatus",
action:"==",
value: "3"
}
}
let _filters = []
_filters.push(_obj)
this.padListParams.condition.filters = _filters
document.getElementById("padListCard").scrollTop = 0
this.clearSearchHandle()
this.getPadList();
if(type == '2'){
this.getPadList(1,()=>{this.padListParams.sorting = 'CompleteTime DESC'})
}else{
this.getPadList(1,()=>{this.padListParams.sorting = null})
}
},
//
listRowButtonClick(row,item){
@ -406,11 +447,13 @@ export default {
}
},
headerSearchHandle(){
this.showFilterSta = false
this.showFilterSta_canHandle = false
this.showFilterSta_compelete = false
},
resetSearchHandle(){
this.clearSearchHandle(true)
this.showFilterSta = false
this.showFilterSta_canHandle = false
this.showFilterSta_compelete = false
},
// -
compeletHandleClose(){
@ -449,11 +492,14 @@ export default {
transferLibJobHandel(this.currentRowData.id, _data).then(res => {
this.compeletLoading = false
this.$successMsg("完成库移成功!")
if(this.showFilterSta){
this.showCanHandleFunc()
if(this.showFilterSta_canHandle){
this.showFasterFunc(1)
}
if(this.showFilterSta_compelete){
this.showFasterFunc(2)
}
else{
this.getPadList()
this.getPadList(1,()=>{this.padListParams.sorting = null})
}
this.compeletHandleClose()
}).catch(err => {
@ -514,7 +560,20 @@ export default {
height:28px;
overflow:hidden
}
::v-deep .padListHeader{
.el-button--mini{
padding: 7px 10px;
}
.showCompeleteBtn{
background:#31bb99;
border-color:#31bb99;
&:hover{
background:#4cc9aa;
border-color:#4cc9aa;
}
}
}
.compeletHandlePop{
::v-deep .el-dialog{
margin-bottom:0 !important

Loading…
Cancel
Save