|
@@ -109,6 +109,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { mapActions } from 'vuex'
|
|
import { mapActions } from 'vuex'
|
|
|
|
|
+import { BrandColors } from '../../utils/brand-colors.js'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
data: function() {
|
|
data: function() {
|
|
@@ -124,41 +125,41 @@ export default {
|
|
|
computed: {
|
|
computed: {
|
|
|
member1Color: function() {
|
|
member1Color: function() {
|
|
|
if (!this.relation || !this.relation.fromMemberRole) {
|
|
if (!this.relation || !this.relation.fromMemberRole) {
|
|
|
- return '#6B7280'
|
|
|
|
|
|
|
+ return BrandColors.textSlate
|
|
|
}
|
|
}
|
|
|
var colorMap = {
|
|
var colorMap = {
|
|
|
- 'parent': '#F97316',
|
|
|
|
|
- 'child': '#3B82F6',
|
|
|
|
|
- 'teacher': '#8B5CF6'
|
|
|
|
|
|
|
+ 'parent': BrandColors.primary,
|
|
|
|
|
+ 'child': BrandColors.infoBlue,
|
|
|
|
|
+ 'teacher': BrandColors.violet
|
|
|
}
|
|
}
|
|
|
- return colorMap[this.relation.fromMemberRole] || '#6B7280'
|
|
|
|
|
|
|
+ return colorMap[this.relation.fromMemberRole] || BrandColors.textSlate
|
|
|
},
|
|
},
|
|
|
member2Color: function() {
|
|
member2Color: function() {
|
|
|
if (!this.relation || !this.relation.toMemberRole) {
|
|
if (!this.relation || !this.relation.toMemberRole) {
|
|
|
- return '#6B7280'
|
|
|
|
|
|
|
+ return BrandColors.textSlate
|
|
|
}
|
|
}
|
|
|
var colorMap = {
|
|
var colorMap = {
|
|
|
- 'parent': '#F97316',
|
|
|
|
|
- 'child': '#3B82F6',
|
|
|
|
|
- 'teacher': '#8B5CF6'
|
|
|
|
|
|
|
+ 'parent': BrandColors.primary,
|
|
|
|
|
+ 'child': BrandColors.infoBlue,
|
|
|
|
|
+ 'teacher': BrandColors.violet
|
|
|
}
|
|
}
|
|
|
- return colorMap[this.relation.toMemberRole] || '#6B7280'
|
|
|
|
|
|
|
+ return colorMap[this.relation.toMemberRole] || BrandColors.textSlate
|
|
|
},
|
|
},
|
|
|
dimensions: function() {
|
|
dimensions: function() {
|
|
|
if (!this.relation || !this.relation.dimensions) {
|
|
if (!this.relation || !this.relation.dimensions) {
|
|
|
return []
|
|
return []
|
|
|
}
|
|
}
|
|
|
var dimMap = {
|
|
var dimMap = {
|
|
|
- 'communication': { label: '沟通', description: '沟通频率与质量', color: '#10B981' },
|
|
|
|
|
- 'trust': { label: '信任', description: '相互信任程度', color: '#3B82F6' },
|
|
|
|
|
- 'understanding': { label: '理解', description: '相互理解程度', color: '#8B5CF6' },
|
|
|
|
|
- 'support': { label: '支持', description: '相互支持力度', color: '#F59E0B' },
|
|
|
|
|
- 'harmony': { label: '和谐', description: '关系和谐度', color: '#F97316' }
|
|
|
|
|
|
|
+ 'communication': { label: '沟通', description: '沟通频率与质量', color: BrandColors.success },
|
|
|
|
|
+ 'trust': { label: '信任', description: '相互信任程度', color: BrandColors.infoBlue },
|
|
|
|
|
+ 'understanding': { label: '理解', description: '相互理解程度', color: BrandColors.violet },
|
|
|
|
|
+ 'support': { label: '支持', description: '相互支持力度', color: BrandColors.wealth },
|
|
|
|
|
+ 'harmony': { label: '和谐', description: '关系和谐度', color: BrandColors.primary }
|
|
|
}
|
|
}
|
|
|
var result = []
|
|
var result = []
|
|
|
for (var key in this.relation.dimensions) {
|
|
for (var key in this.relation.dimensions) {
|
|
|
var value = this.relation.dimensions[key]
|
|
var value = this.relation.dimensions[key]
|
|
|
- var info = dimMap[key] || { label: key, description: '', color: '#6B7280' }
|
|
|
|
|
|
|
+ var info = dimMap[key] || { label: key, description: '', color: BrandColors.textSlate }
|
|
|
result.push({
|
|
result.push({
|
|
|
type: key,
|
|
type: key,
|
|
|
label: info.label,
|
|
label: info.label,
|
|
@@ -245,7 +246,7 @@ export default {
|
|
|
// 绘制背景圆
|
|
// 绘制背景圆
|
|
|
ctx.beginPath()
|
|
ctx.beginPath()
|
|
|
ctx.arc(cx, cy, r, 0, Math.PI * 2)
|
|
ctx.arc(cx, cy, r, 0, Math.PI * 2)
|
|
|
- ctx.strokeStyle = '#E5E7EB'
|
|
|
|
|
|
|
+ ctx.strokeStyle = BrandColors.gray200
|
|
|
ctx.lineWidth = 20
|
|
ctx.lineWidth = 20
|
|
|
ctx.stroke()
|
|
ctx.stroke()
|
|
|
|
|
|
|
@@ -297,7 +298,7 @@ export default {
|
|
|
ctx.moveTo(padding, padding)
|
|
ctx.moveTo(padding, padding)
|
|
|
ctx.lineTo(padding, h - padding)
|
|
ctx.lineTo(padding, h - padding)
|
|
|
ctx.lineTo(w - padding, h - padding)
|
|
ctx.lineTo(w - padding, h - padding)
|
|
|
- ctx.strokeStyle = '#E5E7EB'
|
|
|
|
|
|
|
+ ctx.strokeStyle = BrandColors.gray200
|
|
|
ctx.lineWidth = 1
|
|
ctx.lineWidth = 1
|
|
|
ctx.stroke()
|
|
ctx.stroke()
|
|
|
|
|
|
|
@@ -321,7 +322,7 @@ export default {
|
|
|
ctx.lineTo(x, y)
|
|
ctx.lineTo(x, y)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- ctx.strokeStyle = '#F97316'
|
|
|
|
|
|
|
+ ctx.strokeStyle = BrandColors.primary
|
|
|
ctx.lineWidth = 2
|
|
ctx.lineWidth = 2
|
|
|
ctx.stroke()
|
|
ctx.stroke()
|
|
|
|
|
|
|
@@ -333,21 +334,21 @@ export default {
|
|
|
|
|
|
|
|
ctx.beginPath()
|
|
ctx.beginPath()
|
|
|
ctx.arc(x2, y2, 4, 0, Math.PI * 2)
|
|
ctx.arc(x2, y2, 4, 0, Math.PI * 2)
|
|
|
- ctx.fillStyle = '#F97316'
|
|
|
|
|
|
|
+ ctx.fillStyle = BrandColors.primary
|
|
|
ctx.fill()
|
|
ctx.fill()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
getScoreColor: function(score) {
|
|
getScoreColor: function(score) {
|
|
|
if (!score) {
|
|
if (!score) {
|
|
|
- return '#6B7280'
|
|
|
|
|
|
|
+ return BrandColors.textSlate
|
|
|
}
|
|
}
|
|
|
if (score >= 80) {
|
|
if (score >= 80) {
|
|
|
- return '#10B981'
|
|
|
|
|
|
|
+ return BrandColors.success
|
|
|
} else if (score >= 60) {
|
|
} else if (score >= 60) {
|
|
|
- return '#F59E0B'
|
|
|
|
|
|
|
+ return BrandColors.wealth
|
|
|
} else {
|
|
} else {
|
|
|
- return '#EF4444'
|
|
|
|
|
|
|
+ return BrandColors.danger
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -410,6 +411,9 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
|
|
+// ===== 关系详情页专属色阶(单页专用;约定见 uni.scss §14)=====
|
|
|
|
|
+$c-rel-brown: #7C2D12; // 深棕文字(暖橙卡内)
|
|
|
|
|
+
|
|
|
.relation-detail-container {
|
|
.relation-detail-container {
|
|
|
min-height: 100vh;
|
|
min-height: 100vh;
|
|
|
background: $facade-fill-gray-50;
|
|
background: $facade-fill-gray-50;
|
|
@@ -587,7 +591,7 @@ export default {
|
|
|
|
|
|
|
|
.relation-icon {
|
|
.relation-icon {
|
|
|
font-size: 48rpx;
|
|
font-size: 48rpx;
|
|
|
- color: #D1D5DB;
|
|
|
|
|
|
|
+ color: $app-border-strong;
|
|
|
padding: 0 16rpx;
|
|
padding: 0 16rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -653,14 +657,14 @@ export default {
|
|
|
|
|
|
|
|
.advice-content {
|
|
.advice-content {
|
|
|
padding: 24rpx;
|
|
padding: 24rpx;
|
|
|
- background: #FFF8F0;
|
|
|
|
|
|
|
+ background: $dim-body-tint;
|
|
|
border-radius: 16rpx;
|
|
border-radius: 16rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.advice-text {
|
|
.advice-text {
|
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
|
line-height: 1.6;
|
|
line-height: 1.6;
|
|
|
- color: #7C2D12;
|
|
|
|
|
|
|
+ color: $c-rel-brown;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.action-buttons {
|
|
.action-buttons {
|