|
| 1 | +<template> |
| 2 | + <el-row justify="center"> |
| 3 | + <el-col :xs="24" :sm="24" :lg="16" :xl="8"> |
| 4 | + <!-- 干支 --> |
| 5 | + <el-row style="color:#cccccc"> |
| 6 | + <el-col :span="6"> |
| 7 | + <p class="nml" :style="getColor(nianGan)" @dblclick="clearAll()">{{nianGanShen||'年'}}</p> |
| 8 | + <p class="big" :style="getColor(nianGan)" @click="clickGanZhi('nianGan')">{{nianGan||'干'}}</p> |
| 9 | + <p class="big" :style="getColor(nianZhi)" @click="clickGanZhi('nianZhi')">{{nianZhi||'支'}}</p> |
| 10 | + <p class="sml" :style="getColor(i[0])" v-for="i in nianZhiShenList">{{i}}</p> |
| 11 | + </el-col> |
| 12 | + <el-col :span="6"> |
| 13 | + <p class="nml" :style="getColor(yueGan)">{{yueGanShen||'月'}}</p> |
| 14 | + <p class="big" :style="getColor(yueGan)" @click="clickGanZhi('yueGan')">{{yueGan||'干'}}</p> |
| 15 | + <p class="big" :style="getColor(yueZhi)" @click="clickGanZhi('yueZhi')">{{yueZhi||'支'}}</p> |
| 16 | + <p class="sml" :style="getColor(i[0])" v-for="i in yueZhiShenList">{{i}}</p> |
| 17 | + </el-col> |
| 18 | + <el-col :span="6"> |
| 19 | + <p class="nml" :style="riGan&&'color:black'" @click="sex=(sex+1)%3">{{sex?(sex===1?'乾造':'坤造'):'日主'}}</p> |
| 20 | + <p class="big" :style="getColor(riGan)" @click="clickGanZhi('riGan')">{{riGan||'干'}}</p> |
| 21 | + <p class="big" :style="getColor(riZhi)" @click="clickGanZhi('riZhi')">{{riZhi||'支'}}</p> |
| 22 | + <p class="sml" :style="getColor(i[0])" v-for="i in riZhiShenList">{{i}}</p> |
| 23 | + </el-col> |
| 24 | + <el-col :span="6"> |
| 25 | + <p class="nml" :style="getColor(shiGan)">{{shiGanShen||'时'}}</p> |
| 26 | + <p class="big" :style="getColor(shiGan)" @click="clickGanZhi('shiGan')">{{shiGan||'干'}}</p> |
| 27 | + <p class="big" :style="getColor(shiZhi)" @click="clickGanZhi('shiZhi')">{{shiZhi||'支'}}</p> |
| 28 | + <p class="sml" :style="getColor(i[0])" v-for="i in shiZhiShenList">{{i}}</p> |
| 29 | + </el-col> |
| 30 | + </el-row> |
| 31 | + <!-- 干支选择面板 --> |
| 32 | + <el-dialog v-model="showSelectDialog" width="80%" align-center> |
| 33 | + <el-row justify="center"> |
| 34 | + <el-col :span="12" v-for="i in [...selectList, '']"> |
| 35 | + <p class="nml" :style="getColor(i)" @click="changingMap[changing]=i;showSelectDialog=false"> |
| 36 | + {{i||'空'}} |
| 37 | + </p> |
| 38 | + </el-col> |
| 39 | + </el-row> |
| 40 | + </el-dialog> |
| 41 | + <!-- 备注 --> |
| 42 | + <el-row> |
| 43 | + <input v-model="note" style="border:none;width:100%" /> |
| 44 | + </el-row> |
| 45 | + <!-- 大运 --> |
| 46 | + <el-row v-if="daYunList.length>0"> |
| 47 | + <el-col :span="4" v-for="(i,n) in ['一','二','三','四','五','六','七','八','九','十'].slice(0,daYunList.length)"> |
| 48 | + <p class="sml" style="margin-left:0;margin-right:0" @dblclick="changeQiYunAge(n)"> |
| 49 | + {{qiYunAge>-1?qiYunAge+n*10+'岁':i+'运'}} |
| 50 | + </p> |
| 51 | + </el-col> |
| 52 | + <el-col :span="4" v-for="i in daYunList" :style="getColor(i[0])"> |
| 53 | + <p class="nml" style="margin:0"> |
| 54 | + {{i[0]}}<sub v-if="riGan" style="font-size:18px">{{SHI_SHEN[riGan][i[0]]}}</sub> |
| 55 | + </p> |
| 56 | + </el-col> |
| 57 | + <el-col :span="4" v-for="i in daYunList" :style="getColor(i[1])"> |
| 58 | + <p class="nml" style="margin:0"> |
| 59 | + {{i[1]}}<sub v-if="riGan" style="font-size:18px">{{SHI_SHEN[riGan][CANG_GAN[i[1]][0]]}}</sub> |
| 60 | + </p> |
| 61 | + </el-col> |
| 62 | + </el-row> |
| 63 | + <!-- 流年 --> |
| 64 | + <el-row v-if="daYunList.length>0&&liuNianList.length>0"> |
| 65 | + <br /> |
| 66 | + <el-scrollbar> |
| 67 | + <div style="display:flex"> |
| 68 | + <p class="sml"><br />流<br />年</p> |
| 69 | + <p class="sml" v-for="(i,n) in liuNianList"> |
| 70 | + <small>{{n+1}}</small> |
| 71 | + <br /> |
| 72 | + <span :style="getColor(i[0])">{{i[0]}}</span> |
| 73 | + <br/> |
| 74 | + <span :style="getColor(i[1])">{{i[1]}}</span> |
| 75 | + </p> |
| 76 | + </div> |
| 77 | + </el-scrollbar> |
| 78 | + </el-row> |
| 79 | + </el-col> |
| 80 | + </el-row> |
| 81 | +</template> |
| 82 | + |
1 | 83 | <script setup>
|
2 | 84 | import { computed, ref, watch } from 'vue'
|
3 | 85 | import {
|
@@ -101,88 +183,6 @@ function isSameYinYang(gan, zhi) {
|
101 | 183 | }
|
102 | 184 | </script>
|
103 | 185 |
|
104 |
| -<template> |
105 |
| -<el-row justify="center"> |
106 |
| -<el-col :xs="24" :sm="24" :lg="16" :xl="8"> |
107 |
| - <!-- 干支 --> |
108 |
| - <el-row style="color:#cccccc"> |
109 |
| - <el-col :span="6"> |
110 |
| - <p class="nml" :style="getColor(nianGan)" @dblclick="clearAll()">{{nianGanShen||'年'}}</p> |
111 |
| - <p class="big" :style="getColor(nianGan)" @click="clickGanZhi('nianGan')">{{nianGan||'干'}}</p> |
112 |
| - <p class="big" :style="getColor(nianZhi)" @click="clickGanZhi('nianZhi')">{{nianZhi||'支'}}</p> |
113 |
| - <p class="sml" :style="getColor(i[0])" v-for="i in nianZhiShenList">{{i}}</p> |
114 |
| - </el-col> |
115 |
| - <el-col :span="6"> |
116 |
| - <p class="nml" :style="getColor(yueGan)">{{yueGanShen||'月'}}</p> |
117 |
| - <p class="big" :style="getColor(yueGan)" @click="clickGanZhi('yueGan')">{{yueGan||'干'}}</p> |
118 |
| - <p class="big" :style="getColor(yueZhi)" @click="clickGanZhi('yueZhi')">{{yueZhi||'支'}}</p> |
119 |
| - <p class="sml" :style="getColor(i[0])" v-for="i in yueZhiShenList">{{i}}</p> |
120 |
| - </el-col> |
121 |
| - <el-col :span="6"> |
122 |
| - <p class="nml" :style="riGan&&'color:black'" @click="sex=(sex+1)%3">{{sex?(sex===1?'乾造':'坤造'):'日主'}}</p> |
123 |
| - <p class="big" :style="getColor(riGan)" @click="clickGanZhi('riGan')">{{riGan||'干'}}</p> |
124 |
| - <p class="big" :style="getColor(riZhi)" @click="clickGanZhi('riZhi')">{{riZhi||'支'}}</p> |
125 |
| - <p class="sml" :style="getColor(i[0])" v-for="i in riZhiShenList">{{i}}</p> |
126 |
| - </el-col> |
127 |
| - <el-col :span="6"> |
128 |
| - <p class="nml" :style="getColor(shiGan)">{{shiGanShen||'时'}}</p> |
129 |
| - <p class="big" :style="getColor(shiGan)" @click="clickGanZhi('shiGan')">{{shiGan||'干'}}</p> |
130 |
| - <p class="big" :style="getColor(shiZhi)" @click="clickGanZhi('shiZhi')">{{shiZhi||'支'}}</p> |
131 |
| - <p class="sml" :style="getColor(i[0])" v-for="i in shiZhiShenList">{{i}}</p> |
132 |
| - </el-col> |
133 |
| - </el-row> |
134 |
| - <!-- 干支选择面板 --> |
135 |
| - <el-dialog v-model="showSelectDialog" width="80%" align-center> |
136 |
| - <el-row justify="center"> |
137 |
| - <el-col :span="12" v-for="i in [...selectList, '']"> |
138 |
| - <p class="nml" :style="getColor(i)" @click="changingMap[changing]=i;showSelectDialog=false"> |
139 |
| - {{i||'空'}} |
140 |
| - </p> |
141 |
| - </el-col> |
142 |
| - </el-row> |
143 |
| - </el-dialog> |
144 |
| - <!-- 备注 --> |
145 |
| - <el-row> |
146 |
| - <input v-model="note" style="border:none;width:100%" /> |
147 |
| - </el-row> |
148 |
| - <!-- 大运 --> |
149 |
| - <el-row v-if="daYunList.length>0"> |
150 |
| - <el-col :span="4" v-for="(i,n) in ['一','二','三','四','五','六','七','八','九','十'].slice(0,daYunList.length)"> |
151 |
| - <p class="sml" style="margin-left:0;margin-right:0" @dblclick="changeQiYunAge(n)"> |
152 |
| - {{qiYunAge>-1?qiYunAge+n*10+'岁':i+'运'}} |
153 |
| - </p> |
154 |
| - </el-col> |
155 |
| - <el-col :span="4" v-for="i in daYunList" :style="getColor(i[0])"> |
156 |
| - <p class="nml" style="margin:0"> |
157 |
| - {{i[0]}}<sub v-if="riGan" style="font-size:18px">{{SHI_SHEN[riGan][i[0]]}}</sub> |
158 |
| - </p> |
159 |
| - </el-col> |
160 |
| - <el-col :span="4" v-for="i in daYunList" :style="getColor(i[1])"> |
161 |
| - <p class="nml" style="margin:0"> |
162 |
| - {{i[1]}}<sub v-if="riGan" style="font-size:18px">{{SHI_SHEN[riGan][CANG_GAN[i[1]][0]]}}</sub> |
163 |
| - </p> |
164 |
| - </el-col> |
165 |
| - </el-row> |
166 |
| - <!-- 流年 --> |
167 |
| - <el-row v-if="daYunList.length>0&&liuNianList.length>0"> |
168 |
| - <br /> |
169 |
| - <el-scrollbar> |
170 |
| - <div style="display:flex"> |
171 |
| - <p class="sml"><br />流<br />年</p> |
172 |
| - <p class="sml" v-for="(i,n) in liuNianList"> |
173 |
| - <small>{{n+1}}</small> |
174 |
| - <br /> |
175 |
| - <span :style="getColor(i[0])">{{i[0]}}</span> |
176 |
| - <br/> |
177 |
| - <span :style="getColor(i[1])">{{i[1]}}</span> |
178 |
| - </p> |
179 |
| - </div> |
180 |
| - </el-scrollbar> |
181 |
| - </el-row> |
182 |
| -</el-col> |
183 |
| -</el-row> |
184 |
| -</template> |
185 |
| - |
186 | 186 | <style scoped>
|
187 | 187 | p, input {
|
188 | 188 | margin: 5px;
|
|
0 commit comments