plan.vue 28 KB

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