add:重点工程包一层

dev-2024年1月8日
dearlin 2023-11-15 11:53:03 +08:00
parent 6db77875a1
commit 6aebe887f1
2 changed files with 99 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
.DS_Store
node_modules/
nui_modules/
unpackage/
/dist/
npm-debug.log*

View File

@ -0,0 +1,98 @@
<template>
<view class="content">
<view class="search card">
<u--input
prefixIcon="search"
placeholder="请输入关键字"
border="surround"
v-model="CORP_NAME"
clearable
shape="circle"
></u--input>
<u-button class="bth-mini ml-10" type="success" text="确定" @click="resetList"></u-button>
</view>
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
<u-list-item v-for="(item, index) in list" :key="index">
<view>
<view class="flex-between main-title">
<text>{{ item.CORP_NAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text v-if="item.CORPINFO_ID != '1'">{{item.prvinceName}}-{{item.cityName}}-{{item.countryName}}</text>
<text v-else="item.prvinceName">--</text>
</view>
<view class="flex-between mt-10 subtitle">
<text v-if="item.CORPINFO_ID != '1'">{{item.INDUSTRY_NAME}}</text>
<text v-else></text>
</view>
<view class="flex-between mt-10 subtitle">
<text>重点工程数{{item.OUTSOURCED_COUNT}}</text>
<u-button type="primary" text="进入" size="mini" class="bth-mini" @click="fnNavigatorDetail(item.CORPINFO_ID)"></u-button>
</view>
</view>
</u-list-item>
</u-list>
<empty v-else></empty>
</view>
</template>
<script>
import {getKeyProjectsListListByCorp} from "../../../api";
export default {
data() {
return {
CORP_NAME: '',
pageSize: 10,
currentPage: 1,
totalPage: 0,
list: [],
}
},
onShow() {
this.resetList()
},
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
methods:{
async getData(){
let resData = await getKeyProjectsListListByCorp({
CORP_NAME: this.CORP_NAME,
showCount: this.pageSize,
currentPage: this.currentPage
});
this.list = [...this.list,...resData.varList];
this.totalPage = resData.page.totalPage;
},
resetList() {
this.pageSize= 10
this.currentPage= 1
this.list = []
this.getData()
},
fnNavigatorDetail(CORPINFO_ID){
//
//
uni.$u.route({
url: '/pages/key-project-management/index/index',
params: {
CORPINFO_ID
}
})
},
scrolltolower() {
this.currentPage++;
if(this.totalPage >= this.currentPage) this.getData();
},
}
}
</script>
<style scoped>
</style>