Commit 90cc4185 by 前端

Merge branch 'SAAS+V5.8.2' into 'master'

上线合并

See merge request !18
2 parents 0f2df1d9 5902bc09
Showing 84 changed files with 4486 additions and 84 deletions
...@@ -9,15 +9,5 @@ end_of_line = lf ...@@ -9,15 +9,5 @@ end_of_line = lf
insert_final_newline = true insert_final_newline = true
charset = utf-8 charset = utf-8
indent_style = tab indent_style = tab
indent_size = 4 indent_size = 2
tab_width = 4 tab_width = 2
[*.{json,jsonc}]
indent_style = tab
indent_size = 4
tab_width = 4
[*.{js,ts,jsx,tsx,wxml,wxss,wxs,scss,sass}]
indent_style = tab
indent_size = 4
tab_width = 4
...@@ -11,7 +11,10 @@ miniprogram_npm ...@@ -11,7 +11,10 @@ miniprogram_npm
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local
.idea
*.local.json
.vscode/changelists.json
# Log files # Log files
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
......
export default { export default {
printWidth: 200, printWidth: 200,
tabWidth: 4, tabWidth: 2,
useTabs: true, useTabs: true,
semi: true, semi: true,
singleQuote: false, singleQuote: false,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 使用 Prettier 作为默认格式化器 // 使用 Prettier 作为默认格式化器
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
// 保存时自动格式化 // 保存时自动格式化
"editor.formatOnSave": false, "editor.formatOnSave": true,
// 缩进设置:使用 tab,大小为 4 // 缩进设置:使用 tab,大小为 4
"editor.tabSize": 2, "editor.tabSize": 2,
"editor.insertSpaces": false, "editor.insertSpaces": false,
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"scm.compactFolders": false, "scm.compactFolders": false,
"problems.decorations.enabled": false, "problems.decorations.enabled": false,
"[javascript]": { "[javascript]": {
"editor.defaultFormatter": "Wscats.eno" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"[wxml]": { "[wxml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
}, },
"files.associations": { "files.associations": {
"*.wxss": "css", "*.wxss": "css",
"*.sass": "scss"
}, },
"cSpell.words": [ "cSpell.words": [
// 微信小程序相关 // 微信小程序相关
...@@ -117,5 +116,5 @@ ...@@ -117,5 +116,5 @@
"gitlens.currentLineBlame.format": "${author}, ${date} - ${message}", "gitlens.currentLineBlame.format": "${author}, ${date} - ${message}",
"gitlens.blame.visibility": "on", "gitlens.blame.visibility": "on",
// 待团队讨论后再开启 // 待团队讨论后再开启
"prettier.enable": false "prettier.enable": true
} }
\ No newline at end of file \ No newline at end of file
### pnpm -v
10.29.2
### node -v
v20.20.2
#### 账号
##### 督导
-dev
* 13476670746
* 13132112126
-test
* 13267032121
* 13476670746
...@@ -92,5 +92,51 @@ module.exports = { ...@@ -92,5 +92,51 @@ module.exports = {
*/ */
getMentorRequireList(data) { getMentorRequireList(data) {
return api.post('dj.api.supervisor.mini.page.teachingRecords', data, [], '/rop-dj-supervisor-mini/router') return api.post('dj.api.supervisor.mini.page.teachingRecords', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取任务中心的专项带教任务列表数据
*/
getTaskCenterPageData(data) {
return api.post('dj.api.supervisor.mini.taskCenter.page', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取任务中心专项带教任务详情
*/
getTaskCenterDetail(data) {
return api.post('dj.api.supervisor.mini.taskCenter.getDetail',data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 执行任务中心专项带教任务
*/
executeTaskCenter(data) {
return api.post('dj.api.supervisor.mini.taskCenter.execute',data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取我发起的专项任务列表
*/
getSpecialTaskList(data) {
return api.post('dj.api.supervisor.mini.specialTask.page', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 发起专项任务
*/
createSpecialTask(data) {
return api.post('dj.api.supervisor.mini.specialTask.create', data, [], '/rop-dj-supervisor-mini/router')
},
// 获取门店配置的区域运营(D+平台)
getAreaOperatorList(data) {
return api.post('dj.api.supervisor.mini.list.regionOperator', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取专项任务详情
*/
getSpecialTaskDetail(data) {
return api.post('dj.api.supervisor.mini.specialTask.getDetail', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取我发起的专项任务统计数据
*/
getSpecialTaskCount(data) {
return api.post('dj.api.supervisor.mini.specialTask.count', data, [], '/rop-dj-supervisor-mini/router')
} }
} }
...@@ -9,10 +9,7 @@ ...@@ -9,10 +9,7 @@
"pages/tab/learningCenter/learningCenter", "pages/tab/learningCenter/learningCenter",
"pages/tab/mine/mine" "pages/tab/mine/mine"
], ],
"requiredPrivateInfos": [ "requiredPrivateInfos": ["getLocation", "chooseLocation"],
"getLocation",
"chooseLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -63,6 +60,10 @@ ...@@ -63,6 +60,10 @@
"pages/weeklyReview/weeklyReview", "pages/weeklyReview/weeklyReview",
"pages/monthlyPlan/monthlyPlan", "pages/monthlyPlan/monthlyPlan",
"pages/specialTask/specialTask", "pages/specialTask/specialTask",
"pages/stationStaffPerformance/stationStaffPerformance",
"pages/storePerformance/storePerformance",
"pages/mySpecialTaskList/mySpecialTaskList",
"pages/specialTaskApply/specialTaskApply",
"pages/mentorRequirements/mentorRequirements", "pages/mentorRequirements/mentorRequirements",
"pages/caseAudioList/caseAudioList" "pages/caseAudioList/caseAudioList"
] ]
...@@ -75,15 +76,14 @@ ...@@ -75,15 +76,14 @@
"pages/storeTransfer/storeTransfer", "pages/storeTransfer/storeTransfer",
"pages/receptionRecording/receptionRecording", "pages/receptionRecording/receptionRecording",
"pages/recordingDetail/recordingDetail", "pages/recordingDetail/recordingDetail",
"pages/mentoring/mentoring" "pages/mentoring/mentoring",
"pages/specialMentoring/specialMentoring"
] ]
}, },
{ {
"root": "packageLearningCenter", "root": "packageLearningCenter",
"name": "packageLearningCenter", "name": "packageLearningCenter",
"pages": [ "pages": ["pages/coursePush/coursePush"]
"pages/coursePush/coursePush"
]
} }
], ],
"preloadRule": {}, "preloadRule": {},
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
} }
page { page {
--primary-color: #2c66f7;
--text-color: #333;
/* 兼容 IOS<11.2 先constant再env */ /* 兼容 IOS<11.2 先constant再env */
--constantSafeAreaInsetBottom: constant(safe-area-inset-bottom); --constantSafeAreaInsetBottom: constant(safe-area-inset-bottom);
/* 兼容 IOS>11.2 */ /* 兼容 IOS>11.2 */
...@@ -61,7 +63,6 @@ page { ...@@ -61,7 +63,6 @@ page {
justify-content: center; justify-content: center;
} }
.two-text { .two-text {
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
...@@ -101,7 +102,7 @@ page { ...@@ -101,7 +102,7 @@ page {
background-color: #fff; background-color: #fff;
} }
} }
.flex{ .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
// components/SearchInput/SearchInput.js // components/SearchInput/SearchInput.js
Component({ Component({
externalClasses: ['container-class', 'field-class', 'input-class'],
// options: { // options: {
// styleIsolation: 'shared' // styleIsolation: 'shared'
// }, // },
......
<view class="search-box" style="{{styleValue}}"> <view class="search-box container-class" style="{{styleValue}}">
<view class="search-input"> <view class="search-input field-class">
<block wx:if="{{!edit}}"> <block wx:if="{{!edit}}">
<view class="input {{value?'':'placeholder'}}" bindtap="open"> <view class="input input-class {{value?'':'placeholder'}}" bindtap="open">
<block wx:if="{{value}}"> <block wx:if="{{value}}">
{{value}} {{value}}
</block> </block>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<input type="text" maxlength="{{maxlength}}" class="input" value='{{value}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm" /> <input type="text" maxlength="{{maxlength}}" class="input input-class" value='{{value}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm" />
</block> </block>
</view> </view>
</view> </view>
...@@ -4,27 +4,30 @@ ...@@ -4,27 +4,30 @@
display: flex; display: flex;
align-items: center; align-items: center;
font-size: var(--fontSize28); font-size: var(--fontSize28);
width: 100%;
overflow: hidden;
} }
.search-box .search-input { .search-box .search-input {
width: 100%; width: 100%;
height: var(--fontSize72); height: var(--fontSize72);
background: #F7F8FA; background: #f7f8fa;
border-radius: var(--fontSize38); border-radius: var(--fontSize38);
color: #333; color: #333;
overflow: hidden;
} }
.search-input .input{ .search-input .input {
display: flex; display: flex;
align-items: center; align-items: center;
height: 100%; height: 100%;
width: 100%; width: 100%;
padding: 0 24rpx; padding: 0 24rpx;
} }
.search-input .icon{ .search-input .icon {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
margin-right: var(--fontSize10); margin-right: var(--fontSize10);
} }
.search-input .placeholder{ .search-input .placeholder {
color: #C8C9CC; color: #c8c9cc;
} }
<!--components/dateScreen/dateScreen.wxml--> <!--components/dateScreen/dateScreen.wxml-->
<view class="date-screen"> <view class="date-screen">
<view class="tab-section {{isSticky ? 'isSticky' : ''}}" style="background: {{customBackground}};" wx:if="{{!tabSelected || tabSelected == 3}}"> <view class="tab-section {{ isSticky ? 'isSticky' : '' }}"
<block wx:for="{{dateList}}" wx:key="index"> style="background: {{ customBackground }};"
<view class="tab {{item.index==dateCurrent?'active':''}}" data-index="{{item.index}}" bind:tap="selectDate">{{item.title}}</view> wx:if="{{ !tabSelected || tabSelected == 3 }}">
<block wx:for="{{ dateList }}" wx:key="index">
<view class="tab {{ item.index==dateCurrent?'active':'' }}"
data-index="{{ item.index }}"
bind:tap="selectDate">
{{ item.title }}
</view>
</block> </block>
</view> </view>
<view class="date-section"> <view class="date-section">
<view class="arrow left"> <view class="arrow left">
<van-icon wx:if="{{!leftCurrent}}" class="arrow-left" name="arrow-left" bind:tap="last" /> <van-icon wx:if="{{ !leftCurrent }}"
class="arrow-left"
name="arrow-left"
bind:tap="last" />
</view>
<view class="date-text" bind:tap="onDisplayDate">
{{ date }}
</view> </view>
<view class="date-text" bind:tap="onDisplayDate">{{date}}</view>
<view class="arrow right"> <view class="arrow right">
<van-icon wx:if="{{!rightCurrent}}" class="arrow-right" name="arrow" bind:tap="next" /> <van-icon wx:if="{{ !rightCurrent }}"
class="arrow-right"
name="arrow"
bind:tap="next" />
</view> </view>
</view> </view>
</view> </view>
<!-- 年月日 --> <!-- 年月日 -->
<block wx:if="{{dateShow}}"> <block wx:if="{{ dateShow }}">
<popup bindcancel="cancel" bindconfirm="confirm" show="{{dateShow}}" title="{{titleEnum[timeType]}}" height="60vh"> <popup bindcancel="cancel"
<block wx:if="{{timeType == 'date' || timeType == 'year-month'}}"> bindconfirm="confirm"
<van-datetime-picker id="datePicker" show-toolbar="{{false}}" min-date="{{ minDate }}" max-date="{{ maxDate }}" model:value="{{ currentDate }}" type="{{timeType=='date'?'date':'year-month'}}" bind:change="onChange" bind:input="onInput" /> show="{{ dateShow }}"
title="{{ titleEnum[timeType] }}"
height="60vh">
<block wx:if="{{ timeType == 'date' || timeType == 'year-month' }}">
<van-datetime-picker id="datePicker"
show-toolbar="{{ false }}"
min-date="{{ minDate }}"
max-date="{{ maxDate }}"
model:value="{{ currentDate }}"
type="{{ timeType=='date'?'date':'year-month' }}"
bind:change="onChange"
bind:input="onInput" />
</block> </block>
<!-- 周 --> <!-- 周 -->
<block wx:if="{{timeType == 'week'}}"> <block wx:if="{{ timeType == 'week' }}">
<van-picker id="weekPicker" show-toolbar="{{false}}" model:value="{{ currentDate }}" default-index="{{defaultIndex}}" value-key="label" columns="{{ weekColumns }}" bind:change="onWeekChange" /> <van-picker id="weekPicker"
show-toolbar="{{ false }}"
model:value="{{ currentDate }}"
default-index="{{ defaultIndex }}"
value-key="label"
columns="{{ weekColumns }}"
bind:change="onWeekChange" />
</block> </block>
</popup> </popup>
</block> </block>
<block wx:if="{{show}}"> <block wx:if="{{ show }}">
<van-calendar <van-calendar id="calendar"
id="calendar"
max-range="{{ 31 }}" max-range="{{ 31 }}"
min-date="{{ minDate }}" min-date="{{ minDate }}"
max-date="{{ maxDate }}" max-date="{{ maxDate }}"
...@@ -37,6 +67,5 @@ ...@@ -37,6 +67,5 @@
type="range" type="range"
color="#2C66F7" color="#2C66F7"
bind:confirm="onConfirm" bind:confirm="onConfirm"
bind:close="onClose" bind:close="onClose" />
/>
</block> </block>
Component({
properties: {
show: {
type: Boolean,
value: false,
observer(show) {
if (show) {
this.openTooltip();
return;
}
this.closeTooltip({ triggerEvent: false });
},
},
duration: {
type: Number,
value: 2000,
},
content: {
type: String,
value: "",
},
placement: {
type: String,
value: "top",
},
customStyle: {
type: String,
value: "",
},
},
data: {
rendered: false,
visible: false,
popperStyle: "",
arrowStyle: "",
currentPlacement: "top",
},
lifetimes: {
detached() {
this.clearAutoHideTimer();
this.clearCloseAnimationTimer();
},
},
methods: {
openTooltip() {
this.clearAutoHideTimer();
this.clearCloseAnimationTimer();
this.setData(
{
rendered: true,
visible: true,
popperStyle: "left: -9999px; top: -9999px;",
arrowStyle: "",
currentPlacement: this.properties.placement,
},
() => {
wx.nextTick(() => {
this.updatePopperPosition();
this.emitChange(true);
this.startAutoHideTimer();
});
},
);
},
show() {
this.openTooltip();
},
hide() {
this.closeTooltip();
},
handleTriggerTap() {
if (this.data.visible) {
this.closeTooltip();
return;
}
this.openTooltip();
},
preventTap() {},
updatePopperPosition() {
const query = this.createSelectorQuery();
query.select(".tooltip-reference").boundingClientRect();
query.select(".tooltip-popper").boundingClientRect();
query.exec((res) => {
const referenceRect = res && res[0];
const popperRect = res && res[1];
if (!referenceRect || !popperRect) {
return;
}
const systemInfo = wx.getSystemInfoSync();
const viewportWidth = systemInfo.windowWidth;
const viewportHeight = systemInfo.windowHeight;
const margin = this.rpxToPx(16, viewportWidth);
const gap = this.rpxToPx(16, viewportWidth);
const arrowSize = this.rpxToPx(20, viewportWidth);
const placement = this.getAvailablePlacement(this.properties.placement, referenceRect, popperRect, viewportWidth, viewportHeight, margin, gap);
const position = this.getPopperPosition(placement, referenceRect, popperRect, viewportWidth, viewportHeight, margin, gap, arrowSize);
this.setData({
popperStyle: `left: ${position.left}px; top: ${position.top}px;`,
arrowStyle: position.arrowStyle,
currentPlacement: placement,
});
});
},
getAvailablePlacement(placement, referenceRect, popperRect, viewportWidth, viewportHeight, margin, gap) {
const enoughMap = {
top: referenceRect.top >= popperRect.height + gap + margin,
bottom: viewportHeight - referenceRect.bottom >= popperRect.height + gap + margin,
left: referenceRect.left >= popperRect.width + gap + margin,
right: viewportWidth - referenceRect.right >= popperRect.width + gap + margin,
};
if (enoughMap[placement]) {
return placement;
}
const fallbackMap = {
top: ["bottom", "right", "left"],
bottom: ["top", "right", "left"],
left: ["right", "top", "bottom"],
right: ["left", "top", "bottom"],
};
const fallbackList = fallbackMap[placement] || ["top", "bottom", "right", "left"];
const target = fallbackList.find((item) => enoughMap[item]);
return target || placement;
},
getPopperPosition(placement, referenceRect, popperRect, viewportWidth, viewportHeight, margin, gap, arrowSize) {
let left = 0;
let top = 0;
if (placement === "top" || placement === "bottom") {
left = referenceRect.left + referenceRect.width / 2 - popperRect.width / 2;
left = Math.min(Math.max(left, margin), viewportWidth - popperRect.width - margin);
top = placement === "top" ? referenceRect.top - popperRect.height - gap : referenceRect.bottom + gap;
top = Math.min(Math.max(top, margin), viewportHeight - popperRect.height - margin);
const arrowLeft = referenceRect.left + referenceRect.width / 2 - left - arrowSize / 2;
const safeArrowLeft = Math.min(Math.max(arrowLeft, this.rpxToPx(24, viewportWidth)), popperRect.width - this.rpxToPx(24, viewportWidth) - arrowSize);
return {
left,
top,
arrowStyle: `left: ${safeArrowLeft}px;`,
};
}
top = referenceRect.top + referenceRect.height / 2 - popperRect.height / 2;
top = Math.min(Math.max(top, margin), viewportHeight - popperRect.height - margin);
left = placement === "left" ? referenceRect.left - popperRect.width - gap : referenceRect.right + gap;
left = Math.min(Math.max(left, margin), viewportWidth - popperRect.width - margin);
const arrowTop = referenceRect.top + referenceRect.height / 2 - top - arrowSize / 2;
const safeArrowTop = Math.min(Math.max(arrowTop, this.rpxToPx(24, viewportWidth)), popperRect.height - this.rpxToPx(24, viewportWidth) - arrowSize);
return {
left,
top,
arrowStyle: `top: ${safeArrowTop}px;`,
};
},
rpxToPx(rpx, windowWidth) {
return (Number(rpx) * windowWidth) / 750;
},
startAutoHideTimer() {
const duration = Number(this.properties.duration) || 0;
if (duration <= 0) {
return;
}
this.autoHideTimer = setTimeout(() => {
this.closeTooltip();
}, duration);
},
clearAutoHideTimer() {
if (!this.autoHideTimer) {
return;
}
clearTimeout(this.autoHideTimer);
this.autoHideTimer = null;
},
clearCloseAnimationTimer() {
if (!this.closeAnimationTimer) {
return;
}
clearTimeout(this.closeAnimationTimer);
this.closeAnimationTimer = null;
},
closeTooltip(options = {}) {
const { triggerEvent = true } = options;
this.clearAutoHideTimer();
if (!this.data.visible) {
if (triggerEvent) {
this.emitChange(false);
}
return;
}
this.clearCloseAnimationTimer();
this.setData(
{
visible: false,
},
() => {
this.closeAnimationTimer = setTimeout(() => {
this.setData(
{
rendered: false,
popperStyle: "",
arrowStyle: "",
currentPlacement: this.properties.placement,
},
() => {
if (triggerEvent) {
this.emitChange(false);
}
},
);
this.closeAnimationTimer = null;
}, 100);
},
);
},
emitChange(show) {
if (!show) {
this.triggerEvent("close");
}
this.triggerEvent("change", { show });
},
},
});
{
"component": true,
"usingComponents": {}
}
.tooltip-wrapper {
position: relative;
display: inline-flex;
box-sizing: border-box;
width: 100%;
}
.tooltip-reference {
display: inline-flex;
box-sizing: border-box;
width: 100%;
}
.tooltip-popper {
position: fixed;
z-index: 9999;
max-width: 560rpx;
min-width: 180rpx;
opacity: 0;
transition: opacity 100ms ease;
}
.tooltip-popper-visible {
opacity: 1;
}
.tooltip-inner {
padding: 24rpx 28rpx;
box-sizing: border-box;
background: #ffffff;
border-radius: 16rpx;
box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.12);
color: #333333;
line-height: 1.5;
word-break: break-all;
}
.tooltip-arrow {
position: absolute;
width: 20rpx;
height: 20rpx;
background: #ffffff;
transform: rotate(45deg);
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.08);
}
.tooltip-top {
}
.tooltip-top .tooltip-arrow {
bottom: -8rpx;
transform: rotate(45deg);
}
.tooltip-bottom {
}
.tooltip-bottom .tooltip-arrow {
top: -8rpx;
transform: rotate(45deg);
}
.tooltip-left {
}
.tooltip-left .tooltip-arrow {
right: -8rpx;
transform: rotate(45deg);
}
.tooltip-right {
}
.tooltip-right .tooltip-arrow {
left: -8rpx;
transform: rotate(45deg);
}
<view class="tooltip-wrapper">
<view class="tooltip-reference" catchtap="handleTriggerTap">
<slot></slot>
</view>
<view wx:if="{{ rendered }}"
class="tooltip-popper tooltip-{{ currentPlacement }} {{ visible ? 'tooltip-popper-visible' : '' }}"
style="{{ popperStyle }}{{ customStyle }}"
catchtap="preventTap">
<view class="tooltip-arrow" style="{{ arrowStyle }}"></view>
<view class="tooltip-inner">
<text class="tooltip-text">{{ content }}</text>
</view>
</view>
</view>
const DEFAULT_BREAKPOINTS = {
xs: 0,
sm: 375,
md: 768,
lg: 1024,
};
Component({
externalClasses: ["custom-class"],
options: {
virtualHost: true,
styleIsolation: "apply-shared",
},
relations: {
"../venusRow/venusRow": {
type: "ancestor",
},
},
properties: {
span: {
type: null,
value: 24,
observer() {
this.syncCol();
},
},
offset: {
type: Number,
value: 0,
observer() {
this.syncCol();
},
},
align: {
type: String,
value: "stretch",
observer() {
this.syncCol();
},
},
customStyle: {
type: String,
value: "",
observer() {
this.syncCol();
},
},
clickable: {
type: Boolean,
value: false,
observer() {
this.syncCol();
},
},
contentSpan: {
type: Number,
value: 24,
observer() {
this.syncCol();
},
},
responsive: {
type: Object,
value: null,
observer() {
this.syncCol();
},
},
},
data: {
itemClass: "",
itemStyleText: "",
clickable: false,
currentBreakpoint: "xs",
},
lifetimes: {
attached() {
this.syncCol();
},
},
methods: {
updateFromRow(rowContext) {
this.rowContext = rowContext || null;
this.syncCol();
},
getParentRow() {
const rows = this.getRelationNodes("../venusRow/venusRow") || [];
return rows[0] || null;
},
getStandaloneContext() {
const width = this.getWindowWidth();
const breakpoints = DEFAULT_BREAKPOINTS;
return {
columns: 24,
breakpoints,
viewportWidth: width,
activeBreakpoint: this.getActiveBreakpoint(width, breakpoints),
};
},
getWindowWidth() {
const info = typeof wx.getWindowInfo === "function" ? wx.getWindowInfo() : wx.getSystemInfoSync();
return Number(info.windowWidth || info.screenWidth || 375);
},
syncCol() {
const rowContext = this.rowContext || this.getStandaloneContext();
const config = this.resolveConfig(rowContext);
const columns = this.normalizeColumns(rowContext.columns);
const isContent = config.span === "content";
const span = isContent ? this.normalizeSpan(config.contentSpan, columns) : this.normalizeSpan(config.span, columns);
const offset = this.normalizeOffset(config.offset, columns);
const align = this.normalizeAlign(config.align || (isContent ? "start" : "stretch"));
const clickable = Boolean(config.clickable);
const itemClassList = [];
if (isContent) itemClassList.push("is-content");
if (clickable) itemClassList.push("is-clickable");
const itemStyleList = [`grid-column-end:span ${span}`, `justify-self:${align}`, "min-width:0", "box-sizing:border-box"];
if (offset > 0) {
itemStyleList.push(`grid-column-start:${offset + 1}`);
}
if (isContent) {
itemStyleList.push("width:fit-content");
itemStyleList.push("max-width:100%");
}
if (config.customStyle) {
itemStyleList.push(config.customStyle);
}
this.currentConfig = config;
this.setData({
itemClass: itemClassList.join(" "),
itemStyleText: itemStyleList.join(";"),
clickable,
currentBreakpoint: rowContext.activeBreakpoint || "xs",
});
},
resolveConfig(rowContext) {
let config = {
span: this.properties.span,
offset: this.properties.offset,
align: this.properties.align,
customStyle: this.properties.customStyle,
clickable: this.properties.clickable,
contentSpan: this.properties.contentSpan,
};
const responsive = this.properties.responsive;
if (responsive && typeof responsive === "object") {
const merged = {};
this.getSortedBreakpoints(rowContext.breakpoints).forEach((point) => {
const pointConfig = responsive[point.key];
if (rowContext.viewportWidth >= point.value && this.isPlainObject(pointConfig)) {
Object.assign(merged, pointConfig);
}
});
config = Object.assign({}, config, merged);
}
return config;
},
onTap() {
if (!this.data.clickable) return;
const detail = {
item: this.currentConfig || {},
breakpoint: this.data.currentBreakpoint,
};
this.triggerEvent("itemtap", detail);
const row = this.getParentRow();
if (row && typeof row.emitItemTap === "function") {
row.emitItemTap(detail);
}
},
normalizeColumns(value) {
const columns = Number(value);
if (!Number.isFinite(columns)) return 24;
return Math.max(1, Math.round(columns));
},
normalizeSpan(value, columns) {
const span = Number(value);
if (!Number.isFinite(span)) return columns;
return Math.min(columns, Math.max(1, Math.round(span)));
},
normalizeOffset(value, columns) {
const offset = Number(value);
if (!Number.isFinite(offset)) return 0;
return Math.min(Math.max(columns - 1, 0), Math.max(0, Math.round(offset)));
},
normalizeAlign(value) {
const alignMap = {
start: "start",
center: "center",
end: "end",
stretch: "stretch",
};
return alignMap[value] || "stretch";
},
getActiveBreakpoint(width, breakpoints) {
const list = this.getSortedBreakpoints(breakpoints);
if (!list.length) return "xs";
let activeKey = list[0].key;
list.forEach((item) => {
if (width >= item.value) {
activeKey = item.key;
}
});
return activeKey;
},
getSortedBreakpoints(breakpoints) {
return Object.keys(breakpoints || {})
.map((key) => ({
key,
value: Number(breakpoints[key]),
}))
.filter((item) => Number.isFinite(item.value))
.sort((a, b) => a.value - b.value);
},
isPlainObject(value) {
return !!value && Object.prototype.toString.call(value) === "[object Object]";
},
},
});
.venus-col {
min-width: 0;
box-sizing: border-box;
&.is-content {
max-width: 100%;
}
}
.venus-col--active {
opacity: 0.92;
}
<view class="venus-col custom-class {{ itemClass }}"
style="{{ itemStyleText }}"
hover-class="{{ clickable ? 'venus-col--active' : '' }}"
bind:tap="onTap">
<slot></slot>
</view>
const DEFAULT_BREAKPOINTS = {
xs: 0,
sm: 375,
md: 768,
lg: 1024,
};
Component({
externalClasses: ["custom-class"],
options: {
styleIsolation: "apply-shared",
},
relations: {
"../venusCol/venusCol": {
type: "descendant",
linked() {
this.notifyChildren();
},
linkChanged() {
this.notifyChildren();
},
unlinked() {
this.notifyChildren();
},
},
},
properties: {
columns: {
type: Number,
value: 24,
observer() {
this.syncRow();
},
},
gap: {
type: null,
value: [0, 0],
observer() {
this.syncRow();
},
},
dense: {
type: Boolean,
value: false,
observer() {
this.syncRow();
},
},
breakpoints: {
type: Object,
value: DEFAULT_BREAKPOINTS,
observer() {
this.syncRow();
},
},
},
data: {
rowStyle: "",
activeBreakpoint: "xs",
viewportWidth: 0,
},
lifetimes: {
attached() {
this.bindWindowResize();
this.syncRow();
},
detached() {
this.unbindWindowResize();
},
},
methods: {
bindWindowResize() {
if (typeof wx.onWindowResize !== "function" || this.resizeHandler) return;
this.resizeHandler = (res) => {
const size = (res && res.size) || {};
const width = Number(size.windowWidth || res.windowWidth || this.getWindowWidth());
if (width && width !== this.data.viewportWidth) {
this.syncRow(width);
}
};
wx.onWindowResize(this.resizeHandler);
},
unbindWindowResize() {
if (!this.resizeHandler || typeof wx.offWindowResize !== "function") return;
wx.offWindowResize(this.resizeHandler);
this.resizeHandler = null;
},
getWindowWidth() {
const info = typeof wx.getWindowInfo === "function" ? wx.getWindowInfo() : wx.getSystemInfoSync();
return Number(info.windowWidth || info.screenWidth || 375);
},
syncRow(forcedWidth) {
const columns = this.normalizeColumns(this.properties.columns);
const viewportWidth = Number(forcedWidth || this.getWindowWidth()) || 375;
const activeBreakpoint = this.getActiveBreakpoint(viewportWidth, this.properties.breakpoints);
const rowStyle = this.buildRowStyle(columns, this.properties.gap, this.properties.dense);
this.setData(
{
rowStyle,
activeBreakpoint,
viewportWidth,
},
() => {
this.notifyChildren();
},
);
},
buildRowStyle(columns, gap, dense) {
const normalizedGap = this.normalizeGap(gap);
return [
"display:grid",
"width:100%",
"box-sizing:border-box",
"align-items:start",
`grid-template-columns:repeat(${columns}, minmax(0, 1fr))`,
`column-gap:${normalizedGap.columnGap}`,
`row-gap:${normalizedGap.rowGap}`,
`grid-auto-flow:${dense ? "row dense" : "row"}`,
].join(";");
},
notifyChildren() {
const children = this.getRelationNodes("../venusCol/venusCol") || [];
const context = {
columns: this.normalizeColumns(this.properties.columns),
breakpoints: this.properties.breakpoints,
activeBreakpoint: this.data.activeBreakpoint,
viewportWidth: this.data.viewportWidth || this.getWindowWidth(),
};
children.forEach((child) => {
if (child && typeof child.updateFromRow === "function") {
child.updateFromRow(context);
}
});
},
emitItemTap(detail) {
this.triggerEvent("itemtap", detail);
},
normalizeColumns(value) {
const columns = Number(value);
if (!Number.isFinite(columns)) return 24;
return Math.max(1, Math.round(columns));
},
normalizeGap(value) {
let columnGap = "0rpx";
let rowGap = "0rpx";
if (Array.isArray(value)) {
columnGap = this.toCssSize(value[0]);
rowGap = this.toCssSize(value.length > 1 ? value[1] : value[0]);
} else if (value && typeof value === "object") {
columnGap = this.toCssSize(value.x != null ? value.x : value.column);
rowGap = this.toCssSize(value.y != null ? value.y : value.row);
} else {
columnGap = this.toCssSize(value);
rowGap = this.toCssSize(value);
}
return {
columnGap,
rowGap,
};
},
toCssSize(value) {
if (value == null || value === "") return "0rpx";
if (typeof value === "number") return `${value}rpx`;
if (typeof value !== "string") return "0rpx";
if (/^-?\d+(\.\d+)?$/.test(value)) {
return `${value}rpx`;
}
return value;
},
getActiveBreakpoint(width, breakpoints) {
const list = this.getSortedBreakpoints(breakpoints);
if (!list.length) return "xs";
let activeKey = list[0].key;
list.forEach((item) => {
if (width >= item.value) {
activeKey = item.key;
}
});
return activeKey;
},
getSortedBreakpoints(breakpoints) {
return Object.keys(breakpoints || {})
.map((key) => ({
key,
value: Number(breakpoints[key]),
}))
.filter((item) => Number.isFinite(item.value))
.sort((a, b) => a.value - b.value);
},
},
});
.venus-row {
width: 100%;
box-sizing: border-box;
}
<view class="venus-row custom-class" style="{{ rowStyle }}">
<slot></slot>
</view>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"rfdc": "^1.3.0" "rfdc": "^1.3.0"
}, },
"volta": { "volta": {
"node": "14.21.3" "node": "20.20.2"
}, },
"devDependencies": { "devDependencies": {
"@babel/generator": "^7.28.6", "@babel/generator": "^7.28.6",
......
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"select-popup": "/components/selectPopup/selectPopup"
},
"navigationStyle": "custom"
}
/* packageCrew/pages/specialMentoring/specialMentoring.wxss */
page{
background: #F2F3F7;
}
.required {
color: #F24724;
margin-left: 8rpx;
}
.container {
height: 100vh;
box-sizing: border-box;
width: calc(100% - 48rpx);
margin: 0 24rpx;
.box {
border-radius: 32rpx;
background: #FFFFFF;
padding: 32rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
&.padding-0 {
padding: 0;
}
.name {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
.staff {
display: flex;
align-items: center;
font-size: 36rpx;
width: 100%;
color: #333333;
.staff-name {
max-width: calc(100% - 40rpx);
word-break: break-all;
}
.sex-icon {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-left: 12rpx;
}
}
}
.items {
display: flex;
flex-wrap: wrap;
column-gap: 24rpx;
row-gap: 18rpx;
.item {
width: 100%;
display: flex;
align-items: center;
font-size: 26rpx;
color: #79859E;
.label {
flex-shrink: 0;
}
}
.inline {
flex: 1;
min-width: 0;
.value {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
.item-box {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.label {
color: #292D33;
}
.value {
display: flex;
align-items: center;
justify-content: flex-end;
width: calc(100% - 158rpx);
.value-text {
text-align: right;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.input {
text-align: right;
font-size: 28rpx;
padding: 16rpx 0;
width: 100%;
}
image {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
}
.value_box {
display: flex;
align-items: center;
gap: 32rpx;
.radio-box {
display: flex;
align-items: center;
gap: 16rpx;
.radio-icon {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
}
.circle {
flex-shrink: 0;
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 2rpx solid #d0d2d6;
}
.text {
color: #292D33;
font-size: 28rpx;
}
}
}
}
.multi-select {
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.multi-select__header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.multi-select__label {
color: #292D33;
}
.multi-select__arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
.multi-select__body {
margin-bottom: 12rpx;
}
.multi-placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.multi-tags {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.multi-tag {
display: inline-flex;
align-items: center;
max-width: 100%;
padding: 0 20rpx;
height: 44rpx;
border-radius: 8rpx;
background: #F6F7F9;
border: 2rpx solid #E6E8EC;
box-sizing: border-box;
}
.multi-tag__text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
color: #292D33;
}
.multi-tag__close {
margin-left: 16rpx;
color: #999EA8;
font-size: 32rpx;
line-height: 1;
}
}
.remark_box {
height: 382rpx;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
.label {
margin: 28rpx 0;
}
.textArea_box {
box-sizing: border-box;
width: 100%;
border-radius: 16rpx;
padding: 24rpx 24rpx 42rpx;
background: #FFFFFF;
border: 2rpx solid #eff0f2;
height: 262rpx;
position: relative;
font-size: 28rpx;
.textarea {
height: 100%;
width: 100%;
}
.currentWordNumber {
position: absolute;
right: 26rpx;
bottom: 8rpx;
color: #CCCCCC;
}
}
}
.image-box {
margin: 0 32rpx;
padding-bottom: 28rpx;
.label{
margin: 28rpx 0;
}
.upload_box{
display: flex;
flex-wrap: wrap;
gap: 28rpx;
.payVoucher_image{
flex-shrink: 0;
width: 192rpx;
height: 192rpx;
border-radius: 12rpx;
position: relative;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
.del_icon{
width: 40rpx;
height: 40rpx;
position: absolute;
top: 16rpx;
right: 16rpx;
}
}
.upload-item {
width: 196rpx;
height: 196rpx;
border-radius: 12rpx;
background: #f5f5f7;
display: flex;
align-items: center;
justify-content: center;
flex-flow: column;
.icon-uploadAdd {
width: 40rpx;
height: 40rpx;
&.custom-icon-uploadAdd {
width: 100%;
height: 100%;
}
}
.upload-text {
margin-top: 16rpx;
color: #999EA8;
font-size: 24rpx;
}
}
}
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footer-btn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
}
}
<!--packageCrew/pages/specialMentoring/specialMentoring.wxml-->
<glsx-privacy appletName="嘀加门店管理助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar bindnavbarReady="navbarReady"
class="navigation-header"
showBack="{{true}}"
bindback="back"
navStyle="background-color: transparent;box-shadow:none;">
<view class="page-title">
专项带教
</view>
</navigation-bar>
<scroll-view class="container" scroll-y show-scrollbar="{{false}}" enhanced style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{!isCompleted ? (isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx') : '0'}};">
<view style="width: 100%;height: 8rpx;"></view>
<view class="box padding-0">
<block wx:for="{{formItems}}" wx:key="index">
<block wx:if="{{!item.hide}}">
<view class="multi-select" wx:if="{{item.type == 'select' && item.selectMultiple}}" data-item="{{item}}">
<view class="multi-select__header">
<view class="multi-select__label">{{item.label}}<text class='required'>*</text></view>
<view bindtap="chooseSelect" data-item="{{item}}" style="display: flex;align-items: center;">
<text class="multi-placeholder" wx:if="{{!isCompleted && !lockedFields[item.value]}}">点击选择(可多选)</text>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="multi-select__arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="aspectFit" />
</view>
</view>
<view class="multi-select__body" wx:if="{{orderObj[item.value] && orderObj[item.value].length}}">
<view class="multi-tags">
<block wx:for="{{orderObj[item.value]}}" wx:for-item="tag" wx:key="tagIndex" wx:for-index="tagIndex">
<view class="multi-tag">
<text class="multi-tag__text" style="max-width: {{(isCompleted || lockedFields[item.value]) ? '100%' : 'calc(100% - 36rpx)'}};">{{tag[item.itemName]}}</text>
<text class="multi-tag__close" wx:if="{{!isCompleted && !lockedFields[item.value]}}" catchtap="removeMultiSelected" data-field="{{item.value}}" data-index="{{tagIndex}}">×</text>
</view>
</block>
</view>
</view>
</view>
<view class="item-box" wx:else>
<view class="label">{{item.label}}<text class='required'>*</text></view>
<view wx:if="{{item.type == 'select'}}" class="value" bindtap="chooseSelect" data-item="{{item}}">
<block wx:if="{{orderObj[item.valueText]}}">
<text class="value-text">{{orderObj[item.valueText]}}</text>
</block>
<block wx:else>
<text wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="placeholder">点击选择</text>
<text wx:else class="placeholder">-</text>
</block>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
<view class="value_box" wx:elif="{{item.type == 'radio'}}">
<view class="radio-box" wx:for="{{teaching_scene_list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" bindtap="changeScene" data-value="{{subItem.itemValue}}">
<image wx:if="{{orderObj.teachingSceneCode == subItem.itemValue}}" class="radio-icon" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/radio-checked.png" mode=""/>
<view wx:else class="circle"></view>
<view class="text">{{subItem.itemName}}</view>
</view>
</view>
<view wx:else class="value" bindtap="chooseTime">
<text wx:if="{{orderObj[item.value]}}" class="value-text">{{orderObj[item.value]}}</text>
<block wx:else>
<text wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="placeholder">点击选择</text>
<text wx:else class="placeholder">-</text>
</block>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
</view>
</block>
</block>
<view class="item-box remark_box">
<view class="label">带教内容摘要<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{isCompleted || lockedFields.assigneeDetail}}" value="{{ orderObj.assigneeDetail }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="assigneeDetailInput" />
<view class="currentWordNumber">{{assigneeDetailLength || 0}} / 1000</view>
</view>
</view>
<view class="image-box">
<view class="label">带教照片佐证<text class='required'>*</text></view>
<view class="upload_box">
<block wx:if="{{orderObj.assigneeImages.length > 0}}">
<view class="payVoucher_image" wx:for="{{orderObj.assigneeImages}}" wx:key="index">
<image bindtap="previewImage" data-index="{{index}}" data-url="{{orderObj.assigneeImages}}" src="{{item.imageUrl}}"/>
<image class="del_icon" wx:if="{{!isCompleted && !lockedFields.assigneeImages}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/zy_paf_del_icon.png" mode="" bindtap="delPhoto" data-index="{{index}}"/>
</view>
</block>
<block wx:if="{{orderObj.assigneeImages.length < 9 && !isCompleted && !lockedFields.assigneeImages}}">
<view class="upload-item" bindtap="handleImageUpload">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/{{item.uploadIcon || 'zy-upload_icon.png'}}" class="icon-uploadAdd {{item.uploadIcon ? 'custom-icon-uploadAdd' : ''}}"></image>
<view class="upload-text">
{{orderObj.assigneeImages.length + '/' + 9}}
</view>
</view>
</block>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{!isCompleted}}">
<view class="btn" bindtap="submit">提交</view>
</view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" multiple="{{selectMultiple}}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" labelKey="{{labelKey}}" valueKey="{{valueKey}}" height="{{selectPopupHeight}}" title="{{selectTitle}}" allowSearch="{{true}}" bindcancel="hideSelectPopup"></select-popup>
<popup bindcancel="cancel" bindconfirm="confirm" wx:if="{{dateShow}}" show="{{dateShow}}" title="时间选择" height="60vh">
<van-datetime-picker id="datePicker" show-toolbar="{{false}}" model:value="{{ currentDate }}" bind:change="onChange" bind:input="onInput" />
</popup>
import api from "~/utils/request/request.js";
// 盯防驻店销售业绩接口
export function getSupervisorStaffApi(data) {
return api.post("dj.api.supervisor.staff.performance", data, [], "/rop-dj-supervisor-mini/router");
}
// 盯防门店业绩接口
export function getSupervisorStoreApi(data) {
return api.post("dj.api.supervisor.store.performance", data, [], "/rop-dj-supervisor-mini/router");
}
// 盯防门店业绩接口
export function getSupervisorStoreByMerchantApi(data) {
return api.post("dj.api.supervisor.store.performance.by.merchant", data, [], "/rop-dj-supervisor-mini/router");
}
{
"component": true,
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-calendar": "@vant/weapp/calendar/index",
"van-picker": "@vant/weapp/picker/index"
}
}
\ No newline at end of file \ No newline at end of file
/* components/dateScreen/dateScreen.wxss */
.date-screen {
display: flex;
align-items: center;
justify-content: center;
.tab-section {
box-sizing: border-box;
width: 278rpx;
height: 56rpx;
display: flex;
align-items: center;
background: #FFFFFF;
border-radius: 56rpx;
font-size: 26rpx;
color: #999999;
padding: 4rpx;
&.isSticky {
background: #F7F8FA;
}
.tab {
flex: 1;
text-align: center;
height: 48rpx;
line-height: 48rpx;
border-radius: 48rpx;
&.active{
color: #2C66F7;
font-weight: 500;
background: #2c66f71a;
}
}
}
.date-section {
box-sizing: border-box;
height: 56rpx;
flex: 1;
max-width: calc(100% - 278rpx);
display: flex;
align-items: center;
justify-content: space-around;
.date-text {
font-size: 26rpx;
text-align: center;
width: 320rpx;
flex-shrink: 0;
}
.arrow {
width: 32rpx;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--components/dateScreen/dateScreen.wxml-->
<view class="date-screen">
<view class="tab-section {{ isSticky ? 'isSticky' : '' }}"
style="background: {{ customBackground }};"
wx:if="{{ !tabSelected || tabSelected == 3 }}">
<block wx:for="{{ dateList }}" wx:key="index">
<view class="tab {{ item.index==dateCurrent?'active':'' }}"
data-index="{{ item.index }}"
bind:tap="selectDate">
{{ item.title }}
</view>
</block>
</view>
<view class="date-section">
<view class="arrow left">
<van-icon wx:if="{{ !leftCurrent }}"
class="arrow-left"
name="arrow-left"
bind:tap="last" />
</view>
<view class="date-text" bind:tap="onDisplayDate">
{{ date }}
</view>
<view class="arrow right">
<van-icon wx:if="{{ !rightCurrent }}"
class="arrow-right"
name="arrow"
bind:tap="next" />
</view>
</view>
</view>
<!-- 年月日 -->
<block wx:if="{{ dateShow }}">
<popup bindcancel="cancel"
bindconfirm="confirm"
show="{{ dateShow }}"
title="{{ titleEnum[timeType] }}"
height="60vh">
<block wx:if="{{ timeType == 'date' || timeType == 'year-month' }}">
<van-datetime-picker id="datePicker"
show-toolbar="{{ false }}"
min-date="{{ minDate }}"
max-date="{{ maxDate }}"
model:value="{{ currentDate }}"
type="{{ timeType=='date'?'date':'year-month' }}"
bind:change="onChange"
bind:input="onInput" />
</block>
<!-- 周 -->
<block wx:if="{{ timeType == 'week' }}">
<van-picker id="weekPicker"
show-toolbar="{{ false }}"
model:value="{{ currentDate }}"
default-index="{{ defaultIndex }}"
value-key="label"
columns="{{ weekColumns }}"
bind:change="onWeekChange" />
</block>
</popup>
</block>
<block wx:if="{{ show }}">
<van-calendar id="calendar"
max-range="{{ 31 }}"
min-date="{{ minDate }}"
max-date="{{ maxDate }}"
show="{{ show }}"
type="range"
color="#2C66F7"
bind:confirm="onConfirm"
bind:close="onClose" />
</block>
// components/dateScreen/dateScreen.js
Component({
options: {
multipleSlots: true,
},
/**
* 组件的属性列表
*/
properties: {
// hideColon 是否隐藏colon , 默认false
// name : - 唯一key , 数据的键值
// label : 文案
// col : 占24分之几
// valueWidth : 值的宽度,默认为100%
// labelWidth : 标签宽度,默认为150px
// slot : 整体的插槽名,优先级高于name
// itemStyle: 每一项的样式
// tooltip: boolean 是否用tooltip 展示data数据
// tooltipProps: el-tooltip 的传参
// render ?:(h,{ data,schemaItem,schema } )=>{} 自定义渲染
// isHide 是否隐藏 (data)=>boolean || boolean
// parentProps:{
// className:'text-hide' // 默认
// },
schema: {
type: Array,
value: [],
observer: function (schema) {
const hasMore = Array.isArray(schema) && schema.some((item) => item && item.isMore);
this.setData({
hasMore,
expanded: hasMore ? this.data.expanded : false,
});
this.measureMoreHeight();
},
},
data: {
type: Object,
value: {},
},
title: {
type: String,
value: "",
},
beTap: {
type: Boolean,
value: true,
},
hideValue: {
type: String,
value: "2",
},
},
/**
* 组件的初始数据
*/
data: {
expanded: false,
hasMore: false,
moreHeight: 0,
arrowIcon: "/packageIndex/images/down-arrow-double.png",
tooltipIconPath: "/images/tips-icon.png",
},
lifetimes: {
ready() {
this.measureMoreHeight();
},
},
/**
* 组件的方法列表
*/
methods: {
onToggleMore() {
if (!this.data.hasMore) return;
if (this.data.expanded) {
this.setData({ expanded: false });
return;
}
this.measureMoreHeight(() => {
this.setData({ expanded: true });
});
},
handleTapItem() {
this.triggerEvent("tapItem", {
// item: this.data.normalizedList[nextIndex],
});
},
measureMoreHeight(done) {
wx.nextTick(() => {
const query = this.createSelectorQuery().in(this);
query.select("#moreMeasureInner").boundingClientRect();
query.exec((res) => {
const rect = res && res[0];
const height = Math.max(0, Math.round((rect && rect.height) || 0));
if (height !== this.data.moreHeight) {
this.setData({ moreHeight: height }, () => {
if (typeof done === "function") done();
});
return;
}
if (typeof done === "function") done();
});
});
},
},
});
{
"component": true,
"usingComponents": {
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index",
"van-divider": "@vant/weapp/divider/index",
"van-icon": "@vant/weapp/icon/index",
"Tooltip": "/components/tooltip/tooltip",
"VenusCol": "/components/venusCol/venusCol",
"VenusRow": "/components/venusRow/venusRow"
}
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.statistics-item-wrapper {
background-color: white;
padding: 0 0 var(--fontSize16);
box-sizing: border-box;
overflow: hidden;
border-radius: var(--fontSize24);
position: relative;
transition: background 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
&.is-tap {
&:active {
background: rgb(252, 252, 252);
}
}
.title-wrapper {
display: flex;
align-items: center;
padding: var(--fontSize16) var(--fontSize32);
border-bottom: 1px solid #eeeef0;
overflow: hidden;
.title-label-wrapper {
flex-shrink: 0;
flex: 1;
overflow: hidden;
margin-right: var(--fontSize32);
.title-label {
font-weight: 600;
font-size: var(--fontSize28);
line-height: var(--fontSize44);
color: rgba(0, 0, 0, 0.9);
}
.title-sub-label {
font-weight: 400;
font-size: var(--fontSize24);
line-height: var(--fontSize40);
color: #00000066;
&:empty + .title-sub-label__default {
display: block;
}
&__default {
display: none;
font-weight: 400;
font-size: var(--fontSize24);
line-height: var(--fontSize40);
color: #00000066;
}
}
}
.title-right-wrapper {
max-width: 60%;
display: flex;
align-items: center;
justify-content: flex-end;
overflow: hidden;
.title-right-content {
&:empty + .title-right-content__default {
display: flex;
align-items: center;
.right-item {
text-align: center;
margin-left: var(--fontSize24);
&:first-child {
margin-left: 0;
}
.value {
font-family: numberBold;
font-weight: 700;
font-style: Bold;
font-size: 20px;
line-height: 20px;
text-align: center;
color: var(--primary-color);
}
.label {
font-weight: 400;
font-size: 10px;
line-height: 16px;
text-align: center;
color: #00000042;
}
}
}
&__default {
display: none;
flex: 1;
flex-shrink: 0;
flex-basis: 0;
}
}
.arrow-right {
flex-shrink: 0;
flex-basis: 0;
margin-left: var(--fontSize32);
}
}
}
.schema-wrapper {
padding: 0 var(--fontSize32) var(--fontSize10);
box-sizing: border-box;
&.is-expanded {
padding-bottom: var(--fontSize48);
}
.grid-container {
margin-top: var(--fontSize16);
border-radius: var(--fontSize16);
overflow: hidden;
position: relative;
}
}
}
.col-wrapper {
overflow: hidden;
.item-wrapper {
background: rgba(248, 248, 248, 1);
padding: var(--fontSize16) var(--fontSize20);
overflow: hidden;
box-sizing: border-box;
width: 100%;
&.tooltip-wrapper {
.label {
display: flex;
align-items: center;
.icon {
width: 16px;
height: 16px;
margin-left: var(--fontSize8);
flex-shrink: 0;
}
}
}
.label {
font-weight: 400;
font-size: var(--fontSize24);
line-height: var(--fontSize40);
color: rgba(0, 0, 0, 0.26);
}
.value {
margin-top: var(--fontSize8);
font-family: numberNor;
font-weight: 500;
font-size: var(--fontSize32);
line-height: var(--fontSize40);
color: var(--primary-color);
min-height: var(--fontSize40);
}
}
}
.toggle-more-wrapper {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
text-align: center;
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 15%, rgba(255, 255, 255, 0.7) 30%, #ffffff 100%);
.toggle-more-content {
display: flex;
align-items: center;
justify-content: center;
padding: var(--fontSize16) 0;
color: rgba(0, 0, 0, 0.9);
font-size: var(--fontSize24);
line-height: var(--fontSize40);
.toggle-more-text {
line-height: inherit;
font-weight: 400;
font-size: var(--fontSize24);
line-height: var(--fontSize40);
color: #00000066;
}
.toggle-icon {
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: var(--fontSize4);
transform: rotate(0deg);
transition: transform 300ms ease;
&.is-expanded {
transform: rotate(-180deg);
}
}
}
}
.more-collapse {
overflow: hidden;
transition: height 300ms ease;
}
.more-inner {
overflow: hidden;
}
.more-measure {
position: absolute;
left: 0;
top: 0;
width: 100%;
visibility: hidden;
z-index: -1;
pointer-events: none;
}
<view class="statistics-item-wrapper {{ beTap ? 'is-tap' : '' }}"
bind:tap="handleTapItem">
<view class="title-wrapper">
<view class="title-label-wrapper ">
<view class="title-label text-hide">
{{ title }}
</view>
<view class="title-sub-label">
<slot name="title-sub"></slot>
</view>
<view class="title-sub-label__default text-hide"></view>
</view>
<view class="title-right-wrapper">
<view class="title-right-content">
<slot name="title-right"></slot>
</view>
<view class="title-right-content__default">
<view class="right-item"
wx:for="{{ schema }}"
wx:key="index"
wx:if="{{ item.titleInfo }}">
<view class="value">
{{ data[item.name] }}
</view>
<view class="label">
{{ item.label }}
</view>
</view>
</view>
<van-icon wx:if="{{ beTap }}"
class="arrow-right"
name="arrow" />
</view>
</view>
<view class="schema-wrapper {{ expanded ? 'is-expanded' : '' }}">
<VenusRow custom-class="grid-container " gap="4">
<VenusCol wx:for="{{ schema }}"
wx:key="index"
wx:if="{{ !item.isMore && !item.titleInfo }}"
span="{{ item.col }}"
contentSpan="{{ item.contentSpan || 24 }}"
custom-class="col-wrapper">
<Tooltip duration="{{ 2000 }}"
wx:if="{{ item.tips }}"
placement="top"
content="{{ item.tips }}">
<view class="item-wrapper tooltip-wrapper" style="{{ item.style }}">
<view class="label text-hide ">
{{ item.label }}
<image class="icon"
src="{{ tooltipIconPath }}"
mode="aspectFit" />
</view>
<view class="value text-hide ">
{{ data[item.name] }}
</view>
</view>
</Tooltip>
<view wx:else
class="item-wrapper"
style="{{ item.style }}">
<view class="label text-hide ">
{{ item.label }}
</view>
<view class="value text-hide ">
{{ data[item.name] }}
</view>
</view>
</VenusCol>
<VenusCol wx:for="{{ schema }}"
wx:key="index"
wx:if="{{ item.isMore }}"
span="{{ item.col }}"
contentSpan="{{ item.contentSpan || 24 }}"
custom-class="col-wrapper">
<view class="more-collapse"
style="height: {{ expanded ? (moreHeight + 'px') : '0px' }};">
<view id="moreInner" class="more-inner">
<view class="item-wrapper" style="{{ item.style }}">
<view class="label text-hide ">
{{ item.label }}
</view>
<view class="value text-hide ">
{{ data[item.name] }}
</view>
</view>
</view>
</view>
</VenusCol>
</VenusRow>
<VenusRow custom-class="more-measure" gap="4">
<VenusCol wx:for="{{ schema }}"
wx:key="index"
wx:if="{{ item.isMore }}"
span="{{ item.col }}"
contentSpan="{{ item.contentSpan || 24 }}"
custom-class="col-wrapper">
<view id="moreMeasureInner" class="more-inner">
<view class="item-wrapper" style="{{ item.style }}">
<view class="label text-hide ">
{{ item.label }}
</view>
<view class="value text-hide ">
{{ data[item.name] || item.emptyValue || '0' }}
</view>
</view>
</view>
</VenusCol>
</VenusRow>
<view class="toggle-more-wrapper"
catch:tap="onToggleMore"
wx:if="{{ hasMore }}">
<view class="toggle-more-content">
<view class="toggle-more-text">
{{ expanded ? '收起':'已隐藏' }} {{ hideValue }} 项售后成交指标
</view>
<image class="toggle-icon {{ expanded ? 'is-expanded' : '' }}"
src="{{ arrowIcon }}"
mode="aspectFit" />
</view>
</view>
</view>
<!-- <van-row custom-class="container {{ expanded ? 'is-expanded' : '' }}">
<van-col wx:for="{{ schema }}"
wx:key="index"
wx:if="{{ !item.isMore }}"
span="{{ item.col }}"
custom-class="col-wrapper">
<Tooltip duration="{{ 2000 }}"
placement="top"
content="asdasd">
<view class="item-wrapper" style="{{ item.style }}">
<view class="label text-hide ">
{{ item.label }}
</view>
<view class="value text-hide ">
{{ item.name }}
</view>
</view>
</Tooltip>
</van-col>
<van-col span="24" wx:if="{{ hasMore }}">
<view class="more-collapse"
style="height: {{ expanded ? (moreHeight + 'px') : '0px' }};">
<view id="moreInner" class="more-inner">
<van-row gutter="4">
<van-col wx:for="{{ schema }}"
wx:key="index"
wx:if="{{ item.isMore }}"
span="{{ item.col }}"
custom-class="col-wrapper">
<view class="item-wrapper" style="{{ item.style }}">
<view class="label text-hide ">
{{ item.label }}
</view>
<view class="value text-hide ">
{{ item.name }}
</view>
</view>
</van-col>
</van-row>
</view>
</view>
<view class="more-measure">
<view id="moreMeasureInner" class="more-inner">
<van-row>
<van-col wx:for="{{ schema }}"
wx:key="index"
wx:if="{{ item.isMore }}"
span="{{ item.col }}"
custom-class="col-wrapper">
<view class="item-wrapper" style="{{ item.style }}">
<view class="label text-hide ">
{{ item.label }}
</view>
<view class="value text-hide ">
{{ item.name }}
</view>
</view>
</van-col>
</van-row>
</view>
</view>
</van-col>
<view class="toggle-more-wrapper"
catch:tap="onToggleMore"
wx:if="{{ hasMore }}">
<view class="toggle-more-content">
<view class="toggle-more-text">
查看更多
</view>
<van-icon name="play"
size="12px"
color="#A2A6B1"
custom-class="toggle-icon {{ expanded ? 'is-expanded' : '' }}" />
</view>
</view>
</van-row> -->
</view>
// components/dateScreen/dateScreen.js
Component({
options: {
multipleSlots: true,
},
/**
* 组件的属性列表
*/
properties: {
// hideColon 是否隐藏colon , 默认false
// name : - 唯一key , 数据的键值
// label : 文案
// col : 占24分之几
// valueWidth : 值的宽度,默认为100%
// labelWidth : 标签宽度,默认为150px
// slot : 整体的插槽名,优先级高于name
// itemStyle: 每一项的样式
// tooltip: boolean 是否用tooltip 展示data数据
// tooltipProps: el-tooltip 的传参
// render ?:(h,{ data,schemaItem,schema } )=>{} 自定义渲染
// isHide 是否隐藏 (data)=>boolean || boolean
// parentProps:{
// className:'text-hide' // 默认
// },
itemSchemaList: {},
title: {},
itemTitleKey: {
type: String,
value: "employeeName",
},
list: {
type: Array,
value: [],
},
},
lifetimes: {
ready() {},
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
handleTapItem() {
this.triggerEvent("tapItem", {});
},
},
});
{
"component": true,
"usingComponents": {
"StatisticsItem": "../statisticsItem/statisticsItem"
}
}
.statisticsList-wrapper {
.title-wrapper {
font-weight: 400;
font-size: var(--fontSize28);
line-height: var(--fontSize28);
padding: var(--fontSize16) var(--fontSize24);
}
.container-wrapper {
padding: 0 var(--fontSize24) var(--fontSize16);
.item-wrapper {
margin-bottom: 8px;
}
}
}
<view class="statisticsList-wrapper">
<view class="title-wrapper">
{{ title }}
</view>
<view class="container-wrapper">
<view class="item-wrapper"
wx:for="{{ list }}"
wx:key="index">
<StatisticsItem data="{{ item }}"
title="{{ item[itemTitleKey] }}"
bind:tapItem="handleTapItem"
schema="{{ itemSchemaList }}" />
</view>
</view>
</view>
// components/dateScreen/dateScreen.js
Component({
/**
* 组件的属性列表
*/
properties: {
list: {
type: Array,
value: [],
observer: function () {
this.syncFromProps();
},
},
value: {
type: null,
value: null,
observer: function () {
this.syncFromProps();
},
},
},
lifetimes: {
ready() {
this.syncFromProps();
},
},
/**
* 组件的初始数据
*/
data: {
normalizedList: [],
activeKey: null,
activeIndex: 0,
sliderX: 0,
sliderWidth: 0,
scrollIntoView: "",
},
/**
* 组件的方法列表
*/
methods: {
syncFromProps() {
const normalizedList = this.normalizeList(this.properties.list);
let activeKey = this.getValidActiveKey({
normalizedList,
value: this.properties.value,
prevActiveKey: this.data.activeKey,
});
const activeIndex = this.getIndexByKey(normalizedList, activeKey);
const shouldAutoScroll = normalizedList.length > 2;
this.setData(
{
normalizedList,
activeKey,
activeIndex,
scrollIntoView: shouldAutoScroll && activeIndex > -1 ? `type-tab-${activeIndex}` : "",
},
() => {
this.updateSlider();
},
);
},
normalizeList(list) {
if (!Array.isArray(list)) return [];
return list
.map((raw) => {
const item = raw || {};
const key = item.key ?? item.value ?? item.id ?? (item.label && typeof item.label === "object" ? (item.label.key ?? item.label.value) : undefined);
const label = typeof item.label === "object" ? (item.label.text ?? item.label.name ?? item.label.label ?? item.label.value ?? item.label.key) : (item.label ?? item.text ?? item.name ?? "");
return {
icon: item.icon || "",
key,
label: label == null ? "" : String(label),
showIconOnActiveOnly: Boolean(item.showIconOnActiveOnly),
};
})
.filter((it) => it.key !== undefined && it.key !== null)
.map((it) => ({
...it,
key: String(it.key),
}));
},
getValidActiveKey({ normalizedList, value, prevActiveKey }) {
const keys = normalizedList.map((it) => it.key);
const val = value === undefined || value === null ? null : String(value);
if (val != null && keys.includes(val)) return val;
if (prevActiveKey != null && keys.includes(String(prevActiveKey))) return String(prevActiveKey);
return normalizedList[0]?.key ?? null;
},
getIndexByKey(normalizedList, key) {
if (!normalizedList?.length || key == null) return 0;
const idx = normalizedList.findIndex((it) => it.key === String(key));
return idx > -1 ? idx : 0;
},
onTap(e) {
const { key, index } = e.currentTarget.dataset || {};
const nextKey = key == null ? null : String(key);
if (!nextKey || nextKey === this.data.activeKey) return;
const nextIndex = Number(index) || 0;
const shouldAutoScroll = this.data.normalizedList.length > 2;
this.setData(
{
activeKey: nextKey,
activeIndex: nextIndex,
scrollIntoView: shouldAutoScroll ? `type-tab-${nextIndex}` : "",
},
() => {
this.updateSlider();
this.triggerEvent("change", {
key: nextKey,
index: nextIndex,
item: this.data.normalizedList[nextIndex],
});
},
);
},
updateSlider() {
if (!this.data.normalizedList.length) {
this.setData({ sliderX: 0, sliderWidth: 0 });
return;
}
const activeIndex = this.data.activeIndex || 0;
const tabSelector = `#type-tab-${activeIndex}`;
const containerSelector = "#tabsInner";
this.getViewInfo(containerSelector, (container) => {
if (!container) return;
this.getViewInfo(tabSelector, (tab) => {
if (!tab) return;
const sliderX = tab.left - container.left;
const sliderWidth = tab.width;
this.setData({ sliderX, sliderWidth });
});
});
},
getViewInfo(selector, cb) {
const query = wx.createSelectorQuery().in(this);
query
.select(selector)
.boundingClientRect((res) => {
cb && cb(res);
})
.exec();
},
},
});
{
"component": true,
"usingComponents": {}
}
.tabs-wrapper {
width: 100%;
box-sizing: border-box;
}
.tabs-inner {
position: relative;
display: flex;
align-items: center;
padding: var(--fontSize6);
min-width: 100%;
width: fit-content;
box-sizing: border-box;
border-radius: var(--fontSize48);
overflow: hidden;
}
.tabs-bg {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: var(--fontSize48);
pointer-events: none;
}
.slider {
position: absolute;
top: var(--fontSize6);
bottom: var(--fontSize6);
left: 0;
border-radius: var(--fontSize48);
background-color: var(--primary-color);
z-index: 1;
transition:
transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1),
width 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
will-change: transform, width;
pointer-events: none;
}
.tab-item {
position: relative;
padding: var(--fontSize12) var(--fontSize28);
border-radius: var(--fontSize48);
display: flex;
align-items: center;
justify-content: center;
white-space: nowrap;
color: #222222;
background: rgba(243, 243, 244, 1);
transition: color 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
&.is-active {
color: #ffffff;
}
.icon {
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: var(--fontSize12);
flex-shrink: 0;
position: relative;
z-index: 2;
}
.label {
line-height: var(--fontSize40);
font-size: var(--fontSize26);
transition: color 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
position: relative;
z-index: 2;
}
}
.tab-item + .tab-item {
margin-left: var(--fontSize12);
}
<!--components/dateScreen/dateScreen.wxml-->
<scroll-view class="tabs-wrapper"
scroll-x
show-scrollbar="{{ false }}"
scroll-with-animation
scroll-into-view="{{ scrollIntoView }}">
<view class="tabs-inner" id="tabsInner">
<view class="tabs-bg" />
<view class="slider"
wx:if="{{ normalizedList.length }}"
style="width: {{ sliderWidth }}px; transform: translate3d({{ sliderX }}px, 0, 0);" />
<block wx:for="{{ normalizedList }}" wx:key="key">
<view class="tab-item {{ activeKey === item.key ? 'is-active' : '' }}"
id="type-tab-{{ index }}"
data-index="{{ index }}"
data-key="{{ item.key }}"
bind:tap="onTap">
<image class="icon"
src="{{ item.icon }}"
mode="aspectFit"
wx:if="{{ item.icon && (!item.showIconOnActiveOnly || activeKey === item.key) }}" />
<view class="label">
{{ item.label }}
</view>
</view>
</block>
</view>
</scroll-view>
import { storeWarnList } from "~/packageIndex/constant/performance.js";
const DEFAULT_WARN_STYLE = "color: #FA8C16; background: rgba(250, 140, 22, 0.12);";
function keyBy(list, key) {
return (Array.isArray(list) ? list : []).reduce((result, item) => {
const targetKey = item && item[key];
if (targetKey === undefined || targetKey === null || targetKey === "") {
return result;
}
result[targetKey] = item;
return result;
}, {});
}
const storeWarnMap = keyBy(storeWarnList, "key");
Component({
/**
* 组件的属性列表
*/
properties: {
list: {
type: Array,
value: [],
observer: function (list) {
this.updateWarnItems(list);
},
},
},
lifetimes: {
attached() {
this.updateWarnItems(this.data.list);
},
},
/**
* 组件的初始数据
*/
data: {
warnItems: [],
},
/**
* 组件的方法列表
*/
methods: {
updateWarnItems(list) {
const warnItems = (Array.isArray(list) ? list : [])
.map((warn) => {
const warnKey = String(warn);
const warnConfig = storeWarnMap[warnKey] || {};
return {
key: warnKey,
label: warnConfig.label || warnKey,
style: warnConfig.style || DEFAULT_WARN_STYLE,
};
})
.filter((item) => item.label);
this.setData({
warnItems,
});
},
},
});
{
"component": true,
"usingComponents": {}
}
.warn-wrapper {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.warn-item {
margin-right: var(--fontSize12);
padding: var(--fontSize4) var(--fontSize8);
border-radius: var(--fontSize6);
font-weight: 400;
font-size: var(--fontSize16);
line-height: var(--fontSize24);
text-align: center;
box-sizing: border-box;
}
<view wx:if="{{ warnItems.length }}" class="warn-wrapper">
<view class="warn-item"
wx:for="{{ warnItems }}"
wx:key="key"
style="{{ item.style }}">
{{ item.label }}
</view>
</view>
export const brandTypeList = [
{
showIconOnActiveOnly: true,
icon: "/packageIndex/images/brand-tabs-icon.png",
key: "1",
label: "问界鸿蒙-延保权益",
},
{
showIconOnActiveOnly: true,
icon: "/packageIndex/images/brand-tabs-icon.png",
key: "2",
label: "通用品牌-延保权益",
},
];
export const storeWarnList = [
{
key: 2,
label: "兜底",
style: "background-color:#FFF5E7;color:#FF9D0A",
},
{
key: 3,
label: "生态",
style: "color:#F24724;background-color:#FEECE8",
},
{
key: 4,
label: "红色",
style: "background-color:#EE3140;color:white",
},
{
key: 5,
label: "黄色",
style: "background-color:#FF9D0A;color:white",
},
];
export const staticInfoList = [
{
key: "greenStoreCount",
background: "linear-gradient(90deg, #42CCCF 0%, #36D9A5 100%)",
label: "达标门店数",
},
{
key: "yellowStoreCount",
background: "linear-gradient(90deg, #7552FF 0%, #977DFF 100%)",
label: "需关注门店数",
},
{
key: "redStoreCount",
background: "linear-gradient(90deg, #3D76FC 0%, #4DA6FF 100%)",
label: "预警门店数",
},
];
import api from '~/api/index/index'
import dayjs from 'dayjs'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
Page({
data: {
IMG_URL,
navBarHeight: 84,
statusMap: {
0: { name: '待完成', color: '#2C66F7', background: '#2c66f71a' },
1: { name: '已完成', color: '#35C376', background: '#35c3761a' }
},
list: [],
total: 0,
pageNum: 1,
pageSize: 10,
nothing: false,
flag: false
},
navbarReady(e) {
const navBarHeight = e.detail?.height
if (!navBarHeight) return
this.setData({ navBarHeight })
},
onLoad() {
this.reload()
},
onShow() {},
reload() {
this.setData(
{
list: [],
total: 0,
pageNum: 1,
nothing: false,
flag: false
},
() => {
this.getList(true)
}
)
},
onBottom() {
this.getList()
},
getList(reload) {
const { pageNum, pageSize, nothing } = this.data
if (nothing) return
const params = {
pageNum,
pageSize
}
wx.$util.showLoading()
api
.getSpecialTaskList(params)
.then(res => {
wx.$util.hideLoading()
const { code, data, message } = res || {}
if (code != 0) {
wx.$util.showToast(message || '加载失败')
this.setData({ flag: true })
return
}
const pageList = Array.isArray(data?.list) ? data.list : []
pageList.forEach(val => {
val.completeTime = val.completeTime ? dayjs(val.completeTime).format('YYYY-MM-DD HH:mm:ss') : ''
})
const nextList = reload ? pageList : this.data.list.concat(pageList)
const total = data?.total || 0
const isNothing = pageNum == data?.pages
this.setData({
list: nextList,
total,
pageNum: pageNum + 1,
nothing: !!isNothing,
flag: true
})
})
.catch(() => {
wx.$util.hideLoading()
this.setData({ flag: true })
})
},
viewDetail(e) {
const item = e.currentTarget?.dataset?.item || {}
wx.navigateTo({
url: `/packageIndex/pages/specialTaskApply/specialTaskApply?id=${item.id}`
})
},
goCreate() {
wx.navigateTo({
url: '/packageIndex/pages/specialTaskApply/specialTaskApply'
})
},
back() {
wx.navigateBack()
}
})
{
"usingComponents": {},
"navigationStyle": "custom"
}
page {
background: #F2F3F7;
}
.page-title {
font-size: var(--fontSize34);
color: #222222;
font-weight: 600;
}
.container {
height: 100vh;
box-sizing: border-box;
}
.count {
padding: 16rpx 24rpx;
font-size: 24rpx;
color: #999999;
}
.list {
padding: 0 24rpx 24rpx;
box-sizing: border-box;
}
.item {
border-radius: 24rpx;
background: #FFFFFF;
padding: 24rpx;
margin-bottom: 24rpx;
box-sizing: border-box;
}
.item-top {
display: flex;
align-items: center;
}
.status {
font-size: 22rpx;
padding: 8rpx 12rpx;
border-radius: 8rpx;
flex-shrink: 0;
}
.name {
margin-left: 12rpx;
font-size: 28rpx;
font-weight: 500;
color: #222222;
flex: 1 1 auto;
min-width: 0;
}
.btn {
flex: 0 0 auto;
text-align: center;
padding: 12rpx 34rpx;
border-radius: 60rpx;
color: #2C66F7;
font-size: 26rpx;
font-weight: 500;
background: #2c66f71a;
box-sizing: border-box;
}
.item-actions {
margin-top: 24rpx;
display: flex;
justify-content: flex-end;
}
.row {
margin-top: 24rpx;
display: flex;
align-items: center;
font-size: 24rpx;
color: #999999;
}
.icon {
margin-right: 8rpx;
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
}
.label {
flex: 0 0 auto;
}
.value {
flex: 1 1 auto;
min-width: 0;
}
.list-nothing {
text-align: center;
color: #999999;
font-size: 24rpx;
padding: 24rpx 0;
}
<navigation-bar
bindnavbarReady="navbarReady"
class="navigation-header"
showBack
bindback="back"
navStyle="background-color: #FFFFFF;box-shadow:none;"
>
<view class="page-title">我发起的专项任务</view>
</navigation-bar>
<scroll-view
scroll-y
class="container"
enhanced="{{true}}"
show-scrollbar="{{false}}"
style="padding-top: {{navBarHeight}}px;padding-bottom: 40rpx;"
bindscrolltolower="onBottom"
>
<view class="count">共{{ total || 0 }}条任务</view>
<view class="list">
<block wx:for="{{ list }}" wx:key="id">
<view class="item">
<view class="item-top">
<view
class="status text-center"
style="color: {{statusMap[item.taskStatus].color}}; background-color: {{statusMap[item.taskStatus].background}};"
>
{{statusMap[item.taskStatus].name}}
</view>
<view class="name text-hide">{{ item.categoryName || '-' }}</view>
</view>
<view class="row" wx:if="{{ item.merchantName }}">
<image class="icon" src="{{IMG_URL}}special-task-merchant.png" mode="" />
<view class="label">归属门店:</view>
<view class="value text-hide">{{ item.merchantName }}</view>
</view>
<view class="row" wx:if="{{ item.regionOperatorName }}">
<image class="icon" src="{{IMG_URL}}special-task-staff.png" mode="" />
<view class="label">指定区域运营:</view>
<view class="value text-hide">{{ item.regionOperatorName || '-' }}</view>
</view>
<view class="row" wx:if="{{ item.taskStatus == 1 }}">
<image class="icon" src="{{IMG_URL}}time-icon.png" mode="" />
<view class="label">完成时间:</view>
<view class="value">{{ item.completeTime || '-' }}</view>
</view>
<view class="item-actions">
<view class="btn" bindtap="viewDetail" data-item="{{ item }}">查看</view>
</view>
</view>
</block>
<view class="list-nothing" wx:if="{{ nothing && list.length }}">到底了~</view>
<empty-data wx:if="{{ flag && !list.length }}" />
</view>
</scroll-view>
{
"usingComponents": {
"select-popup": "/components/selectPopup/selectPopup"
},
"navigationStyle": "custom"
}
page {
background: #F2F3F7;
}
.page-title {
font-size: var(--fontSize34);
color: #222222;
font-weight: 600;
}
.required {
color: #F24724;
margin-left: 8rpx;
}
.container {
height: 100vh;
box-sizing: border-box;
width: calc(100% - 48rpx);
margin: 0 24rpx;
}
.box {
border-radius: 32rpx;
background: #FFFFFF;
padding: 32rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
&.padding-0 {
padding: 0;
}
}
.item-box {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
box-sizing: border-box;
.label {
color: #292D33;
flex: 0 0 auto;
}
.value {
display: flex;
align-items: center;
justify-content: flex-end;
width: calc(100% - 158rpx);
min-width: 0;
image {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
transform: rotate(-90deg)
}
}
.value-text {
text-align: right;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #292D33;
}
.placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
}
.value_box {
flex: 1 1 auto;
min-width: 0;
display: flex;
justify-content: flex-end;
gap: 24rpx;
.radio-box {
display: flex;
align-items: center;
gap: 10rpx;
.radio-icon {
width: 32rpx;
height: 32rpx;
}
.circle {
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 2rpx solid #D9DDE3;
box-sizing: border-box;
}
.text {
color: #292D33;
font-size: 28rpx;
}
}
}
.multi-select {
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.multi-select__header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.multi-select__label {
color: #292D33;
}
.multi-select__arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
.multi-select__body {
margin-bottom: 12rpx;
}
.multi-placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
}
.multi-tags {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.multi-tag {
display: inline-flex;
align-items: center;
max-width: 100%;
padding: 0 12rpx;
height: 44rpx;
border-radius: 8rpx;
background: #F6F7F9;
border: 2rpx solid #E6E8EC;
box-sizing: border-box;
}
.multi-tag__text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
color: #292D33;
}
.multi-tag__close {
margin-left: 16rpx;
color: #999EA8;
font-size: 32rpx;
line-height: 1;
}
.remark_box {
height: 382rpx;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
border-bottom: none;
.label {
margin: 28rpx 0;
width: 100%;
}
.textArea_box {
box-sizing: border-box;
width: 100%;
border-radius: 16rpx;
padding: 24rpx 24rpx 42rpx;
background: #FFFFFF;
border: 2rpx solid #eff0f2;
height: 262rpx;
position: relative;
font-size: 28rpx;
.textarea {
height: 100%;
width: 100%;
}
.currentWordNumber {
position: absolute;
right: 26rpx;
bottom: 8rpx;
color: #CCCCCC;
}
}
}
.footer-btn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
<glsx-privacy appletName="嘀加门店管理助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar
bindnavbarReady="navbarReady"
class="navigation-header"
showBack="{{true}}"
bindback="back"
navStyle="background-color: transparent;box-shadow:none;"
>
<view class="page-title">{{ pageTitle }}</view>
</navigation-bar>
<scroll-view
class="container"
scroll-y
show-scrollbar="{{false}}"
enhanced
style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{ readonly ? '0' : (isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx') }};"
>
<view style="width: 100%;height: 8rpx;"></view>
<view class="box padding-0">
<view class="item-box" bindtap="openbizType">
<view class="label">任务类型<text class="required">*</text></view>
<view class="value">
<text wx:if="{{ form.categoryName }}" class="value-text">{{ form.categoryName }}</text>
<text wx:else class="placeholder">点击选择</text>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="" />
</view>
</view>
<view class="item-box" bindtap="openMerchant">
<view class="label">归属门店<text class="required">*</text></view>
<view class="value">
<text wx:if="{{ form.merchantName }}" class="value-text">{{ form.merchantName }}</text>
<text wx:else class="placeholder">点击选择</text>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="" />
</view>
</view>
<view class="item-box">
<view class="label">归属业务<text class="required">*</text></view>
<view class="value_box">
<view class="radio-box" wx:for="{{ businessList }}" wx:key="value" bindtap="changeBusiness" data-value="{{ item.value }}">
<image wx:if="{{ form.businessType == item.value }}" class="radio-icon" src="{{IMG_URL}}radio-checked.png" mode="" />
<view wx:else class="circle" style="background: {{readonly ? '#EEE' : ''}};"></view>
<view class="text">{{ item.label }}</view>
</view>
</view>
</view>
<view class="multi-select" wx:if="{{ form.bizType == 'staff-replace-access' }}">
<view class="multi-select__header">
<view class="multi-select__label">问题驻店销售<text class="required">*</text></view>
<view bindtap="openProblemSales" style="display: flex;align-items: center;">
<text class="multi-placeholder" wx:if="{{ !readonly }}">点击选择(可多选)</text>
<image class="multi-select__arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="aspectFit" />
</view>
</view>
<view class="multi-select__body" wx:if="{{ form.problemStaffList && form.problemStaffList.length }}">
<view class="multi-tags">
<block wx:for="{{ form.problemStaffList }}" wx:key="phone">
<view class="multi-tag">
<text class="multi-tag__text" style="max-width: {{ readonly ? '100%' : 'calc(100% - 36rpx)'}};">{{ item.name || item.staffName || item.participantName || '-' }}</text>
<text class="multi-tag__close" wx:if="{{ !readonly }}" catchtap="removeProblemSales" data-index="{{ index }}">×</text>
</view>
</block>
</view>
</view>
</view>
<view class="item-box" bindtap="openOperator">
<view class="label">指定区域运营<text class="required">*</text></view>
<view class="value">
<text wx:if="{{ form.regionOperatorName }}" class="value-text">{{ form.regionOperatorName }}</text>
<text wx:else class="placeholder">点击选择</text>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="" />
</view>
</view>
<view class="item-box remark_box">
<view class="label">任务事项描述<text class="required">*</text></view>
<view class="textArea_box">
<textarea
placeholder-style="color: #999EA8;"
disabled="{{ readonly }}"
value="{{ form.description }}"
maxlength="500"
placeholder="请输入"
class="textarea"
bindinput="descriptionInput"
/>
<view class="currentWordNumber">{{ descriptionLength || 0 }} / 500</view>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{ !readonly }}">
<view class="btn" bindtap="submit">提交</view>
</view>
<select-popup
show="{{ showSelectPopup }}"
options="{{ selectOptions }}"
multiple="{{ selectMultiple }}"
values="{{ selectValues }}"
value="{{ selectValue }}"
bindconfirm="handlePopupConfirm"
bindcancel="hideSelectPopup"
labelKey="{{ labelKey }}"
valueKey="{{ valueKey }}"
height="{{ selectPopupHeight }}"
title="{{ selectTitle }}"
allowSearch="{{ allowSearch }}"
/>
export const brandTypeList = [
{
showIconOnActiveOnly: true,
icon: "/packageIndex/images/brand-tabs-icon.png",
key: "1",
label: "问界鸿蒙-延保权益",
},
{
showIconOnActiveOnly: true,
icon: "/packageIndex/images/brand-tabs-icon.png",
key: "2",
label: "通用品牌-延保权益",
},
];
export const schemaList = [
{
name: "displayDeliveryCount",
label: "交付数",
col: 8,
titleInfo: true,
emptyValue: "0",
},
{
name: "displayPreSalesTouchCount",
label: "触客数",
col: 8,
titleInfo: true,
emptyValue: "0",
},
{
name: "displayTotalOutput",
label: "总产值(万)",
col: 8,
titleInfo: true,
emptyValue: "0",
},
{
name: "displayVehicleWarrantyRate",
label: "整车延保",
col: 8,
tips: "整车延保触客转化率",
emptyValue: "0%",
},
{
name: "displayPeaceOfMindRate",
label: "安心包",
col: 6,
tips: "安心包触客转化率",
emptyValue: "0%",
},
{
name: "displayBatteryWarrantyRate",
label: "电池",
col: 5,
tips: "电池延保触客转化率",
emptyValue: "0%",
},
{
name: "displayTireInsuranceRate",
label: "轮胎",
col: 5,
tips: "轮胎险触客转化率",
emptyValue: "0%",
},
{
name: "displayVehicleWarrantyAfterSalesRate",
label: "整车延保售后成交/总成交",
col: 12,
emptyValue: "0/0",
},
{
name: "displayPeaceOfMindAfterSalesRate",
label: "安心包售后成交/总成交",
col: 12,
emptyValue: "0/0",
},
{
name: "displayBatteryAfterSalesRate",
label: "电池售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
{
name: "displayTireInsuranceAfterSalesRate",
label: "轮胎售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
];
export const schemaCommonBrandList = [
{
name: "displayDeliveryCount",
label: "交付数",
col: 8,
titleInfo: true,
emptyValue: "0",
},
{
name: "displayPreSalesTouchCount",
label: "触客数",
col: 8,
titleInfo: true,
emptyValue: "0",
},
{
name: "displayTotalOutput",
label: "总产值(万)",
col: 8,
titleInfo: true,
emptyValue: "0",
},
{
name: "displayTouchConversionRate",
label: "触客成交率",
col: 7,
emptyValue: "0%",
},
{
name: "displayWarrantyRate",
label: "延保",
col: 5,
tips: "延保触客转化率",
emptyValue: "0%",
},
{
name: "displayEquityProductRate",
label: "权益商品",
col: 7,
tips: "权益商品触客转化率",
emptyValue: "0%",
},
{
name: "displayEquityRate",
label: "权益",
col: 5,
tips: "权益触客转化率",
emptyValue: "0%",
},
{
name: "displayWarrantyAfterSalesRate",
label: "延保售后成交/总成交",
col: 12,
emptyValue: "0/0",
},
{
name: "displayEquityProductAfterSalesRate",
label: "权益商品售后成交/总成交",
col: 12,
emptyValue: "0/0",
},
{
name: "displayEquityAfterSalesRate",
label: "权益售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
{
name: "displayEquityAvgUnitPrice",
label: "权益平均客单价(元)",
col: 12,
isMore: true,
emptyValue: "0",
},
];
import { schemaList, schemaCommonBrandList } from "./stationStaffPerformance.data.js";
import { brandTypeList } from "~/packageIndex/constant/performance.js";
import { getSupervisorStaffApi, getSupervisorStoreByMerchantApi } from "~/packageIndex/api/performance.js";
const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/";
import dayjs from "dayjs";
Page({
data: {
IMG_URL,
pageTitle: "驻店人员业绩列表",
merchantName: undefined,
navBarHeight: 84,
brandTypeList: [],
schemaList: [],
originList: [],
list: [],
query: {
statDimension: "1",
dateType: 0,
filterKey: "",
merchantId: undefined,
},
},
navbarReady(e) {
this.setData({
navBarHeight: e.detail.height,
});
},
onRoute(options) {
wx.$track.setTrackData(0, "data_guard_view_stationed_sales_list", {}, "");
console.log("options", options);
if (options.merchantId && options.merchantName) {
if (options.pageTitle) {
this.setData({
pageTitle: options.pageTitle,
});
}
const query = options?.query || {};
this.setData({
brandTypeList: [
{
key: query.statDimension,
label: `${query.statDimension === "1" ? "问界鸿蒙" : "通用品牌"}-${options.merchantName}`,
},
],
schemaList: String(query.statDimension) === "1" ? schemaList : schemaCommonBrandList,
merchantName: options.merchantName,
query: {
...this.data.query,
...query,
dateType: Number(query.dateType),
merchantId: options.merchantId,
},
});
return;
}
this.setData({
brandTypeList: wx.$util.deepClone(brandTypeList),
schemaList: schemaList,
query: {
...this.data.query,
dateType: 0,
startDate: dayjs().startOf("day").format("YYYY-MM-DD"),
endDate: dayjs().endOf("day").format("YYYY-MM-DD"),
},
});
},
// onLoad(options) {
// console.log("options", options);
// },
onReady() {},
onShow() {},
filterData(list) {
if (!this.data.query.filterKey.trim()) {
return list || this.data.originList;
}
return (list || this.data.originList).filter((item) => item?.employeeName?.includes(this.data.query.filterKey));
},
async getData() {
wx.$util.showLoading();
this.setData({
originList: [],
list: [],
});
try {
let userInfo = wx.$util.getUserInfo();
const api = this.data.query.merchantId ? getSupervisorStoreByMerchantApi : getSupervisorStaffApi;
const { data } = await api({
supervisorId: userInfo.uuid,
...this.data.query,
});
this.setData({
originList: data,
list: this.filterData(data),
});
} finally {
wx.$util.hideLoading();
}
},
async handleBrandTabChange({ detail }) {
const schemaLists = String(detail.key) === "1" ? schemaList : schemaCommonBrandList;
this.setData({
schemaList: schemaLists,
query: {
...this.data.query,
statDimension: detail.key,
},
});
await this.getData();
},
async handleSearch({ detail }) {
console.log("handleSearch");
this.setData({
query: {
...this.data.query,
startDate: detail.startDay?.replace(/\//g, "-"),
endDate: detail.endDay?.replace(/\//g, "-"),
dateType: detail.timeDimension,
},
});
await this.getData();
},
handleFilterKeyChange({ detail }) {
wx.$util.showLoading();
this.setData({
query: {
...this.data.query,
filterKey: detail,
},
});
this.setData(
{
list: this.filterData(),
},
function () {
wx.$util.hideLoading();
},
);
},
handleTapItem() {},
handleBack() {
wx.navigateBack();
},
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
async onPullDownRefresh() {
try {
await this.getData();
} finally {
wx.stopPullDownRefresh();
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});
{
"usingComponents": {
"TypeTabs": "/packageIndex/components/typeTabs/typeTabs",
"StatisticsItem": "/packageIndex/components/statisticsItem/statisticsItem",
"date-screen": "/packageIndex/components/dateScreen/dateScreen",
"van-search": "@vant/weapp/search/index"
},
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
/* packageIndex/pages/specialTask/specialTask.wxss */
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
page {
background: #f2f3f7;
height: 100%;
.filter-wrapper {
background-color: white;
.tab-wrapper {
padding: var(--fontSize12) var(--fontSize24);
}
.date-filter-wrapper {
padding: var(--fontSize16) var(--fontSize24);
}
.search-input-wrapper {
padding: var(--fontSize16) var(--fontSize24);
width: 100%;
overflow: hidden;
box-sizing: border-box;
}
}
.list-wrapper {
padding: 0 var(--fontSize24) var(--fontSize16);
.title-wrapper {
font-weight: 400;
font-size: var(--fontSize28);
line-height: var(--fontSize28);
color: #000000e5;
padding: var(--fontSize16) 0;
}
.item-wrapper {
margin-bottom: var(--fontSize16);
.title-sub-wrapper {
font-weight: 400;
font-size: var(--fontSize24);
line-height: var(--fontSize40);
margin-right: var(--fontSize16);
}
}
.last-tips {
padding: var(--fontSize30) 0;
text-align: center;
font-size: var(--fontSize24);
color: #999999;
}
}
}
<!--packageIndex/pages/specialTask/specialTask.wxml-->
<navigation-bar bind:navbarReady="navbarReady"
class="navigation-header"
showBack
bind:back="handleBack"
navStyle="background-color: white;box-shadow:none;">
<view class="page-title">
{{ pageTitle }}
</view>
</navigation-bar>
<scroll-view scroll-y
class="container"
style="padding-top: calc({{ navBarHeight }}px);">
<view class="filter-wrapper">
<view class="tab-wrapper">
<TypeTabs bind:change="handleBrandTabChange"
list="{{ brandTypeList }}"
value="{{ query.statDimension }}" />
</view>
<view class="date-filter-wrapper">
<date-screen customBackground="#f3f3f4"
tabSelected="{{ 3 }}"
init-start-date="{{ query.startDate }}"
init-end-date="{{ query.endDate }}"
init-time-dimension="{{ query.dateType }}"
bind:search="handleSearch"></date-screen>
</view>
<van-search value="{{ query.filterKey }}"
shape="round"
custom-class="search-input-wrapper"
background="#fff"
bind:change="handleFilterKeyChange"
placeholder="搜索驻店销售姓名..." />
</view>
<view class="list-wrapper">
<view class="title-wrapper">
驻店列表
</view>
<block wx:if="{{ list && list.length > 0 }}">
<view class="item-wrapper"
wx:for="{{ list }}"
wx:key="index">
<StatisticsItem title="{{ item.employeeName }}"
data="{{ item }}"
beTap="{{ false }}"
schema="{{ schemaList }}">
<view slot="title-sub"
class="title-sub-wrapper text-hide"
wx:if="{{ item.merchantName }}">
{{ item.merchantName }}
</view>
</StatisticsItem>
</view>
<view class="last-tips">
到底了~
</view>
</block>
<block wx:else>
<empty-data />
</block>
</view>
</scroll-view>
export const schemaList = [
{
name: "displayTotalOutput",
label: "总产值(万)",
col: 8,
emptyValue: "0",
},
{
name: "displayDeliveryCount",
label: "交付数",
col: 8,
emptyValue: "0",
},
{
name: "displayPreSalesTouchCount",
label: "触客数",
col: 8,
emptyValue: "0",
},
{
name: "displayVehicleWarrantyRate",
label: "整车延保",
col: 8,
tips: "整车延保触客转化率",
emptyValue: "0%",
},
{
name: "displayPeaceOfMindRate",
label: "安心包",
col: 6,
tips: "安心包触客转化率",
emptyValue: "0%",
},
{
name: "displayBatteryWarrantyRate",
label: "电池",
col: 5,
tips: "电池延保触客转化率",
emptyValue: "0%",
},
{
name: "displayTireInsuranceRate",
label: "轮胎",
col: 5,
tips: "轮胎险触客转化率",
emptyValue: "0%",
},
{
name: "displayVehicleWarrantyAfterSalesRate",
label: "整车延保售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
{
name: "displayPeaceOfMindAfterSalesRate",
label: "安心包售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
{
name: "displayBatteryAfterSalesRate",
label: "电池售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
{
name: "displayTireInsuranceAfterSalesRate",
label: "轮胎售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
];
export const schemaCommonBrandList = [
{
name: "displayTotalOutput",
label: "总产值(万)",
col: 8,
emptyValue: "0",
},
{
name: "displayDeliveryCount",
label: "交付数",
col: 8,
emptyValue: "0",
},
{
name: "displayPreSalesTouchCount",
label: "触客数",
col: 8,
emptyValue: "0",
},
{
name: "displayTouchConversionRate",
label: "触客成交率",
col: 7,
emptyValue: "0%",
},
{
name: "displayWarrantyRate",
label: "延保",
col: 5,
tips: "延保触客转化率",
emptyValue: "0%",
},
{
name: "displayEquityProductRate",
label: "权益商品",
col: 7,
tips: "权益商品触客转化率",
emptyValue: "0%",
},
{
name: "displayEquityRate",
label: "权益",
col: 5,
tips: "权益触客转化率",
emptyValue: "0%",
},
{
name: "displayWarrantyAfterSalesRate",
label: "延保售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
{
name: "displayEquityProductAfterSalesRate",
label: "权益商品售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
{
name: "displayEquityAfterSalesRate",
label: "权益售后成交/总成交",
col: 12,
isMore: true,
emptyValue: "0/0",
},
{
name: "displayEquityAvgUnitPrice",
label: "权益平均客单价(元)",
col: 12,
isMore: true,
emptyValue: "0",
},
];
import { schemaList, schemaCommonBrandList } from "./storePerformance.data.js";
import { brandTypeList, staticInfoList } from "~/packageIndex/constant/performance.js";
import { getSupervisorStoreApi } from "~/packageIndex/api/performance.js";
const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/";
Page({
data: {
IMG_URL,
navBarHeight: 84,
brandType: {
list: brandTypeList,
},
schemaList: schemaList,
staticInfoList: staticInfoList,
statistics: {
totalStoreCount: 0,
redStoreCount: 0,
yellowStoreCount: 0,
greenStoreCount: 0,
},
originList: [],
list: [],
query: {
statDimension: "1",
dateType: 0,
filterKey: "",
startDate: undefined,
endDate: undefined,
},
},
navbarReady(e) {
let navBarHeight = e.detail.height;
this.setData({
navBarHeight,
});
},
onLoad(options) {
wx.$track.setTrackData(0, "data_guard_view_store_count", {}, "");
// this.setData({
// pageQuery: options,
// });
// this.getDetail(options);
},
onReady() {},
onShow() {},
filterData(list) {
if (!this.data.query.filterKey.trim()) {
return list || this.data.originList;
}
return (list || this.data.originList).filter((item) => item?.merchantName?.includes(this.data.query.filterKey));
},
async getData() {
wx.$util.showLoading();
this.setData({
originList: [],
list: [],
});
try {
let userInfo = wx.$util.getUserInfo();
const { data } = await getSupervisorStoreApi({
supervisorId: userInfo.uuid,
...this.data.query,
});
this.setData({
originList: data.storeList,
statistics: data.statistics,
list: this.filterData(data.storeList),
});
} finally {
wx.$util.hideLoading();
}
},
async handleBrandTabChange({ detail }) {
const schemaLists = String(detail.key) === "1" ? schemaList : schemaCommonBrandList;
this.setData({
schemaList: schemaLists,
query: {
...this.data.query,
statDimension: detail.key,
},
});
await this.getData();
},
async handleSearch({ detail }) {
console.log("store search");
this.setData({
query: {
...this.data.query,
startDate: detail.startDay?.replace(/\//g, "-"),
endDate: detail.endDay?.replace(/\//g, "-"),
dateType: detail.timeDimension,
},
});
await this.getData();
},
handleFilterKeyChange({ detail }) {
wx.$util.showLoading();
this.setData({
query: {
...this.data.query,
filterKey: detail,
},
});
this.setData(
{
list: this.filterData(),
},
function () {
wx.$util.hideLoading();
},
);
},
handleTapItem({ currentTarget }) {
const row = currentTarget.dataset.item;
wx.$router.go("packageIndex.stationStaffPerformance", {
merchantName: row.merchantName,
merchantId: row.merchantId,
pageTitle: "门店驻店销售列表",
query: this.data.query,
});
},
goSpecialTaskApply() {
wx.navigateTo({
url: "/packageIndex/pages/specialTaskApply/specialTaskApply",
});
},
back() {
wx.navigateBack();
},
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
async onPullDownRefresh() {
try {
await this.getData();
} finally {
wx.stopPullDownRefresh();
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});
{
"usingComponents": {
"TypeTabs": "/packageIndex/components/typeTabs/typeTabs",
"StatisticsItem": "/packageIndex/components/statisticsItem/statisticsItem",
"date-screen": "/packageIndex/components/dateScreen/dateScreen",
"van-search": "@vant/weapp/search/index",
"WarnList": "/packageIndex/components/warnList/index"
},
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
/* packageIndex/pages/specialTask/specialTask.wxss */
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
page {
background: #f2f3f7;
height: 100%;
.filter-wrapper {
background-color: white;
.tab-wrapper {
padding: var(--fontSize12) var(--fontSize24);
}
.date-filter-wrapper {
padding: var(--fontSize16) var(--fontSize24);
}
.search-input-wrapper {
padding: var(--fontSize16) var(--fontSize24);
width: 100%;
overflow: hidden;
box-sizing: border-box;
}
.statistics-wrapper {
display: flex;
align-items: center;
padding: var(--fontSize16) var(--fontSize32);
.static-item {
margin-left: var(--fontSize8);
padding: var(--fontSize24);
border-radius: var(--fontSize16);
flex: 1;
.label {
font-weight: 400;
font-size: 14px;
line-height: 16px;
color: white;
}
.value {
font-family: numberBold;
font-weight: 700;
font-style: Bold;
font-size: 20px;
margin-top: var(--fontSize10);
color: white;
}
}
}
}
.list-wrapper {
padding: 0 var(--fontSize24) var(--fontSize16);
.title-wrapper {
font-weight: 400;
font-size: var(--fontSize28);
line-height: var(--fontSize28);
color: #000000e5;
padding: var(--fontSize16) 0;
}
.item-wrapper {
margin-bottom: 8px;
.title-sub-wrapper {
display: flex;
align-items: center;
.label {
font-weight: 400;
font-size: var(--fontSize24);
line-height: var(--fontSize40);
margin-right: var(--fontSize16);
}
}
}
.last-tips {
padding: var(--fontSize30) 0;
text-align: center;
font-size: var(--fontSize24);
color: #999999;
}
}
}
.fixed-action-bar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 99;
padding: 32rpx 16rpx calc(32rpx + env(safe-area-inset-bottom));
background: #ffffff;
box-sizing: border-box;
}
.fixed-action-btn {
height: 44px;
border-radius: 12px;
background: #2f6bff;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
color: #ffffff;
font-size: 16px;
font-weight: 600;
}
.fixed-action-text {
line-height: 16px;
}
<!--packageIndex/pages/specialTask/specialTask.wxml-->
<navigation-bar bind:navbarReady="navbarReady"
class="navigation-header"
showBack
bind:back="back"
navStyle="background-color: white;box-shadow:none;">
<view class="page-title">
门店业绩列表
</view>
</navigation-bar>
<scroll-view scroll-y
class="container"
style="padding-top: calc({{ navBarHeight }}px);">
<view class="filter-wrapper">
<view class="tab-wrapper">
<TypeTabs bind:change="handleBrandTabChange"
list="{{ brandType.list }}"
value="{{ query.statDimension }}" />
</view>
<view class="date-filter-wrapper">
<date-screen customBackground="#f3f3f4"
tabSelected="{{ 3 }}"
bind:search="handleSearch"></date-screen>
</view>
<view class="statistics-wrapper"
wx:if="{{ query.dateType === 1 || query.dateType === 2 }}">
<view wx:for="{{ staticInfoList }}"
wx:key="{{ item.key }}"
class="static-item"
style="background:{{ item.background }}">
<view class="label">
{{ item.label }}
</view>
<view class="value">
{{ statistics[item.key] }}
</view>
</view>
</view>
<van-search value="{{ query.filterKey }}"
shape="round"
custom-class="search-input-wrapper"
background="#fff"
bind:change="handleFilterKeyChange"
placeholder="搜索门店名称..." />
</view>
<view class="list-wrapper">
<view class="title-wrapper">
门店列表
</view>
<block wx:if="{{ list && list.length > 0 }}">
<view class="item-wrapper"
wx:for="{{ list }}"
wx:key="index"
data-item="{{ item }}"
bind:tap="handleTapItem">
<StatisticsItem title="{{ item.merchantName }}"
data="{{ item }}"
hideValue="4"
schema="{{ schemaList }}">
<view slot="title-sub" class="title-sub-wrapper">
<view class="label">
{{ item.staffCount }}名驻店人员
</view>
<view wx:if="{{ item.warnList && item.warnList.length }}">
<WarnList list="{{ item.warnList }}" />
</view>
</view>
</StatisticsItem>
</view>
<view class="last-tips">
到底了~
</view>
</block>
<block wx:else>
<empty-data />
</block>
</view>
</scroll-view>
<!-- <view class="fixed-action-bar">
<view class="fixed-action-btn" catchtap="goSpecialTaskApply">
<view class="fixed-action-text">发起专项任务</view>
</view>
</view> -->
...@@ -7,38 +7,61 @@ ...@@ -7,38 +7,61 @@
</view> </view>
</navigation-bar> </navigation-bar>
<view class="bg"></view> <view class="bg"></view>
<view class="container" scroll-y style="padding-top: {{navBarHeight}}px;"> <view class="container"
scroll-y
style="padding-top: {{ navBarHeight }}px;">
<view class="top-box"> <view class="top-box">
<view class="tab"> <view class="tab">
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" bindtap="changeTab" data-target="{{item}}" wx:for="{{tabList}}" wx:key="index">{{item.text}}</view> <view class="tab-item {{ tabIndex == index ? 'active' : '' }}"
bindtap="changeTab"
data-target="{{ item }}"
wx:for="{{ tabList }}"
wx:key="index">
{{ item.text }}
</view>
</view> </view>
<view class="scene-tab"> <view class="scene-tab">
<view class="scene-tab-item {{sceneTabIndex == index ? 'active' : ''}}" wx:for="{{sceneTabList}}" wx:key="index" bindtap="changeSceneTab" data-target="{{item}}"> <view class="scene-tab-item {{ sceneTabIndex == index ? 'active' : '' }}"
<image wx:if="{{sceneTabIndex == index}}" src="{{IMG_URL}}{{item.icon}}.png" mode=""/> wx:for="{{ sceneTabList }}"
{{item.text}} wx:key="index"
bindtap="changeSceneTab"
data-target="{{ item }}">
<image wx:if="{{ sceneTabIndex == index }}"
src="{{ IMG_URL }}{{ item.icon }}.png"
mode="" />
{{ item.text }}
</view> </view>
</view> </view>
<view class="date"> <view class="date">
<date-screen id="date" bind:search="search" setTrackData="{{true}}"></date-screen> <date-screen id="date"
bind:search="search"
setTrackData="{{ true }}"></date-screen>
</view> </view>
</view> </view>
<scroll-view scroll-y style="height: calc(100% - {{topBoxHeight}}px);"> <scroll-view scroll-y style="height: calc(100% - {{ topBoxHeight }}px);">
<view class="static-info"> <view class="static-info">
<view class="static-item" style="flex: {{item.width}}rpx 0 0;background: {{item.background}};" wx:for="{{staticList}}" wx:key="index"> <view class="static-item"
<view class="label">{{item.label}}</view> wx:for="{{ staticList }}"
<view class="value">{{staticData[item.key]}}</view> style="flex: {{ item.width }}rpx 0 0;background: {{ item.background }};"
</view> data-key="{{ item.key }}"
</view> bind:tap="handleNavigatePerformance"
<AI-analyse AIContent="{{AIContent}}" loading="{{AILoading}}" /> wx:key="index">
<employee-ranking <view class="label">
id="employee-ranking" {{ item.label }}
title-icon="{{IMG_URL}}staff-rank.png" </view>
mode="{{mode}}" <view class="value">
scene="{{sceneTabIndex}}" {{ staticData[item.key] }}
employee-list="{{employeeList}}" </view>
local-sort="{{false}}" </view>
</view>
<AI-analyse AIContent="{{ AIContent }}" loading="{{ AILoading }}" />
<employee-ranking id="employee-ranking"
title-icon="{{ IMG_URL }}staff-rank.png"
mode="{{ mode }}"
scene="{{ sceneTabIndex }}"
employee-list="{{ employeeList }}"
local-sort="{{ false }}"
bind:sortChange="onEmployeeSortChange" bind:sortChange="onEmployeeSortChange"
bind:employeeTap="onEmployeeTap" bind:employeeTap="onEmployeeTap" />
/>
</scroll-view> </scroll-view>
</view> </view>
...@@ -73,12 +73,53 @@ page { ...@@ -73,12 +73,53 @@ page {
} }
} }
} }
.count-row {
display: flex;
align-items: center;
justify-content: space-between;
background: #F2F3F7;
padding: 16rpx 24rpx;
}
.number { .number {
height: 30rpx; height: 30rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
background: #F2F3F7; }
padding: 16rpx 24rpx;
.sub-tab {
display: flex;
align-items: center;
gap: 24rpx;
padding: 8rpx;
border-radius: 16rpx;
background: #FFFFFF;
}
.center-switch {
display: flex;
align-items: center;
padding: 4rpx 8rpx;
border-radius: 8rpx;
&.active {
background: #E7EDFE;
}
}
.center-switch__text {
font-size: 26rpx;
color: #292D33;
&.active {
color: #2C66F7;
font-weight: 600;
}
}
.center-switch__icon {
font-size: 26rpx;
color: #BEC1C7;
line-height: 1;
margin: 0 6rpx;
} }
.content-box { .content-box {
padding: 0 24rpx; padding: 0 24rpx;
......
...@@ -12,6 +12,11 @@ Page({ ...@@ -12,6 +12,11 @@ Page({
navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;', navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;',
isForbidden: false isForbidden: false
}, },
goMySpecialTask() {
wx.navigateTo({
url: '/packageIndex/pages/mySpecialTaskList/mySpecialTaskList'
})
},
jump(e) { jump(e) {
let { let {
url url
......
...@@ -19,12 +19,20 @@ ...@@ -19,12 +19,20 @@
</view> </view>
</view> </view>
<view class="set_box"> <view class="set_box">
<!-- <view class="set_item" bindtap="goMySpecialTask">
<image class="icon" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/special-task-icon.png" mode=""/>
<view class="right">
<view class="title">我发起的专项任务</view>
<view class="set_tips"></view>
<image class="icon_image" src="{{IMG_URL}}arrow-left.png" mode="" />
</view>
</view> -->
<view class="set_item " bindtap="jump" data-url="agreement"> <view class="set_item " bindtap="jump" data-url="agreement">
<image class="icon" src="{{IMG_URL}}user-agreement.png" mode=""/> <image class="icon" src="{{IMG_URL}}user-agreement.png" mode=""/>
<view class="right"> <view class="right">
<view class="title">用户协议</view> <view class="title">用户协议</view>
<view class="set_tips"></view> <view class="set_tips"></view>
<image class="icon_image" src="./images/right.png" mode="" /> <image class="icon_image" src="{{IMG_URL}}arrow-left.png" mode="" />
</view> </view>
</view> </view>
<view class="set_item " bindtap="jump" data-url="privacy"> <view class="set_item " bindtap="jump" data-url="privacy">
...@@ -32,7 +40,7 @@ ...@@ -32,7 +40,7 @@
<view class="right"> <view class="right">
<view class="title">隐私协议</view> <view class="title">隐私协议</view>
<view class="set_tips"></view> <view class="set_tips"></view>
<image class="icon_image" src="./images/right.png" mode="" /> <image class="icon_image" src="{{IMG_URL}}arrow-left.png" mode="" />
</view> </view>
</view> </view>
<!-- <view class="set_item " bindtap="goVersionPage"> <!-- <view class="set_item " bindtap="goVersionPage">
......
lockfileVersion: "9.0"
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
dependencies:
"@vant/area-data":
specifier: ^1.5.1
version: 1.5.2
"@vant/weapp":
specifier: ^1.10.24
version: 1.11.7
dayjs:
specifier: ^1.11.11
version: 1.11.20
glsk-applet-component:
specifier: ^1.0.0
version: 1.0.0
glsx-applet-component:
specifier: ^1.1.29
version: 1.1.29
glsx-common-sdk:
specifier: ^0.2.8
version: 0.2.8
number-precision:
specifier: ^1.6.0
version: 1.6.0
rfdc:
specifier: ^1.3.0
version: 1.4.1
devDependencies:
"@babel/generator":
specifier: ^7.28.6
version: 7.29.1
"@babel/parser":
specifier: ^7.28.6
version: 7.29.3
prettier:
specifier: ^3.8.1
version: 3.8.3
prettier-plugin-mp:
specifier: ^2.5.0
version: 2.5.0(prettier@3.8.3)
packages:
"@babel/generator@7.29.1":
resolution: { integrity: sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw== }
engines: { node: ">=6.9.0" }
"@babel/helper-string-parser@7.27.1":
resolution: { integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== }
engines: { node: ">=6.9.0" }
"@babel/helper-validator-identifier@7.28.5":
resolution: { integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== }
engines: { node: ">=6.9.0" }
"@babel/parser@7.29.3":
resolution: { integrity: sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA== }
engines: { node: ">=6.0.0" }
hasBin: true
"@babel/types@7.29.0":
resolution: { integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A== }
engines: { node: ">=6.9.0" }
"@jridgewell/gen-mapping@0.3.13":
resolution: { integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== }
"@jridgewell/resolve-uri@3.1.2":
resolution: { integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== }
engines: { node: ">=6.0.0" }
"@jridgewell/sourcemap-codec@1.5.5":
resolution: { integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== }
"@jridgewell/trace-mapping@0.3.31":
resolution: { integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== }
"@vant/area-data@1.5.2":
resolution: { integrity: sha512-Gtxgt6Rjgopt6234ANpO0bBsSwtjZ23lBlVDHIy8Mi2NJqyoj1vgVWY0dri8/2LCZAWzQ6EnwRrUVViUZ0cvMA== }
"@vant/weapp@1.11.7":
resolution: { integrity: sha512-Rwn9BBnb4kHSV4XmvBicwtd42J+amEUfnFDcXJsGNPNX4a9c/DoT6YLsm4X1wB2+sQbdiQsbFBLAvGRBxCkD8g== }
"@wxml/parser@0.4.0":
resolution: { integrity: sha512-pS0OPyKzCOhCPGlcfO9IDLZbqH4485bPdGDqaa+hYnI+cY/OW+GN4J88XpfdzM8wXJcJShFZy5F6MTUr2rysXg== }
dayjs@1.11.20:
resolution: { integrity: sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ== }
glsk-applet-component@1.0.0:
resolution: { integrity: sha512-ulz1OquWy4y4Q26Zu4FLDWzyqK+sInPWs4o8MKj2N8V/TnYQlUXoWkkgKh8fERK8A+rsusf3eiyZB0odchKk8g== }
glsx-applet-component@1.1.29:
resolution: { integrity: sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw== }
glsx-common-sdk@0.2.8:
resolution: { integrity: sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A== }
jsesc@3.1.0:
resolution: { integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== }
engines: { node: ">=6" }
hasBin: true
number-precision@1.6.0:
resolution: { integrity: sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ== }
prettier-plugin-mp@2.5.0:
resolution: { integrity: sha512-xOACEwH19w211V8kkQEcrZnVQsP+g7/wepcJ2VM0ajLJdhQgcW4qJpD827vl28BYUuhkQ6dnyAAkeybJ3lzvzQ== }
peerDependencies:
prettier: ^3.0.0
prettier@3.8.3:
resolution: { integrity: sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw== }
engines: { node: ">=14" }
hasBin: true
rfdc@1.4.1:
resolution: { integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== }
snapshots:
"@babel/generator@7.29.1":
dependencies:
"@babel/parser": 7.29.3
"@babel/types": 7.29.0
"@jridgewell/gen-mapping": 0.3.13
"@jridgewell/trace-mapping": 0.3.31
jsesc: 3.1.0
"@babel/helper-string-parser@7.27.1": {}
"@babel/helper-validator-identifier@7.28.5": {}
"@babel/parser@7.29.3":
dependencies:
"@babel/types": 7.29.0
"@babel/types@7.29.0":
dependencies:
"@babel/helper-string-parser": 7.27.1
"@babel/helper-validator-identifier": 7.28.5
"@jridgewell/gen-mapping@0.3.13":
dependencies:
"@jridgewell/sourcemap-codec": 1.5.5
"@jridgewell/trace-mapping": 0.3.31
"@jridgewell/resolve-uri@3.1.2": {}
"@jridgewell/sourcemap-codec@1.5.5": {}
"@jridgewell/trace-mapping@0.3.31":
dependencies:
"@jridgewell/resolve-uri": 3.1.2
"@jridgewell/sourcemap-codec": 1.5.5
"@vant/area-data@1.5.2": {}
"@vant/weapp@1.11.7": {}
"@wxml/parser@0.4.0": {}
dayjs@1.11.20: {}
glsk-applet-component@1.0.0: {}
glsx-applet-component@1.1.29: {}
glsx-common-sdk@0.2.8: {}
jsesc@3.1.0: {}
number-precision@1.6.0: {}
prettier-plugin-mp@2.5.0(prettier@3.8.3):
dependencies:
"@wxml/parser": 0.4.0
prettier: 3.8.3
prettier@3.8.3: {}
rfdc@1.4.1: {}
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
"packNpmRelationList": [ "packNpmRelationList": [
{ {
"packageJsonPath": "./package.json", "packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram_npm" "miniprogramNpmDistDir": "./"
} }
], ],
"compileHotReLoad": true, "compileHotReLoad": true,
......
...@@ -4,11 +4,18 @@ ...@@ -4,11 +4,18 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "驻店人员",
"pathName": "packageIndex/pages/stationStaffPerformance/stationStaffPerformance",
"query": "",
"scene": null,
"launchMode": "default"
},
{
"name": "packageCrew/pages/peopleOverview/peopleOverview", "name": "packageCrew/pages/peopleOverview/peopleOverview",
"pathName": "packageCrew/pages/peopleOverview/peopleOverview", "pathName": "packageCrew/pages/peopleOverview/peopleOverview",
"query": "query=%7B%22employeeId%22%3Anull%2C%22employeeName%22%3A%22%E9%99%88%E5%B8%8C%22%2C%22employeePhone%22%3A%2213132112126%22%2C%22personalOutput%22%3A9420%2C%22personalUnitPrice%22%3A724.62%2C%22personalConversion%22%3A0.4483%2C%22dealCount%22%3Anull%2C%22defeatCount%22%3Anull%2C%22recordingCount%22%3Anull%2C%22leadCount%22%3Anull%2C%22missingRate%22%3Anull%2C%22dealRate%22%3Anull%2C%22avgRecordPerDeal%22%3Anull%2C%22bussinessType%22%3A%221%22%2C%22conversionWarningLevel%22%3A0%2C%22unitPriceWarningLevel%22%3A0%2C%22outputWarningLevel%22%3A2%2C%22scene%22%3A2%2C%22startDate%22%3A%222026-03-01%22%2C%22endDate%22%3A%222026-03-31%22%2C%22timeDimension%22%3A2%7D", "query": "query=%7B%22employeeId%22%3Anull%2C%22employeeName%22%3A%22%E9%99%88%E5%B8%8C%22%2C%22employeePhone%22%3A%2213132112126%22%2C%22personalOutput%22%3A9420%2C%22personalUnitPrice%22%3A724.62%2C%22personalConversion%22%3A0.4483%2C%22dealCount%22%3Anull%2C%22defeatCount%22%3Anull%2C%22recordingCount%22%3Anull%2C%22leadCount%22%3Anull%2C%22missingRate%22%3Anull%2C%22dealRate%22%3Anull%2C%22avgRecordPerDeal%22%3Anull%2C%22bussinessType%22%3A%221%22%2C%22conversionWarningLevel%22%3A0%2C%22unitPriceWarningLevel%22%3A0%2C%22outputWarningLevel%22%3A2%2C%22scene%22%3A2%2C%22startDate%22%3A%222026-03-01%22%2C%22endDate%22%3A%222026-03-31%22%2C%22timeDimension%22%3A2%7D",
"scene": null, "launchMode": "default",
"launchMode": "default" "scene": null
}, },
{ {
"name": "packageCrew/pages/receptionRecording/receptionRecording", "name": "packageCrew/pages/receptionRecording/receptionRecording",
...@@ -240,6 +247,6 @@ ...@@ -240,6 +247,6 @@
"libVersion": "3.12.0", "libVersion": "3.12.0",
"projectname": "supervisor-miniprogram", "projectname": "supervisor-miniprogram",
"setting": { "setting": {
"compileHotReLoad": false "compileHotReLoad": true
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!