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 = {
getDashboardData
(
data
)
{
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
)
{
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
)
{
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({
* 组件的属性列表
*/
properties
:
{
AIContent
:
String
AIContent
:
{
type
:
String
,
observer
:
function
(
val
)
{
this
.
setData
({
unfoldFlag
:
false
})
}
},
loading
:
Boolean
},
/**
...
...
components/AIAnalyse/AIAnalyse.json
View file @
68ecc4a
{
"component"
:
true
,
"usingComponents"
:
{}
"usingComponents"
:
{
"van-loading"
:
"@vant/weapp/loading/index"
}
}
\ No newline at end of file
components/AIAnalyse/AIAnalyse.wxml
View file @
68ecc4a
...
...
@@ -7,6 +7,12 @@
</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>
<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}}">
<view class="content {{!unfoldFlag ? 'unfold' : ''}}">{{AIContent}}</view>
</block>
...
...
@@ -16,4 +22,5 @@
暂无数据
</view>
</block>
</block>
</view>
\ No newline at end of file
config.js
View file @
68ecc4a
...
...
@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let
index
=
1
;
let
index
=
2
;
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
systemInfo
=
wx
.
getSystemInfoSync
();
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
...
...
packageCrew/pages/mentoring/mentoring.js
View file @
68ecc4a
...
...
@@ -255,7 +255,7 @@ Page({
storeManagerName
:
orderObj
.
storeManagerName
,
storeManagerPhone
:
orderObj
.
storeManagerPhone
,
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
}
wx
.
$util
.
showLoading
()
...
...
packageCrew/pages/peopleOverview/components/behaviorAnalysis/behaviorAnalysis.js
View file @
68ecc4a
...
...
@@ -11,6 +11,9 @@ Component({
selectedMerchantObj
:
{
type
:
Object
},
merchantList
:
{
type
:
Array
},
initTimeDimension
:
{
type
:
Number
,
value
:
-
1
...
...
@@ -162,16 +165,26 @@ Component({
this
.
triggerEvent
(
'changeMerchant'
)
},
handleChangeMerchant
(
e
)
{
let
merchantId
=
123
let
{
merchantList
,
selectedMerchantObj
}
=
this
.
data
this
.
setData
({
showSelectPopup
:
true
,
selectOptions
:
[{
merchantId
:
123
,
merchantName
:
'明明4s店1'
}]
,
selectValue
:
[
merchantId
]
selectOptions
:
merchantList
,
selectValue
:
selectedMerchantObj
.
merchantId
?
[
selectedMerchantObj
.
merchantId
]
:
[
]
})
},
handlePopupConfirm
(
e
)
{
let
{
values
,
items
}
=
e
.
detail
console
.
log
(
values
)
let
{
items
}
=
e
.
detail
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
()
{
...
...
packageCrew/pages/peopleOverview/components/personalPerformance/personalPerformance.js
View file @
68ecc4a
...
...
@@ -250,6 +250,9 @@ Component({
selectedMerchantObj
:
{
type
:
Object
},
merchantList
:
{
type
:
Array
},
initTimeDimension
:
{
type
:
Number
,
value
:
-
1
...
...
@@ -476,6 +479,8 @@ Component({
merchantName: items[0]?.merchantName,
employeeId: items[0].employeeId
}
}, () => {
this.refreshViewModel()
})
this.hideSelectPopup()
},
...
...
packageCrew/pages/peopleOverview/peopleOverview.js
View file @
68ecc4a
...
...
@@ -147,6 +147,7 @@ Page({
},
getPersonAIData
(
options
)
{
this
.
setData
({
AILoading
:
true
})
api
.
getAIAnslyseData
({
type
:
4
,
timeDimension
:
options
.
timeDimension
,
...
...
@@ -154,12 +155,15 @@ Page({
startDate
:
options
.
startDate
,
endDate
:
options
.
endDate
}).
then
(
res
=>
{
this
.
setData
({
AILoading
:
false
})
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
this
.
setData
({
AIContent
:
data
?.
aiGenerateResult
||
''
})
}
else
{
wx
.
$util
.
showToast
(
message
)
}
}).
catch
(()
=>
{
this
.
setData
({
AILoading
:
false
})
})
},
...
...
packageCrew/pages/peopleOverview/peopleOverview.wxml
View file @
68ecc4a
...
...
@@ -11,7 +11,7 @@
<view class="bg"></view>
<scroll-view class="container" scroll-y style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px);">
<view style="width: 100%;height: 8rpx;"></view>
<AI-analyse AIContent="{{AIContent}}" />
<AI-analyse AIContent="{{AIContent}}"
loading="{{AILoading}}"
/>
<view class="content">
<view class="top-box">
<view class="name">
...
...
@@ -37,7 +37,7 @@
<view class="tab-content">
<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}}" />
<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}}" />
<view style="width: 100%;height: 200rpx;"></view>
</view>
...
...
pages/tab/crew/crew.js
View file @
68ecc4a
...
...
@@ -101,10 +101,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
()
{
this
.
getEmployeeRank
()
if
(
this
.
data
.
tabIndex
==
2
)
{
// 获取培训AI分析结果
this
.
getAIAnalyse
()
}
this
.
getEmployeeRank
()
},
formatThousands
(
v
)
{
...
...
@@ -137,6 +135,7 @@ Page({
const
sortComp
=
this
.
selectComponent
(
'#employee-ranking'
)
if
(
sortComp
)
sortComp
.
initLoad
()
setTimeout
(()
=>
{
this
.
getAIAnalyse
()
this
.
getEmployeeRank
()
})
})
...
...
@@ -152,6 +151,7 @@ Page({
this
.
setData
({
sceneTabIndex
:
index
},
()
=>
{
this
.
getAIAnalyse
()
this
.
getEmployeeRank
()
})
},
...
...
@@ -172,37 +172,51 @@ Page({
endStr
:
e
.
detail
.
endDay
?.
replace
(
/
\/
/g
,
'-'
),
timeDimension
:
e
.
detail
.
timeDimension
})
if
(
this
.
data
.
tabIndex
==
2
)
{
// 获取培训AI分析结果
this
.
getAIAnalyse
()
}
this
.
getEmployeeRank
()
},
getAIAnalyse
()
{
let
{
startStr
,
endStr
,
timeDimension
,
tabIndex
}
=
this
.
data
api
.
getAIAnslyseData
({
let
{
startStr
,
endStr
,
timeDimension
,
tabIndex
,
sceneTabIndex
}
=
this
.
data
const
apievents
=
[
'getDashboardAIResult'
,
'getBehaviorAIResult'
,
'getAIAnslyseData'
]
let
params
=
tabIndex
==
2
?
{
type
:
tabIndex
+
1
,
timeDimension
:
timeDimension
,
startDate
:
startStr
,
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
if
(
code
==
0
)
{
if
(
tabIndex
==
2
)
{
this
.
setData
({
AIContent
:
data
?.
aiGenerateResult
?
`
${
JSON
.
parse
(
data
?.
aiGenerateResult
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiGenerateResult
).
suggestions
}
` : '',
})
} else {
this.setData({
AIContent: data?.aiAnalysisSuggestion ? `
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
suggestions
}
` : '',
})
}
} else {
wx.$util.showToast(message)
}
}).catch(() => {
this.setData({AILoading: false})
})
},
getEmployeeRank() {
getEmployeeRank(
noAI
) {
let { tabIndex, sceneTabIndex, startStr, endStr, sortField, sortOrder, timeDimension } = this.data
this.setData({
AIContent: '',
employeeList: []
})
const event = ['getDashboardData', 'getDashboardBehavior', 'getTrainingStaffList']
let params = tabIndex == 2 ? {
businessType: sceneTabIndex > 0 ? sceneMaps[sceneTabIndex] : undefined,
startDate: startStr,
...
...
@@ -230,14 +244,12 @@ Page({
switch(tabIndex) {
case 0:
this.setData({
AIContent: `
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
suggestions
}
`,
staticData: data?.metrics,
employeeList: data?.employeeList || []
})
break
case 1:
this.setData({
AIContent: `
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
current_analysis
}
$
{
JSON
.
parse
(
data
?.
aiAnalysisSuggestion
).
suggestions
}
`,
staticData: data?.metrics,
employeeList: data?.employeeList || []
})
...
...
@@ -253,8 +265,6 @@ Page({
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
})
},
// 跳转员工个人看板
...
...
pages/tab/crew/crew.wxml
View file @
68ecc4a
...
...
@@ -29,7 +29,7 @@
<view class="value">{{staticData[item.key]}}</view>
</view>
</view>
<AI-analyse AIContent="{{AIContent}}" />
<AI-analyse AIContent="{{AIContent}}"
loading="{{AILoading}}"
/>
<employee-ranking
id="employee-ranking"
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