Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
supervisor-miniprogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 68ecc4af
authored
Mar 23, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
自测跑流程修改
1 parent
9a6ca7b4
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
84 additions
and
27 deletions
api/crew/index.js
components/AIAnalyse/AIAnalyse.js
components/AIAnalyse/AIAnalyse.json
components/AIAnalyse/AIAnalyse.wxml
config.js
packageCrew/pages/mentoring/mentoring.js
packageCrew/pages/peopleOverview/components/behaviorAnalysis/behaviorAnalysis.js
packageCrew/pages/peopleOverview/components/personalPerformance/personalPerformance.js
packageCrew/pages/peopleOverview/peopleOverview.js
packageCrew/pages/peopleOverview/peopleOverview.wxml
pages/tab/crew/crew.js
pages/tab/crew/crew.wxml
api/crew/index.js
View file @
68ecc4a
...
@@ -12,10 +12,18 @@ module.exports = {
...
@@ -12,10 +12,18 @@ module.exports = {
getDashboardData
(
data
)
{
getDashboardData
(
data
)
{
return
api
.
post
(
'dj.api.supervisor.dashboard.data'
,
data
,
[],
'/rop-dj-supervisor-mini/router'
)
return
api
.
post
(
'dj.api.supervisor.dashboard.data'
,
data
,
[],
'/rop-dj-supervisor-mini/router'
)
},
},
// 获取业绩AI分析结果
getDashboardAIResult
(
data
)
{
return
api
.
post
(
'dj.api.supervisor.dashboard.data.ai'
,
data
,
[],
'/rop-dj-supervisor-mini/router'
)
},
// 获取行为维度排行数据
// 获取行为维度排行数据
getDashboardBehavior
(
data
)
{
getDashboardBehavior
(
data
)
{
return
api
.
post
(
'dj.api.supervisor.dashboard.behavior'
,
data
,
[],
'/rop-dj-supervisor-mini/router'
)
return
api
.
post
(
'dj.api.supervisor.dashboard.behavior'
,
data
,
[],
'/rop-dj-supervisor-mini/router'
)
},
},
// 获取行为AI分析结果
getBehaviorAIResult
(
data
)
{
return
api
.
post
(
'dj.api.supervisor.dashboard.behavior.ai'
,
data
,
[],
'/rop-dj-supervisor-mini/router'
)
},
// 获取培训维度排行数据
// 获取培训维度排行数据
getTrainingStaffList
(
data
)
{
getTrainingStaffList
(
data
)
{
return
api
.
post
(
'dj.api.supervisor.mini.team.all.employee.training.info'
,
data
,
[],
'/rop-dj-supervisor-mini/router'
)
return
api
.
post
(
'dj.api.supervisor.mini.team.all.employee.training.info'
,
data
,
[],
'/rop-dj-supervisor-mini/router'
)
...
...
components/AIAnalyse/AIAnalyse.js
View file @
68ecc4a
...
@@ -6,7 +6,15 @@ Component({
...
@@ -6,7 +6,15 @@ Component({
* 组件的属性列表
* 组件的属性列表
*/
*/
properties
:
{
properties
:
{
AIContent
:
String
AIContent
:
{
type
:
String
,
observer
:
function
(
val
)
{
this
.
setData
({
unfoldFlag
:
false
})
}
},
loading
:
Boolean
},
},
/**
/**
...
...
components/AIAnalyse/AIAnalyse.json
View file @
68ecc4a
{
{
"component"
:
true
,
"component"
:
true
,
"usingComponents"
:
{}
"usingComponents"
:
{
"van-loading"
:
"@vant/weapp/loading/index"
}
}
}
\ No newline at end of file
\ No newline at end of file
components/AIAnalyse/AIAnalyse.wxml
View file @
68ecc4a
...
@@ -7,6 +7,12 @@
...
@@ -7,6 +7,12 @@
</view>
</view>
<view class="right" wx:if="{{AIContent}}" bindtap="changeUnfold">{{unfoldFlag ? '收起' : '展开'}}<image class="icon {{unfoldFlag ? 'up' : ''}}" src="{{IMG_URL}}gray-arrow-down.png" mode=""/></view>
<view class="right" wx:if="{{AIContent}}" bindtap="changeUnfold">{{unfoldFlag ? '收起' : '展开'}}<image class="icon {{unfoldFlag ? 'up' : ''}}" src="{{IMG_URL}}gray-arrow-down.png" mode=""/></view>
</view>
</view>
<block wx:if="{{loading}}">
<view style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;">
<van-loading type="spinner" color="#2C66F7" />
</view>
</block>
<block wx:else>
<block wx:if="{{AIContent}}">
<block wx:if="{{AIContent}}">
<view class="content {{!unfoldFlag ? 'unfold' : ''}}">{{AIContent}}</view>
<view class="content {{!unfoldFlag ? 'unfold' : ''}}">{{AIContent}}</view>
</block>
</block>
...
@@ -16,4 +22,5 @@
...
@@ -16,4 +22,5 @@
暂无数据
暂无数据
</view>
</view>
</block>
</block>
</block>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
config.js
View file @
68ecc4a
...
@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
...
@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 4预发布
* 5cdptest
* 5cdptest
*/
*/
let
index
=
1
;
let
index
=
2
;
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
systemInfo
=
wx
.
getSystemInfoSync
();
const
systemInfo
=
wx
.
getSystemInfoSync
();
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
...
...
packageCrew/pages/mentoring/mentoring.js
View file @
68ecc4a
...
@@ -255,7 +255,7 @@ Page({
...
@@ -255,7 +255,7 @@ Page({
storeManagerName
:
orderObj
.
storeManagerName
,
storeManagerName
:
orderObj
.
storeManagerName
,
storeManagerPhone
:
orderObj
.
storeManagerPhone
,
storeManagerPhone
:
orderObj
.
storeManagerPhone
,
taskContext
:
orderObj
.
taskContext
,
taskContext
:
orderObj
.
taskContext
,
courseList
:
orderObj
.
courseList
?.
map
(
val
=>
{
return
{
bcCourseId
:
val
.
courseId
}}),
courseList
:
orderObj
.
courseList
?.
map
(
val
=>
{
return
{
bcCourseId
:
val
.
courseId
,
bcCourseName
:
val
.
title
}}),
imageList
:
orderObj
.
imageList
imageList
:
orderObj
.
imageList
}
}
wx
.
$util
.
showLoading
()
wx
.
$util
.
showLoading
()
...
...
packageCrew/pages/peopleOverview/components/behaviorAnalysis/behaviorAnalysis.js
View file @
68ecc4a
...
@@ -11,6 +11,9 @@ Component({
...
@@ -11,6 +11,9 @@ Component({
selectedMerchantObj
:
{
selectedMerchantObj
:
{
type
:
Object
type
:
Object
},
},
merchantList
:
{
type
:
Array
},
initTimeDimension
:
{
initTimeDimension
:
{
type
:
Number
,
type
:
Number
,
value
:
-
1
value
:
-
1
...
@@ -162,16 +165,26 @@ Component({
...
@@ -162,16 +165,26 @@ Component({
this
.
triggerEvent
(
'changeMerchant'
)
this
.
triggerEvent
(
'changeMerchant'
)
},
},
handleChangeMerchant
(
e
)
{
handleChangeMerchant
(
e
)
{
let
merchantId
=
123
let
{
merchantList
,
selectedMerchantObj
}
=
this
.
data
this
.
setData
({
this
.
setData
({
showSelectPopup
:
true
,
showSelectPopup
:
true
,
selectOptions
:
[{
merchantId
:
123
,
merchantName
:
'明明4s店1'
}]
,
selectOptions
:
merchantList
,
selectValue
:
[
merchantId
]
selectValue
:
selectedMerchantObj
.
merchantId
?
[
selectedMerchantObj
.
merchantId
]
:
[
]
})
})
},
},
handlePopupConfirm
(
e
)
{
handlePopupConfirm
(
e
)
{
let
{
values
,
items
}
=
e
.
detail
let
{
items
}
=
e
.
detail
console
.
log
(
values
)
let
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
.
setData
({
selectedMerchantObj
:
{
merchantId
:
items
[
0
].
merchantId
,
merchantName
:
items
[
0
]?.
merchantName
,
employeeId
:
items
[
0
].
employeeId
}
},
()
=>
{
this
.
getData
()
})
this
.
hideSelectPopup
()
},
},
hideSelectPopup
()
{
hideSelectPopup
()
{
...
...
packageCrew/pages/peopleOverview/components/personalPerformance/personalPerformance.js
View file @
68ecc4a
...
@@ -250,6 +250,9 @@ Component({
...
@@ -250,6 +250,9 @@ Component({
selectedMerchantObj
:
{
selectedMerchantObj
:
{
type
:
Object
type
:
Object
},
},
merchantList
:
{
type
:
Array
},
initTimeDimension
:
{
initTimeDimension
:
{
type
:
Number
,
type
:
Number
,
value
:
-
1
value
:
-
1
...
@@ -476,6 +479,8 @@ Component({
...
@@ -476,6 +479,8 @@ Component({
merchantName: items[0]?.merchantName,
merchantName: items[0]?.merchantName,
employeeId: items[0].employeeId
employeeId: items[0].employeeId
}
}
}, () => {
this.refreshViewModel()
})
})
this.hideSelectPopup()
this.hideSelectPopup()
},
},
...
...
packageCrew/pages/peopleOverview/peopleOverview.js
View file @
68ecc4a
...
@@ -147,6 +147,7 @@ Page({
...
@@ -147,6 +147,7 @@ Page({
},
},
getPersonAIData
(
options
)
{
getPersonAIData
(
options
)
{
this
.
setData
({
AILoading
:
true
})
api
.
getAIAnslyseData
({
api
.
getAIAnslyseData
({
type
:
4
,
type
:
4
,
timeDimension
:
options
.
timeDimension
,
timeDimension
:
options
.
timeDimension
,
...
@@ -154,12 +155,15 @@ Page({
...
@@ -154,12 +155,15 @@ Page({
startDate
:
options
.
startDate
,
startDate
:
options
.
startDate
,
endDate
:
options
.
endDate
endDate
:
options
.
endDate
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
setData
({
AILoading
:
false
})
let
{
code
,
data
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
this
.
setData
({
AIContent
:
data
?.
aiGenerateResult
||
''
})
this
.
setData
({
AIContent
:
data
?.
aiGenerateResult
||
''
})
}
else
{
}
else
{
wx
.
$util
.
showToast
(
message
)
wx
.
$util
.
showToast
(
message
)
}
}
}).
catch
(()
=>
{
this
.
setData
({
AILoading
:
false
})
})
})
},
},
...
...
packageCrew/pages/peopleOverview/peopleOverview.wxml
View file @
68ecc4a
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<view class="bg"></view>
<view class="bg"></view>
<scroll-view class="container" scroll-y style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px);">
<scroll-view class="container" scroll-y style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px);">
<view style="width: 100%;height: 8rpx;"></view>
<view style="width: 100%;height: 8rpx;"></view>
<AI-analyse AIContent="{{AIContent}}" />
<AI-analyse AIContent="{{AIContent}}"
loading="{{AILoading}}"
/>
<view class="content">
<view class="content">
<view class="top-box">
<view class="top-box">
<view class="name">
<view class="name">
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<view class="tab-content">
<view class="tab-content">
<basic-info wx:if="{{tabIndex === 0}}" baseInfo="{{baseInfo}}" />
<basic-info wx:if="{{tabIndex === 0}}" baseInfo="{{baseInfo}}" />
<personal-performance wx:if="{{tabIndex === 1}}" detailInfo="{{detailInfo}}" merchantList="{{merchantList}}" selectedMerchantObj="{{selectedMerchantObj}}" bindpopupvisible="onDatePopupVisible" binddatesave="onDateSave" initTimeDimension="{{personalPerformanceDate.timeDimension}}" initStartDate="{{personalPerformanceDate.startDate}}" initEndDate="{{personalPerformanceDate.endDate}}" />
<personal-performance wx:if="{{tabIndex === 1}}" detailInfo="{{detailInfo}}" merchantList="{{merchantList}}" selectedMerchantObj="{{selectedMerchantObj}}" bindpopupvisible="onDatePopupVisible" binddatesave="onDateSave" initTimeDimension="{{personalPerformanceDate.timeDimension}}" initStartDate="{{personalPerformanceDate.startDate}}" initEndDate="{{personalPerformanceDate.endDate}}" />
<behavior-analysis wx:if="{{tabIndex === 2}}" detailInfo="{{detailInfo}}" selectedMerchantObj="{{selectedMerchantObj}}" bindpopupvisible="onDatePopupVisible" binddatesave="onDateSave" initTimeDimension="{{behaviorAnalysisDate.timeDimension}}" initStartDate="{{behaviorAnalysisDate.startDate}}" initEndDate="{{behaviorAnalysisDate.endDate}}" />
<behavior-analysis wx:if="{{tabIndex === 2}}" detailInfo="{{detailInfo}}"
merchantList="{{merchantList}}"
selectedMerchantObj="{{selectedMerchantObj}}" bindpopupvisible="onDatePopupVisible" binddatesave="onDateSave" initTimeDimension="{{behaviorAnalysisDate.timeDimension}}" initStartDate="{{behaviorAnalysisDate.startDate}}" initEndDate="{{behaviorAnalysisDate.endDate}}" />
<training-experience id="training" wx:if="{{tabIndex === 3}}" detailInfo="{{detailInfo}}" bindpopupvisible="onDatePopupVisible" binddatesave="onDateSave" initTimeDimension="{{trainingExperienceDate.timeDimension}}" initStartDate="{{trainingExperienceDate.startDate}}" initEndDate="{{trainingExperienceDate.endDate}}" />
<training-experience id="training" wx:if="{{tabIndex === 3}}" detailInfo="{{detailInfo}}" bindpopupvisible="onDatePopupVisible" binddatesave="onDateSave" initTimeDimension="{{trainingExperienceDate.timeDimension}}" initStartDate="{{trainingExperienceDate.startDate}}" initEndDate="{{trainingExperienceDate.endDate}}" />
<view style="width: 100%;height: 200rpx;"></view>
<view style="width: 100%;height: 200rpx;"></view>
</view>
</view>
...
...
pages/tab/crew/crew.js
View file @
68ecc4a
...
@@ -101,10 +101,8 @@ Page({
...
@@ -101,10 +101,8 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
this
.
getEmployeeRank
()
if
(
this
.
data
.
tabIndex
==
2
)
{
// 获取培训AI分析结果
this
.
getAIAnalyse
()
this
.
getAIAnalyse
()
}
this
.
getEmployeeRank
()
},
},
formatThousands
(
v
)
{
formatThousands
(
v
)
{
...
@@ -137,6 +135,7 @@ Page({
...
@@ -137,6 +135,7 @@ Page({
const
sortComp
=
this
.
selectComponent
(
'#employee-ranking'
)
const
sortComp
=
this
.
selectComponent
(
'#employee-ranking'
)
if
(
sortComp
)
sortComp
.
initLoad
()
if
(
sortComp
)
sortComp
.
initLoad
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getAIAnalyse
()
this
.
getEmployeeRank
()
this
.
getEmployeeRank
()
})
})
})
})
...
@@ -152,6 +151,7 @@ Page({
...
@@ -152,6 +151,7 @@ Page({
this
.
setData
({
this
.
setData
({
sceneTabIndex
:
index
sceneTabIndex
:
index
},
()
=>
{
},
()
=>
{
this
.
getAIAnalyse
()
this
.
getEmployeeRank
()
this
.
getEmployeeRank
()
})
})
},
},
...
@@ -172,37 +172,51 @@ Page({
...
@@ -172,37 +172,51 @@ Page({
endStr
:
e
.
detail
.
endDay
?.
replace
(
/
\/
/g
,
'-'
),
endStr
:
e
.
detail
.
endDay
?.
replace
(
/
\/
/g
,
'-'
),
timeDimension
:
e
.
detail
.
timeDimension
timeDimension
:
e
.
detail
.
timeDimension
})
})
if
(
this
.
data
.
tabIndex
==
2
)
{
// 获取培训AI分析结果
this
.
getAIAnalyse
()
this
.
getAIAnalyse
()
}
this
.
getEmployeeRank
()
this
.
getEmployeeRank
()
},
},
getAIAnalyse
()
{
getAIAnalyse
()
{
let
{
startStr
,
endStr
,
timeDimension
,
tabIndex
}
=
this
.
data
let
{
startStr
,
endStr
,
timeDimension
,
tabIndex
,
sceneTabIndex
}
=
this
.
data
api
.
getAIAnslyseData
({
const
apievents
=
[
'getDashboardAIResult'
,
'getBehaviorAIResult'
,
'getAIAnslyseData'
]
let
params
=
tabIndex
==
2
?
{
type
:
tabIndex
+
1
,
type
:
tabIndex
+
1
,
timeDimension
:
timeDimension
,
timeDimension
:
timeDimension
,
startDate
:
startStr
,
startDate
:
startStr
,
endDate
:
endStr
endDate
:
endStr
}).
then
(
res
=>
{
}
:
{
bizs
:
sceneTabIndex
>
0
?
sceneMaps
[
sceneTabIndex
]
:
undefined
,
dateType
:
timeDimension
,
startDate
:
startStr
,
endDate
:
endStr
}
this
.
setData
({
AILoading
:
true
})
api
[
apievents
[
tabIndex
]](
params
).
then
(
res
=>
{
this
.
setData
({
AILoading
:
false
})
let
{
code
,
data
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
if
(
tabIndex
==
2
)
{
this
.
setData
({
this
.
setData
({
AIContent
:
data
?.
aiGenerateResult
?
`
${
JSON
.
parse
(
data
?.
aiGenerateResult
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiGenerateResult
).
suggestions
}
` : '',
AIContent
:
data
?.
aiGenerateResult
?
`
${
JSON
.
parse
(
data
?.
aiGenerateResult
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiGenerateResult
).
suggestions
}
` : '',
})
})
} else {
} else {
this.setData({
AIContent: data?.aiAnalysisSuggestion ? `
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
suggestions
}
` : '',
})
}
} else {
wx.$util.showToast(message)
wx.$util.showToast(message)
}
}
}).catch(() => {
this.setData({AILoading: false})
})
})
},
},
getEmployeeRank() {
getEmployeeRank(
noAI
) {
let { tabIndex, sceneTabIndex, startStr, endStr, sortField, sortOrder, timeDimension } = this.data
let { tabIndex, sceneTabIndex, startStr, endStr, sortField, sortOrder, timeDimension } = this.data
this.setData({
this.setData({
AIContent: '',
employeeList: []
employeeList: []
})
})
const event = ['getDashboardData', 'getDashboardBehavior', 'getTrainingStaffList']
const event = ['getDashboardData', 'getDashboardBehavior', 'getTrainingStaffList']
let params = tabIndex == 2 ? {
let params = tabIndex == 2 ? {
businessType: sceneTabIndex > 0 ? sceneMaps[sceneTabIndex] : undefined,
businessType: sceneTabIndex > 0 ? sceneMaps[sceneTabIndex] : undefined,
startDate: startStr,
startDate: startStr,
...
@@ -230,14 +244,12 @@ Page({
...
@@ -230,14 +244,12 @@ Page({
switch(tabIndex) {
switch(tabIndex) {
case 0:
case 0:
this.setData({
this.setData({
AIContent: `
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
suggestions
}
`,
staticData: data?.metrics,
staticData: data?.metrics,
employeeList: data?.employeeList || []
employeeList: data?.employeeList || []
})
})
break
break
case 1:
case 1:
this.setData({
this.setData({
AIContent: `
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
suggestions
}
`,
staticData: data?.metrics,
staticData: data?.metrics,
employeeList: data?.employeeList || []
employeeList: data?.employeeList || []
})
})
...
@@ -253,8 +265,6 @@ Page({
...
@@ -253,8 +265,6 @@ Page({
} else {
} else {
wx.$util.showToast(message)
wx.$util.showToast(message)
}
}
}).catch(() => {
wx.$util.hideLoading()
})
})
},
},
// 跳转员工个人看板
// 跳转员工个人看板
...
...
pages/tab/crew/crew.wxml
View file @
68ecc4a
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<view class="value">{{staticData[item.key]}}</view>
<view class="value">{{staticData[item.key]}}</view>
</view>
</view>
</view>
</view>
<AI-analyse AIContent="{{AIContent}}" />
<AI-analyse AIContent="{{AIContent}}"
loading="{{AILoading}}"
/>
<employee-ranking
<employee-ranking
id="employee-ranking"
id="employee-ranking"
title-icon="{{IMG_URL}}staff-rank.png"
title-icon="{{IMG_URL}}staff-rank.png"
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment