task.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  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. console.log('taskCounts.value', taskCounts.value);
  177. calendarRef.value && calendarRef.value.setCounts(index, taskCounts.value[index]);
  178. if (index === 0) {
  179. calendarRef.value && calendarRef.value.setSolarTerm(data);
  180. indexMap.initData(data);
  181. }
  182. } else if (data?.total !== undefined) {
  183. taskCounts.value[index] = data.total;
  184. } else {
  185. taskCounts.value[index] = 0;
  186. }
  187. })
  188. .catch((error) => {
  189. console.error(`获取状态${index}任务数量失败:`, error);
  190. taskCounts.value[index] = 0;
  191. });
  192. }
  193. const taskItemRefs = ref([]);
  194. const setTaskItemRef = (el, index) => {
  195. if (el) {
  196. taskItemRefs.value[index] = el;
  197. }
  198. };
  199. const handleUploadSuccess = async () => {
  200. // 刷新列表
  201. await initTaskCounts();
  202. // 加载当前选中状态的数据列表
  203. getSimpleList();
  204. };
  205. const cityCode = ref("");
  206. //根据城市的坐标返回区县列表
  207. const districtList = ref([]);
  208. function getDistrictListByCity() {
  209. VE_API.z_farm_work_record.getDistrictListByCity({ point: mapPoint.value }).then(({ data }) => {
  210. districtList.value = data || [];
  211. // cityCode.value = data[0].code.slice(0, -2);
  212. cityCode.value = "";
  213. districtList.value.unshift({ code: cityCode.value, name: "全部" });
  214. selectParma.value.districtCode = cityCode.value;
  215. getSimpleList();
  216. });
  217. }
  218. //农事类型列表
  219. const farmWorkTypeList = ref([]);
  220. function getFarmWorkTypeList() {
  221. VE_API.z_farm_work_record.getFarmWorkTypeList().then(({ data }) => {
  222. farmWorkTypeList.value = data;
  223. farmWorkTypeList.value.unshift({ id: 0, name: "全部" });
  224. });
  225. }
  226. // 初始化时获取所有状态的任务数量
  227. function initTaskCounts() {
  228. // 并行请求状态的数量
  229. Promise.all([
  230. getTaskCount(4, 0), // 待完成
  231. getTaskCount(5, 1), // 已完成
  232. getTaskCount(5, 2), // 待复核
  233. ]);
  234. }
  235. const mapPoint = ref(null);
  236. const agriculturalRole = ref(null);
  237. const userId = ref(null);
  238. onMounted(() => {
  239. mapPoint.value = store.state.home.miniUserLocationPoint;
  240. const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
  241. agriculturalRole.value = userInfo.agriculturalRole;
  242. userId.value = userInfo.id;
  243. // 初始化时获取所有状态的数量
  244. initTaskCounts();
  245. // 加载当前选中状态的数据列表
  246. getSimpleList();
  247. getDistrictListByCity();
  248. getFarmWorkTypeList();
  249. nextTick(() => {
  250. indexMap.initMap(mapPoint.value, mapContainer.value, true);
  251. });
  252. });
  253. onActivated(() => {
  254. // 确保地图已初始化,使用 nextTick 等待 DOM 更新
  255. nextTick(() => {
  256. // 检查地图实例是否已初始化
  257. if (!indexMap.kmap) {
  258. // 如果地图未初始化,重新初始化
  259. if (mapContainer.value) {
  260. mapPoint.value = store.state.home.miniUserLocationPoint;
  261. indexMap.initMap(mapPoint.value, mapContainer.value, true);
  262. }
  263. } else {
  264. // 如果地图已初始化,更新地图尺寸(解决页面切换后地图不显示的问题)
  265. if (mapContainer.value && indexMap.kmap.map) {
  266. // 等待容器完全可见后再更新尺寸
  267. setTimeout(() => {
  268. indexMap.kmap.map.updateSize();
  269. }, 100);
  270. }
  271. }
  272. });
  273. // 初始化时获取所有状态的数量
  274. initTaskCounts();
  275. getSimpleList();
  276. });
  277. // 标记是否正在通过日期选择切换筛选(避免 watch 清除日期筛选)
  278. const isDateSelecting = ref(false);
  279. // 监听 activeIndex 变化,重新加载数据
  280. watch(activeIndex, () => {
  281. // 如果正在通过日期选择切换,不清除日期筛选
  282. if (isDateSelecting.value) {
  283. isDateSelecting.value = false;
  284. getSimpleList();
  285. return;
  286. }
  287. // 切换筛选时清除日期筛选
  288. filterDate.value = null;
  289. // 清除日历选中状态
  290. if (calendarRef.value) {
  291. calendarRef.value.clearSelection();
  292. }
  293. getSimpleList();
  294. });
  295. function getSimpleList() {
  296. loading.value = true;
  297. noData.value = false;
  298. // 清空refs数组,避免索引错乱
  299. taskItemRefs.value = [];
  300. const startFlowStatus = getStartFlowStatus(activeIndex.value);
  301. const needReview = activeIndex.value === 2 ? 1 : null;
  302. const params = {
  303. ...selectParma.value,
  304. role: 2,
  305. location: mapPoint.value,
  306. flowStatus: startFlowStatus,
  307. farmWorkTypeId: selectParma.value.farmWorkTypeId || null,
  308. needReview: needReview,
  309. includePrescription: activeIndex.value === 0 ? false : true,
  310. };
  311. return VE_API.z_farm_work_record
  312. .getSimpleList(params)
  313. .then(({ data }) => {
  314. loading.value = false;
  315. // 假设返回的数据结构是 { list: [], total: 0 } 或者直接是数组
  316. let filteredData = data;
  317. // 保存完整数据(用于日历显示)
  318. if (activeIndex.value === 0) {
  319. // 如果是"待完成"状态,保存完整数据用于日历
  320. fullTaskList.value = Array.isArray(data) ? data : [];
  321. }
  322. // 如果有日期筛选,在前端再次过滤(确保数据准确)
  323. if (filterDate.value && Array.isArray(filteredData)) {
  324. filteredData = filteredData.filter((item) => {
  325. if (!item.expectedExecuteDate && !item.executeDeadlineDate) return false;
  326. const itemDate = formatDate(new Date(item.expectedExecuteDate || item.executeDeadlineDate));
  327. return itemDate === filterDate.value;
  328. });
  329. }
  330. if (Array.isArray(filteredData) && filteredData.length > 0) {
  331. taskList.value = filteredData;
  332. // 更新当前状态的数量
  333. taskCounts.value[activeIndex.value] = filteredData.length;
  334. if (activeIndex.value === 0) {
  335. // 传递给日历的数据应该是完整的未筛选数据
  336. const calendarData = filterDate.value ? fullTaskList.value : taskList.value;
  337. calendarRef.value && calendarRef.value.setSolarTerm(calendarData);
  338. // 地图使用筛选后的数据
  339. indexMap.initData(taskList.value);
  340. }
  341. } else {
  342. noData.value = true;
  343. taskList.value = [];
  344. taskCounts.value[activeIndex.value] = 0;
  345. }
  346. })
  347. .catch((error) => {
  348. console.error("获取任务列表失败:", error);
  349. loading.value = false;
  350. taskList.value = [];
  351. taskCounts.value[activeIndex.value] = 0;
  352. if (activeIndex.value === 0) {
  353. // 即使筛选后没有数据,日历也应该显示完整数据
  354. const calendarData = filterDate.value ? fullTaskList.value : [];
  355. indexMap.initData(taskList.value);
  356. calendarRef.value && calendarRef.value.setSolarTerm(calendarData);
  357. }
  358. noData.value = true;
  359. });
  360. }
  361. // 处理日历日期选择
  362. const handleDateSelect = (date) => {
  363. if (date) {
  364. // 有日期选择,切换到"待完成"筛选并设置筛选日期
  365. filterDate.value = date;
  366. // 如果当前不是"待完成"状态,切换到"待完成"
  367. if (activeIndex.value !== 0) {
  368. isDateSelecting.value = true; // 标记正在通过日期选择切换
  369. activeIndex.value = 0;
  370. // watch 会处理 getSimpleList
  371. } else {
  372. // 如果已经是"待完成"状态,直接重新加载列表
  373. getSimpleList();
  374. }
  375. } else {
  376. // 取消日期筛选
  377. filterDate.value = null;
  378. // 重新加载列表
  379. getSimpleList();
  380. }
  381. };
  382. function handleActiveFilter(i) {
  383. activeIndex.value = i;
  384. // watch 会自动处理清除日期筛选和日历选中状态
  385. selectParma.value.districtCode = cityCode.value;
  386. selectParma.value.farmWorkTypeId = null;
  387. }
  388. const offerPopupRef = ref(null);
  389. const showUploadExecutePopup = (item) => {
  390. if(getButtonText(item)) {
  391. const query = {
  392. askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
  393. shareText: '向您分享了一条农事执行提醒,请您尽快执行',
  394. targetUrl: `completed_work`,
  395. paramsPage: JSON.stringify({id: item.id}),
  396. imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
  397. };
  398. wx.miniProgram.navigateTo({
  399. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  400. });
  401. }else{
  402. offerPopupRef.value.openPopup(item);
  403. }
  404. };
  405. const generateReport = (item) => {
  406. router.push({
  407. path: "/achievement_report",
  408. query: { miniJson: JSON.stringify({ id: item.id }) },
  409. });
  410. };
  411. function toDetail(item) {
  412. // router.push({
  413. // path: "/modify",
  414. // query: { id: item.id },
  415. // });
  416. router.push({
  417. path: "/completed_work",
  418. query: { miniJson: JSON.stringify({ id: item.id }) },
  419. });
  420. }
  421. const showCalendar = ref(false);
  422. const maxDate = ref();
  423. // 最小日期设置为今天,今天可以选择
  424. const minDate = new Date();
  425. const executeItem = ref(null);
  426. const selectExecuteTime = (item) => {
  427. if (getButtonText(item)) {
  428. const query = {
  429. askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
  430. shareText: '向您分享了一条农事提醒,请您尽快确认执行时间',
  431. targetUrl: `completed_work`,
  432. paramsPage: JSON.stringify({id: item.id}),
  433. imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
  434. };
  435. wx.miniProgram.navigateTo({
  436. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  437. });
  438. } else {
  439. executeItem.value = item;
  440. maxDate.value = new Date(item.executeDeadlineDate);
  441. showCalendar.value = true;
  442. }
  443. };
  444. const onConfirmExecuteTime = (date) => {
  445. showCalendar.value = false;
  446. VE_API.z_farm_work_record
  447. .updateExpectedExecuteDate({ recordId: executeItem.value.id, expectedExecuteDate: formatDate(date) })
  448. .then((res) => {
  449. if (res.code === 0) {
  450. ElMessage.success("操作成功");
  451. getSimpleList();
  452. }
  453. });
  454. };
  455. // 获取上传按钮的文本(计算属性方式)
  456. const getButtonText = (item) => {
  457. return agriculturalRole.value === 1 || (agriculturalRole.value === 2 && item.executorUserId != userId.value);
  458. };
  459. // const isShowPermission = (item) => {
  460. // return agriculturalRole.value === 1 || agriculturalRole.value === 2 || item.executorUserId === userId.value;
  461. // };
  462. const priceSheetPopupRef = ref(null);
  463. const showPriceSheetPopup = (item) => {
  464. VE_API.z_farm_work_record.getDetail({ id: item.id }).then(({ data }) => {
  465. const res = data[0];
  466. priceSheetPopupRef.value.handleShowPopup(res);
  467. });
  468. };
  469. const onlyShare = ref(false);
  470. function handleAction(item) {
  471. if(getButtonText(item)) {
  472. const query = {
  473. askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
  474. shareText: '向您分享了一条农事复核提醒,请您尽快复核',
  475. targetUrl: `review_work`,
  476. paramsPage: JSON.stringify({id: item.id}),
  477. imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
  478. };
  479. wx.miniProgram.navigateTo({
  480. url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
  481. });
  482. }else{
  483. setTimeout(() => {
  484. uploadExecuteRef.value.showPopup(item, "share-sheet");
  485. }, 10);
  486. }
  487. }
  488. function handleForward(item) {
  489. if (item.quoteCount && item.quoteCount != 0) {
  490. onlyShare.value = true;
  491. setTimeout(() => {
  492. uploadExecuteRef.value.showPopup(
  493. { ...item, type: "quotation", farmWorkOrderId: item.orderId },
  494. "share-sheet"
  495. );
  496. }, 10);
  497. } else {
  498. ElMessage.warning("暂无报价数据,无法分享");
  499. return;
  500. }
  501. }
  502. </script>
  503. <style lang="scss" scoped>
  504. .task-page {
  505. width: 100%;
  506. height: calc(100vh - 50px - 50px);
  507. overflow: auto;
  508. box-sizing: border-box;
  509. background: #f5f7fb;
  510. .map-container {
  511. width: 100%;
  512. height: 162px;
  513. clip-path: inset(0px round 8px);
  514. }
  515. .select-group {
  516. display: flex;
  517. padding: 0 12px;
  518. .select-item {
  519. width: 100%;
  520. ::v-deep {
  521. .el-select__wrapper {
  522. text-align: center;
  523. gap: 2px;
  524. box-shadow: none;
  525. justify-content: center;
  526. background: none;
  527. }
  528. .el-select__selection {
  529. flex: none;
  530. width: fit-content;
  531. }
  532. .el-select__placeholder {
  533. position: static;
  534. transform: none;
  535. width: fit-content;
  536. color: rgba(0, 0, 0, 0.2);
  537. }
  538. .el-select__caret {
  539. color: rgba(0, 0, 0, 0.2);
  540. }
  541. }
  542. }
  543. }
  544. .calendar-wrap {
  545. padding: 10px 0 4px 0;
  546. }
  547. .task-top {
  548. padding: 10px 12px;
  549. }
  550. .task-content-loading {
  551. height: 80px;
  552. border-radius: 8px;
  553. position: absolute;
  554. top: 60px;
  555. left: 0;
  556. width: 100%;
  557. }
  558. .task-content {
  559. min-height: 80px;
  560. }
  561. .empty-data {
  562. text-align: center;
  563. font-size: 14px;
  564. color: #6f7274;
  565. padding: 20px 0;
  566. }
  567. .task-list {
  568. position: relative;
  569. background: #fff;
  570. padding: 8px 12px;
  571. }
  572. .list-filter {
  573. display: flex;
  574. align-items: center;
  575. justify-content: center;
  576. gap: 20px;
  577. .filter-item {
  578. padding: 0 12px;
  579. height: 28px;
  580. color: rgba(0, 0, 0, 0.5);
  581. font-size: 14px;
  582. line-height: 28px;
  583. border-radius: 20px;
  584. &.active {
  585. color: #2199f8;
  586. background: rgba(33, 153, 248, 0.2);
  587. }
  588. }
  589. }
  590. .task-item + .task-item {
  591. margin-top: 10px;
  592. }
  593. .execute-wrap {
  594. background: rgba(153, 153, 153, 0.1);
  595. border: 1px solid rgba(153, 153, 153, 0.2);
  596. border-radius: 2px;
  597. padding: 6px 10px;
  598. color: #999999;
  599. display: flex;
  600. align-items: center;
  601. gap: 5px;
  602. margin-top: 10px;
  603. .execute-icon {
  604. width: 14px;
  605. height: 14px;
  606. }
  607. }
  608. .item-footer {
  609. margin-top: 10px;
  610. padding-top: 11px;
  611. border-top: 1px solid rgba(0, 0, 0, 0.1);
  612. display: flex;
  613. align-items: center;
  614. justify-content: space-between;
  615. font-size: 12px;
  616. .footer-l {
  617. color: #8b8b8b;
  618. font-size: 12px;
  619. &.primary-btn {
  620. display: inline-flex;
  621. align-items: center;
  622. border: 1px solid #2199f8;
  623. background: rgba(33, 153, 248, 0.1);
  624. padding: 0 12px;
  625. height: 32px;
  626. box-sizing: border-box;
  627. display: flex;
  628. align-items: center;
  629. border-radius: 20px;
  630. color: #2199f8;
  631. .share-icon {
  632. width: 12px;
  633. padding-right: 4px;
  634. }
  635. }
  636. &.farm-name-text {
  637. font-size: 14px;
  638. color: #6f7274;
  639. .name-text {
  640. padding-left: 4px;
  641. }
  642. }
  643. }
  644. .footer-r {
  645. display: flex;
  646. align-items: center;
  647. .btn {
  648. height: 32px;
  649. line-height: 32px;
  650. padding: 0 12px;
  651. border-radius: 20px;
  652. display: flex;
  653. align-items: center;
  654. box-sizing: border-box;
  655. &.second {
  656. // border: 1px solid #8B8B8B;
  657. // color: #8B8B8B;
  658. color: #2199f8;
  659. background: rgba(33, 153, 248, 0.1);
  660. }
  661. &.primary {
  662. background: #2199f8;
  663. color: #fff;
  664. }
  665. .btn-icon {
  666. padding-right: 4px;
  667. }
  668. &.warning {
  669. color: #ff953d;
  670. background: #fff;
  671. border: 1px solid #ff953d;
  672. }
  673. &.secondary-text {
  674. color: #2199f8;
  675. border: 1px solid #2199f8;
  676. }
  677. &.primary-text {
  678. background: rgba(33, 153, 248, 0.1);
  679. color: #2199f8;
  680. border: 1px solid #2199f8;
  681. }
  682. }
  683. .btn + .btn {
  684. margin-left: 8px;
  685. }
  686. }
  687. }
  688. }
  689. </style>
  690. <style lang="scss">
  691. .van-calendar__popup {
  692. z-index: 9999 !important;
  693. }
  694. </style>