TriangleChart.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  1. <template>
  2. <view class="container">
  3. <view class="chart-inner">
  4. <view class="triangle-glow"></view>
  5. <view class="triangle-bg"></view>
  6. <view class="inner-matrix">
  7. <view class="zone-left-bg"></view>
  8. <view class="zone-right-bg"></view>
  9. <view class="row row-top" @click="showCellDetail('O', chartNum('innerTop'))">
  10. <view class="cell cell-main" :class="numColorCls(chartNum('innerTop'))">
  11. {{ matrix.innerTop }}
  12. <text v-if="isMasterNum(chartNum('innerTop'))" class="master-star">★</text>
  13. </view>
  14. </view>
  15. <view class="row row-mid">
  16. <view class="cell cell-mid border-right zone-father" @click="showCellDetail('M', chartNum('innerMid', 0))">
  17. <text :class="numColorCls(chartNum('innerMid', 0))">
  18. {{ matrix.innerMid[0] }}
  19. <text v-if="isMasterNum(chartNum('innerMid', 0))" class="master-star-sm">★</text>
  20. </text>
  21. </view>
  22. <view class="cell cell-mid zone-mother" @click="showCellDetail('N', chartNum('innerMid', 1))">
  23. <text :class="numColorCls(chartNum('innerMid', 1))">
  24. {{ matrix.innerMid[1] }}
  25. <text v-if="isMasterNum(chartNum('innerMid', 1))" class="master-star-sm">★</text>
  26. </text>
  27. </view>
  28. </view>
  29. <view class="row-sep"></view>
  30. <view class="row row-bot4">
  31. <view class="cell-bot4" @click="showCellDetail('I', chartNum('innerBottom', 0))">
  32. <text :class="numColorCls(chartNum('innerBottom', 0))">
  33. {{ matrix.innerBottom[0] }}
  34. <text v-if="isMasterNum(chartNum('innerBottom', 0))" class="master-star-sm">★</text>
  35. </text>
  36. </view>
  37. <view class="cell-bot4 zone-father" @click="showCellDetail('J', chartNum('innerBottom', 1))">
  38. <text :class="numColorCls(chartNum('innerBottom', 1))">
  39. {{ matrix.innerBottom[1] }}
  40. <text v-if="isMasterNum(chartNum('innerBottom', 1))" class="master-star-sm">★</text>
  41. </text>
  42. </view>
  43. <view class="cell-bot4" @click="showCellDetail('K', chartNum('innerBottom', 2))">
  44. <text :class="numColorCls(chartNum('innerBottom', 2))">
  45. {{ matrix.innerBottom[2] }}
  46. <text v-if="isMasterNum(chartNum('innerBottom', 2))" class="master-star-sm">★</text>
  47. </text>
  48. </view>
  49. <view class="cell-bot4 zone-mother" @click="showCellDetail('L', chartNum('innerBottom', 3))">
  50. <text :class="numColorCls(chartNum('innerBottom', 3))">
  51. {{ matrix.innerBottom[3] }}
  52. <text v-if="isMasterNum(chartNum('innerBottom', 3))" class="master-star-sm">★</text>
  53. </text>
  54. </view>
  55. </view>
  56. </view>
  57. <!-- 外三区 -->
  58. <view class="outer-tri top-tri">
  59. <view class="tri-main" :class="numColorCls(matrix.outerTop.main)" @click="showCellDetail('X', matrix.outerTop.main)">
  60. {{ matrix.outerTop.main }}
  61. <text v-if="isMasterNum(matrix.outerTop.main)" class="master-star">★</text>
  62. </view>
  63. <view class="tri-subs">
  64. <text class="tri-sub" :class="numColorCls(matrix.outerTop.sub[0])" @click.stop="showCellDetail('V', matrix.outerTop.sub[0])">
  65. {{ matrix.outerTop.sub[0] }}
  66. <text v-if="isMasterNum(matrix.outerTop.sub[0])" class="master-star-sm">★</text>
  67. </text>
  68. <text class="tri-sub" :class="numColorCls(matrix.outerTop.sub[1])" @click.stop="showCellDetail('W', matrix.outerTop.sub[1])">
  69. {{ matrix.outerTop.sub[1] }}
  70. <text v-if="isMasterNum(matrix.outerTop.sub[1])" class="master-star-sm">★</text>
  71. </text>
  72. </view>
  73. </view>
  74. <view class="outer-tri left-tri">
  75. <view class="tri-main" :class="numColorCls(matrix.outerLeft.main)" @click="showCellDetail('R', matrix.outerLeft.main)">
  76. {{ matrix.outerLeft.main }}
  77. <text v-if="isMasterNum(matrix.outerLeft.main)" class="master-star-sm">★</text>
  78. </view>
  79. <view class="tri-subs">
  80. <text class="tri-sub" :class="numColorCls(matrix.outerLeft.sub[0])" @click.stop="showCellDetail('P', matrix.outerLeft.sub[0])">
  81. {{ matrix.outerLeft.sub[0] }}
  82. <text v-if="isMasterNum(matrix.outerLeft.sub[0])" class="master-star-sm">★</text>
  83. </text>
  84. <text class="tri-sub" :class="numColorCls(matrix.outerLeft.sub[1])" @click.stop="showCellDetail('Q', matrix.outerLeft.sub[1])">
  85. {{ matrix.outerLeft.sub[1] }}
  86. <text v-if="isMasterNum(matrix.outerLeft.sub[1])" class="master-star-sm">★</text>
  87. </text>
  88. </view>
  89. </view>
  90. <view class="outer-tri right-tri">
  91. <view class="tri-main" :class="numColorCls(matrix.outerRight.main)" @click="showCellDetail('U', matrix.outerRight.main)">
  92. {{ matrix.outerRight.main }}
  93. <text v-if="isMasterNum(matrix.outerRight.main)" class="master-star-sm">★</text>
  94. </view>
  95. <view class="tri-subs">
  96. <text class="tri-sub" :class="numColorCls(matrix.outerRight.sub[0])" @click.stop="showCellDetail('S', matrix.outerRight.sub[0])">
  97. {{ matrix.outerRight.sub[0] }}
  98. <text v-if="isMasterNum(matrix.outerRight.sub[0])" class="master-star-sm">★</text>
  99. </text>
  100. <text class="tri-sub" :class="numColorCls(matrix.outerRight.sub[1])" @click.stop="showCellDetail('T', matrix.outerRight.sub[1])">
  101. {{ matrix.outerRight.sub[1] }}
  102. <text v-if="isMasterNum(matrix.outerRight.sub[1])" class="master-star-sm">★</text>
  103. </text>
  104. </view>
  105. </view>
  106. <view class="sep-v sep-v-left"></view>
  107. <view class="sep-v sep-v-right"></view>
  108. </view>
  109. <view class="date-footer">
  110. <view class="date-group">
  111. <view class="input-boxes">
  112. <view class="box" v-for="(num, index) in birthday.day" :key="'d-'+index">{{ num }}</view>
  113. </view>
  114. <text class="label">日</text>
  115. </view>
  116. <view class="date-divider"></view>
  117. <view class="date-group">
  118. <view class="input-boxes">
  119. <view class="box" v-for="(num, index) in birthday.month" :key="'m-'+index">{{ num }}</view>
  120. </view>
  121. <text class="label">月</text>
  122. </view>
  123. <view class="date-divider"></view>
  124. <view class="date-group">
  125. <view class="input-boxes">
  126. <view class="box" v-for="(num, index) in birthday.year" :key="'y-'+index">{{ num }}</view>
  127. </view>
  128. <text class="label">年</text>
  129. </view>
  130. </view>
  131. <!-- Detail panel with annotation support -->
  132. <view v-if="selectedCell" class="detail-overlay" @click="hideDetail">
  133. <view class="detail-panel" @click.stop>
  134. <view class="detail-close" @click="hideDetail">✕</view>
  135. <view class="detail-num" :class="numColorCls(selectedCell.value)">{{ selectedCell.value }}</view>
  136. <view class="detail-name">{{ selectedCell.label }}</view>
  137. <view class="detail-zone-tag" :class="'tag-' + selectedCell.zone">{{ zoneName(selectedCell.zone) }}</view>
  138. <view class="detail-trait">{{ selectedCell.trait }}</view>
  139. <view class="detail-desc">{{ selectedCell.desc }}</view>
  140. <view v-if="selectedCell.isMaster" class="detail-master">✦ 卓越数 — 能量倍增,非同凡响 ✦</view>
  141. <!-- Annotation section (US-7.1) -->
  142. <view v-if="recordId" class="annotation-section">
  143. <view class="anno-divider"></view>
  144. <text class="anno-title">📝 批注</text>
  145. <!-- Existing annotations for this position -->
  146. <view v-if="positionAnnotations.length > 0" class="anno-list">
  147. <view v-for="(a, idx) in positionAnnotations" :key="idx" class="anno-item">
  148. <text class="anno-text">{{ a.content }}</text>
  149. <view class="anno-item-row">
  150. <text class="anno-date">{{ formatTime(a.createdAt) }}</text>
  151. <text class="anno-tag" v-if="a.tagName" :style="{ color: a.tagColor }">#{{ a.tagName }}</text>
  152. <text class="anno-del" @click="deleteAnnotation(a.id)">删除</text>
  153. </view>
  154. </view>
  155. </view>
  156. <!-- Add annotation -->
  157. <view class="anno-add">
  158. <input class="anno-input" v-model="annoText" placeholder="添加批注..." maxlength="200" />
  159. <view class="anno-actions">
  160. <view class="tag-selector">
  161. <text
  162. v-for="t in allTags"
  163. :key="t.id"
  164. class="tag-option"
  165. :class="{ active: selectedTagId === t.id }"
  166. :style="{ borderColor: t.color || '#666' }"
  167. @click="selectedTagId = selectedTagId === t.id ? null : t.id"
  168. >#{{ t.name }}</text>
  169. <text class="tag-option tag-add" @click="showCreateTag">+</text>
  170. </view>
  171. <button class="anno-save" @click="saveAnnotation" :disabled="!annoText.trim()">保存</button>
  172. </view>
  173. </view>
  174. </view>
  175. </view>
  176. </view>
  177. <!-- Create tag modal -->
  178. <view v-if="showTagModal" class="detail-overlay" @click="showTagModal = false">
  179. <view class="tag-modal" @click.stop>
  180. <text class="tag-modal-title">新建标签</text>
  181. <input class="tag-modal-input" v-model="newTagName" placeholder="标签名称" maxlength="20" />
  182. <view class="tag-color-picker">
  183. <text
  184. v-for="c in tagColors"
  185. :key="c"
  186. class="color-dot"
  187. :class="{ active: newTagColor === c }"
  188. :style="{ background: c }"
  189. @click="newTagColor = c"
  190. ></text>
  191. </view>
  192. <view class="tag-modal-actions">
  193. <button class="tag-cancel" @click="showTagModal = false">取消</button>
  194. <button class="tag-confirm" @click="createTag" :disabled="!newTagName.trim()">创建</button>
  195. </view>
  196. </view>
  197. </view>
  198. </view>
  199. </template>
  200. <script>
  201. const NUM_COLORS = {
  202. 1: '#D94A4A', 2: '#4A90D9', 3: '#E8A238',
  203. 4: '#2D8B67', 5: '#D4A017', 6: '#7B6FA0',
  204. 7: '#4A6FA5', 8: '#C9A84C', 9: '#B85C3A'
  205. }
  206. const POSITION_INFO = {
  207. O: { label: '主性格', zone: 'main', trait: '核心人格特质', desc: '代表你的核心性格、人生方向和主要能量特征,是整个命盘的中心。' },
  208. M: { label: '青年综合数', zone: 'left', trait: '青年期自身力量的呈现', desc: '由月能量与日能量结合而成,代表青年期的内在动力与外在表现。' },
  209. N: { label: '晚年综合数', zone: 'right', trait: '晚年期自身力量的呈现', desc: '由年前位与年后位结合而成,代表晚年的人生经验积累与智慧沉淀。' },
  210. I: { label: '日能量', zone: 'left', trait: '出生日能量', desc: '代表你出生当天的能量特质,影响你的日常行为和表达方式。' },
  211. J: { label: '月能量', zone: 'father', trait: '父亲遗传与先天能量', desc: '代表来自父亲/父系的先天遗传能量,影响你的内在根基。' },
  212. K: { label: '年前位', zone: 'right', trait: '前半生积累', desc: '代表早年环境与成长经历,影响人生前期的运势走向。' },
  213. L: { label: '年后位', zone: 'mother', trait: '母亲遗传与后天能量', desc: '代表来自母亲/母系的遗传能量以及后天环境的影响。' },
  214. P: { label: '左侧左子', zone: 'left', trait: '外部左翼基础', desc: '由日能量(I)与青年综合数(M)结合,代表左翼外部能量的基础层面。' },
  215. Q: { label: '左侧右子', zone: 'left', trait: '外部左翼辅助', desc: '由月能量(J)与青年综合数(M)结合,代表左翼外部能量的辅助层面。' },
  216. R: { label: '左侧主数', zone: 'left', trait: '左翼外部能量总和(21-40岁)', desc: '左侧子数之和,代表21-40岁年龄段的综合外部能量。' },
  217. S: { label: '右侧左子', zone: 'right', trait: '外部右翼基础', desc: '由年前位与晚年综合数结合,代表右翼外部能量的基础层面。' },
  218. T: { label: '右侧右子', zone: 'right', trait: '外部右翼辅助', desc: '由年后位与晚年综合数结合,代表右翼外部能量的辅助层面。' },
  219. U: { label: '右侧主数', zone: 'right', trait: '右翼外部能量总和(61+岁)', desc: '右侧子数之和,代表61岁以后年龄段的综合外部能量。' },
  220. V: { label: '顶部左子', zone: 'main', trait: '顶部外部基础', desc: '由青年综合数与主性格结合,代表顶部外部能量的基础层面。' },
  221. W: { label: '顶部右子', zone: 'main', trait: '顶部外部辅助', desc: '由晚年综合数与主性格结合,代表顶部外部能量的辅助层面。' },
  222. X: { label: '顶部主数', zone: 'main', trait: '顶部外部能量总和(41-60岁)', desc: '顶部子数之和,代表41-60岁年龄段的综合外部能量。' }
  223. }
  224. const TAG_COLORS = ['#D94A4A', '#4A90D9', '#E8A238', '#2D8B67', '#7B6FA0', '#C9A84C', '#D4A017', '#B85C3A']
  225. export default {
  226. props: {
  227. chartData: { type: Object, default: null },
  228. birthYear: { type: Number, default: 0 },
  229. birthMonth: { type: Number, default: 0 },
  230. birthDay: { type: Number, default: 0 },
  231. recordId: { type: Number, default: null },
  232. annotations: { type: Array, default: () => [] },
  233. tags: { type: Array, default: () => [] }
  234. },
  235. emits: ['annotation-add', 'annotation-delete', 'tag-create'],
  236. data() {
  237. return {
  238. selectedCell: null,
  239. annoText: '',
  240. selectedTagId: null,
  241. showTagModal: false,
  242. newTagName: '',
  243. newTagColor: TAG_COLORS[1],
  244. tagColors: TAG_COLORS
  245. }
  246. },
  247. computed: {
  248. matrix() {
  249. if (!this.chartData) {
  250. return {
  251. innerTop: 3,
  252. innerMid: [2, 1],
  253. innerBottom: [1, 2, 3, 4],
  254. outerTop: { main: 7, sub: [5, 6] },
  255. outerLeft: { main: 1, sub: [8, 9] },
  256. outerRight: { main: 4, sub: [2, 3] }
  257. }
  258. }
  259. const d = this.chartData
  260. return {
  261. innerTop: d.O,
  262. innerMid: [d.M, d.N],
  263. innerBottom: [d.I, d.J, d.K, d.L],
  264. outerTop: { main: d.X, sub: [d.V, d.W] },
  265. outerLeft: { main: d.R, sub: [d.P, d.Q] },
  266. outerRight: { main: d.U, sub: [d.S, d.T] }
  267. }
  268. },
  269. birthday() {
  270. if (this.birthYear > 0) {
  271. return {
  272. year: String(this.birthYear).padStart(4, '0').split(''),
  273. month: String(this.birthMonth).padStart(2, '0').split(''),
  274. day: String(this.birthDay).padStart(2, '0').split('')
  275. }
  276. }
  277. return {
  278. month: ['0', '1'],
  279. day: ['0', '1'],
  280. year: ['1', '9', '9', '0']
  281. }
  282. },
  283. positionAnnotations() {
  284. if (!this.selectedCell || !this.annotations || !this.recordId) return []
  285. return this.annotations.filter(a => a.position === this.selectedCell.position)
  286. },
  287. allTags() {
  288. return this.tags || []
  289. }
  290. },
  291. methods: {
  292. chartNum(row, index) {
  293. if (row === 'innerTop') return this.matrix.innerTop
  294. if (row === 'innerMid') return this.matrix.innerMid[index]
  295. if (row === 'innerBottom') return this.matrix.innerBottom[index]
  296. return 0
  297. },
  298. numColorCls(num) {
  299. return 'num-color-' + num
  300. },
  301. isMasterNum(num) {
  302. return num === 11 || num === 22 || num === 33
  303. },
  304. showCellDetail(pos, value) {
  305. const info = POSITION_INFO[pos]
  306. if (!info) return
  307. this.selectedCell = {
  308. position: pos,
  309. value: value,
  310. label: info.label,
  311. zone: info.zone,
  312. trait: info.trait,
  313. desc: info.desc,
  314. isMaster: this.isMasterNum(value)
  315. }
  316. },
  317. hideDetail() {
  318. this.selectedCell = null
  319. this.annoText = ''
  320. this.selectedTagId = null
  321. },
  322. zoneName(zone) {
  323. return { main: '主性格区', left: '左区(月日能量)', right: '右区(年份能量)', father: '父源区', mother: '母源区' }[zone] || ''
  324. },
  325. formatTime(dateStr) {
  326. if (!dateStr) return ''
  327. const d = new Date(dateStr)
  328. return `${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')} ${String(d.getHours()).padStart(2,'0')}:${String(d.getMinutes()).padStart(2,'0')}`
  329. },
  330. saveAnnotation() {
  331. if (!this.annoText.trim() || !this.recordId || !this.selectedCell) return
  332. this.$emit('annotation-add', {
  333. recordId: this.recordId,
  334. position: this.selectedCell.position,
  335. content: this.annoText.trim(),
  336. tagId: this.selectedTagId
  337. })
  338. this.annoText = ''
  339. },
  340. deleteAnnotation(annoId) {
  341. this.$emit('annotation-delete', annoId)
  342. },
  343. showCreateTag() {
  344. this.showTagModal = true
  345. this.newTagName = ''
  346. this.newTagColor = TAG_COLORS[1]
  347. },
  348. createTag() {
  349. if (!this.newTagName.trim()) return
  350. this.$emit('tag-create', {
  351. name: this.newTagName.trim(),
  352. color: this.newTagColor
  353. })
  354. this.showTagModal = false
  355. }
  356. }
  357. }
  358. </script>
  359. <style scoped>
  360. /* ================================================
  361. 数字能量三角图 - 深邃星空 · 黄金三角
  362. ================================================ */
  363. .container {
  364. width: 100%;
  365. background: linear-gradient(160deg, #0c0a1a 0%, #1a1040 40%, #0f0c2e 100%);
  366. display: flex;
  367. flex-direction: column;
  368. align-items: center;
  369. padding: 85rpx 0 14rpx;
  370. border-radius: 20rpx;
  371. position: relative;
  372. overflow: hidden;
  373. }
  374. .container::before {
  375. content: '';
  376. position: absolute;
  377. inset: 0;
  378. background-image:
  379. radial-gradient(1rpx 1rpx at 10% 20%, rgba(255,255,255,0.5) 0%, transparent 100%),
  380. radial-gradient(1.5rpx 1.5rpx at 30% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
  381. radial-gradient(1rpx 1rpx at 50% 15%, rgba(255,255,255,0.6) 0%, transparent 100%),
  382. radial-gradient(1rpx 1rpx at 70% 80%, rgba(255,255,255,0.35) 0%, transparent 100%),
  383. radial-gradient(1.5rpx 1.5rpx at 85% 30%, rgba(255,255,255,0.45) 0%, transparent 100%),
  384. radial-gradient(1rpx 1rpx at 20% 90%, rgba(255,255,255,0.3) 0%, transparent 100%);
  385. pointer-events: none;
  386. z-index: 0;
  387. }
  388. .chart-inner {
  389. position: relative;
  390. width: 100%;
  391. height: 520rpx;
  392. padding: 120rpx 60rpx 0 60rpx;
  393. box-sizing: border-box;
  394. z-index: 1;
  395. }
  396. /* Zone backgrounds, layout, cells, outer tris, etc. — exactly the same as before */
  397. .zone-left-bg,
  398. .zone-right-bg {
  399. position: absolute;
  400. pointer-events: none;
  401. z-index: 0;
  402. opacity: 0.12;
  403. }
  404. .zone-left-bg {
  405. left: 0;
  406. bottom: 0;
  407. width: 55%;
  408. height: 85%;
  409. clip-path: polygon(0% 100%, 15% 0%, 100% 100%);
  410. background: linear-gradient(135deg, #f59e0b, #fbbf24);
  411. }
  412. .zone-right-bg {
  413. right: 0;
  414. bottom: 0;
  415. width: 55%;
  416. height: 85%;
  417. clip-path: polygon(100% 100%, 85% 0%, 0% 100%);
  418. background: linear-gradient(135deg, #4A90D9, #4A6FA5);
  419. }
  420. .zone-father { position: relative; }
  421. .zone-father::after {
  422. content: '';
  423. position: absolute;
  424. bottom: -2rpx;
  425. left: 50%;
  426. transform: translateX(-50%);
  427. width: 20rpx;
  428. height: 3rpx;
  429. border-radius: 2rpx;
  430. background: #4A90D9;
  431. opacity: 0.5;
  432. }
  433. .zone-mother { position: relative; }
  434. .zone-mother::after {
  435. content: '';
  436. position: absolute;
  437. bottom: -2rpx;
  438. left: 50%;
  439. transform: translateX(-50%);
  440. width: 20rpx;
  441. height: 3rpx;
  442. border-radius: 2rpx;
  443. background: #7B6FA0;
  444. opacity: 0.5;
  445. }
  446. .inner-matrix::after {
  447. content: '';
  448. position: absolute;
  449. top: 28%;
  450. bottom: 0;
  451. left: 50%;
  452. transform: translateX(-50%);
  453. width: 1rpx;
  454. background: linear-gradient(180deg,
  455. rgba(255, 255, 255, 0.06) 0%,
  456. rgba(255, 255, 255, 0.10) 15%,
  457. rgba(255, 255, 255, 0.10) 85%,
  458. rgba(255, 255, 255, 0.04) 100%
  459. );
  460. pointer-events: none;
  461. z-index: 1;
  462. }
  463. .num-color-1 { color: #D94A4A !important; }
  464. .num-color-2 { color: #4A90D9 !important; }
  465. .num-color-3 { color: #E8A238 !important; }
  466. .num-color-4 { color: #2D8B67 !important; }
  467. .num-color-5 { color: #D4A017 !important; }
  468. .num-color-6 { color: #7B6FA0 !important; }
  469. .num-color-7 { color: #4A6FA5 !important; }
  470. .num-color-8 { color: #C9A84C !important; }
  471. .num-color-9 { color: #B85C3A !important; }
  472. .master-star {
  473. font-size: 28rpx;
  474. color: #fbbf24;
  475. text-shadow: 0 0 16rpx rgba(251, 191, 36, 0.8);
  476. display: inline-block;
  477. margin-left: 4rpx;
  478. animation: pulse-star 1.5s ease-in-out infinite;
  479. }
  480. .master-star-sm {
  481. font-size: 20rpx;
  482. color: #fbbf24;
  483. text-shadow: 0 0 12rpx rgba(251, 191, 36, 0.6);
  484. display: inline-block;
  485. margin-left: 2rpx;
  486. animation: pulse-star 1.5s ease-in-out infinite;
  487. }
  488. @keyframes pulse-star {
  489. 0%, 100% { opacity: 1; transform: scale(1); }
  490. 50% { opacity: 0.6; transform: scale(1.2); }
  491. }
  492. .triangle-glow {
  493. position: absolute;
  494. top: 100rpx;
  495. left: 44rpx;
  496. right: 44rpx;
  497. bottom: 10rpx;
  498. clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  499. background: linear-gradient(135deg, rgba(255, 200, 50, 0.2), rgba(255, 100, 200, 0.15));
  500. filter: blur(20rpx);
  501. }
  502. .triangle-bg {
  503. position: absolute;
  504. top: 104rpx;
  505. left: 48rpx;
  506. right: 48rpx;
  507. bottom: 14rpx;
  508. clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  509. background: linear-gradient(165deg, #fbbf24 0%, #f59e0b 30%, #d97706 60%, #b45309 100%);
  510. padding: 3rpx;
  511. box-sizing: border-box;
  512. }
  513. .triangle-bg::after {
  514. content: '';
  515. display: block;
  516. width: 100%;
  517. height: 100%;
  518. background: linear-gradient(180deg, #0f0a1e 0%, #1a1035 50%, #0f0a20 100%);
  519. clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  520. }
  521. .inner-matrix {
  522. position: absolute;
  523. bottom: 14rpx;
  524. left: 48rpx;
  525. right: 48rpx;
  526. height: 74%;
  527. display: flex;
  528. flex-direction: column;
  529. z-index: 2;
  530. }
  531. .row { display: flex; }
  532. .row-top {
  533. height: 36%;
  534. justify-content: center;
  535. align-items: flex-end;
  536. padding-bottom: 4rpx;
  537. }
  538. .row-mid {
  539. height: 28%;
  540. justify-content: center;
  541. align-items: center;
  542. gap: 56rpx;
  543. position: relative;
  544. }
  545. .row-mid::before {
  546. content: '';
  547. position: absolute;
  548. top: -4rpx;
  549. left: 50%;
  550. transform: translateX(-50%);
  551. width: 32%;
  552. height: 1rpx;
  553. background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, transparent);
  554. pointer-events: none;
  555. }
  556. .row-bot4 {
  557. height: 36%;
  558. display: flex;
  559. justify-content: center;
  560. align-items: center;
  561. gap: 16rpx;
  562. padding: 0 20rpx;
  563. position: relative;
  564. }
  565. .row-sep {
  566. height: 2rpx;
  567. width: 62%;
  568. margin: 0 auto;
  569. background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12) 20%, rgba(255, 255, 255, 0.12) 80%, transparent);
  570. flex-shrink: 0;
  571. }
  572. .row-bot4::before {
  573. content: '';
  574. position: absolute;
  575. top: 6rpx;
  576. bottom: 6rpx;
  577. left: 50%;
  578. transform: translateX(-50%);
  579. width: 1rpx;
  580. background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0.15) 80%, transparent);
  581. pointer-events: none;
  582. z-index: 1;
  583. }
  584. .cell-main {
  585. font-size: 64rpx;
  586. font-weight: 700;
  587. color: #fbbf24;
  588. text-shadow: 0 0 24rpx rgba(251, 191, 36, 0.5), 0 0 80rpx rgba(251, 191, 36, 0.2);
  589. letter-spacing: 2rpx;
  590. }
  591. .cell-mid {
  592. flex: none;
  593. width: auto;
  594. font-size: 44rpx;
  595. font-weight: 600;
  596. color: #ffffff;
  597. text-shadow: 0 0 16rpx rgba(255, 255, 255, 0.25);
  598. padding: 0 6rpx;
  599. }
  600. .cell-bot4 {
  601. width: 64rpx;
  602. text-align: center;
  603. font-size: 40rpx;
  604. font-weight: 500;
  605. color: #ffffff;
  606. text-shadow: 0 0 12rpx rgba(255, 255, 255, 0.2);
  607. }
  608. .border-right { border-right: 1rpx solid rgba(255, 255, 255, 0.1); }
  609. .outer-tri {
  610. position: absolute;
  611. display: flex;
  612. flex-direction: column;
  613. align-items: center;
  614. z-index: 3;
  615. }
  616. .tri-main {
  617. font-size: 44rpx;
  618. font-weight: 700;
  619. color: #ffffff;
  620. text-shadow: 0 0 18rpx rgba(255, 255, 255, 0.2);
  621. line-height: 1.1;
  622. }
  623. .tri-subs {
  624. display: flex;
  625. gap: 20rpx;
  626. margin-top: 4rpx;
  627. }
  628. .tri-sub {
  629. font-size: 44rpx;
  630. font-weight: 700;
  631. color: rgba(255, 255, 255, 0.75);
  632. }
  633. .top-tri { top: -58rpx; left: 50%; transform: translateX(-50%); position: absolute; }
  634. .top-tri .tri-main { font-size: 52rpx; color: #fbbf24; text-shadow: 0 0 28rpx rgba(251, 191, 36, 0.4); }
  635. .left-tri { top: 28%; left: 58rpx; position: absolute; }
  636. .right-tri { top: 28%; right: 58rpx; position: absolute; }
  637. .top-tri .tri-subs { position: relative; }
  638. .top-tri .tri-subs::before {
  639. content: '';
  640. position: absolute;
  641. left: 50%;
  642. bottom: -20rpx;
  643. transform: translateX(-50%);
  644. width: 130rpx;
  645. height: 1rpx;
  646. background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15) 15%, rgba(255, 255, 255, 0.15) 85%, transparent);
  647. }
  648. .sep-v {
  649. position: absolute;
  650. z-index: 2;
  651. width: 1rpx;
  652. background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 100%);
  653. pointer-events: none;
  654. }
  655. .sep-v-left { top: 20rpx; left: 50%; height: 70rpx; transform-origin: top center; transform: rotate(-36deg); }
  656. .sep-v-right { top: 20rpx; left: 50%; height: 70rpx; transform-origin: top center; transform: rotate(36deg); }
  657. .date-footer {
  658. display: flex;
  659. align-items: center;
  660. margin-top: 20rpx;
  661. padding: 0 40rpx;
  662. z-index: 1;
  663. }
  664. .date-group { display: flex; flex-direction: column; align-items: center; }
  665. .date-divider { width: 1rpx; height: 40rpx; background: rgba(255, 255, 255, 0.08); margin: 0 24rpx; }
  666. .input-boxes { display: flex; }
  667. .box {
  668. width: 34rpx; height: 42rpx;
  669. border: 1rpx solid rgba(255, 255, 255, 0.25);
  670. border-radius: 6rpx; margin: 0 3rpx;
  671. text-align: center; line-height: 42rpx;
  672. font-size: 22rpx; color: #ffffff;
  673. background: rgba(255, 255, 255, 0.08);
  674. }
  675. .label { font-size: 18rpx; color: rgba(255, 255, 255, 0.45); margin-top: 8rpx; letter-spacing: 2rpx; }
  676. /* Detail overlay (same as before, extended for annotations) */
  677. .detail-overlay {
  678. position: fixed;
  679. inset: 0;
  680. background: rgba(0, 0, 0, 0.6);
  681. z-index: 100;
  682. display: flex;
  683. align-items: flex-end;
  684. justify-content: center;
  685. animation: fadeIn 0.2s ease-out;
  686. }
  687. @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  688. .detail-panel {
  689. width: 100%;
  690. background: linear-gradient(180deg, #1a1040 0%, #0f0c2e 100%);
  691. border-radius: 28rpx 28rpx 0 0;
  692. padding: 40rpx 36rpx 60rpx;
  693. position: relative;
  694. animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  695. border-top: 1rpx solid rgba(251, 191, 36, 0.2);
  696. max-height: 70vh;
  697. overflow-y: auto;
  698. }
  699. @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  700. .detail-close {
  701. position: absolute; top: 20rpx; right: 28rpx;
  702. font-size: 32rpx; color: rgba(255, 255, 255, 0.3);
  703. width: 50rpx; height: 50rpx;
  704. display: flex; align-items: center; justify-content: center;
  705. }
  706. .detail-num { font-size: 80rpx; font-weight: 700; text-align: center; text-shadow: 0 0 30rpx currentColor; margin-bottom: 8rpx; }
  707. .detail-name { font-size: 30rpx; font-weight: 600; color: #ffffff; text-align: center; margin-bottom: 16rpx; }
  708. .detail-zone-tag { display: inline-block; font-size: 20rpx; padding: 4rpx 16rpx; border-radius: 20rpx; text-align: center; margin: 0 auto 20rpx; width: fit-content; }
  709. .tag-main { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1rpx solid rgba(251, 191, 36, 0.2); }
  710. .tag-left { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1rpx solid rgba(245, 158, 11, 0.2); }
  711. .tag-right { background: rgba(74, 144, 217, 0.15); color: #4A90D9; border: 1rpx solid rgba(74, 144, 217, 0.2); }
  712. .tag-father { background: rgba(74, 144, 217, 0.15); color: #4A90D9; border: 1rpx solid rgba(74, 144, 217, 0.2); }
  713. .tag-mother { background: rgba(123, 111, 160, 0.15); color: #7B6FA0; border: 1rpx solid rgba(123, 111, 160, 0.2); }
  714. .detail-trait { font-size: 26rpx; font-weight: 500; color: rgba(255, 255, 255, 0.8); text-align: center; margin-bottom: 16rpx; }
  715. .detail-desc { font-size: 24rpx; color: rgba(255, 255, 255, 0.5); line-height: 1.8; text-align: center; padding: 0 20rpx; }
  716. .detail-master { margin-top: 24rpx; text-align: center; font-size: 22rpx; color: #fbbf24; background: rgba(251, 191, 36, 0.1); border: 1rpx solid rgba(251, 191, 36, 0.15); border-radius: 12rpx; padding: 12rpx; letter-spacing: 2rpx; }
  717. /* ===== Annotation section ===== */
  718. .annotation-section {
  719. margin-top: 16rpx;
  720. }
  721. .anno-divider {
  722. height: 1rpx;
  723. background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  724. margin: 20rpx 0 16rpx;
  725. }
  726. .anno-title {
  727. font-size: 26rpx;
  728. font-weight: 600;
  729. color: rgba(255,255,255,0.7);
  730. display: block;
  731. margin-bottom: 12rpx;
  732. }
  733. .anno-list {
  734. margin-bottom: 12rpx;
  735. }
  736. .anno-item {
  737. background: rgba(255,255,255,0.04);
  738. border: 1rpx solid rgba(255,255,255,0.06);
  739. border-radius: 10rpx;
  740. padding: 12rpx 14rpx;
  741. margin-bottom: 8rpx;
  742. }
  743. .anno-text {
  744. font-size: 24rpx;
  745. color: rgba(255,255,255,0.85);
  746. display: block;
  747. line-height: 1.5;
  748. }
  749. .anno-item-row {
  750. display: flex;
  751. align-items: center;
  752. gap: 12rpx;
  753. margin-top: 6rpx;
  754. }
  755. .anno-date {
  756. font-size: 20rpx;
  757. color: rgba(255,255,255,0.3);
  758. }
  759. .anno-tag {
  760. font-size: 20rpx;
  761. font-weight: 500;
  762. }
  763. .anno-del {
  764. font-size: 20rpx;
  765. color: #D94A4A;
  766. margin-left: auto;
  767. }
  768. .anno-add {
  769. margin-top: 8rpx;
  770. }
  771. .anno-input {
  772. width: 100%;
  773. height: 72rpx;
  774. border: 1rpx solid rgba(255,255,255,0.1);
  775. border-radius: 10rpx;
  776. padding: 0 14rpx;
  777. font-size: 24rpx;
  778. color: rgba(255,255,255,0.85);
  779. background: rgba(255,255,255,0.04);
  780. box-sizing: border-box;
  781. }
  782. .anno-actions {
  783. display: flex;
  784. justify-content: space-between;
  785. align-items: center;
  786. margin-top: 10rpx;
  787. }
  788. .tag-selector {
  789. display: flex;
  790. flex-wrap: wrap;
  791. gap: 8rpx;
  792. flex: 1;
  793. }
  794. .tag-option {
  795. font-size: 20rpx;
  796. padding: 4rpx 12rpx;
  797. border-radius: 8rpx;
  798. border: 1rpx solid rgba(255,255,255,0.15);
  799. color: rgba(255,255,255,0.5);
  800. }
  801. .tag-option.active {
  802. background: rgba(255,255,255,0.08);
  803. color: rgba(255,255,255,0.85);
  804. }
  805. .tag-add {
  806. font-size: 24rpx;
  807. font-weight: 700;
  808. color: rgba(255,255,255,0.4);
  809. border-style: dashed;
  810. padding: 4rpx 14rpx;
  811. }
  812. .anno-save {
  813. font-size: 22rpx;
  814. padding: 6rpx 24rpx;
  815. background: linear-gradient(135deg, #f59e0b, #d97706);
  816. color: #fff;
  817. border: none;
  818. border-radius: 8rpx;
  819. flex-shrink: 0;
  820. margin-left: 8rpx;
  821. }
  822. .anno-save[disabled] { opacity: 0.3; }
  823. /* Tag creation modal */
  824. .tag-modal {
  825. width: 70%;
  826. background: #1a1040;
  827. border-radius: 20rpx;
  828. padding: 36rpx;
  829. border: 1rpx solid rgba(251,191,36,0.15);
  830. margin-bottom: 30vh;
  831. }
  832. .tag-modal-title {
  833. font-size: 28rpx;
  834. font-weight: 600;
  835. color: rgba(255,255,255,0.9);
  836. display: block;
  837. text-align: center;
  838. margin-bottom: 20rpx;
  839. }
  840. .tag-modal-input {
  841. width: 100%;
  842. height: 72rpx;
  843. border: 1rpx solid rgba(255,255,255,0.15);
  844. border-radius: 10rpx;
  845. padding: 0 14rpx;
  846. font-size: 26rpx;
  847. color: rgba(255,255,255,0.85);
  848. background: rgba(255,255,255,0.04);
  849. box-sizing: border-box;
  850. margin-bottom: 16rpx;
  851. }
  852. .tag-color-picker {
  853. display: flex;
  854. gap: 12rpx;
  855. justify-content: center;
  856. margin-bottom: 24rpx;
  857. }
  858. .color-dot {
  859. width: 40rpx;
  860. height: 40rpx;
  861. border-radius: 50%;
  862. border: 2rpx solid transparent;
  863. }
  864. .color-dot.active {
  865. border-color: #fff;
  866. box-shadow: 0 0 12rpx rgba(255,255,255,0.3);
  867. }
  868. .tag-modal-actions {
  869. display: flex;
  870. gap: 16rpx;
  871. }
  872. .tag-cancel {
  873. flex: 1;
  874. padding: 12rpx 0;
  875. background: rgba(255,255,255,0.06);
  876. border: 1rpx solid rgba(255,255,255,0.1);
  877. border-radius: 10rpx;
  878. color: rgba(255,255,255,0.6);
  879. font-size: 26rpx;
  880. }
  881. .tag-confirm {
  882. flex: 1;
  883. padding: 12rpx 0;
  884. background: linear-gradient(135deg, #f59e0b, #d97706);
  885. border: none;
  886. border-radius: 10rpx;
  887. color: #fff;
  888. font-size: 26rpx;
  889. }
  890. .tag-confirm[disabled] { opacity: 0.3; }
  891. </style>