plan.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  1. <template>
  2. <div class="plan-page">
  3. <custom-header name="农事规划"></custom-header>
  4. <div class="plan-content">
  5. <div class="timeline-container" ref="timelineContainerRef">
  6. <div class="timeline-list" :style="getListStyle">
  7. <div class="timeline-middle-line"></div>
  8. <!-- 物候期覆盖条(progress 为起点,progress2 为终点,单位 %) -->
  9. <div
  10. v-for="(p, idx) in phenologyList"
  11. :key="p.id ?? idx"
  12. class="phenology-bar"
  13. :style="getPhenologyBarStyle(p)"
  14. >
  15. <div class="reproductive-list">
  16. <div
  17. v-for="(r, rIdx) in Array.isArray(p.reproductiveList) ? p.reproductiveList : []"
  18. :key="r.id ?? rIdx"
  19. class="reproductive-item"
  20. :class="{
  21. 'horizontal-text': getReproductiveItemHeight(p) < 30,
  22. 'vertical-lr-text': getReproductiveItemHeight(p) >= 30,
  23. }"
  24. :style="
  25. getReproductiveItemHeight(p) < 30
  26. ? { '--item-height': `${getReproductiveItemHeight(p)}px` }
  27. : {}
  28. "
  29. >
  30. {{ r.name }}
  31. <div class="arranges">
  32. <div
  33. v-for="(fw, aIdx) in Array.isArray(r.farmWorkArrangeList)
  34. ? r.farmWorkArrangeList
  35. : []"
  36. :key="fw.id ?? aIdx"
  37. class="arrange-card"
  38. :class="getArrangeStatusClass(fw)"
  39. @click="handleRowClick(fw)"
  40. >
  41. <div class="card-header">
  42. <div class="header-left">
  43. <span class="farm-work-name">{{ fw.farmWorkName || "农事名称" }}</span>
  44. <span class="tag-standard">标准农事</span>
  45. </div>
  46. <div class="header-right">托管农事</div>
  47. </div>
  48. <div class="card-content">
  49. <span>温馨提示:在某某物候期之后,请密切关注荔枝,关注蒂蛀虫的出现!</span>
  50. <span class="edit-link" @click.stop="handleEdit(fw)">编辑</span>
  51. </div>
  52. <div class="card-divider"></div>
  53. <div class="card-footer" @click.stop="handleRowClick(fw)">查看详情</div>
  54. <div
  55. v-if="
  56. getArrangeStatusClass(fw) === 'status-complete' ||
  57. getArrangeStatusClass(fw) === 'status-warning'
  58. "
  59. class="status-icon"
  60. :class="getArrangeStatusClass(fw)"
  61. >
  62. <el-icon
  63. v-if="getArrangeStatusClass(fw) === 'status-complete'"
  64. size="16"
  65. color="#1CA900"
  66. >
  67. <SuccessFilled />
  68. </el-icon>
  69. <el-icon v-else size="18" color="#FF953D">
  70. <WarnTriangleFilled />
  71. </el-icon>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <div v-for="t in solarTerms" :key="t.id" class="timeline-term" :style="getTermStyle(t)">
  79. <span class="term-name">{{ t.displayName }}</span>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="custom-bottom-fixed-btns">
  85. <div class="bottom-btn primary-btn" @click="addNewTask">新增农事</div>
  86. </div>
  87. </div>
  88. <!-- 农事信息弹窗 -->
  89. <detail-dialog ref="detailDialogRef" @triggerFarmWork="triggerFarmWork"></detail-dialog>
  90. <!-- 新增:激活上传弹窗 -->
  91. <active-upload-popup ref="activeUploadPopupRef" :needExecutor="true" @handleUploadSuccess="getFarmWorkPlan"></active-upload-popup>
  92. </template>
  93. <script setup>
  94. import { ref, onMounted, computed, nextTick } from "vue";
  95. import customHeader from "@/components/customHeader.vue";
  96. import { useRouter, useRoute } from "vue-router";
  97. import detailDialog from "@/components/detailDialog.vue";
  98. import eventBus from "@/api/eventBus";
  99. import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
  100. import { ElMessage } from "element-plus";
  101. const router = useRouter();
  102. const route = useRoute();
  103. const activeSeason = ref("");
  104. const solarTerms = ref([]);
  105. const phenologyList = ref([]);
  106. // 获取当前季节
  107. const getCurrentSeason = () => {
  108. const month = new Date().getMonth() + 1; // 1-12
  109. if (month >= 3 && month <= 5) {
  110. return "spring"; // 春季:3-5月
  111. } else if (month >= 6 && month <= 8) {
  112. return "summer"; // 夏季:6-8月
  113. } else if (month >= 9 && month <= 10) {
  114. return "autumn"; // 秋季:9-10月
  115. } else {
  116. return "winter"; // 冬季:12-2月
  117. }
  118. };
  119. onMounted(() => {
  120. getFarmWorkPlan();
  121. });
  122. const getFarmWorkPlan = () => {
  123. // 如果不是首次加载,保存当前滚动位置
  124. let savedScrollTop = 0;
  125. if (!isInitialLoad.value && timelineContainerRef.value) {
  126. savedScrollTop = timelineContainerRef.value.scrollTop || 0;
  127. }
  128. VE_API.monitor
  129. .farmWorkPlan({ farmId: route.query.farmId })
  130. .then(({ data, code }) => {
  131. if (code === 0) {
  132. const list = Array.isArray(data?.solarTermsList) ? data.solarTermsList : [];
  133. const filtered = list
  134. .filter((t) => t && t.type === 1)
  135. .map((t) => ({
  136. id:
  137. t.id ??
  138. t.solarTermsId ??
  139. t.termId ??
  140. `${t.name || t.solarTermsName || t.termName || "term"}-${t.createDate || ""}`,
  141. displayName: t.name || t.solarTermsName || t.termName || "节气",
  142. createDate: t.createDate || null,
  143. progress: Number(t.progress) || 0,
  144. }));
  145. solarTerms.value = filtered;
  146. // 物候期数据
  147. phenologyList.value = Array.isArray(data?.phenologyList)
  148. ? data.phenologyList.map((it) => ({
  149. id: it.id ?? it.phenologyId ?? it.name ?? `${it.progress}-${it.progress2}`,
  150. progress: Number(it.progress) || 0, // 起点 %
  151. progress2: Number(it.progress2) || 0, // 终点 %
  152. // 兼容多种可能的开始时间字段
  153. startTimeMs: safeParseDate(
  154. it.startDate || it.beginDate || it.startTime || it.start || it.start_at
  155. ),
  156. reproductiveList: Array.isArray(it.reproductiveList) ? it.reproductiveList : [],
  157. }))
  158. : [];
  159. // 等待 DOM 更新后处理滚动
  160. nextTick(() => {
  161. if (isInitialLoad.value) {
  162. // 首次加载:设置默认季节为当前季节,并自动滚动到对应位置
  163. const currentSeason = getCurrentSeason();
  164. handleSeasonClick(currentSeason);
  165. isInitialLoad.value = false;
  166. } else {
  167. // 非首次加载:恢复之前的滚动位置
  168. if (timelineContainerRef.value && savedScrollTop > 0) {
  169. timelineContainerRef.value.scrollTop = savedScrollTop;
  170. }
  171. }
  172. });
  173. }
  174. })
  175. .catch((error) => {
  176. console.error("获取农事规划数据失败:", error);
  177. });
  178. };
  179. // 切换开关状态
  180. const isDefaultEnabled = ref(true);
  181. // 新增农事
  182. const addNewTask = () => {
  183. ElMessage.warning("该功能正在升级中,敬请期待");
  184. // router.push({
  185. // path: "/modify_work",
  186. // query: { data: JSON.stringify(["生长异常"]), gardenId: 766, isAdd: true },
  187. // });
  188. };
  189. const triggerFarmWork = () => {
  190. eventBus.emit("activeUpload:show", {
  191. gardenIdVal: route.query.farmId,
  192. problemTitleVal: "请选择您出现" + curFarmObj.value.farmWorkName + "的时间",
  193. arrangeIdVal: curFarmObj.value.id,
  194. });
  195. };
  196. const curFarmObj = ref({});
  197. const handleRowClick = (item) => {
  198. curFarmObj.value = item;
  199. // 0:默认,1-4:正常,5:完成,6:预警
  200. if (item.flowStatus === 5) {
  201. router.push({
  202. path: "/review_work",
  203. query: {
  204. miniJson: JSON.stringify({ id: item.farmWorkRecordId, goBack: true }),
  205. },
  206. });
  207. } else if (item.flowStatus === null) {
  208. detailDialogRef.value.showDialog(item.farmWorkId);
  209. } else if (item.flowStatus === 6 || (item.flowStatus < 5 && item.flowStatus >= 0)) {
  210. router.push({
  211. path: "/completed_work",
  212. query: {
  213. miniJson: JSON.stringify({ id: item.farmWorkRecordId }),
  214. },
  215. });
  216. }
  217. };
  218. const activeUploadPopupRef = ref(null);
  219. const handleEdit = (item) => {
  220. eventBus.emit("activeUpload:show", {
  221. gardenIdVal: route.query.farmId,
  222. problemTitleVal: '请选择 ' + item.farmWorkName + ' 执行截至时间',
  223. arrangeIdVal: item.id,
  224. modeVal: 'interact', // 设置为互动设置模式
  225. interactTitleVal: item.farmWorkName || '梢期杀虫', // 使用农事名称作为标题
  226. interactTimeVal: item.interactTime || '', // 如果有已保存的互动时间
  227. forceTriggerTimeVal: item.forceTriggerTime || '', // 如果有已保存的强制触发时间
  228. interactQuestionVal: item.interactQuestion, // 如果有已保存的互动问题
  229. });
  230. };
  231. const detailDialogRef = ref(null);
  232. const timelineContainerRef = ref(null);
  233. // 标记是否为首次加载
  234. const isInitialLoad = ref(true);
  235. // 安全解析时间到时间戳(ms)
  236. const safeParseDate = (val) => {
  237. if (!val) return NaN;
  238. if (val instanceof Date) return val.getTime();
  239. if (typeof val === "number") return val;
  240. if (typeof val === "string") {
  241. // 兼容 "YYYY-MM-DD HH:mm:ss" -> Safari
  242. const s = val.replace(/-/g, "/").replace("T", " ");
  243. const d = new Date(s);
  244. return isNaN(d.getTime()) ? NaN : d.getTime();
  245. }
  246. return NaN;
  247. };
  248. // 计算最小progress值(第一个节气的progress)
  249. const minProgress = computed(() => {
  250. if (!solarTerms.value || solarTerms.value.length === 0) return 0;
  251. const progresses = solarTerms.value.map((t) => Number(t?.progress) || 0).filter((p) => !isNaN(p));
  252. return progresses.length > 0 ? Math.min(...progresses) : 0;
  253. });
  254. // 计算最大progress值
  255. const maxProgress = computed(() => {
  256. if (!solarTerms.value || solarTerms.value.length === 0) return 100;
  257. const progresses = solarTerms.value.map((t) => Number(t?.progress) || 0).filter((p) => !isNaN(p));
  258. return progresses.length > 0 ? Math.max(...progresses) : 100;
  259. });
  260. // 计算节气列表容器高度与项位置
  261. const getListStyle = computed(() => {
  262. const minP = minProgress.value;
  263. const maxP = maxProgress.value;
  264. const range = Math.max(1, maxP - minP); // 避免除0
  265. const total = (solarTerms.value?.length || 0) * 320;
  266. const minH = total; // 无上下留白
  267. return { minHeight: `${minH}px` };
  268. });
  269. const getTermStyle = (t) => {
  270. const p = Math.max(0, Math.min(100, Number(t?.progress) || 0));
  271. const minP = minProgress.value;
  272. const maxP = maxProgress.value;
  273. const range = Math.max(1, maxP - minP); // 避免除0
  274. const total = (solarTerms.value?.length || 0) * 320;
  275. // 将progress映射到0开始的位置,最小progress对应top: 0
  276. const normalizedP = range > 0 ? ((p - minP) / range) * 100 : 0;
  277. const top = (normalizedP / 100) * total;
  278. return {
  279. position: "absolute",
  280. top: `${top}px`,
  281. left: 0,
  282. width: "30px",
  283. height: "20px",
  284. display: "flex",
  285. alignItems: "flex-start",
  286. };
  287. };
  288. // 点击季节 → 滚动到对应节气(立春/立夏/立秋/立冬)
  289. const handleSeasonClick = (seasonValue) => {
  290. activeSeason.value = seasonValue;
  291. const mapping = {
  292. spring: "立春",
  293. summer: "立夏",
  294. autumn: "立秋",
  295. winter: "立冬",
  296. };
  297. const targetName = mapping[seasonValue];
  298. if (!targetName) return;
  299. const target = (solarTerms.value || []).find((t) => (t?.displayName || "") === targetName);
  300. if (!target) return;
  301. const p = Math.max(0, Math.min(100, Number(target.progress) || 0));
  302. const minP = minProgress.value;
  303. const maxP = maxProgress.value;
  304. const range = Math.max(1, maxP - minP);
  305. const total = (solarTerms.value?.length || 0) * 320;
  306. const normalizedP = range > 0 ? ((p - minP) / range) * 100 : 0;
  307. const targetTop = (normalizedP / 100) * total; // 内容内的像素位置
  308. const wrap = timelineContainerRef.value;
  309. if (!wrap) return;
  310. const viewH = wrap.clientHeight || 0;
  311. const maxScroll = Math.max(0, wrap.scrollHeight - viewH);
  312. // 将目标位置稍微靠上(使用 0.35 视口高度做偏移)
  313. let scrollTop = Math.max(0, targetTop - viewH * 0.1);
  314. if (scrollTop > maxScroll) scrollTop = maxScroll;
  315. wrap.scrollTo({ top: scrollTop, behavior: "smooth" });
  316. };
  317. // 物候期覆盖条样式(使用像素计算,避免 100% 高度为 0 的问题)
  318. const getPhenologyBarStyle = (item) => {
  319. const p1 = Math.max(0, Math.min(100, Number(item?.progress) || 0));
  320. const p2 = Math.max(0, Math.min(100, Number(item?.progress2) || 0));
  321. const start = Math.min(p1, p2);
  322. const end = Math.max(p1, p2);
  323. const minP = minProgress.value;
  324. const maxP = maxProgress.value;
  325. const range = Math.max(1, maxP - minP);
  326. const total = (solarTerms.value?.length || 0) * 320; // 有效绘制区高度(px)
  327. // 将progress映射到0开始的位置
  328. const normalizedStart = range > 0 ? ((start - minP) / range) * 100 : 0;
  329. const normalizedEnd = range > 0 ? ((end - minP) / range) * 100 : 0;
  330. let topPx = (normalizedStart / 100) * total;
  331. let heightPx = Math.max(2, ((normalizedEnd - normalizedStart) / 100) * total);
  332. // 计算第一个节气的位置(minProgress对应的位置,应该是0)
  333. const firstTermTop = 0; // 第一个节气在top: 0
  334. // 节气文字高度为46px,"小"字大约在文字的上半部分,约在15px位置
  335. // 让蓝色条的顶部对齐到"小"字的位置(firstTermTop + 15px)
  336. const minTop = firstTermTop + 10; // 对齐到"小"字位置(文字高度的约33%)
  337. if (topPx < minTop) {
  338. // 如果顶部小于最小位置,调整top和height
  339. const diff = minTop - topPx;
  340. topPx = minTop;
  341. heightPx = Math.max(2, heightPx - diff);
  342. }
  343. // 计算最后一个节气的位置(maxProgress对应的位置)
  344. const lastTermTop = (100 / 100) * total; // 因为normalizedEnd最大是100
  345. // 节气文字高度为46px,"至"字大约在文字的下半部分,约在30px位置
  346. // 让蓝色条的底部对齐到"至"字的位置(lastTermTop + 30px)
  347. const maxBottom = lastTermTop + 35; // 对齐到"至"字位置(文字高度的约65%)
  348. const barBottom = topPx + heightPx;
  349. if (barBottom > maxBottom) {
  350. heightPx = Math.max(2, maxBottom - topPx);
  351. }
  352. const now = Date.now();
  353. const isFuture = Number.isFinite(item?.startTimeMs) ? item.startTimeMs > now : start > 0; // 无开始时间时按起点>0近似
  354. // 反转:大于当前时间用灰色,小于等于当前时间用蓝色
  355. const barColor = isFuture ? "rgba(145, 145, 145, 0.1)" : "#2199F8";
  356. const beforeBg = isFuture ? "rgba(145, 145, 145, 0.1)" : "rgba(33, 153, 248, 0.1)";
  357. return {
  358. position: "absolute",
  359. left: "46px",
  360. width: "25px",
  361. top: `${topPx}px`,
  362. height: `${heightPx}px`,
  363. background: barColor,
  364. color: isFuture ? "#747778" : "#fff",
  365. "--bar-before-bg": beforeBg,
  366. zIndex: 2,
  367. };
  368. };
  369. // 农事状态样式映射(0:默认,1-4:正常,5:完成,6:预警)
  370. const getArrangeStatusClass = (fw) => {
  371. const t = fw?.flowStatus;
  372. if (t == null) return "status-default";
  373. if (t >= 0 && t <= 4) return "status-normal";
  374. if (t === 5) return "status-complete";
  375. if (t === 6) return "status-warning";
  376. return "status-default";
  377. };
  378. // 计算 phenology-bar 的高度(px)
  379. const getPhenologyBarHeight = (item) => {
  380. const p1 = Math.max(0, Math.min(100, Number(item?.progress) || 0));
  381. const p2 = Math.max(0, Math.min(100, Number(item?.progress2) || 0));
  382. const start = Math.min(p1, p2);
  383. const end = Math.max(p1, p2);
  384. const minP = minProgress.value;
  385. const maxP = maxProgress.value;
  386. const range = Math.max(1, maxP - minP);
  387. const total = (solarTerms.value?.length || 0) * 320;
  388. // 将progress映射到0开始的位置
  389. const normalizedStart = range > 0 ? ((start - minP) / range) * 100 : 0;
  390. const normalizedEnd = range > 0 ? ((end - minP) / range) * 100 : 0;
  391. const heightPx = Math.max(2, ((normalizedEnd - normalizedStart) / 100) * total);
  392. return heightPx;
  393. };
  394. // 计算 reproductive-item 的高度(px)
  395. // 由于 reproductive-list 使用 grid-auto-rows: 1fr,每个 item 会等分 phenology-bar 的高度
  396. const getReproductiveItemHeight = (phenologyItem) => {
  397. const barHeight = getPhenologyBarHeight(phenologyItem);
  398. const listLength = Array.isArray(phenologyItem?.reproductiveList) ? phenologyItem.reproductiveList.length : 1;
  399. // 如果列表为空,返回 barHeight;否则等分
  400. return listLength > 0 ? barHeight / listLength : barHeight;
  401. };
  402. // 根据文字长度返回对应的 class
  403. const getTextLengthClass = (text) => {
  404. if (!text || typeof text !== "string") return "";
  405. const len = text.trim().length;
  406. if (len > 4 && len <= 6) return "text-4-6";
  407. if (len > 6 && len <= 8) return "text-7-8";
  408. return "";
  409. };
  410. // 处理文本,在括号前换行
  411. const formatTextWithLineBreak = (text) => {
  412. if (!text || typeof text !== "string") return text;
  413. // 在左括号前添加换行符
  414. return text.replace(/([((])/g, "\n$1");
  415. };
  416. </script>
  417. <style scoped lang="scss">
  418. .plan-page {
  419. width: 100%;
  420. height: 100vh;
  421. background: #fff;
  422. .plan-content {
  423. padding: 12px 0;
  424. .timeline-container {
  425. height: calc(100vh - 40px - 73px);
  426. overflow: auto;
  427. position: relative;
  428. box-sizing: border-box;
  429. padding: 0 12px;
  430. .timeline-list {
  431. position: relative;
  432. }
  433. .timeline-middle-line {
  434. position: absolute;
  435. left: 15px; /* 位于节气文字列中间(列宽约30px) */
  436. top: 0;
  437. bottom: 0;
  438. width: 2px;
  439. background: #e8e8e8;
  440. z-index: 1;
  441. }
  442. .phenology-bar {
  443. display: flex;
  444. align-items: stretch;
  445. justify-content: center;
  446. box-sizing: border-box;
  447. // &::before {
  448. // content: "";
  449. // position: absolute;
  450. // top: 0;
  451. // left: 25px;
  452. // width: calc(100vw - 100px);
  453. // height: 100%;
  454. // background: var(--bar-before-bg, rgba(201, 201, 201, 0.1));
  455. // z-index: 1;
  456. // }
  457. .reproductive-list {
  458. display: grid;
  459. grid-auto-rows: 1fr; /* 子项等高,整体等分父高度 */
  460. align-items: stretch;
  461. justify-items: center; /* 子项居中 */
  462. width: 100%;
  463. height: 100%;
  464. box-sizing: border-box;
  465. }
  466. .reproductive-item {
  467. font-size: 12px;
  468. text-align: center;
  469. word-break: break-all;
  470. writing-mode: vertical-rl;
  471. text-orientation: upright;
  472. letter-spacing: 3px;
  473. width: 100%;
  474. line-height: 23px;
  475. color: inherit;
  476. position: relative;
  477. &.horizontal-text {
  478. writing-mode: horizontal-tb;
  479. text-orientation: mixed;
  480. letter-spacing: normal;
  481. line-height: calc(var(--item-height, 15px) - 3px);
  482. }
  483. &.vertical-lr-text {
  484. writing-mode: vertical-lr;
  485. text-orientation: upright;
  486. letter-spacing: 3px;
  487. line-height: 26px;
  488. }
  489. .arranges {
  490. position: absolute;
  491. left: 48px; /* 列与中线右侧一段距离 */
  492. top: 0;
  493. z-index: 3;
  494. display: flex;
  495. max-width: calc(100vw - 100px);
  496. gap: 12px;
  497. letter-spacing: 0px;
  498. .arrange-card {
  499. width: 94%;
  500. border: 0.5px solid #2199f8;
  501. border-radius: 8px;
  502. background: #fff;
  503. box-sizing: border-box;
  504. position: relative;
  505. padding: 8px;
  506. writing-mode: horizontal-tb;
  507. .card-header {
  508. display: flex;
  509. justify-content: space-between;
  510. align-items: center;
  511. .header-left {
  512. display: flex;
  513. align-items: center;
  514. gap: 8px;
  515. .farm-work-name {
  516. font-size: 14px;
  517. font-weight: 500;
  518. color: #1d2129;
  519. }
  520. .tag-standard {
  521. padding: 0 8px;
  522. background: rgba(119, 119, 119, 0.1);
  523. border-radius: 25px;
  524. font-weight: 400;
  525. font-size: 11px;
  526. color: #000;
  527. }
  528. }
  529. .header-right {
  530. font-size: 11px;
  531. color: #2199f8;
  532. padding: 0 8px;
  533. border-radius: 25px;
  534. // background: rgba(33, 153, 248, 0.1);
  535. }
  536. }
  537. .card-content {
  538. color: #909090;
  539. text-align: left;
  540. line-height: 1.55;
  541. margin: 4px 0 10px 0;
  542. .edit-link {
  543. color: #2199f8;
  544. }
  545. }
  546. .card-divider {
  547. height: 0.5px;
  548. background: rgba(0, 0, 0, 0.1);
  549. }
  550. .card-footer {
  551. text-align: center;
  552. font-size: 12px;
  553. color: #adadad;
  554. padding-top: 6px;
  555. }
  556. .status-icon {
  557. position: absolute;
  558. right: -8px;
  559. bottom: -8px;
  560. z-index: 3;
  561. }
  562. &::before {
  563. content: "";
  564. position: absolute;
  565. left: -6px;
  566. top: 50%;
  567. transform: translateY(-50%);
  568. width: 0;
  569. height: 0;
  570. border-top: 5px solid transparent;
  571. border-bottom: 5px solid transparent;
  572. border-right: 5px solid #2199f8;
  573. }
  574. }
  575. .arrange-card.status-warning {
  576. border-color: #ff953d;
  577. &::before {
  578. border-right-color: #ff953d;
  579. }
  580. }
  581. .arrange-card.status-complete {
  582. border-color: #1ca900;
  583. &::before {
  584. border-right-color: #1ca900;
  585. }
  586. }
  587. .arrange-card.status-normal {
  588. border-color: #2199f8;
  589. &::before {
  590. border-right-color: #2199f8;
  591. }
  592. }
  593. }
  594. }
  595. }
  596. .reproductive-item + .reproductive-item {
  597. border-top: 2px solid #fff;
  598. }
  599. .phenology-bar + .phenology-bar {
  600. border-top: 2px solid #fff;
  601. }
  602. .timeline-term {
  603. position: absolute;
  604. width: 30px;
  605. padding-right: 16px;
  606. display: flex;
  607. align-items: flex-start;
  608. z-index: 2; /* 置于中线之上 */
  609. .term-name {
  610. display: inline-block;
  611. width: 100%;
  612. height: 46px;
  613. line-height: 30px;
  614. background: #fff;
  615. font-size: 13px;
  616. word-break: break-all;
  617. writing-mode: vertical-rl;
  618. text-orientation: upright;
  619. color: rgba(174, 174, 174, 0.6);
  620. text-align: center;
  621. }
  622. }
  623. }
  624. }
  625. // 控制区域样式
  626. .custom-bottom-fixed-btns {
  627. justify-content: center;
  628. .primary-btn {
  629. padding: 10px 34px;
  630. }
  631. }
  632. }
  633. </style>