77 lines
2.3 KiB
Vue
77 lines
2.3 KiB
Vue
<template>
|
|
<view class="data-summary-page">
|
|
<view class="search u-flex u-padding-left-24 u-padding-right-24">
|
|
<u-search placeholder="请输入项目名称" v-model="searchVal" :show-action="false" @change="changePut"></u-search>
|
|
</view>
|
|
<view class="scroll">
|
|
<scroll-view class="scroll-view" scroll-y>
|
|
<view class="title">
|
|
<text>{{ decodeURIComponent(queryData.companyName) }}</text>
|
|
</view>
|
|
<template v-if="projectItemData.length > 0">
|
|
<view class="card u-margin-bottom-20" v-for="(item, index) in projectItemData" :key="index">
|
|
<view class="header u-flex u-border-bottom">
|
|
<text class="header-title">{{ item.ProjectName }}</text>
|
|
</view>
|
|
<view class="card-item">
|
|
<view class="con u-flex u-row-between">
|
|
<text class="con-title">在岗焊工总人数</text>
|
|
<text class="u-margin-top-6">{{ item.WelderNum }}</text>
|
|
</view>
|
|
<view class="con u-flex u-row-between">
|
|
<text class="con-title">总达因数</text>
|
|
<text class="u-margin-top-6">{{ item.TotalDineNum }}</text>
|
|
</view>
|
|
<view class="con u-flex u-row-between">
|
|
<text class="con-title">完成达因数</text>
|
|
<text class="u-margin-top-6">{{ item.CompleteDineNum }}</text>
|
|
</view>
|
|
<view class="con u-flex u-row-between">
|
|
<text class="con-title">总拍片数</text>
|
|
<text class="u-margin-top-6">{{ item.TotalFilmNum }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<template v-else>
|
|
<u-empty text="暂无数据" mode="list"></u-empty>
|
|
</template>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script setup>
|
|
import { ref } from 'vue';
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
import { getQMSHjDataItem } from '@/api/moduleApi/index.js';
|
|
import { debounce } from '@/utils';
|
|
let searchVal = ref('');
|
|
|
|
let queryData = ref({});
|
|
onLoad((options) => {
|
|
queryData.value = options;
|
|
getApiData(queryData.value.unitId);
|
|
});
|
|
let projectItemData = ref([]);
|
|
const getApiData = async (unitId) => {
|
|
let res = await getQMSHjDataItem({
|
|
unitId,
|
|
searchText: searchVal.value
|
|
});
|
|
projectItemData.value = res;
|
|
};
|
|
const changePut = debounce((ev) => {
|
|
searchVal.value = ev;
|
|
getApiData(queryData.value.unitId);
|
|
}, 500);
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
@import 'index.scss';
|
|
</style>
|
|
<style>
|
|
page {
|
|
height: 100%;
|
|
}
|
|
</style>
|