index.vue 35 KB

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