task.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. <template>
  2. <div class="task-page" :style="{ height: `calc(100vh - ${tabBarHeight}px - 50px)` }">
  3. <div class="task-top">
  4. <div class="map-container" ref="mapContainer"></div>
  5. <div class="calendar-wrap">
  6. <customCalendar ref="calendarRef" @dateSelect="handleDateSelect"></customCalendar>
  7. </div>
  8. </div>
  9. <div class="task-list">
  10. <div class="list-filter">
  11. <div class="filter-item" :class="{ active: activeIndex === 0 }" @click="handleActiveFilter(0)">
  12. 待完成({{ taskCounts[0] || 0 }})
  13. </div>
  14. <div class="filter-item" :class="{ active: activeIndex === 1 }" @click="handleActiveFilter(1)">
  15. 已完成({{ taskCounts[1] || 0 }})
  16. </div>
  17. <div class="filter-item" :class="{ active: activeIndex === 2 }" @click="handleActiveFilter(2)">
  18. 待复核({{ taskCounts[2] || 0 }})
  19. </div>
  20. </div>
  21. <div class="select-group">
  22. <el-select
  23. class="select-item"
  24. v-model="selectParma.farmWorkTypeId"
  25. placeholder="农事类型"
  26. @change="getSimpleList"
  27. >
  28. <el-option v-for="item in farmWorkTypeList" :key="item.id" :label="item.name" :value="item.id" />
  29. </el-select>
  30. <el-select
  31. class="select-item"
  32. v-model="selectParma.districtCode"
  33. placeholder="区域筛选"
  34. @change="getSimpleList"
  35. >
  36. <el-option v-for="item in districtList" :key="item.code" :label="item.name" :value="item.code" />
  37. </el-select>
  38. </div>
  39. <!-- <div class="task-content-loading" v-if="loading && noData" v-loading="loading">
  40. </div> -->
  41. <div class="task-content" v-loading="loading">
  42. <div class="task-item" v-for="(item, index) in taskList" :key="item.id || item.workRecordId">
  43. <task-item
  44. :key="activeIndex + '-' + index"
  45. :itemIndex="activeIndex"
  46. :status="activeIndex === 0 ? 0 : 1"
  47. :item-data="item"
  48. @handleUploadSuccess="handleUploadSuccess"
  49. :ref="(el) => setTaskItemRef(el, index)"
  50. >
  51. <template #footer>
  52. <div class="execute-wrap" v-if="activeIndex === 0">
  53. <img class="execute-icon" src="@/assets/img/monitor/execute-icon.png" alt="" />
  54. <span>{{ item.executorName }}</span>
  55. </div>
  56. <div class="item-footer" v-if="activeIndex === 2">
  57. <div class="footer-l farm-name-text van-ellipsis">
  58. 来自<span class="name-text">{{ item.farmName || "--" }}</span>
  59. </div>
  60. <div class="footer-r" v-if="item.reviewImage && item.reviewImage.length">
  61. <div class="btn warning" @click="generateReport(item)">生成成果报告</div>
  62. </div>
  63. <div class="footer-r" v-else>
  64. <div class="btn primary" :class="{ 'primary-text': getButtonText(item) }" @click="handleAction(item)">{{ getButtonText(item) ? '提醒复核' : '上传复核照片' }}</div>
  65. </div>
  66. </div>
  67. <div v-else-if="activeIndex === 1" class="item-footer">
  68. <div class="footer-l farm-name-text van-ellipsis">
  69. 来自<span class="name-text">{{ item.farmName || "--" }}</span>
  70. </div>
  71. <div class="footer-r">
  72. <div class="btn warning" @click="generateReport(item)">生成成果报告</div>
  73. </div>
  74. </div>
  75. <div v-else-if="activeIndex === 0" class="item-footer">
  76. <div class="footer-l" @click="toDetail(item)">查看详情</div>
  77. <div class="footer-r" v-if="item.expectedExecuteDate">
  78. <div
  79. class="btn primary"
  80. :class="{ 'primary-text': getButtonText(item) }"
  81. @click="showUploadExecutePopup(item)"
  82. >
  83. {{ getButtonText(item) ? "提醒执行" : "上传照片" }}
  84. </div>
  85. </div>
  86. <div class="footer-r" v-else>
  87. <div
  88. class="btn warning"
  89. :class="{ 'primary-text': getButtonText(item) }"
  90. @click="selectExecuteTime(item)"
  91. >
  92. {{ getButtonText(item) ? "提醒确认执行时间" : "确认执行时间" }}
  93. </div>
  94. </div>
  95. </div>
  96. </template>
  97. </task-item>
  98. </div>
  99. <div class="empty-data" v-if="noData">暂无数据</div>
  100. </div>
  101. </div>
  102. </div>
  103. <upload-execute ref="uploadExecuteRef" :onlyShare="onlyShare" @uploadSuccess="handleUploadSuccess" />
  104. <!-- 服务报价单 -->
  105. <price-sheet-popup :key="activeIndex" ref="priceSheetPopupRef"></price-sheet-popup>
  106. <offer-popup ref="offerPopupRef" @uploadSuccess="handleUploadSuccess"></offer-popup>
  107. <!-- 确认执行时间 -->
  108. <calendar
  109. teleport="#app"
  110. v-model:show="showCalendar"
  111. @confirm="onConfirmExecuteTime"
  112. :min-date="minDate"
  113. :max-date="maxDate"
  114. />
  115. </template>
  116. <script setup>
  117. import { computed, nextTick, onActivated, onMounted, ref, watch } from "vue";
  118. import { useStore } from "vuex";
  119. import { Popup, Calendar } from "vant";
  120. import IndexMap from "../../farm_manage/map/index";
  121. import taskItem from "@/components/taskItem.vue";
  122. import wx from "weixin-js-sdk";
  123. import customCalendar from "./calendar.vue";
  124. import { useRouter } from "vue-router";
  125. import uploadExecute from "./uploadExecute.vue";
  126. import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
  127. import { ElMessage } from "element-plus";
  128. import offerPopup from "@/components/popup/offerPopup.vue";
  129. import { formatDate } from "@/common/commonFun";
  130. const store = useStore();
  131. const router = useRouter();
  132. const indexMap = new IndexMap();
  133. const mapContainer = ref(null);
  134. const tabBarHeight = computed(() => store.state.home.tabBarHeight);
  135. const uploadExecuteRef = ref(null);
  136. const dateValue = ref("1");
  137. const calendarRef = ref(null);
  138. const showPopup = ref(false);
  139. const executionData = ref(null);
  140. const selectParma = ref({
  141. farmWorkTypeId: null,
  142. districtCode: null,
  143. });
  144. // 任务列表数据(用于显示,可能被筛选)
  145. const taskList = ref([]);
  146. // 完整的任务列表数据(用于日历显示,不被筛选影响)
  147. const fullTaskList = ref([]);
  148. // 各状态任务数量
  149. const taskCounts = ref([0, 0, 0]);
  150. // 当前选中的筛选索引
  151. const activeIndex = ref(0);
  152. // 筛选日期(用于按日期筛选)
  153. const filterDate = ref(null);
  154. const noData = ref(false);
  155. const loading = ref(false);
  156. // 根据 activeIndex 计算 startFlowStatus
  157. const getStartFlowStatus = (index) => {
  158. const statusMap = {
  159. 0: 4, // 待完成
  160. 1: 5, // 已完成
  161. 2: 5, // 待复核
  162. };
  163. return statusMap[index] ?? 4;
  164. };
  165. // 获取单个状态的任务数量
  166. function getTaskCount(flowStatus, index) {
  167. const location = store.state.home.miniUserLocationPoint;
  168. // 根据传入的 index 参数来设置 needReview 和 includePrescription,而不是根据 activeIndex.value
  169. const needReview = index === 2 ? 1 : null; // 待复核需要 needReview=1
  170. const includePrescription = index === 0 ? false : true; // 待完成不需要处方,其他需要
  171. return VE_API.z_farm_work_record
  172. .getSimpleList({ role: 2, location, flowStatus, needReview, includePrescription })
  173. .then(({ data }) => {
  174. if (Array.isArray(data)) {
  175. taskCounts.value[index] = data.length;
  176. calendarRef.value && calendarRef.value.setCounts(index, taskCounts.value[index]);
  177. if (index === 0) {
  178. calendarRef.value && calendarRef.value.setSolarTerm(data);
  179. indexMap.initData(data);
  180. }
  181. } else if (data?.total !== undefined) {
  182. taskCounts.value[index] = data.total;
  183. } else {
  184. taskCounts.value[index] = 0;
  185. }
  186. })
  187. .catch((error) => {
  188. console.error(`获取状态${index}任务数量失败:`, error);
  189. taskCounts.value[index] = 0;
  190. });
  191. }
  192. const taskItemRefs = ref([]);
  193. const setTaskItemRef = (el, index) => {
  194. if (el) {
  195. taskItemRefs.value[index] = el;
  196. }
  197. };
  198. const handleUploadSuccess = async () => {
  199. // 刷新列表
  200. await initTaskCounts();
  201. // 加载当前选中状态的数据列表
  202. getSimpleList();
  203. };
  204. const cityCode = ref("");
  205. //根据城市的坐标返回区县列表
  206. const districtList = ref([]);
  207. function getDistrictListByCity() {
  208. VE_API.z_farm_work_record.getDistrictListByCity({ point: mapPoint.value }).then(({ data }) => {
  209. districtList.value = data || [];
  210. // cityCode.value = data[0].code.slice(0, -2);
  211. cityCode.value = "";
  212. districtList.value.unshift({ code: cityCode.value, name: "全部" });
  213. selectParma.value.districtCode = cityCode.value;
  214. getSimpleList();
  215. });
  216. }
  217. //农事类型列表
  218. const farmWorkTypeList = ref([]);
  219. function getFarmWorkTypeList() {
  220. VE_API.z_farm_work_record.getFarmWorkTypeList().then(({ data }) => {
  221. farmWorkTypeList.value = data;
  222. farmWorkTypeList.value.unshift({ id: 0, name: "全部" });
  223. });
  224. }
  225. // 初始化时获取所有状态的任务数量
  226. function initTaskCounts() {
  227. // 并行请求状态的数量
  228. Promise.all([
  229. getTaskCount(4, 0), // 待完成
  230. getTaskCount(5, 1), // 已完成
  231. getTaskCount(5, 2), // 待复核
  232. ]);
  233. }
  234. const mapPoint = ref(null);
  235. const agriculturalRole = ref(null);
  236. const userId = ref(null);
  237. onMounted(() => {
  238. mapPoint.value = store.state.home.miniUserLocationPoint;
  239. const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
  240. agriculturalRole.value = userInfo.agriculturalRole;
  241. userId.value = userInfo.id;
  242. // 初始化时获取所有状态的数量
  243. initTaskCounts();
  244. // 加载当前选中状态的数据列表
  245. getSimpleList();
  246. getDistrictListByCity();
  247. getFarmWorkTypeList();
  248. nextTick(() => {
  249. indexMap.initMap(mapPoint.value, mapContainer.value, true);
  250. });
  251. });
  252. onActivated(() => {
  253. // 确保地图已初始化,使用 nextTick 等待 DOM 更新
  254. nextTick(() => {
  255. // 检查地图实例是否已初始化
  256. if (!indexMap.kmap) {
  257. // 如果地图未初始化,重新初始化
  258. if (mapContainer.value) {
  259. mapPoint.value = store.state.home.miniUserLocationPoint;
  260. indexMap.initMap(mapPoint.value, mapContainer.value, true);
  261. // 等待地图初始化完成后再加载数据
  262. setTimeout(() => {
  263. initTaskCounts();
  264. getSimpleList();
  265. }, 300);
  266. return;
  267. }
  268. } else {
  269. // 如果地图已初始化,需要等待 tab 切换完成,容器完全可见后再更新尺寸
  270. // Tab 切换时容器可能被隐藏,需要更长的延迟确保容器可见
  271. if (mapContainer.value && indexMap.kmap.map) {
  272. // 检查容器是否可见
  273. const checkAndUpdateSize = () => {
  274. const container = mapContainer.value;
  275. if (container) {
  276. const rect = container.getBoundingClientRect();
  277. // 如果容器可见(有宽度和高度),更新地图尺寸
  278. if (rect.width > 0 && rect.height > 0) {
  279. indexMap.kmap.map.updateSize();
  280. } else {
  281. // 如果容器不可见,继续等待
  282. setTimeout(checkAndUpdateSize, 100);
  283. }
  284. }
  285. };
  286. // 延迟检查,确保 tab 切换完成
  287. setTimeout(checkAndUpdateSize, 200);
  288. }
  289. }
  290. // 初始化时获取所有状态的数量
  291. initTaskCounts();
  292. getSimpleList();
  293. });
  294. });
  295. // 标记是否正在通过日期选择切换筛选(避免 watch 清除日期筛选)
  296. const isDateSelecting = ref(false);
  297. // 监听 activeIndex 变化,重新加载数据
  298. watch(activeIndex, () => {
  299. // 如果正在通过日期选择切换,不清除日期筛选
  300. if (isDateSelecting.value) {
  301. isDateSelecting.value = false;
  302. getSimpleList();
  303. return;
  304. }
  305. // 切换筛选时清除日期筛选
  306. filterDate.value = null;
  307. // 清除日历选中状态
  308. if (calendarRef.value) {
  309. calendarRef.value.clearSelection();
  310. }
  311. getSimpleList();
  312. });
  313. function getSimpleList() {
  314. loading.value = true;
  315. noData.value = false;
  316. // 清空refs数组,避免索引错乱
  317. taskItemRefs.value = [];
  318. const startFlowStatus = getStartFlowStatus(activeIndex.value);
  319. const needReview = activeIndex.value === 2 ? 1 : null;
  320. const params = {
  321. ...selectParma.value,
  322. role: 2,
  323. location: mapPoint.value,
  324. flowStatus: startFlowStatus,
  325. farmWorkTypeId: selectParma.value.farmWorkTypeId || null,
  326. needReview: needReview,
  327. includePrescription: activeIndex.value === 0 ? false : true,
  328. };
  329. return VE_API.z_farm_work_record
  330. .getSimpleList(params)
  331. .then(({ data }) => {
  332. loading.value = false;
  333. // 假设返回的数据结构是 { list: [], total: 0 } 或者直接是数组
  334. let filteredData = data;
  335. // 保存完整数据(用于日历显示)
  336. if (activeIndex.value === 0) {
  337. // 如果是"待完成"状态,保存完整数据用于日历
  338. fullTaskList.value = Array.isArray(data) ? data : [];
  339. }
  340. // 如果有日期筛选,在前端再次过滤(确保数据准确)
  341. if (filterDate.value && Array.isArray(filteredData)) {
  342. filteredData = filteredData.filter((item) => {
  343. if (!item.expectedExecuteDate && !item.executeDeadlineDate) return false;
  344. const itemDate = formatDate(new Date(item.expectedExecuteDate || item.executeDeadlineDate));
  345. return itemDate === filterDate.value;
  346. });
  347. }
  348. if (Array.isArray(filteredData) && filteredData.length > 0) {
  349. taskList.value = filteredData;
  350. // 更新当前状态的数量
  351. taskCounts.value[activeIndex.value] = filteredData.length;
  352. if (activeIndex.value === 0) {
  353. // 传递给日历的数据应该是完整的未筛选数据
  354. const calendarData = filterDate.value ? fullTaskList.value : taskList.value;
  355. calendarRef.value && calendarRef.value.setSolarTerm(calendarData);
  356. // 地图使用筛选后的数据
  357. indexMap.initData(taskList.value);
  358. }
  359. } else {
  360. noData.value = true;
  361. taskList.value = [];
  362. taskCounts.value[activeIndex.value] = 0;
  363. }
  364. })
  365. .catch((error) => {
  366. console.error("获取任务列表失败:", error);
  367. loading.value = false;
  368. taskList.value = [];
  369. taskCounts.value[activeIndex.value] = 0;
  370. if (activeIndex.value === 0) {
  371. // 即使筛选后没有数据,日历也应该显示完整数据
  372. const calendarData = filterDate.value ? fullTaskList.value : [];
  373. indexMap.initData(taskList.value);
  374. calendarRef.value && calendarRef.value.setSolarTerm(calendarData);
  375. }
  376. noData.value = true;
  377. });
  378. }
  379. // 处理日历日期选择
  380. const handleDateSelect = (date) => {
  381. if (date) {
  382. // 有日期选择,切换到"待完成"筛选并设置筛选日期
  383. filterDate.value = date;
  384. // 如果当前不是"待完成"状态,切换到"待完成"
  385. if (activeIndex.value !== 0) {
  386. isDateSelecting.value = true; // 标记正在通过日期选择切换
  387. activeIndex.value = 0;
  388. // watch 会处理 getSimpleList
  389. } else {
  390. // 如果已经是"待完成"状态,直接重新加载列表
  391. getSimpleList();
  392. }
  393. } else {
  394. // 取消日期筛选
  395. filterDate.value = null;
  396. // 重新加载列表
  397. getSimpleList();
  398. }
  399. };
  400. function handleActiveFilter(i) {
  401. activeIndex.value = i;
  402. // watch 会自动处理清除日期筛选和日历选中状态
  403. selectParma.value.districtCode = cityCode.value;
  404. selectParma.value.farmWorkTypeId = null;
  405. }
  406. const offerPopupRef = ref(null);
  407. const showUploadExecutePopup = (item) => {
  408. if(getButtonText(item)) {
  409. const query = {
  410. askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
  411. shareText: '向您分享了一条农事执行提醒,请您尽快执行',
  412. targetUrl: `completed_work`,
  413. paramsPage: JSON.stringify({id: item.id}),
  414. imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
  415. };
  416. wx.miniProgram.navigateTo({
  417. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  418. });
  419. }else{
  420. offerPopupRef.value.openPopup(item);
  421. }
  422. };
  423. const generateReport = (item) => {
  424. router.push({
  425. path: "/achievement_report",
  426. query: { miniJson: JSON.stringify({ id: item.id }) },
  427. });
  428. };
  429. function toDetail(item) {
  430. // router.push({
  431. // path: "/modify",
  432. // query: { id: item.id },
  433. // });
  434. router.push({
  435. path: "/completed_work",
  436. query: { miniJson: JSON.stringify({ id: item.id }) },
  437. });
  438. }
  439. const showCalendar = ref(false);
  440. const maxDate = ref();
  441. // 最小日期设置为今天,今天可以选择
  442. const minDate = new Date();
  443. const executeItem = ref(null);
  444. const selectExecuteTime = (item) => {
  445. if (getButtonText(item)) {
  446. const query = {
  447. askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
  448. shareText: '向您分享了一条农事提醒,请您尽快确认执行时间',
  449. targetUrl: `completed_work`,
  450. paramsPage: JSON.stringify({id: item.id}),
  451. imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
  452. };
  453. wx.miniProgram.navigateTo({
  454. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  455. });
  456. } else {
  457. executeItem.value = item;
  458. maxDate.value = new Date(item.executeDeadlineDate);
  459. showCalendar.value = true;
  460. }
  461. };
  462. const onConfirmExecuteTime = (date) => {
  463. showCalendar.value = false;
  464. VE_API.z_farm_work_record
  465. .updateExpectedExecuteDate({ recordId: executeItem.value.id, expectedExecuteDate: formatDate(date) })
  466. .then((res) => {
  467. if (res.code === 0) {
  468. ElMessage.success("操作成功");
  469. getSimpleList();
  470. }
  471. });
  472. };
  473. // 获取上传按钮的文本(计算属性方式)
  474. const getButtonText = (item) => {
  475. return agriculturalRole.value === 1 || (agriculturalRole.value === 2 && item.executorUserId != userId.value);
  476. };
  477. // const isShowPermission = (item) => {
  478. // return agriculturalRole.value === 1 || agriculturalRole.value === 2 || item.executorUserId === userId.value;
  479. // };
  480. const priceSheetPopupRef = ref(null);
  481. const showPriceSheetPopup = (item) => {
  482. VE_API.z_farm_work_record.getDetail({ id: item.id }).then(({ data }) => {
  483. const res = data[0];
  484. priceSheetPopupRef.value.handleShowPopup(res);
  485. });
  486. };
  487. const onlyShare = ref(false);
  488. function handleAction(item) {
  489. if(getButtonText(item)) {
  490. const query = {
  491. askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
  492. shareText: '向您分享了一条农事复核提醒,请您尽快复核',
  493. targetUrl: `review_work`,
  494. paramsPage: JSON.stringify({id: item.id}),
  495. imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
  496. };
  497. wx.miniProgram.navigateTo({
  498. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  499. });
  500. }else{
  501. setTimeout(() => {
  502. uploadExecuteRef.value.showPopup(item, "share-sheet");
  503. }, 10);
  504. }
  505. }
  506. function handleForward(item) {
  507. if (item.quoteCount && item.quoteCount != 0) {
  508. onlyShare.value = true;
  509. setTimeout(() => {
  510. uploadExecuteRef.value.showPopup(
  511. { ...item, type: "quotation", farmWorkOrderId: item.orderId },
  512. "share-sheet"
  513. );
  514. }, 10);
  515. } else {
  516. ElMessage.warning("暂无报价数据,无法分享");
  517. return;
  518. }
  519. }
  520. </script>
  521. <style lang="scss" scoped>
  522. .task-page {
  523. width: 100%;
  524. height: calc(100vh - 50px - 50px);
  525. overflow: auto;
  526. box-sizing: border-box;
  527. background: #f5f7fb;
  528. .map-container {
  529. width: 100%;
  530. height: 162px;
  531. clip-path: inset(0px round 8px);
  532. }
  533. .select-group {
  534. display: flex;
  535. padding: 0 12px;
  536. .select-item {
  537. width: 100%;
  538. ::v-deep {
  539. .el-select__wrapper {
  540. text-align: center;
  541. gap: 2px;
  542. box-shadow: none;
  543. justify-content: center;
  544. background: none;
  545. }
  546. .el-select__selection {
  547. flex: none;
  548. width: fit-content;
  549. }
  550. .el-select__placeholder {
  551. position: static;
  552. transform: none;
  553. width: fit-content;
  554. color: rgba(0, 0, 0, 0.2);
  555. }
  556. .el-select__caret {
  557. color: rgba(0, 0, 0, 0.2);
  558. }
  559. }
  560. }
  561. }
  562. .calendar-wrap {
  563. padding: 10px 0 4px 0;
  564. }
  565. .task-top {
  566. padding: 10px 12px;
  567. }
  568. .task-content-loading {
  569. height: 80px;
  570. border-radius: 8px;
  571. position: absolute;
  572. top: 60px;
  573. left: 0;
  574. width: 100%;
  575. }
  576. .task-content {
  577. min-height: 80px;
  578. }
  579. .empty-data {
  580. text-align: center;
  581. font-size: 14px;
  582. color: #6f7274;
  583. padding: 20px 0;
  584. }
  585. .task-list {
  586. position: relative;
  587. background: #fff;
  588. padding: 8px 12px;
  589. }
  590. .list-filter {
  591. display: flex;
  592. align-items: center;
  593. justify-content: center;
  594. gap: 20px;
  595. .filter-item {
  596. padding: 0 12px;
  597. height: 28px;
  598. color: rgba(0, 0, 0, 0.5);
  599. font-size: 14px;
  600. line-height: 28px;
  601. border-radius: 20px;
  602. &.active {
  603. color: #2199f8;
  604. background: rgba(33, 153, 248, 0.2);
  605. }
  606. }
  607. }
  608. .task-item + .task-item {
  609. margin-top: 10px;
  610. }
  611. .execute-wrap {
  612. background: rgba(153, 153, 153, 0.1);
  613. border: 1px solid rgba(153, 153, 153, 0.2);
  614. border-radius: 2px;
  615. padding: 6px 10px;
  616. color: #999999;
  617. display: flex;
  618. align-items: center;
  619. gap: 5px;
  620. margin-top: 10px;
  621. .execute-icon {
  622. width: 14px;
  623. height: 14px;
  624. }
  625. }
  626. .item-footer {
  627. margin-top: 10px;
  628. padding-top: 11px;
  629. border-top: 1px solid rgba(0, 0, 0, 0.1);
  630. display: flex;
  631. align-items: center;
  632. justify-content: space-between;
  633. font-size: 12px;
  634. .footer-l {
  635. color: #8b8b8b;
  636. font-size: 12px;
  637. &.primary-btn {
  638. display: inline-flex;
  639. align-items: center;
  640. border: 1px solid #2199f8;
  641. background: rgba(33, 153, 248, 0.1);
  642. padding: 0 12px;
  643. height: 32px;
  644. box-sizing: border-box;
  645. display: flex;
  646. align-items: center;
  647. border-radius: 20px;
  648. color: #2199f8;
  649. .share-icon {
  650. width: 12px;
  651. padding-right: 4px;
  652. }
  653. }
  654. &.farm-name-text {
  655. font-size: 14px;
  656. color: #6f7274;
  657. .name-text {
  658. padding-left: 4px;
  659. }
  660. }
  661. }
  662. .footer-r {
  663. display: flex;
  664. align-items: center;
  665. .btn {
  666. height: 32px;
  667. line-height: 32px;
  668. padding: 0 12px;
  669. border-radius: 20px;
  670. display: flex;
  671. align-items: center;
  672. box-sizing: border-box;
  673. &.second {
  674. // border: 1px solid #8B8B8B;
  675. // color: #8B8B8B;
  676. color: #2199f8;
  677. background: rgba(33, 153, 248, 0.1);
  678. }
  679. &.primary {
  680. background: #2199f8;
  681. color: #fff;
  682. }
  683. .btn-icon {
  684. padding-right: 4px;
  685. }
  686. &.warning {
  687. color: #ff953d;
  688. background: #fff;
  689. border: 1px solid #ff953d;
  690. }
  691. &.secondary-text {
  692. color: #2199f8;
  693. border: 1px solid #2199f8;
  694. }
  695. &.primary-text {
  696. background: rgba(33, 153, 248, 0.1);
  697. color: #2199f8;
  698. border: 1px solid #2199f8;
  699. }
  700. }
  701. .btn + .btn {
  702. margin-left: 8px;
  703. }
  704. }
  705. }
  706. }
  707. </style>
  708. <style lang="scss">
  709. .van-calendar__popup {
  710. z-index: 9999 !important;
  711. }
  712. </style>