修改为弹出框
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "QualityCoveragePopup",
|
||||
data() {
|
||||
return {
|
||||
coverageRate: "87.5",
|
||||
todayCoverage: "92.3",
|
||||
dataList: [
|
||||
{ date: "2024-02-07", description: "今日质检覆盖率", rate: "92.3" },
|
||||
{ date: "2024-02-06", description: "昨日质检覆盖率", rate: "89.1" },
|
||||
{ date: "2024-02-05", description: "前日质检覆盖率", rate: "85.7" },
|
||||
{ date: "2024-02-04", description: "工作日平均覆盖率", rate: "88.4" },
|
||||
{ date: "2024-02-03", description: "周末覆盖率", rate: "91.2" }
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.$refs.popup.open();
|
||||
},
|
||||
close() {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
onPopupChange(e) {
|
||||
if (!e.show) {
|
||||
this.$emit("close");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
_easycom_uni_popup2();
|
||||
}
|
||||
const _easycom_uni_popup = () => "../../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_popup();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o((...args) => $options.close && $options.close(...args)),
|
||||
b: common_vendor.t($data.coverageRate),
|
||||
c: common_vendor.t($data.todayCoverage),
|
||||
d: common_vendor.f($data.dataList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.date),
|
||||
b: common_vendor.t(item.description),
|
||||
c: common_vendor.t(item.rate),
|
||||
d: index
|
||||
};
|
||||
}),
|
||||
e: common_vendor.sr("popup", "220853f7-0"),
|
||||
f: common_vendor.o($options.onPopupChange),
|
||||
g: common_vendor.p({
|
||||
type: "center",
|
||||
["mask-click"]: true
|
||||
})
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-220853f7"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages-subpackage/ai_features/quality_coverage/quality-coverage-popup.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-popup": "../../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<uni-popup wx:if="{{g}}" class="r data-v-220853f7" u-s="{{['d']}}" u-r="popup" bindchange="{{f}}" u-i="220853f7-0" bind:__l="__l" u-p="{{g}}"><view class="quality-coverage-popup data-v-220853f7"><view class="popup-header data-v-220853f7"><text class="popup-title data-v-220853f7">质检覆盖率统计</text><view class="popup-close data-v-220853f7" bindtap="{{a}}"><text class="close-icon data-v-220853f7">×</text></view></view><scroll-view class="popup-content data-v-220853f7" scroll-y="true"><view class="popup-stats-card data-v-220853f7"><view class="popup-stat-item data-v-220853f7"><text class="popup-stat-value data-v-220853f7">{{b}}%</text><text class="popup-stat-label data-v-220853f7">总体覆盖率</text></view><view class="popup-stat-item data-v-220853f7"><text class="popup-stat-value data-v-220853f7">{{c}}%</text><text class="popup-stat-label data-v-220853f7">今日覆盖率</text></view></view><view class="popup-chart-section data-v-220853f7"><text class="popup-section-title data-v-220853f7">覆盖率趋势图</text><view class="popup-chart-placeholder data-v-220853f7"><text class="popup-placeholder-text data-v-220853f7">📊 图表区域</text><text class="popup-placeholder-desc data-v-220853f7">此处将显示质检覆盖率趋势图表</text></view></view><view class="popup-data-list data-v-220853f7"><text class="popup-section-title data-v-220853f7">详细数据</text><view wx:for="{{d}}" wx:for-item="item" wx:key="d" class="popup-list-item data-v-220853f7"><view class="popup-item-left data-v-220853f7"><text class="popup-item-date data-v-220853f7">{{item.a}}</text><text class="popup-item-desc data-v-220853f7">{{item.b}}</text></view><view class="popup-item-right data-v-220853f7"><text class="popup-item-rate data-v-220853f7">{{item.c}}%</text></view></view></view></scroll-view></view></uni-popup>
|
||||
@@ -0,0 +1,148 @@
|
||||
|
||||
.quality-coverage-popup.data-v-220853f7 {
|
||||
width: 680rpx;
|
||||
max-height: 80vh;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.popup-header.data-v-220853f7 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 6rpx 32rpx;
|
||||
border-bottom: 1rpx solid #E0E0E0;
|
||||
flex-shrink: 0;
|
||||
background-color: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.popup-title.data-v-220853f7 {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
.popup-close.data-v-220853f7 {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
min-width: 40rpx;
|
||||
min-height: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 50%;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
.popup-close.data-v-220853f7:active {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.close-icon.data-v-220853f7 {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
line-height: 1;
|
||||
display: block;
|
||||
}
|
||||
.popup-content.data-v-220853f7 {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
max-height: calc(80vh - 52rpx);
|
||||
}
|
||||
.popup-stats-card.data-v-220853f7 {
|
||||
display: flex;
|
||||
margin: 20rpx 30rpx;
|
||||
background: #f8f9fa;
|
||||
border-radius: 16rpx;
|
||||
padding: 40rpx 30rpx;
|
||||
}
|
||||
.popup-stat-item.data-v-220853f7 {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.popup-stat-item.data-v-220853f7:not(:last-child) {
|
||||
border-right: 1rpx solid #e9ecef;
|
||||
}
|
||||
.popup-stat-value.data-v-220853f7 {
|
||||
display: block;
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: #007aff;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.popup-stat-label.data-v-220853f7 {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.popup-chart-section.data-v-220853f7,
|
||||
.popup-data-list.data-v-220853f7 {
|
||||
margin: 20rpx 30rpx;
|
||||
background: #f8f9fa;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.popup-section-title.data-v-220853f7 {
|
||||
display: block;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #e9ecef;
|
||||
background: #ffffff;
|
||||
}
|
||||
.popup-chart-placeholder.data-v-220853f7 {
|
||||
padding: 80rpx 30rpx;
|
||||
text-align: center;
|
||||
background: #ffffff;
|
||||
}
|
||||
.popup-placeholder-text.data-v-220853f7 {
|
||||
display: block;
|
||||
font-size: 48rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.popup-placeholder-desc.data-v-220853f7 {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.popup-list-item.data-v-220853f7 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
background: #ffffff;
|
||||
}
|
||||
.popup-list-item.data-v-220853f7:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.popup-item-left.data-v-220853f7 {
|
||||
flex: 1;
|
||||
}
|
||||
.popup-item-date.data-v-220853f7 {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.popup-item-desc.data-v-220853f7 {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.popup-item-right.data-v-220853f7 {
|
||||
text-align: right;
|
||||
}
|
||||
.popup-item-rate.data-v-220853f7 {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #007aff;
|
||||
}
|
||||
Reference in New Issue
Block a user