plan.vue 28 KB

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