index.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139
  1. <template>
  2. <div class="work-detail">
  3. <custom-header :name="$t('workDetail.title')" v-if="!miniJson?.hideDraw" :showClose="false" isGoBack
  4. @goback="handleBack" />
  5. <div class="work-detail-content">
  6. <!-- 顶部状态 -->
  7. <div class="content-status" :style="getContentStatusStyle(farmData)">
  8. <div class="status-l">
  9. <div class="status-title">
  10. <span>{{ farmData.work_name }}</span>
  11. <div class="status-tag" :style="statusTagStyle[farmData?.farm_work_type]">{{ farmWorkTypeObj[farmData?.farm_work_type] }}</div>
  12. </div>
  13. <div class="status-hint-card" v-if="farmData?.work_status === 0">
  14. <div class="status-hint-text">{{ farmData?.best_time }}</div>
  15. <div class="status-hint-question">
  16. <el-icon class="status-hint-link-icon">
  17. <Link />
  18. </el-icon>
  19. <span class="status-hint-question-text">{{ farmData.interaction_issue }}</span>
  20. </div>
  21. </div>
  22. <div class="status-sub" :style="getFarmWorkTypeColorStyle(farmData)" v-else>
  23. {{ farmData.best_time }}
  24. </div>
  25. </div>
  26. </div>
  27. <div class="work-wrap has-bottom" :style="farmData.work_status === 0 ? 'margin-top: 35px;' : ''">
  28. <!-- 农事组信息 -->
  29. <div class="group-info group-box" v-if="farmData.interaction_reason">
  30. <div class="group-name">
  31. {{ farmData.interaction_reason }}
  32. </div>
  33. </div>
  34. <div class="box-wrap stage-card">
  35. <div class="work-info">
  36. <div class="map-box" @click="handleViewArea">
  37. <div class="map-title">{{ $t('workDetail.executionArea') }}</div>
  38. <div class="map-container" ref="mapContainer"></div>
  39. </div>
  40. <div class="area-list">
  41. <div v-for="(zone, zoneIndex) in farmZones"
  42. :key="`${zone.zone_name || 'zone'}-${zoneIndex}`" class="area-item">
  43. <div class="area-l">
  44. {{ zone.zone_name }}
  45. <span> {{ zone.execute_time }}</span>
  46. <span class="area-tag" :style="backgroundFarmWorkStatus(farmData.work_status)">{{
  47. workStatusObj[farmData.work_status] }}</span>
  48. </div>
  49. <div class="area-r" @click="handleExecute(farmData?.work_status, farmData?.farm_work_type)" :style="{background:farmData?.work_status === 6 ? '#37C11B' : '#2199F8'}">{{ farmData?.work_status === 6 ? '溯源认证' : '我已完成' }}</div>
  50. </div>
  51. </div>
  52. <!-- <div class="ecological-plant-card">
  53. <div class="ecological-plant-text">
  54. <div class="ecological-plant-line">
  55. 生态种植方式:{{ ecologicalPlantingMethodText }}
  56. </div>
  57. <div class="ecological-plant-line ecological-plant-line--sub">
  58. 来自于 {{ ecologicalExecutorOrg }}
  59. </div>
  60. </div>
  61. <div class="ecological-plant-gallery">
  62. <img v-for="(src, idx) in ecologicalPlantThumbUrls" :key="idx"
  63. class="ecological-plant-thumb" :src="src" alt="" />
  64. </div>
  65. </div> -->
  66. </div>
  67. </div>
  68. <div class="box-wrap stage-card">
  69. <div class="work-info">
  70. <div class="info-item">
  71. <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.reason') }}</div>
  72. <div class="info-value">{{ farmData.work_reason_detail }}</div>
  73. </div>
  74. <div class="info-item">
  75. <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.purpose') }}
  76. </div>
  77. <div class="info-value">{{ farmData.work_purpose }}</div>
  78. </div>
  79. <div class="info-item">
  80. <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.notes') }}</div>
  81. <div class="info-value">{{ farmData.precautions }}</div>
  82. </div>
  83. <div class="info-item">
  84. <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.prescription') }}
  85. </div>
  86. <div class="info-value">{{ farmData.drug_prescription }}</div>
  87. </div>
  88. <div class="info-item">
  89. <div class="info-title"><span class="title-block"></span>{{ $t('workDetail.executionMethod')
  90. }}</div>
  91. <div class="info-value">{{ farmData.execution_method }}</div>
  92. </div>
  93. </div>
  94. </div>
  95. <!-- <div class="warning-info">
  96. <div class="warning-l">
  97. <div class="warning-title">
  98. <el-icon size="16" color="#FF953D"><WarningFilled /></el-icon>
  99. 存在继发危害需巡园
  100. </div>
  101. <div class="warning-text">{{ $t('文案文案文案文案文案') }}</div>
  102. </div>
  103. <div class="warning-r">{{ $t('异常记录') }}</div>
  104. </div> -->
  105. <!-- 底部按钮 -->
  106. <!-- <div class="fixed-btn-wrap execute-action">
  107. <div class="action-item second" v-if="!miniJson?.hideDraw" @click="handleConvert">{{ $t('转发给执行人员') }}</div>
  108. </div> -->
  109. <!-- <div class="action-item primary" @click="handleExecute">{{ $t('溯源认证') }}</div> -->
  110. </div>
  111. </div>
  112. <ExecutePopup ref="executePopupRef" @executeSuccess="getDetail" />
  113. <upload-tips v-model:show="showUploadTipsPopup" />
  114. </div>
  115. </template>
  116. <script setup>
  117. import { ElMessage } from "element-plus";
  118. import wx from "weixin-js-sdk";
  119. import customHeader from "@/components/customHeader.vue";
  120. import { ref, computed, watch, onMounted, onActivated, onDeactivated, onBeforeUnmount, nextTick } from "vue";
  121. import { useI18n } from "@/i18n";
  122. import { useRouter } from "vue-router";
  123. import { formatDate } from "@/common/commonFun";
  124. import ExecutePopup from "./components/executePopup.vue";
  125. import { base_img_url2 } from "@/api/config";
  126. import UploadTips from "@/components/popup/uploadTips.vue";
  127. import { useRoute } from "vue-router";
  128. import AreaMap from "./components/areaMap.js";
  129. import WKT from "ol/format/WKT.js";
  130. import { time } from "echarts";
  131. const route = useRoute();
  132. const { locale } = useI18n();
  133. const showUploadTipsPopup = ref(false);
  134. const router = useRouter();
  135. // const info = JSON.parse(localStorage.getItem("localUserInfo") || "{}");
  136. const info = { appType: 1 };
  137. /** 接口根级与 detail 合并后的详情(pesticideList、prescriptionList) */
  138. const detail = ref({
  139. farmId: null,
  140. farmWorkLibId: null,
  141. farmWorkName: "",
  142. flowStatus: null,
  143. purpose: "",
  144. speciesId: null,
  145. speciesName: "",
  146. executeDate: null,
  147. intervelTime: null,
  148. remark: "",
  149. pesticideList: [],
  150. prescriptionList: [],
  151. confirmPicture: [],
  152. executeEvidence: [],
  153. expertName: "",
  154. expertPrescription: "",
  155. id: null,
  156. postId: null,
  157. post: null,
  158. expertNameFromFarmBasicInfo: "",
  159. rangeWkt: null,
  160. });
  161. /** 凭证图片统一为 { filename } */
  162. const normalizeCropAlbum = (album) => {
  163. if (!album || !Array.isArray(album)) return [];
  164. return album
  165. .map((x) => {
  166. if (!x) return null;
  167. if (typeof x === "string") return { filename: x };
  168. if (x.filename) return x;
  169. return null;
  170. })
  171. .filter(Boolean);
  172. };
  173. const maybeShowUploadTips = () => {
  174. if (detail.value?.flowStatus !== 1) return;
  175. const shown = localStorage.getItem('upload_tips');
  176. if (shown === "1") return;
  177. localStorage.setItem('upload_tips', "1");
  178. showUploadTipsPopup.value = true;
  179. };
  180. onMounted(() => {
  181. maybeShowUploadTips();
  182. });
  183. const miniJson = ref(null);
  184. const farmData = ref({});
  185. const wktFmt = new WKT();
  186. const MAP_CENTER_FALLBACK = "POINT(113.1093017627431 22.57454083668)";
  187. const farmZones = computed(() => {
  188. const zones = farmData.value?.zones;
  189. if (!Array.isArray(zones)) return [];
  190. return zones.filter(
  191. (z) => z && typeof z.zone_geometry === "string" && z.zone_geometry.trim()
  192. );
  193. });
  194. /** 从地块 WKT 取首坐标作为初始中心,initZones 会 fit 到全部地块 */
  195. function wktCenterPointFromZones(zones) {
  196. const list = Array.isArray(zones) ? zones : [];
  197. for (const zone of list) {
  198. const wkt = zone?.zone_geometry;
  199. if (!wkt || typeof wkt !== "string") continue;
  200. try {
  201. const c = wktFmt.readGeometry(wkt.trim()).getFirstCoordinate();
  202. return `POINT(${c[0]} ${c[1]})`;
  203. } catch {
  204. /* try next zone */
  205. }
  206. }
  207. return MAP_CENTER_FALLBACK;
  208. }
  209. function destroyWorkDetailMap() {
  210. areaMap.destroyMap();
  211. }
  212. function initWorkDetailMap() {
  213. nextTick(() => {
  214. if (!mapContainer.value) return;
  215. const zones = farmZones.value;
  216. areaMap.destroyMap();
  217. areaMap.initMap(wktCenterPointFromZones(zones), mapContainer.value);
  218. areaMap.initZones(zones);
  219. });
  220. }
  221. onDeactivated(() => {
  222. destroyWorkDetailMap();
  223. });
  224. onBeforeUnmount(() => {
  225. destroyWorkDetailMap();
  226. });
  227. onActivated(() => {
  228. getDetail();
  229. });
  230. const workStatusObj = {
  231. 0: "时间待校准",
  232. 1: "触发待巡园",
  233. 2: "待执行",
  234. 3: "未激活",
  235. 4: "已认证",
  236. 5: "已失效",
  237. 6: "已执行",
  238. }
  239. const farmWorkTypeObj = {
  240. 1: "标准农事",
  241. 2: "机动农事",
  242. 3: "气象预警农事",
  243. 4: "气象恢复农事",
  244. 5: "异常农事",
  245. 6: "标准施肥类",
  246. 7: "标准防治类",
  247. 8: "标准调节类",
  248. }
  249. const backgroundFarmWorkStatus = (status) => {
  250. let background = 'rgba(33, 153, 248, 0.1)';
  251. let color = '#2199F8';
  252. if (status === 6 || status === 4) {
  253. background = 'rgba(55, 193, 27, 0.1)';
  254. color = '#37C11B';
  255. } else if (status === 3 || status === 5) {
  256. background = 'rgba(98, 98, 98, 0.1)';
  257. color = '#626262';
  258. }
  259. return {
  260. background,
  261. color,
  262. }
  263. }
  264. const getDetail = () => {
  265. if (!route.query.id) return;
  266. VE_API.monitor.getWorkDetail({ id: route.query.id }).then(res => {
  267. if (res.code === 200 && res.data.length) {
  268. farmData.value = res.data[0];
  269. initWorkDetailMap();
  270. }
  271. })
  272. };
  273. const handleExecute = (status, type) => {
  274. const popupType = type === 5 ? 'bc' : (status === 6 ? 'sy' : 'wc')
  275. executePopupRef.value.openPopup(popupType);
  276. };
  277. watch(locale, () => {
  278. getDetail();
  279. });
  280. // 执行方式 Tab 配置
  281. const executionTabs = [
  282. { label: "植保机", value: 1 },
  283. { label: "人工手持", value: 2 },
  284. { label: "地面机械", value: 3 }
  285. ];
  286. // 每一段农事的当前执行方式(索引 -> 执行方式),默认 1:植保机
  287. const stageExecutionMethods = ref({});
  288. const executePopupRef = ref(null);
  289. const hasTextValue = (val) => {
  290. if (val === null || val === undefined) return false;
  291. return String(val).trim() !== "";
  292. };
  293. const hasValidParamForMethod = (item, methodValue) => {
  294. if (!item?.params || !Array.isArray(item.params)) return false;
  295. const methodParam = item.params.find(
  296. (param) => Number(param.executionMethod) === Number(methodValue)
  297. );
  298. if (!methodParam) return false;
  299. return hasTextValue(methodParam.ratio) || hasTextValue(methodParam.remark);
  300. };
  301. const getAvailableExecutionTabs = (prescription) => {
  302. const list = prescription?.pesticideList;
  303. if (!Array.isArray(list) || !list.length) return [];
  304. return executionTabs.filter((tab) =>
  305. list.some((item) => hasValidParamForMethod(item, tab.value))
  306. );
  307. };
  308. const statusTagStyle = {
  309. 3: {
  310. color: '#FF953D',
  311. },
  312. 4: {
  313. color: '#FF953D',
  314. },
  315. 5: {
  316. color: '#FF6A6A',
  317. },
  318. };
  319. const getFarmWorkTypeColorStyle = (farmData) => {
  320. const type = Number(farmData?.farm_work_type);
  321. const status = Number(farmData?.work_status);
  322. let color = '#2199F8';
  323. if (status === 2) {
  324. if(type === 3 || type === 4) {
  325. color = '#FF943D';
  326. } else if(type === 5) {
  327. color = '#FF6A6A';
  328. } else {
  329. color = '#2199F8';
  330. }
  331. }else if (status === 3) {
  332. color = 'rgba(62, 61, 61, 0.8)';
  333. }
  334. return {
  335. color,
  336. };
  337. };
  338. /** 顶部 content-status 背景色(::after 通过 CSS 变量读取) */
  339. const getContentStatusStyle = (farmData) => {
  340. const type = Number(farmData?.farm_work_type);// 农事类型
  341. const status = Number(farmData?.work_status);// 农事状态
  342. let background = '#2199F8';
  343. if(type === 3 || type === 4) {
  344. background = '#FF943D';
  345. } else if(type === 5) {
  346. background = '#FF6A6A';
  347. } else {
  348. background = '#2199F8';
  349. }
  350. if(status === 3) {
  351. background = '#C7C7C7';
  352. }
  353. return {
  354. "--content-status-bg": background,
  355. };
  356. };
  357. /**
  358. * 展示用「分段」列表:detail.pesticideList 或 prescriptionList 推导
  359. */
  360. const stageList = computed(() => {
  361. const d = detail.value;
  362. if (!d) return [];
  363. // if (Array.isArray(d.pesticideList) && d.pesticideList.length) {
  364. return [
  365. {
  366. ...d,
  367. pesticideList: d.pesticideList,
  368. cropAlbum: normalizeCropAlbum(
  369. d.confirmPicture?.length
  370. ? d.confirmPicture
  371. : d.executeEvidence
  372. ),
  373. },
  374. ];
  375. // }
  376. // return [];
  377. });
  378. const handleViewArea = () => {
  379. router.push({
  380. path: "/view_area",
  381. query: {
  382. subjectId: localStorage.getItem('selectedFarmId'),
  383. varietyId: 2,
  384. },
  385. });
  386. }
  387. const handleBack = () => {
  388. router.back();
  389. };
  390. const handleConvert = () => {
  391. const query = {
  392. askInfo: { title: "农事执行", content: "是否分享该农事给好友" },
  393. shareText: `${detail.value.farmWorkName}农事 已触发,请在最佳农时内执行`,
  394. targetUrl: `work_detail`,
  395. paramsPage: JSON.stringify({ ...miniJson.value, hideDraw: true }),
  396. imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/work_img.png',
  397. };
  398. wx.miniProgram.navigateTo({
  399. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  400. });
  401. };
  402. // 获取当前段的执行方式
  403. const getStageExecutionMethod = (stageIndex) => {
  404. const stage = stageList.value?.[stageIndex];
  405. const availableTabs = getAvailableExecutionTabs(stage);
  406. if (!availableTabs.length) return 1;
  407. const val = stageExecutionMethods.value[stageIndex];
  408. const isValidSelected = availableTabs.some(
  409. (tab) => Number(tab.value) === Number(val)
  410. );
  411. return isValidSelected ? val : availableTabs[0].value;
  412. };
  413. // 根据当前执行方式,获取对应的参数(配比、单亩用量、备注)
  414. const getPesticideParam = (item, stageIndex) => {
  415. if (!item?.params || !Array.isArray(item.params)) return null;
  416. const currentMethod = getStageExecutionMethod(stageIndex);
  417. return (
  418. item.params.find((param) => param.executionMethod === currentMethod) || null
  419. );
  420. };
  421. // 地图
  422. const mapContainer = ref(null);
  423. const areaMap = new AreaMap();
  424. </script>
  425. <style scoped lang="scss">
  426. .work-detail {
  427. height: 100vh;
  428. background: #f2f3f5;
  429. display: flex;
  430. flex-direction: column;
  431. .work-detail-content {
  432. flex: 1;
  433. overflow: auto;
  434. }
  435. }
  436. .content-status {
  437. position: relative;
  438. padding: 16px 12px 0 12px;
  439. color: #fff;
  440. z-index: 1;
  441. height: 92px;
  442. box-sizing: border-box;
  443. &::after {
  444. content: "";
  445. z-index: -1;
  446. position: absolute;
  447. left: 0;
  448. top: 0;
  449. height: 140px;
  450. background: var(--content-status-bg, #2199F8);
  451. width: 100%;
  452. }
  453. .status-l {
  454. .status-title {
  455. font-size: 21px;
  456. display: flex;
  457. align-items: center;
  458. gap: 9px;
  459. .status-tag {
  460. font-size: 12px;
  461. color: #2199F8;
  462. background: #fff;
  463. border-radius: 2px;
  464. padding: 2px 5px;
  465. min-width: fit-content;
  466. }
  467. }
  468. .status-sub {
  469. margin-top: 10px;
  470. font-size: 13px;
  471. padding: 2px 8px;
  472. background: #fff;
  473. color: #2199F8;
  474. width: fit-content;
  475. border-radius: 2px;
  476. }
  477. .status-hint-card {
  478. margin-top: 10px;
  479. background: #fff;
  480. border-radius: 2px;
  481. padding: 5px 8px;
  482. box-sizing: border-box;
  483. .status-hint-text {
  484. font-size: 12px;
  485. color: #626262;
  486. }
  487. .status-hint-question {
  488. margin-top: 8px;
  489. background: #2199f8;
  490. border-radius: 4px;
  491. padding: 6px 8px;
  492. display: flex;
  493. align-items: center;
  494. gap: 6px;
  495. color: #fff;
  496. .status-hint-link-icon {
  497. flex-shrink: 0;
  498. font-size: 14px;
  499. }
  500. .status-hint-question-text {
  501. flex: 1;
  502. min-width: 0;
  503. font-size: 12px;
  504. text-decoration: underline;
  505. overflow: hidden;
  506. text-overflow: ellipsis;
  507. white-space: nowrap;
  508. }
  509. }
  510. }
  511. }
  512. }
  513. .work-wrap {
  514. position: relative;
  515. top: 0;
  516. padding: 0 12px 12px;
  517. z-index: 2;
  518. // &.has-bottom {
  519. // margin-bottom: 88px;
  520. // }
  521. // &.warning-info-show {
  522. // // margin-bottom: 168px;
  523. // margin-bottom: 88px;
  524. // }
  525. }
  526. .box-wrap {
  527. .work-info {
  528. background: #ffffff;
  529. border-radius: 8px;
  530. padding: 10px 10px;
  531. box-shadow: 0 2px 8px rgba(15, 35, 52, 0.06);
  532. }
  533. .photo-box {
  534. margin-top: 10px;
  535. padding: 11px 10px;
  536. font-size: 14px;
  537. .tips-text {
  538. color: #FA7406;
  539. padding: 5px 10px;
  540. border: 1px solid #FF953D;
  541. border-radius: 5px;
  542. margin-bottom: 10px;
  543. background: #fff;
  544. }
  545. .photo-title {
  546. color: #000;
  547. padding-bottom: 9px;
  548. }
  549. .photo-sub-title {
  550. padding-bottom: 9px;
  551. color: #767676;
  552. }
  553. }
  554. }
  555. .group-info {
  556. margin-bottom: 10px;
  557. background: #ffffff;
  558. border-radius: 8px;
  559. padding: 14px 10px 10px 10px;
  560. box-shadow: 0 2px 8px rgba(15, 35, 52, 0.06);
  561. &.group-box {
  562. padding: 10px;
  563. .group-name {
  564. font-size: 14px;
  565. color: #767676;
  566. .group-name-text {
  567. color: #000;
  568. }
  569. }
  570. }
  571. .group-name {
  572. font-size: 14px;
  573. color: rgba(0, 0, 0, 0.2);
  574. .group-name-text {
  575. color: #767676;
  576. }
  577. }
  578. .group-sub {
  579. margin-top: 6px;
  580. font-size: 12px;
  581. color: rgba(0, 0, 0, 0.45);
  582. line-height: 1.5;
  583. }
  584. }
  585. .stage-card+.stage-card {
  586. margin-top: 10px;
  587. }
  588. .info-item+.info-item {
  589. margin-top: 10px;
  590. }
  591. .info-item {
  592. .info-title {
  593. display: flex;
  594. align-items: center;
  595. gap: 4px;
  596. color: #2199F8;
  597. font-weight: 500;
  598. .title-block {
  599. width: 6px;
  600. height: 6px;
  601. background: #2199F8;
  602. border-radius: 1px;
  603. transform: rotate(45deg);
  604. }
  605. }
  606. .info-value {
  607. padding-top: 4px;
  608. color: #ACACAC;
  609. line-height: 21px;
  610. white-space: pre-line;
  611. }
  612. .blod-text {
  613. font-weight: 500;
  614. }
  615. }
  616. .map-box {
  617. position: relative;
  618. .map-title {
  619. z-index: 12;
  620. position: absolute;
  621. border-radius: 5px 0 0 5px;
  622. top: 0;
  623. left: 0;
  624. height: 25px;
  625. padding: 0 18px;
  626. line-height: 25px;
  627. font-size: 12px;
  628. font-weight: 500;
  629. color: #fff;
  630. background: rgba(0, 0, 0, 0.45);
  631. backdrop-filter: blur(4px);
  632. }
  633. .map-container {
  634. /* 略增高,配合 fit 后更易看清整块地 */
  635. height: 200px;
  636. width: 100%;
  637. clip-path: inset(0px round 5px);
  638. }
  639. }
  640. .area-list {
  641. margin-top: 10px;
  642. .area-item+.area-item {
  643. margin-top: 6px;
  644. }
  645. .area-item {
  646. display: flex;
  647. align-items: center;
  648. justify-content: space-between;
  649. padding: 10px;
  650. border: 1px solid rgba(0, 0, 0, 0.1);
  651. border-radius: 6px;
  652. .area-l {
  653. display: flex;
  654. align-items: center;
  655. gap: 5px;
  656. .area-tag {
  657. background: rgba(98, 98, 98, 0.1);
  658. color: #626262;
  659. height: 22px;
  660. line-height: 22px;
  661. padding: 0 5px;
  662. border-radius: 2px;
  663. font-size: 12px;
  664. margin-left: 5px;
  665. display: inline-block;
  666. }
  667. }
  668. .area-r {
  669. background: #2199F8;
  670. color: #fff;
  671. font-size: 12px;
  672. font-weight: 500;
  673. cursor: pointer;
  674. height: 28px;
  675. line-height: 28px;
  676. padding: 0 10px;
  677. border-radius: 20px;
  678. }
  679. }
  680. }
  681. .ecological-plant-card {
  682. margin-top: 10px;
  683. border-radius: 8px;
  684. text-align: left;
  685. }
  686. .ecological-plant-text {
  687. color: #666666;
  688. font-size: 14px;
  689. line-height: 1.45;
  690. }
  691. .ecological-plant-line--sub {
  692. margin-top: 6px;
  693. }
  694. .ecological-plant-gallery {
  695. display: flex;
  696. gap: 12px;
  697. }
  698. .ecological-plant-thumb {
  699. width: 80px;
  700. height: 80px;
  701. object-fit: cover;
  702. border-radius: 8px;
  703. display: block;
  704. }
  705. .stage-card {
  706. .stage-header {
  707. padding-bottom: 12px;
  708. display: flex;
  709. align-items: center;
  710. gap: 5px;
  711. .stage-title {
  712. font-size: 16px;
  713. color: #000;
  714. }
  715. .title-tag {
  716. width: fit-content;
  717. font-size: 12px;
  718. height: 26px;
  719. line-height: 26px;
  720. color: #2199F8;
  721. background: rgba(33, 153, 248, 0.1);
  722. border-radius: 20px;
  723. padding: 0 8px;
  724. }
  725. .tag-0 {
  726. color: #FF953D;
  727. background: rgba(255, 149, 61, 0.1);
  728. }
  729. }
  730. .stage-info {
  731. padding: 8px 0 2px;
  732. border-top: 1px solid #f5f5f5;
  733. }
  734. }
  735. .form-item {
  736. display: flex;
  737. font-size: 14px;
  738. color: #767676;
  739. margin-top: 4px;
  740. .area-btn {
  741. border: 1px solid rgba(0, 0, 0, 0.1);
  742. padding: 0 10px;
  743. color: #767676;
  744. }
  745. .area-btn-right {
  746. padding-right: 4px;
  747. display: inline-flex;
  748. align-items: center;
  749. gap: 4px;
  750. }
  751. .item-name {
  752. padding-right: 26px;
  753. color: rgba(0, 0, 0, 0.2);
  754. }
  755. .item-text {
  756. flex: 1;
  757. line-height: 21px;
  758. &.light-text {
  759. color: #2199F8;
  760. }
  761. }
  762. .area-text {
  763. display: inline-flex;
  764. align-items: center;
  765. gap: 10px;
  766. }
  767. }
  768. .light-text {
  769. color: #2199F8;
  770. }
  771. .stage-tabs {
  772. display: inline-flex;
  773. gap: 8px;
  774. margin-top: 8px;
  775. .tab-pill {
  776. padding: 0 8px;
  777. font-size: 14px;
  778. text-align: center;
  779. border-radius: 2px;
  780. height: 28px;
  781. line-height: 28px;
  782. color: #767676;
  783. background: rgba(171, 171, 171, 0.1);
  784. &.active {
  785. background: rgba(33, 153, 248, 0.1);
  786. color: #2199F8;
  787. }
  788. }
  789. }
  790. .prescription-wrap {
  791. margin-top: 10px;
  792. overflow: hidden;
  793. .prescription-title {
  794. padding: 8px 10px;
  795. font-size: 13px;
  796. font-weight: 500;
  797. border-bottom: 1px solid rgba(225, 225, 225, 0.6);
  798. }
  799. }
  800. .prescription-table {
  801. font-size: 12px;
  802. text-align: center;
  803. border-radius: 6px;
  804. border: 1px solid rgba(225, 225, 225, 0.6);
  805. .table-header {
  806. display: flex;
  807. background: rgba(171, 171, 171, 0.1);
  808. padding: 9px 6px;
  809. color: #767676;
  810. }
  811. .table-row {
  812. display: flex;
  813. padding: 12px 6px;
  814. border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  815. color: rgba(0, 0, 0, 0.76);
  816. &:last-child {
  817. border-bottom: none;
  818. }
  819. }
  820. .col {
  821. display: flex;
  822. align-items: center;
  823. justify-content: center;
  824. padding: 0 2px;
  825. }
  826. .col-type {
  827. width: 56px;
  828. }
  829. .col-name {
  830. flex: 1;
  831. }
  832. .col-ratio {
  833. width: 64px;
  834. }
  835. .col-dose {
  836. width: 64px;
  837. }
  838. }
  839. .prescription-remark {
  840. margin-top: 8px;
  841. padding: 7px 10px;
  842. border-radius: 6px;
  843. color: #767676;
  844. background: rgba(171, 171, 171, 0.1);
  845. line-height: 21px;
  846. }
  847. .photo-img-wrap {
  848. display: flex;
  849. flex-wrap: wrap;
  850. gap: 10px;
  851. ::v-deep {
  852. .PhotoConsumer {
  853. width: 31%;
  854. height: 92px;
  855. }
  856. }
  857. .photo-img {
  858. width: 100%;
  859. height: 100%;
  860. position: relative;
  861. box-sizing: border-box;
  862. border: 2px solid transparent;
  863. border-radius: 8px;
  864. overflow: hidden;
  865. .fail-icon {
  866. position: absolute;
  867. top: 0;
  868. left: 0;
  869. width: 100%;
  870. height: 100%;
  871. background: rgba(0, 0, 0, 0.6);
  872. border-radius: 8px;
  873. display: flex;
  874. align-items: center;
  875. justify-content: center;
  876. flex-direction: column;
  877. gap: 4px;
  878. .fail-icon-text {
  879. color: #FF943D;
  880. font-size: 12px;
  881. }
  882. }
  883. img {
  884. width: 100%;
  885. height: 100%;
  886. border-radius: 8px;
  887. object-fit: cover;
  888. }
  889. }
  890. }
  891. .execute-action {
  892. display: flex;
  893. align-items: center;
  894. justify-content: center;
  895. // justify-content: space-between;
  896. gap: 16px;
  897. .action-item {
  898. padding: 0 26px;
  899. height: 40px;
  900. line-height: 40px;
  901. border-radius: 26px;
  902. box-sizing: border-box;
  903. font-size: 14px;
  904. &.second {
  905. background: #ffffff;
  906. border: 0.5px solid rgba(153, 153, 153, 0.5);
  907. color: #999999;
  908. }
  909. &.primary {
  910. background: linear-gradient(180deg, #8ACBFF 0%, #2199F8 100%);
  911. color: #ffffff;
  912. }
  913. }
  914. &.no-share {
  915. justify-content: center;
  916. }
  917. }
  918. .warning-info {
  919. position: fixed;
  920. bottom: 100px;
  921. left: 10px;
  922. width: calc(100% - 20px);
  923. background: linear-gradient(180deg, #FFDFC5 -13%, #FFFFFF 39%);
  924. border-radius: 8px;
  925. padding: 14px 10px;
  926. box-sizing: border-box;
  927. display: flex;
  928. align-items: center;
  929. justify-content: space-between;
  930. box-shadow: 0px 4px 4px 0px #0000001A;
  931. .warning-l {
  932. .warning-title {
  933. display: inline-flex;
  934. align-items: center;
  935. gap: 6px;
  936. font-size: 16px;
  937. color: #FF953D;
  938. }
  939. .warning-text {
  940. color: rgba(0, 0, 0, 0.4);
  941. font-size: 12px;
  942. // margin-top: 4px;
  943. }
  944. }
  945. .warning-r {
  946. background: #FF953D;
  947. color: #fff;
  948. font-size: 12px;
  949. cursor: pointer;
  950. padding: 0 7px;
  951. height: 32px;
  952. line-height: 32px;
  953. border-radius: 20px;
  954. }
  955. }
  956. .fixed-btn-wrap {
  957. display: flex;
  958. justify-content: center;
  959. // justify-content: space-between;
  960. &.center-btn {
  961. justify-content: center;
  962. }
  963. position: fixed;
  964. bottom: 0px;
  965. left: 0;
  966. right: 0;
  967. background: #fff;
  968. padding: 10px 12px 36px 12px;
  969. box-sizing: border-box;
  970. // box-shadow: 0 -2px 8px rgba(15, 35, 52, 0.06);
  971. box-shadow: 2px 2px 4.5px 0px #00000066;
  972. .fixed-btn {
  973. min-width: 110px;
  974. height: 40px;
  975. line-height: 40px;
  976. text-align: center;
  977. border-radius: 20px;
  978. background: linear-gradient(180deg, #70bffe, #2199f8);
  979. color: #ffffff;
  980. font-size: 14px;
  981. }
  982. }
  983. .map-popup {
  984. width: 92%;
  985. // max-width: 420px;
  986. border-radius: 8px;
  987. padding: 12px;
  988. box-sizing: border-box;
  989. }
  990. </style>