index.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  1. <template>
  2. <custom-header name="农情互动" bgColor="#f2f4f5"></custom-header>
  3. <div class="interaction-list">
  4. <div class="list-item" v-for="(item, index) in listData" :key="item.id || index"
  5. :class="{ 'uploaded-item': item.questionStatus !== 3 }">
  6. <!-- 标题区域 -->
  7. <div class="item-header-wrapper" :class="{ 'has-status': item.questionStatus !== 3 }">
  8. <div class="item-header">
  9. <div class="title">{{ item.interactionTypeName }}</div>
  10. <div class="status" :class="['urgent-' + item.urgent]" v-if="item.questionStatus === 3">{{
  11. urgentType[item.urgent] }}</div>
  12. </div>
  13. <div class="upload-status" v-show="item.questionStatus !== 3">
  14. <el-icon class="status-icon">
  15. <SuccessFilled />
  16. </el-icon>
  17. <span class="status-text">提交成功</span>
  18. </div>
  19. </div>
  20. <!-- 未上传状态内容 -->
  21. <div class="uploaded-content" v-show="item.questionStatus === 3 || item.expanded">
  22. <div class="content-wrapper">
  23. <text-ellipsis class="item-desc" rows="2" :content="item.reason" expand-text="展开"
  24. collapse-text="收起" />
  25. <div class="tip-box">如果不确定是否发生,直接上传照片即可</div>
  26. <div class="example-wrapper">
  27. <div class="example-header">
  28. <div>示例照片</div>
  29. <div class="more" v-if="item.exampleImagesJson.length > 3"
  30. @click="openMorePopup(item.exampleImagesJson)">查看更多</div>
  31. </div>
  32. <div class="example-list" v-if="item.exampleImagesJson.length > 0">
  33. <div class="image-item-wrapper" v-for="(example, exIndex) in item.exampleImagesJson"
  34. :key="example" @click="showExample(item.exampleImagesJson, exIndex)">
  35. <img class="image-item" :src="example" alt="" />
  36. </div>
  37. </div>
  38. </div>
  39. <text-ellipsis class="patrol-suggestion" rows="2" :content="'巡园建议:' + item.patrolSuggestion">
  40. <template #action="{ expanded }"><span class="action-text">{{ expanded ? '收起' : '展开'
  41. }}</span></template>
  42. </text-ellipsis>
  43. </div>
  44. <!-- 展开状态内容 -->
  45. <div class="expanded-content" v-show="item.imagePaths.length > 0">
  46. <!-- 原因说明 -->
  47. <div class="reason-text">上传照片({{ item.imagePaths.length }}张)</div>
  48. <!-- 图片展示 -->
  49. <div class="uploaded-images">
  50. <div class="uploaded-img-wrap" v-for="(image, imgIndex) in item.imagePaths" :key="image"
  51. @click="showExample(item.imagePaths.map(p => base_img_url2 + p), imgIndex, { hideLabel: true })">
  52. <img class="uploaded-img" :src="base_img_url2 + image" alt="" />
  53. <span v-show="item.questionStatus === 3" class="uploaded-img-remove"
  54. @click.stop="removeUploadedImage(item, imgIndex)">×</span>
  55. </div>
  56. </div>
  57. <uploader v-show="item.questionStatus === 3" class="upload-wrap continue-upload-btn"
  58. @click="handleUploadClick(item)" multiple :max-count="10" :after-read="afterReadUpload">
  59. <div class="upload-btn">
  60. <el-icon>
  61. <Plus />
  62. </el-icon>
  63. <span>继续上传照片</span>
  64. </div>
  65. </uploader>
  66. </div>
  67. <!-- 上传按钮 -->
  68. <uploader v-if="item.imagePaths.length === 0 && item.questionStatus === 3"
  69. @click="handleUploadClick(item)" class="upload-wrap" multiple :max-count="10"
  70. :after-read="afterReadUpload">
  71. <div class="upload-btn">
  72. <el-icon>
  73. <Plus />
  74. </el-icon>
  75. <span>点击上传照片</span>
  76. </div>
  77. </uploader>
  78. <div class="question-wrapper" v-if="item.imagePaths.length">
  79. <div class="question-text">
  80. <span class="text-title">{{ item.question }}</span>
  81. <el-input v-model="item.answerValues[0]" :disabled="item.questionStatus !== 3" type="number"
  82. style="width: 70px">
  83. <template #suffix>
  84. <span class="text-unit">{{ item.indicators[0]?.unit || '%' }}</span>
  85. </template>
  86. </el-input>
  87. </div>
  88. <div class="draw-region-btn" v-if="item.interactionTypeId != 1 && item.questionStatus === 3"
  89. @click="handleDrawRegion(item)">
  90. 编辑发生区域</div>
  91. </div>
  92. <!-- 输入框 -->
  93. <div class="input-wrapper">
  94. <el-input v-model="item.replyText" :disabled="item.questionStatus !== 3" placeholder="请输入您咨询的问题"
  95. clearable />
  96. </div>
  97. <!-- 按钮区域 -->
  98. <div class="button-group" v-show="item.questionStatus === 3">
  99. <div class="btn-not-reached" @click="handleConfirm(item, false)">{{ item.cancelButtonName }}</div>
  100. <div class="btn-default" :class="{ 'btn-confirm': item.imagePaths.length > 0 }"
  101. @click="handleConfirm(item, true)">
  102. 确认提交
  103. </div>
  104. </div>
  105. </div>
  106. <!-- 比例信息(已上传状态显示) -->
  107. <div class="proportion-info" v-show="item.questionStatus !== 3"
  108. :style="{ justifyContent: item.expanded ? 'center' : 'space-between' }">
  109. <template v-if="!item.expanded">
  110. <span class="proportion-text">{{ item.question }}{{
  111. item.answerValues[0] || 0
  112. }}{{ item.indicators[0]?.unit || '%' }}</span>
  113. </template>
  114. <div class="toggle-btn" @click="toggleExpand(item)">
  115. <span>{{ item.expanded ? "收起" : "展开" }}</span>
  116. <el-icon :class="{ rotate: !item.expanded }">
  117. <CaretTop />
  118. </el-icon>
  119. </div>
  120. </div>
  121. </div>
  122. <div class="empty-data" v-if="!loading && listData.length === 0">暂无数据</div>
  123. </div>
  124. <!-- <div class="custom-bottom-fixed-btns" :class="{ 'center-btn': false }">
  125. <div class="bottom-btn secondary-btn" @click="handleShowDroneConsultPopup">获取自动飞行航线</div>
  126. <div class="bottom-btn secondary-btn">邀请农情互动</div>
  127. <div class="bottom-btn primary-btn" @click="handleSubmitAll">一键提交</div>
  128. </div> -->
  129. <!-- 农场信息完善弹窗 -->
  130. <farm-info-popup :oldUser="oldUser" :expertMiniUserId="query.expertMiniUserId" v-model:show="showFarmInfoPopup" />
  131. <!-- 无人机/飞行航线咨询弹窗 -->
  132. <drone-consult-popup v-model:show="showDroneConsultPopup" @copy="onCopyWechatId" />
  133. <!-- 示例照片轮播组件 -->
  134. <example-popup v-model:show="showExamplePopup" :images="exampleList" :start-index="exampleStartIndex"
  135. title="蒂蛀虫示例图" :show-title-and-tips="exampleShowTitleAndTips" />
  136. <!-- 照片上传进度 -->
  137. <popup v-model:show="showUploadProgressPopup" round class="upload-progress-popup">
  138. <div class="upload-progress-title">
  139. <span>照片上传进度</span>
  140. <el-progress class="upload-progress" :percentage="uploadPercentage" :stroke-width="10" :format="format" />
  141. </div>
  142. <div class="upload-box">
  143. <!-- 把已经上传成功的图片传给 upload 组件做回显,同时保持原有上传事件不变 -->
  144. <upload :maxCount="10" :initImgArr="initImgArr" @handleUpload="handleUploadSuccess">
  145. </upload>
  146. </div>
  147. <div class="input-box">
  148. <div class="input-item">
  149. <span class="label-text">{{ currentItem.question }}</span>
  150. <el-input class="label-input" v-model="answerValue" placeholder="请输入" type="number">
  151. <template #suffix>
  152. <span class="unit">{{ currentItem.indicators[0]?.unit || '%' }}</span>
  153. </template>
  154. </el-input>
  155. </div>
  156. <el-input class="input-item" v-model="currentItem.replyText" placeholder="请输入您咨询的问题" clearable />
  157. </div>
  158. <template v-if="currentItem.interactionTypeId != 1">
  159. <div class="region-tips">勾画新发生区域,精准匹配专属农事方案</div>
  160. <div class="region-map" ref="mapContainer" @click="handleDrawRegion">
  161. <div class="region-map-text">点击勾画新发生区域</div>
  162. </div>
  163. </template>
  164. <div class="confirm-btn" @click="handleConfirmUpload">确认上传</div>
  165. </popup>
  166. <!-- 查看更多弹窗 -->
  167. <more-popup ref="morePopupRef" />
  168. <tip-popup v-model:show="showTipPopup" type="success" text="2025.02.05农情报告已生成
  169. 请点击查看" buttonText="查看报告" @confirm="handleBtn" :zIndex="9999" />
  170. </template>
  171. <script setup>
  172. import { ref, onMounted, onActivated, computed, onDeactivated } from "vue";
  173. import { ElMessage } from "element-plus";
  174. import { Uploader, Popup, TextEllipsis } from "vant";
  175. import customHeader from "@/components/customHeader.vue";
  176. import upload from "@/components/upload.vue";
  177. import FarmInfoPopup from "@/components/popup/farmInfoPopup.vue";
  178. import DroneConsultPopup from "@/components/popup/droneConsultPopup.vue";
  179. import ExamplePopup from "./components/examplePopup.vue";
  180. import { useRouter, useRoute } from "vue-router";
  181. import { base_img_url2 } from "@/api/config";
  182. import DrawRegionMap from "./map/drawRegionMap.js";
  183. import UploadFile from "@/utils/upliadFile";
  184. import { getFileExt } from "@/utils/util";
  185. import MorePopup from "./components/morePopup.vue";
  186. import tipPopup from "@/components/popup/tipPopup.vue";
  187. const showTipPopup = ref(false)
  188. const handleBtn = () => {
  189. console.log('00')
  190. }
  191. const showDroneConsultPopup = ref(false);
  192. const handleShowDroneConsultPopup = () => {
  193. // showDroneConsultPopup.value = true;
  194. router.push(
  195. `/confirm_area`
  196. );
  197. }
  198. const showFarmInfoPopup = ref(false);
  199. const loading = ref(false);
  200. const router = useRouter();
  201. const listData = ref([]);
  202. const query = ref(useRoute().query);
  203. const morePopupRef = ref(null);
  204. //照片上传进度
  205. const showUploadProgressPopup = ref(false);
  206. const answerValue = ref('');
  207. // 上传进度统计
  208. const totalUploadCount = ref(0); // 本次选择的总文件数(固定不随上传成功变化)
  209. const uploadedSuccessCount = ref(0); // 已上传成功的文件数
  210. const uploadPercentage = computed(() => {
  211. if (!totalUploadCount.value) return 0;
  212. return Math.round((uploadedSuccessCount.value / totalUploadCount.value) * 100);
  213. });
  214. const format = () => {
  215. if (!totalUploadCount.value) return '0/0';
  216. return `${uploadedSuccessCount.value}/${totalUploadCount.value}`;
  217. };
  218. const drawRegionMap = new DrawRegionMap();
  219. const mapContainer = ref(null);
  220. // 从 sessionStorage 中回显已勾画的区域
  221. const renderRegionFromSession = () => {
  222. const polygonStr = sessionStorage.getItem("drawRegionPolygonData");
  223. if (!polygonStr) return;
  224. try {
  225. const polygonData = JSON.parse(polygonStr);
  226. if (polygonData && Array.isArray(polygonData.geometryArr) && polygonData.geometryArr.length > 0) {
  227. // 先清空原有图层,再回显
  228. drawRegionMap.clearLayer && drawRegionMap.clearLayer();
  229. // needFitView 设为 true,让视图适配当前地块;同时传入面积用于只读模式展示“XX亩”
  230. drawRegionMap.setAreaGeometry(polygonData.geometryArr, true, polygonData.mianji);
  231. }
  232. } catch (e) {
  233. console.error("解析 drawRegionPolygonData 失败:", e);
  234. }
  235. };
  236. //
  237. const urgentType = {
  238. "0": "普通",
  239. "1": "紧急",
  240. "2": "非常紧急",
  241. null: "未设置",
  242. }
  243. const uploadFileObj = new UploadFile();
  244. const initImgArr = ref([]);
  245. const miniUserId = localStorage.getItem("MINI_USER_ID");
  246. //弹窗问题
  247. const afterReadUpload = async (data) => {
  248. // 继续上传:回显已有图片再追加新图;首次上传:直接清空,只显示本次新传
  249. initImgArr.value = (currentItem.value?.imagePaths?.length > 0)
  250. ? [...currentItem.value.imagePaths]
  251. : [];
  252. // 本次上传的总数 = 选择的文件数量(固定,用于做进度的“总数”)
  253. if (!Array.isArray(data)) {
  254. data = [data];
  255. }
  256. totalUploadCount.value = data.length;
  257. uploadedSuccessCount.value = 0;
  258. drawRegionMap.clearLayer && drawRegionMap.clearLayer();
  259. sessionStorage.removeItem("drawRegionPolygonData");
  260. for (let file of data) {
  261. // 将文件上传至服务器
  262. let fileVal = file.file;
  263. file.status = "uploading";
  264. file.message = "上传中...";
  265. let ext = getFileExt(fileVal.name);
  266. let key = `birdseye-look-mini/${miniUserId}/${new Date().getTime()}.${ext}`;
  267. let resFilename = await uploadFileObj.put(key, fileVal)
  268. if (resFilename) {
  269. file.status = "done";
  270. file.message = "";
  271. // 记录成功数量,用于进度条“当前成功数”
  272. uploadedSuccessCount.value += 1;
  273. // 记录已上传成功的图片路径,用于回显
  274. initImgArr.value.push(resFilename)
  275. } else {
  276. file.status = 'failed';
  277. file.message = '上传失败';
  278. ElMessage.error('图片上传失败,请稍后再试!')
  279. }
  280. }
  281. showUploadProgressPopup.value = true;
  282. // 所有文件上传结束后再打开进度弹窗,此时 imgArr 已包含全部图片
  283. if (initImgArr.value.length > 0 && currentItem.value.interactionTypeId != 1) {
  284. setTimeout(() => {
  285. // 只在第一次时初始化地图,后续复用已有实例
  286. if (!drawRegionMap.kmap) {
  287. drawRegionMap.initMap(
  288. "POINT (113.6142086995688 23.585836479509055)",
  289. mapContainer.value,
  290. false,
  291. false,
  292. false
  293. );
  294. }
  295. // 每次打开弹窗都尝试根据 sessionStorage 回显最新地块
  296. renderRegionFromSession();
  297. }, 100);
  298. }
  299. };
  300. const currentItem = ref(null);
  301. const handleUploadClick = (item) => {
  302. currentItem.value = item;
  303. answerValue.value = item.answerValues[0] || '';
  304. };
  305. // 示例照片轮播
  306. const showExamplePopup = ref(false);
  307. const exampleList = ref([]);
  308. const exampleStartIndex = ref(0);
  309. const exampleShowTitleAndTips = ref(true);
  310. const showExample = (list, index, options = {}) => {
  311. exampleList.value = list || [];
  312. exampleStartIndex.value = index || 0;
  313. exampleShowTitleAndTips.value = options.hideLabel !== true;
  314. showExamplePopup.value = true;
  315. };
  316. // 加载数据
  317. /* */
  318. const loadData = async () => {
  319. loading.value = true;
  320. try {
  321. const { data } = await VE_API.home.listTriggeredByFarm({ farmId: localStorage.getItem("selectedFarmId") })
  322. listData.value = data.map(item => {
  323. // 将 exampleImagesJson 转换为数组
  324. if (item.exampleImagesJson) {
  325. try {
  326. item.exampleImagesJson = typeof item.exampleImagesJson === 'string'
  327. ? JSON.parse(item.exampleImagesJson)
  328. : item.exampleImagesJson;
  329. // 确保是数组格式
  330. if (!Array.isArray(item.exampleImagesJson)) {
  331. item.exampleImagesJson = [];
  332. }
  333. } catch (e) {
  334. item.exampleImagesJson = [];
  335. }
  336. } else {
  337. item.exampleImagesJson = [];
  338. }
  339. return {
  340. ...item
  341. };
  342. });
  343. } catch (error) {
  344. // 加载数据失败时静默处理或在需要时提示
  345. } finally {
  346. loading.value = false;
  347. }
  348. };
  349. // 刷新列表数据
  350. const refreshList = async () => {
  351. listData.value = [];
  352. await loadData();
  353. };
  354. // 删除已上传的图片
  355. const removeUploadedImage = (item, imgIndex) => {
  356. item.imagePaths.splice(imgIndex, 1);
  357. };
  358. // 确认上传 / 暂未到达进程
  359. const handleConfirm = async (item, isConfirm) => {
  360. if (isConfirm) {
  361. if (item.answerValues[0] === '' || item.answerValues[0] === null || item.answerValues[0] === undefined) {
  362. ElMessage.warning("请输入当前果园比例");
  363. return;
  364. }
  365. if (item.imagePaths.length === 0 && uploadData.value.length === 0) {
  366. ElMessage.warning("请上传图片");
  367. return;
  368. }
  369. }
  370. const parmas = {
  371. farmId: localStorage.getItem("selectedFarmId"),
  372. imagePaths: item.imagePaths.concat(uploadData.value),
  373. isUploadPhoto: item.imagePaths.concat(uploadData.value).length > 0 ? true : false,
  374. rangeWkt: sessionStorage.getItem("drawRegionPolygonData") || '',
  375. interactionId: item.id,
  376. replyText: item.replyText,
  377. answerValues: item.answerValues
  378. }
  379. const { code, msg } = await VE_API.home.uploadAnswer(parmas);
  380. if (code === 0) {
  381. ElMessage.success("上传成功");
  382. // 清空上传数据
  383. uploadData.value = [];
  384. // 刷新列表
  385. await refreshList();
  386. } else {
  387. ElMessage.error(msg || '上传失败');
  388. }
  389. };
  390. const handleConfirmUpload = async () => {
  391. // 校验是否有上传图片
  392. if (!uploadData.value || uploadData.value.length === 0) {
  393. ElMessage.warning("请先上传照片");
  394. return;
  395. }
  396. // 校验是否填写了输入框内容(百分比)
  397. if (answerValue.value === '' || answerValue.value === null || answerValue.value === undefined) {
  398. ElMessage.warning("请输入占比数值");
  399. return;
  400. }
  401. const parmas = {
  402. interactionId: currentItem.value.id,
  403. farmId: localStorage.getItem("selectedFarmId"),
  404. imagePaths: uploadData.value,
  405. rangeWkt: sessionStorage.getItem("drawRegionPolygonData") || '',
  406. replyText: currentItem.value.replyText,
  407. answerValues: [answerValue.value],
  408. }
  409. const { code, msg } = await VE_API.home.uploadAnswerData(parmas);
  410. if (code === 0) {
  411. ElMessage.success("确认成功");
  412. // 清空上传数据
  413. uploadData.value = [];
  414. sessionStorage.removeItem("drawRegionPolygonData");
  415. showUploadProgressPopup.value = false;
  416. // 刷新列表
  417. await refreshList();
  418. } else {
  419. ElMessage.error(msg || '确认失败');
  420. }
  421. };
  422. // 切换展开/收起
  423. const toggleExpand = (item) => {
  424. item.expanded = !item.expanded;
  425. };
  426. const handleDrawRegion = (item) => {
  427. const polygonData = sessionStorage.getItem("drawRegionPolygonData");
  428. if (item.rangeWkt && item.rangeWkt.length > 10) {
  429. if (polygonData) {
  430. router.push(`/draw_region?polygonData=${polygonData}`);
  431. } else {
  432. router.push(`/draw_region?polygonData=${item.rangeWkt}`);
  433. }
  434. } else {
  435. if (polygonData) {
  436. router.push(`/draw_region?polygonData=${polygonData}`);
  437. } else {
  438. router.push(`/draw_region`);
  439. }
  440. }
  441. };
  442. onDeactivated(() => {
  443. sessionStorage.removeItem("drawRegionPolygonData");
  444. });
  445. const uploadData = ref([]);
  446. const handleUploadSuccess = (data) => {
  447. uploadData.value = data.imgArr;
  448. // 同步进度条:删除/增加图片时,总数和已上传数跟随当前列表变化
  449. const len = (data.imgArr && data.imgArr.length) || 0;
  450. totalUploadCount.value = len;
  451. uploadedSuccessCount.value = len;
  452. };
  453. const openMorePopup = (images) => {
  454. morePopupRef.value.setItems([...images, ...images, ...images, ...images, ...images, ...images, ...images, ...images, ...images, ...images, ...images, ...images, ...images]);
  455. morePopupRef.value.openPopup();
  456. }
  457. const onCopyWechatId = () => {
  458. ElMessage.success("微信号已复制");
  459. };
  460. const oldUser = ref(false);
  461. onMounted(() => {
  462. // 初始化加载
  463. getFarmList();
  464. // 加载数据
  465. loadData();
  466. oldUser.value = query.value.oldUser && Boolean(query.value.oldUser);
  467. if (oldUser.value) {
  468. showFarmInfoPopup.value = true;
  469. }
  470. });
  471. // 页面从勾画页返回时,如果组件被 keep-alive 缓存,则会触发 onActivated,在此再做一次回显
  472. onActivated(() => {
  473. renderRegionFromSession();
  474. });
  475. const getFarmList = async () => {
  476. const { data } = await VE_API.farm.userFarmSelectOption();
  477. if (data && data.length === 0) {
  478. showFarmInfoPopup.value = true;
  479. }
  480. }
  481. const handleSubmitAll = () => {
  482. console.log("一键提交");
  483. };
  484. </script>
  485. <style scoped lang="scss">
  486. .interaction-list {
  487. width: 100%;
  488. height: calc(100vh - 40px);
  489. background: #f2f4f5;
  490. padding: 12px;
  491. box-sizing: border-box;
  492. overflow-y: auto;
  493. .list-item {
  494. background: #ffffff;
  495. border-radius: 6px;
  496. padding: 10px;
  497. border: 1px solid #ffffff;
  498. &.uploaded-item {
  499. border: 1px solid #2199f8;
  500. }
  501. .item-header-wrapper {
  502. .item-header {
  503. display: flex;
  504. align-items: center;
  505. justify-content: space-between;
  506. div {
  507. font-size: 16px;
  508. color: #6f6f6f;
  509. font-family: "PangMenZhengDao";
  510. width: fit-content;
  511. background: rgba(143, 143, 143, 0.1);
  512. padding: 5px 10px;
  513. border-radius: 2px;
  514. }
  515. .status {
  516. color: #999999;
  517. background: #F1F1F1;
  518. &.urgent-0 {
  519. color: #2199f8;
  520. background: rgba(33, 153, 248, 0.1);
  521. }
  522. &.urgent-1 {
  523. color: #FF953D;
  524. background: rgba(255, 149, 61, 0.1);
  525. }
  526. &.urgent-2 {
  527. color: #EE4646;
  528. background: rgba(238, 70, 70, 0.1);
  529. }
  530. }
  531. }
  532. .upload-status {
  533. display: flex;
  534. align-items: center;
  535. gap: 4px;
  536. margin-left: 10px;
  537. .status-icon {
  538. color: #2199f8;
  539. font-size: 17px;
  540. }
  541. .status-text {
  542. font-size: 14px;
  543. color: #2199f8;
  544. }
  545. }
  546. &.has-status {
  547. display: flex;
  548. justify-content: space-between;
  549. align-items: center;
  550. .item-header {
  551. div {
  552. color: #2199f8;
  553. background: rgba(33, 153, 248, 0.1);
  554. }
  555. }
  556. }
  557. }
  558. .expanded-content {
  559. background: rgba(33, 153, 248, 0.1);
  560. border-radius: 5px;
  561. padding: 10px;
  562. border: 0.5px solid #2199F8;
  563. margin-top: 12px;
  564. .uploaded-images {
  565. display: flex;
  566. flex-wrap: wrap;
  567. gap: 8px;
  568. margin-top: 8px;
  569. .uploaded-img-wrap {
  570. position: relative;
  571. width: calc((100vw - 68px) / 4);
  572. height: calc((100vw - 68px) / 4);
  573. }
  574. .uploaded-img {
  575. width: 100%;
  576. height: 100%;
  577. border-radius: 4px;
  578. object-fit: cover;
  579. }
  580. .uploaded-img-remove {
  581. position: absolute;
  582. top: 0;
  583. right: 0;
  584. width: 18px;
  585. height: 18px;
  586. display: flex;
  587. justify-content: center;
  588. background: rgba(0, 0, 0, 0.6);
  589. color: #fff;
  590. font-size: 14px;
  591. line-height: 16px;
  592. border-radius: 50%;
  593. }
  594. }
  595. .continue-upload-btn {
  596. border: 0.5px solid rgba(33, 153, 248, 0.5);
  597. border-radius: 4px;
  598. background: #FFFFFF;
  599. cursor: pointer;
  600. }
  601. }
  602. .uploaded-content {
  603. .content-wrapper {
  604. border: 0.5px solid rgba(0, 0, 0, 0.1);
  605. border-radius: 4px;
  606. padding: 10px;
  607. margin-top: 12px;
  608. .item-desc {
  609. color: #3C3C3C;
  610. margin-bottom: 10px;
  611. }
  612. .tip-box {
  613. font-size: 12px;
  614. color: #2199F8;
  615. padding: 3px 5px;
  616. border-radius: 4px;
  617. margin-bottom: 10px;
  618. background: linear-gradient(90deg, rgba(33, 153, 248, 0.2) 0%, rgba(221, 221, 221, 0) 100%);
  619. }
  620. .example-wrapper {
  621. .example-header {
  622. display: flex;
  623. align-items: center;
  624. justify-content: space-between;
  625. margin-bottom: 8px;
  626. color: #BEB9B9;
  627. .more {
  628. font-size: 12px;
  629. }
  630. }
  631. .example-list {
  632. display: flex;
  633. align-items: center;
  634. overflow: hidden;
  635. .image-item-wrapper {
  636. position: relative;
  637. margin-right: 6px;
  638. &::after {
  639. content: '示例';
  640. position: absolute;
  641. top: 0;
  642. left: 0;
  643. background: rgba(0, 0, 0, 0.7);
  644. color: #F2F4F5;
  645. padding: 2px 6px;
  646. border-radius: 8px 0 2px 0;
  647. font-size: 10px;
  648. z-index: 1;
  649. }
  650. }
  651. .image-item {
  652. width: calc((100vw - 68px) / 4);
  653. height: calc((100vw - 68px) / 4);
  654. border-radius: 8px;
  655. object-fit: cover;
  656. }
  657. }
  658. }
  659. .patrol-suggestion {
  660. color: rgba(60, 60, 60, 0.4);
  661. margin-top: 10px;
  662. .action-text {
  663. color: #727272;
  664. }
  665. }
  666. }
  667. .upload-wrap {
  668. width: 100%;
  669. margin-top: 12px;
  670. ::v-deep {
  671. .van-uploader__input-wrapper {
  672. width: 100%;
  673. }
  674. }
  675. .upload-btn {
  676. width: 100%;
  677. display: flex;
  678. align-items: center;
  679. justify-content: center;
  680. gap: 4px;
  681. color: #0B84E4;
  682. padding: 6px;
  683. border: 0.5px solid rgba(33, 153, 248, 0.5);
  684. border-radius: 4px;
  685. box-sizing: border-box;
  686. }
  687. }
  688. }
  689. .input-wrapper {
  690. margin: 12px 0;
  691. }
  692. .button-group {
  693. display: flex;
  694. gap: 12px;
  695. .btn-not-reached,
  696. .btn-default {
  697. flex: 1;
  698. text-align: center;
  699. border-radius: 4px;
  700. padding: 6px;
  701. }
  702. .btn-not-reached {
  703. max-width: fit-content;
  704. background: #fff;
  705. color: #585858;
  706. border: 1px solid rgba(88, 88, 88, 0.2);
  707. }
  708. .btn-default {
  709. background: #F1F1F1;
  710. color: #999999;
  711. border: 1px solid #F1F1F1;
  712. }
  713. .btn-confirm {
  714. background: #2199f8;
  715. color: #ffffff;
  716. border: 1px solid #2199f8;
  717. }
  718. }
  719. .proportion-info {
  720. display: flex;
  721. justify-content: space-between;
  722. align-items: center;
  723. margin-top: 12px;
  724. .proportion-text {
  725. color: #969696;
  726. font-size: 14px;
  727. white-space: nowrap;
  728. overflow: hidden;
  729. text-overflow: ellipsis;
  730. flex: 1;
  731. margin-right: 10px;
  732. }
  733. .toggle-btn {
  734. display: flex;
  735. align-items: center;
  736. gap: 2px;
  737. color: #8D8D8D;
  738. padding: 2px 10px;
  739. border: 1px solid rgba(0, 0, 0, 0.2);
  740. font-size: 12px;
  741. border-radius: 25px;
  742. background: #FFFFFF;
  743. .rotate {
  744. transform: rotate(180deg);
  745. }
  746. }
  747. }
  748. }
  749. .list-item+.list-item {
  750. margin-top: 12px;
  751. }
  752. .empty-data {
  753. text-align: center;
  754. padding: 40px 0;
  755. color: #999999;
  756. font-size: 14px;
  757. }
  758. .question-wrapper {
  759. display: flex;
  760. align-items: center;
  761. justify-content: space-between;
  762. gap: 10px;
  763. margin: 12px 0 6px;
  764. box-sizing: border-box;
  765. width: 100%;
  766. .question-text {
  767. background: #ffffff;
  768. color: #6f6f6f;
  769. display: flex;
  770. align-items: center;
  771. .text-title {
  772. margin-right: 5px;
  773. }
  774. .text-unit {
  775. margin-left: 4px;
  776. }
  777. }
  778. .draw-region-btn {
  779. background: rgba(33, 153, 248, 0.1);
  780. border-radius: 4px;
  781. padding: 6px 10px;
  782. color: #2199f8;
  783. }
  784. }
  785. }
  786. .center-btn {
  787. justify-content: center;
  788. .primary-btn {
  789. padding: 10px 32px;
  790. background: #2199F8;
  791. }
  792. }
  793. .upload-progress-popup {
  794. width: 100%;
  795. padding: 20px 16px;
  796. .upload-progress-title {
  797. font-size: 16px;
  798. color: #121212;
  799. margin-bottom: 12px;
  800. display: flex;
  801. align-items: center;
  802. justify-content: space-between;
  803. .upload-progress {
  804. width: 55%;
  805. ::v-deep {
  806. .el-progress__text {
  807. min-width: fit-content;
  808. }
  809. }
  810. }
  811. }
  812. .upload-box {
  813. margin-bottom: 12px;
  814. }
  815. .input-box {
  816. .input-item {
  817. display: flex;
  818. align-items: center;
  819. justify-content: space-between;
  820. gap: 6px;
  821. .label-input {
  822. width: 130px;
  823. }
  824. }
  825. .input-item+.input-item {
  826. margin-top: 6px;
  827. }
  828. }
  829. .region-tips {
  830. color: #2199F8;
  831. padding: 5px;
  832. background: rgba(33, 153, 248, 0.1);
  833. border-radius: 5px;
  834. margin: 16px 0 12px 0;
  835. text-align: center;
  836. }
  837. .region-map {
  838. width: 100%;
  839. height: 168px;
  840. clip-path: inset(0px round 5px);
  841. position: relative;
  842. .region-map-text {
  843. position: absolute;
  844. bottom: 0;
  845. right: 0;
  846. color: #FFFFFF;
  847. padding: 5px 20px;
  848. border-radius: 5px;
  849. background: rgba(0, 0, 0, 0.6);
  850. z-index: 1;
  851. }
  852. }
  853. .confirm-btn {
  854. background: #2199f8;
  855. color: #ffffff;
  856. border-radius: 4px;
  857. padding: 8px;
  858. text-align: center;
  859. font-size: 16px;
  860. margin-top: 16px;
  861. }
  862. }
  863. </style>