index.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553
  1. <template>
  2. <div class="new-farming-page">
  3. <custom-header :name="isAdd ? '新增农事' : isEdit ? '编辑方案' : '农事详情'"></custom-header>
  4. <div class="new-farming-content">
  5. <div v-if="!isAdd && !isEdit">
  6. <div class="step-wrap">
  7. <farm-steps :currentStep="0" />
  8. </div>
  9. <div class="box-wrap farm-info">
  10. <div class="info-title">
  11. <div class="card-title">农场现状</div>
  12. <!-- <div class="info-more">
  13. 点击查看更多
  14. <el-icon><ArrowRight /></el-icon>
  15. </div> -->
  16. </div>
  17. <div class="info-content">
  18. {{ farmStatusText }}
  19. </div>
  20. </div>
  21. <div class="box-wrap farm-photo" v-if="triggerImg.length">
  22. <div class="photo-list">
  23. <photo-provider :photo-closable="true">
  24. <photo-consumer v-for="src in triggerImg" intro="触发照片" :key="src" :src="base_img_url2 + src.cloudFilename">
  25. <div class="img-item">
  26. <img :src="base_img_url2 + src.cloudFilename" class="view-box">
  27. </div>
  28. </photo-consumer>
  29. </photo-provider>
  30. </div>
  31. <!-- <div class="list-text">点击查看更多</div> -->
  32. </div>
  33. </div>
  34. <el-form
  35. ref="formRef"
  36. style="max-width: 600px"
  37. label-position="left"
  38. :rules="rules"
  39. :model="dynamicValidateForm"
  40. class="demo-dynamic"
  41. >
  42. <div class="farm-card" v-if="!isAdd">
  43. <div class="card-title">{{ detailData?.farmWorkName }}<span class="type-tag">标准农事</span></div>
  44. <div class="info-content">
  45. <el-form-item label-width="70px" class="form-item text-item" label="农事编号">
  46. <div class="info-text">
  47. {{ detailData?.code }}
  48. </div>
  49. </el-form-item>
  50. <el-form-item label-width="70px" class="form-item text-item" label="服务亩数">
  51. <div class="info-text">
  52. {{ detailData?.area ? formatArea(detailData?.area) + '亩' : '--' }}
  53. </div>
  54. </el-form-item>
  55. <el-form-item label-width="70px" class="form-item text-item" label="服务区域">
  56. <div class="info-text">
  57. {{ detailData?.serviceRegion }}
  58. </div>
  59. </el-form-item>
  60. <!-- <el-form-item label-width="70px" class="form-item" prop="conditionRate" label="触发条件">
  61. <div class="condition-wrap">
  62. {{ detailData?.condition }}
  63. </div>
  64. </el-form-item> -->
  65. <el-form-item label-width="70px" class="form-item" prop="executeDate" label="执行时间">
  66. <el-date-picker
  67. class="item-input"
  68. style="width: 100%"
  69. value-format="YYYY-MM-DD"
  70. v-model="dynamicValidateForm.executeDate"
  71. type="date"
  72. :clearable="false"
  73. placeholder="选择日期"
  74. :editable="false"
  75. />
  76. </el-form-item>
  77. </div>
  78. </div>
  79. <template v-else>
  80. <div class="farm-card progress">
  81. <span class="progress-title">农事进度</span>
  82. <el-radio-group v-model="farmProgress">
  83. <el-radio :value="0">已做</el-radio>
  84. <el-radio :value="1">未做</el-radio>
  85. </el-radio-group>
  86. </div>
  87. <div class="farm-card" v-if="farmProgress === 0">
  88. <div class="card-title">基本信息</div>
  89. <div class="info-content">
  90. <el-form-item label-width="82px" class="form-item" prop="farmWorkName" label="农事名称">
  91. <el-select v-model="dynamicValidateForm.farmWorkName" placeholder="请选择农事名称" style="width: 100%">
  92. <el-option v-for="(item, index) in farmWorkNameList" :key="index" :value="item" :label="item" />
  93. </el-select>
  94. </el-form-item>
  95. <el-form-item label-width="82px" class="form-item" prop="name" label="农事目的">
  96. <el-input
  97. v-model="dynamicValidateForm.purpose"
  98. style="width: 100%"
  99. :rows="2"
  100. type="textarea"
  101. placeholder="请输入农事目的"
  102. />
  103. </el-form-item>
  104. <el-form-item label-width="82px" class="form-item" prop="conditionRate" label="执行时间">
  105. <el-date-picker
  106. v-model="dynamicValidateForm.checkDay"
  107. value-format="YYYY-MM-DD"
  108. type="date"
  109. placeholder="请选择执行时间"
  110. style="width: 100%"
  111. :editable="false"
  112. />
  113. </el-form-item>
  114. </div>
  115. </div>
  116. </template>
  117. <div class="farm-card prescription-content" v-if="farmProgress === 0">
  118. <div class="card-title pb-12">药物处方</div>
  119. <el-form-item label-width="82px" class="form-item" prop="usageMode" label="施用方式">
  120. <el-select v-model="dynamicValidateForm.usageMode" placeholder="请选择施用方式" style="width: 100%">
  121. <el-option
  122. v-for="(usage, uId) in allUsageModeList"
  123. :key="uId"
  124. :label="usage"
  125. :value="usage"
  126. />
  127. </el-select>
  128. </el-form-item>
  129. <div v-if="dynamicValidateForm.usageMode !== '人工农事'">
  130. <el-form-item
  131. v-for="(prescriptionItem, prescriptionI) in dynamicValidateForm.prescriptionList"
  132. :key="prescriptionI"
  133. :prop="'prescriptions.' + prescriptionI + '.value'"
  134. class="prescription-item"
  135. >
  136. <div class="recipe-item">
  137. <div class="sub-title">
  138. <div>{{ prescriptionItem.name }}处方</div>
  139. <div class="add-tag" @click="addDomain(prescriptionI)">
  140. <el-icon color="#2199F8"><Plus /></el-icon>新增药物
  141. </div>
  142. </div>
  143. <div class="recipe-form">
  144. <el-form-item
  145. v-for="(domain, index) in prescriptionItem.pesticideFertilizerList"
  146. :key="domain.key"
  147. :prop="'pesticideFertilizerList.' + index + '.value'"
  148. >
  149. <div class="form-box">
  150. <div class="form-index">{{ formatIndex(index) }}</div>
  151. <div class="box-item" v-if="domain.typeName">
  152. <div class="form-l">药肥类型</div>
  153. <div class="form-r r-text">
  154. {{ domain.typeName }}
  155. <!-- <el-select
  156. v-model="domain.typeName"
  157. placeholder="请选择"
  158. style="width: 100%"
  159. >
  160. <el-option :label="domain.typeName" :value="domain.typeName" />
  161. </el-select> -->
  162. </div>
  163. </div>
  164. <div class="box-item">
  165. <div class="form-l">药肥名称</div>
  166. <div class="form-r">
  167. <el-select
  168. filterable
  169. @change="handlePesticideFertilizerChange(prescriptionI, index)"
  170. v-model="domain.pesticideFertilizerId"
  171. placeholder="请选择"
  172. style="width: 100%"
  173. >
  174. <el-option
  175. v-for="item in pesticideFertilizersOptions"
  176. :key="item.id"
  177. :label="item.defaultName || item.name"
  178. :value="item.id"
  179. />
  180. </el-select>
  181. </div>
  182. </div>
  183. <div class="form-title">人工方式</div>
  184. <div class="box-item sub-item">
  185. <div class="form-l has-sub">
  186. <div class="main-name">药肥配比</div>
  187. </div>
  188. <div class="form-r input-box text-center input-unit">
  189. <!-- <el-input
  190. v-model="domain.ratio"
  191. style="width: 100%"
  192. placeholder="请输入"
  193. /> -->
  194. <el-input v-model="domain.ratio" type="number" step="0.01" placeholder="请输入">
  195. <template #append>倍</template>
  196. </el-input>
  197. </div>
  198. </div>
  199. <!-- <div class="box-item sub-item">
  200. <div class="form-l">施用方式</div>
  201. <div class="form-r">
  202. <el-select
  203. v-model="domain.usageMode"
  204. placeholder="请选择"
  205. style="width: 100%"
  206. >
  207. <el-option
  208. v-for="(usage, uId) in domain.usageModeList"
  209. :key="uId"
  210. :label="usage"
  211. :value="usage"
  212. />
  213. </el-select>
  214. </div>
  215. </div> -->
  216. <div class="box-item sub-item">
  217. <div class="form-l has-sub">
  218. <div class="main-name">单亩用量</div>
  219. </div>
  220. <div class="form-r input-box text-center">
  221. <!-- <el-input
  222. v-model="domain.muUsage"
  223. style="width: 100%"
  224. placeholder="请输入"
  225. /> -->
  226. <el-input v-model="domain.muUsage" type="number" step="0.01" placeholder="请输入">
  227. <template #append>{{ domain.unit }}</template>
  228. </el-input>
  229. </div>
  230. </div>
  231. <div v-if="dynamicValidateForm.usageMode === '叶面施'">
  232. <div class="form-title">无人机</div>
  233. <div class="box-item sub-item">
  234. <div class="form-l has-sub">
  235. <div class="main-name">药肥配比</div>
  236. </div>
  237. <div class="form-r input-box text-center">
  238. <!-- <el-input
  239. v-model="domain.ratio2"
  240. style="width: 100%"
  241. placeholder="请输入"
  242. /> -->
  243. <el-input v-model="domain.ratio2" type="number" step="0.01" placeholder="请输入">
  244. <template #append>倍</template>
  245. </el-input>
  246. </div>
  247. </div>
  248. <div class="box-item sub-item">
  249. <div class="form-l has-sub">
  250. <div class="main-name">单亩用量</div>
  251. </div>
  252. <div class="form-r input-box text-center">
  253. <!-- <el-input
  254. v-model="domain.muUsage2"
  255. style="width: 100%"
  256. placeholder="请输入"
  257. /> -->
  258. <el-input v-model="domain.muUsage2" type="number" step="0.01" placeholder="请输入">
  259. <template #append>{{ domain.unit }}</template>
  260. </el-input>
  261. </div>
  262. </div>
  263. </div>
  264. <div class="input-box mark-box">
  265. <el-input
  266. v-model="domain.remark"
  267. style="width: 100%"
  268. placeholder="备注:用药注意事项"
  269. />
  270. </div>
  271. <div class="action-btn">
  272. <el-button
  273. class="btn delete-btn"
  274. @click.prevent="removeDomain(prescriptionI, domain)"
  275. >
  276. 删除
  277. </el-button>
  278. <el-button
  279. type="default"
  280. class="btn"
  281. @click.prevent="resetItemForm(prescriptionI, index)"
  282. >
  283. 重置
  284. </el-button>
  285. </div>
  286. </div>
  287. </el-form-item>
  288. </div>
  289. </div>
  290. </el-form-item>
  291. </div>
  292. </div>
  293. <div class="farm-card progress" v-else>
  294. <div class="situation-description">
  295. <div class="description-title">状况描述</div>
  296. <div class="description-content">
  297. <el-input
  298. v-model="situationDescription"
  299. type="textarea"
  300. :rows="3"
  301. placeholder="请输入目前农场状况"
  302. class="description-textarea"
  303. />
  304. <div class="upload-section">
  305. <el-button class="upload-btn" @click="handleUploadImage">
  306. <el-icon><Upload /></el-icon>
  307. 上传图片
  308. </el-button>
  309. <div class="upload-tip">上传图片,专家诊断更清晰</div>
  310. </div>
  311. </div>
  312. </div>
  313. </div>
  314. <div class="farm-card map-content" v-if="false">
  315. <!-- <div class="farm-card map-content" v-if="!(curRole==1 && isAdd)"> -->
  316. <div class="card-title">执行农事区域</div>
  317. <div class="info-content">
  318. <div class="area-select">
  319. 执行分区:
  320. <span class="block"></span>
  321. <el-select
  322. popper-class="v-select-popper-ns"
  323. v-model="regionId"
  324. placeholder="请选择分区"
  325. style="width: 160px"
  326. @change="changeRegion"
  327. >
  328. <el-option
  329. v-for="(area, index) in areaList"
  330. :key="index"
  331. :label="area.name"
  332. :value="area.id"
  333. >
  334. </el-option>
  335. </el-select>
  336. </div>
  337. <div class="area-select">
  338. 服务亩数:
  339. <span class="block"></span>{{ serveArea }}
  340. </div>
  341. <div class="bottom-map" ref="areaRef"></div>
  342. <div>
  343. <div class="check-btn">
  344. <el-checkbox v-model="checkedArea" @change="handleArea" label="全选" size="large" />
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <div class="submit-btn" v-if="isEdit">
  350. <div class="btn second" @click.prevent="cancelEdit">取消编辑</div>
  351. <div class="btn" @click.prevent="submitForm(formRef)">保存方案</div>
  352. </div>
  353. <div class="submit-btn" v-if="!isAdd && !isEdit">
  354. <div class="btn second" @click="handleIgnore">忽略</div>
  355. <div class="btn" @click.prevent="submitForm(formRef)">确认并报价</div>
  356. </div>
  357. <div class="submit-btn" v-if="isAdd && farmProgress === 0">
  358. <div class="btn second">取消</div>
  359. <div class="btn" @click.prevent="submitForm(formRef)">确定新增</div>
  360. </div>
  361. <div v-if="isAdd && farmProgress === 1">
  362. <div class="expert-diagnosis-btn" @click="handleExpertDiagnosis">邀请专家诊断</div>
  363. </div>
  364. </el-form>
  365. </div>
  366. </div>
  367. <popup v-model:show="showTaskPopup" round class="task-tips-popup">
  368. <template v-if="taskPopupType === 'warning'">
  369. <img class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
  370. <div class="create-farm-text">
  371. <div>您确认忽略 <span class="main-text">{{ detailData?.farmName }}</span> 的 <span class="main-text">{{ detailData?.farmWorkName }}</span> 农事吗</div>
  372. </div>
  373. </template>
  374. <template v-else>
  375. <img class="farm-check-icon" src="@/assets/img/home/right.png" alt="">
  376. <div class="create-farm-text success-text">农事已下发成功</div>
  377. </template>
  378. <div class="create-farm-btn" @click="handlePopupBtn">{{ taskPopupType === 'warning' ? '确认忽略' : '我知道了' }}</div>
  379. </popup>
  380. <!-- 服务报价单 -->
  381. <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
  382. </template>
  383. <script setup>
  384. import { onActivated, ref, reactive, onDeactivated, onBeforeUnmount, computed, onMounted } from "vue";
  385. import { useRouter, useRoute } from "vue-router";
  386. import { ElMessage ,ElMessageBox} from "element-plus";
  387. import customHeader from "@/components/customHeader.vue";
  388. import NewFarmMap from "./newFarmMap";
  389. import { useStore } from "vuex";
  390. import { Popup } from "vant";
  391. import farmSteps from "@/components/farmSteps.vue";
  392. import { base_img_url2 } from "@/api/config";
  393. import { formatArea } from "@/common/commonFun";
  394. import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
  395. import dayjs from "dayjs";
  396. const store = useStore();
  397. const router = useRouter();
  398. const route = useRoute();
  399. // 角色
  400. // const curRole = store.state.app.curRole
  401. const curRole = 0
  402. const gardenId = ref(null);
  403. const actionType = ref([]);
  404. const isAdd = ref(false)
  405. const showTaskPopup = ref(false);
  406. const taskPopupType = ref('warning');
  407. const isEdit = ref(false)
  408. isAdd.value = route.query.isAdd ? true : false
  409. isEdit.value = route.query.isEdit ? true : false
  410. onActivated(() => {
  411. const id = route.query.id;
  412. if (id) {
  413. getDetail(id);
  414. getTriggerImg(id);
  415. }
  416. window.scrollTo(0, 0);
  417. getFarmWorkNameList();
  418. getFarmWorkIndexNameList();
  419. if (route.query.data) {
  420. actionType.value = JSON.parse(route.query.data);
  421. } else {
  422. actionType.value = ["生长异常"];
  423. }
  424. dynamicValidateForm.prescriptionList = actionType.value.map((name) => ({
  425. name,
  426. pesticideFertilizerList: [
  427. {
  428. key: 1,
  429. typeName: "",
  430. muUsage: "",
  431. muUsage2: "",
  432. ratio: "",
  433. ratio2: "",
  434. remark: "",
  435. },
  436. ],
  437. }));
  438. if (!(curRole==1 && isAdd.value)) {
  439. const point = store.state.home.miniUserLocationPoint;
  440. // newFarmMap.initMap(point, areaRef.value);
  441. // eventBus.on("editNsMap:areaVal", getArea);
  442. gardenId.value = route.query.gardenId;
  443. // getAreaList(() => {
  444. // newFarmMap.initArea(areaList.value);
  445. // });
  446. }
  447. getWarningMsg();
  448. });
  449. const triggerImg = ref([]);
  450. const getTriggerImg = async (id) => {
  451. const { data } = await VE_API.z_farm_work_record.getTriggerImg({ farmWorkRecordId: id });
  452. triggerImg.value = data || [];
  453. }
  454. const priceSheetPopupRef = ref(null);
  455. const showPriceSheetPopup = () => {
  456. priceSheetPopupRef.value.handleShowPopup(detailData.value);
  457. };
  458. const detailData = ref({});
  459. const getDetail = async (id) => {
  460. const { data } = await VE_API.z_farm_work_record.getDetail({ id });
  461. const res = data[0];
  462. detailData.value = res;
  463. dynamicValidateForm.executeDate = res.executeDate;
  464. dynamicValidateForm.usageMode = res.usageMode;
  465. res.prescriptionList.forEach(item => {
  466. item.pesticideFertilizerList.forEach(pesticide => {
  467. pesticide.typeName = item.name;
  468. });
  469. });
  470. dynamicValidateForm.prescriptionList = res.prescriptionList;
  471. getFarmWorkArrangeDetail(res.farmWorkArrangeId);
  472. };
  473. // 获取农场现状
  474. const farmStatusText = ref('');
  475. const getFarmWorkArrangeDetail = (id) => {
  476. VE_API.farm.getFarmWorkArrangeDetail({ id }).then(({ data }) => {
  477. farmStatusText.value = data.farmStatus;
  478. });
  479. };
  480. function handleIgnore() {
  481. taskPopupType.value = 'warning';
  482. showTaskPopup.value = true;
  483. }
  484. function handlePopupBtn() {
  485. showTaskPopup.value = false;
  486. if (taskPopupType.value === 'warning') {
  487. // 确认忽略
  488. VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: route.query.id }).then((res) => {
  489. if (res.code === 0) {
  490. ElMessage.success("操作成功");
  491. router.back();
  492. }
  493. });
  494. } else {
  495. router.replace({
  496. path: "/completed_work",
  497. query: {
  498. miniJson: JSON.stringify({ id: route.query.id }),
  499. },
  500. });
  501. }
  502. }
  503. const resetForm = (formEl) => {
  504. if (!formEl) return;
  505. formEl.resetFields();
  506. serveArea.value = null;
  507. regionId.value = null;
  508. };
  509. // 清空所有数据
  510. const clearData = () => {
  511. // 清空表单
  512. resetForm(formRef.value);
  513. // 清空详情数据
  514. detailData.value = {};
  515. // 清空表单数据
  516. dynamicValidateForm.farmWorkName = "";
  517. dynamicValidateForm.conditionRate = "";
  518. dynamicValidateForm.purpose = "";
  519. dynamicValidateForm.executeDate = dayjs().format("YYYY-MM-DD");
  520. dynamicValidateForm.checkDay = "";
  521. dynamicValidateForm.usageMode = "";
  522. dynamicValidateForm.prescriptionList = [{
  523. name: "",
  524. pesticideFertilizerList: [{
  525. key: 1,
  526. typeName: "",
  527. muUsage: "",
  528. muUsage2: "",
  529. ratio: "",
  530. ratio2: "",
  531. remark: "",
  532. }],
  533. }];
  534. // 清空其他数据
  535. serveArea.value = null;
  536. regionId.value = null;
  537. areaList.value = [];
  538. farmProgress.value = 0;
  539. situationDescription.value = '';
  540. checkedArea.value = false;
  541. actionType.value = [];
  542. gardenId.value = null;
  543. showTaskPopup.value = false;
  544. taskPopupType.value = 'warning';
  545. };
  546. onDeactivated(() => {
  547. // areaRef.value && newFarmMap.destroyMap();
  548. clearData();
  549. });
  550. onBeforeUnmount(() => {
  551. clearData();
  552. });
  553. const cancelEdit = () => {
  554. ElMessageBox.confirm("确认要取消编辑吗?", "提示", {
  555. confirmButtonText: "确认",
  556. cancelButtonText: "取消",
  557. type: "warning",
  558. })
  559. .then(() => {
  560. router.back();
  561. })
  562. .catch(() => {
  563. console.log("取消编辑");
  564. });
  565. };
  566. // 表单
  567. const formRef = ref();
  568. const dynamicValidateForm = reactive({
  569. farmWorkName: "",
  570. conditionRate: "",
  571. purpose: "",
  572. executeDate: dayjs().format("YYYY-MM-DD"),
  573. checkDay: "",
  574. usageMode: "",
  575. prescriptionList: [
  576. {
  577. name: "",
  578. pesticideFertilizerList: [
  579. {
  580. key: 1,
  581. typeName: "",
  582. muUsage: "",
  583. muUsage2: "",
  584. ratio: "",
  585. ratio2: "",
  586. remark: "",
  587. },
  588. ],
  589. },
  590. ],
  591. });
  592. const rules = {
  593. farmWorkName: [
  594. {
  595. required: true,
  596. message: "请输入农事名称",
  597. trigger: "blur",
  598. },
  599. ],
  600. conditionRate: [
  601. {
  602. required: false,
  603. message: "请输入触发条件",
  604. trigger: "blur",
  605. },
  606. ],
  607. executeDate: [
  608. {
  609. required: false,
  610. message: "请选择执行时间",
  611. trigger: "blur",
  612. },
  613. ],
  614. checkDay: [
  615. {
  616. required: true,
  617. message: "请选择复核时间",
  618. trigger: "blur",
  619. },
  620. ],
  621. };
  622. const formatIndex = (index) => {
  623. return String(index + 1).padStart(2, "0");
  624. };
  625. const addDomain = (parentIndex) => {
  626. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.unshift({
  627. key: Date.now(),
  628. muUsage: "",
  629. muUsage2: "",
  630. ratio: "",
  631. ratio2: "",
  632. remark: "",
  633. });
  634. };
  635. let pesticideFertilizersOptions = ref([
  636. // {
  637. // id: 'null',
  638. // name: "芸苔素内酯 15000倍",
  639. // typeName: "30",
  640. // defaultRatio: null,
  641. // defaultDroneRatio: null,
  642. // unit: 0,
  643. // defaultName: "调节",
  644. // },
  645. {
  646. brand: "天润美满",
  647. capacity: 1000,
  648. count: null,
  649. defaultDroneRatio: null,
  650. defaultName: "生物活性酶",
  651. defaultRatio: null,
  652. ftl: "",
  653. id: "185",
  654. name: "生物活性酶",
  655. pesticideFertilizerCode: "1185",
  656. price: 220.0,
  657. processUnit: "",
  658. typeId: 1,
  659. typeName: "调节",
  660. unit: "ml",
  661. unitUsage: null,
  662. unitWaterAmount: null,
  663. usageModeList: ["叶面施"],
  664. },
  665. {
  666. brand: "",
  667. capacity: null,
  668. count: null,
  669. defaultDroneRatio: null,
  670. defaultName: "矮壮素",
  671. defaultRatio: null,
  672. ftl: "",
  673. id: "145",
  674. name: "矮壮素",
  675. pesticideFertilizerCode: "1145",
  676. price: null,
  677. processUnit: "",
  678. typeId: 1,
  679. typeName: "调节",
  680. unit: "ml",
  681. unitUsage: null,
  682. unitWaterAmount: null,
  683. usageModeList: ["叶面施"],
  684. },
  685. ]);
  686. VE_API.z_farm_work_order.pesticideFertilizersList().then(({ data }) => {
  687. pesticideFertilizersOptions.value = data;
  688. });
  689. const allUsageMode = ref(null);
  690. const allUsageModeList = ["叶面施", "根部施", "人工农事"];
  691. // 农事名称列表
  692. const farmWorkIndexNameList = ref([
  693. "片区拔节率",
  694. "园区花蕾率",
  695. "单树花蕾率",
  696. "片区雄穗抽出率",
  697. "园区花量大率",
  698. "单树花量大率",
  699. "片区分蘖率",
  700. ]);
  701. function getFarmWorkIndexNameList() {
  702. farmWorkIndexNameList.value = [
  703. "片区拔节率",
  704. "园区花蕾率",
  705. "单树花蕾率",
  706. "片区雄穗抽出率",
  707. "园区花量大率",
  708. "单树花量大率",
  709. "片区分蘖率",
  710. ];
  711. // VE_API.farm.fetchFarmWorkIndexNameList().then(({data}) => {
  712. // farmWorkIndexNameList.value = data
  713. // })
  714. }
  715. // 触发指标列表
  716. const farmWorkNameList = ref([]);
  717. function getFarmWorkNameList() {
  718. // VE_API.farm.fetchFarmWorkNameList().then(({data}) => {
  719. // farmWorkNameList.value = data
  720. // })
  721. }
  722. // 预警文字信息
  723. const warningMsg = ref("");
  724. const getWarningMsg = () => {
  725. // VE_API.farm.getFarmWorkWarningMsg({farmId: gardenId.value}).then(({data}) => {
  726. // warningMsg.value = data
  727. // })
  728. };
  729. /**
  730. * 选择药肥的时候修改订单中药肥pesticideFertilizerId 以外其他数据
  731. * @param index
  732. */
  733. const handlePesticideFertilizerChange = (parentIndex, index) => {
  734. let obj = pesticideFertilizersOptions.value.filter(
  735. (item) =>
  736. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index].pesticideFertilizerId ===
  737. item.id
  738. )[0];
  739. console.log('obj', obj)
  740. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
  741. ...dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index],
  742. typeName: obj.typeName,
  743. unit: obj.unit,
  744. defaultRatio: obj.defaultRatio,
  745. usageModeList: obj.usageModeList,
  746. ratio: obj.defaultRatio,
  747. defaultName: obj.defaultName,
  748. pesticideFertilizerName: obj.name,
  749. pesticideFertilizerCode: obj.pesticideFertilizerCode,
  750. };
  751. };
  752. const removeDomain = (parentIndex, item) => {
  753. const index = dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.indexOf(item);
  754. if (index !== -1) {
  755. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList.splice(index, 1);
  756. }
  757. };
  758. const resetItemForm = (parentIndex, index) => {
  759. dynamicValidateForm.prescriptionList[parentIndex].pesticideFertilizerList[index] = {
  760. typeName: "",
  761. muUsage: "",
  762. muUsage2: "",
  763. ratio: "",
  764. ratio2: "",
  765. remark: "",
  766. };
  767. };
  768. const submitForm = (formEl) => {
  769. if (!formEl) return;
  770. formEl.validate((valid) => {
  771. if (valid) {
  772. // router.push({
  773. // path: "/completed_work",
  774. // query: {
  775. // id: 1,
  776. // status: 1,
  777. // },
  778. // });
  779. submit();
  780. } else {
  781. console.log("error submit!");
  782. }
  783. });
  784. };
  785. const submit = () => {
  786. // let executeBlueZones = null
  787. // if (!(curRole==1 && isAdd.value)) {
  788. // executeBlueZones = newFarmMap.getSelectedBlueRegion();
  789. // }
  790. // if (!executeBlueZones || !executeBlueZones.length) {
  791. // ElMessage({
  792. // message: "请选择执行区域",
  793. // type: "warning",
  794. // });
  795. // return false
  796. // }
  797. // 检查药物所有项是否都包含特定的字段
  798. // const hasRequiredFields = dynamicValidateForm.prescriptionList.every(item => {
  799. // return item.pesticideFertilizerList.every(domain => {
  800. // const hasPesticideFertilizerCode = 'pesticideFertilizerCode' in domain
  801. // const hasMuUsage = 'muUsage' in domain;
  802. // const hasRatio = 'ratio' in domain;
  803. // const isMuUsageValid = domain.muUsage !== '';
  804. // const isRatioValid = domain.ratio ? true : false;
  805. // return hasPesticideFertilizerCode && hasMuUsage && hasRatio && isMuUsageValid && isRatioValid
  806. // });
  807. // })
  808. // if (!hasRequiredFields) {
  809. // ElMessage({
  810. // message: "请完善药物信息",
  811. // type: "warning",
  812. // });
  813. // return false
  814. // }
  815. // const flattenedDomains = flattenDomains(dynamicValidateForm.prescription)
  816. const data = {
  817. id: route.query.id,
  818. ...dynamicValidateForm,
  819. };
  820. VE_API.z_farm_work_record.issueFarmWorkRecord(data).then(async (res) => {
  821. if (res.code === 0) {
  822. // taskPopupType.value = 'success';
  823. // showTaskPopup.value = true;
  824. await getDetail(route.query.id);
  825. showPriceSheetPopup()
  826. }
  827. })
  828. // 新增农事
  829. // VE_API.farm.saveFarmWork(data).then(({ code }) => {
  830. // if (code === 0) {
  831. // ElMessage({
  832. // message: "保存成功",
  833. // type: "success",
  834. // });
  835. // setTimeout(() => {
  836. // // router.go(-1);
  837. // router.replace("/expert_album?reload=true");
  838. // }, 500);
  839. // }
  840. // });
  841. // const data = {
  842. // orderId: props.prescriptioData.orderId,
  843. // orderStatus: 1,
  844. // pesticideFertilizers: dynamicValidateForm.domains,
  845. // };
  846. // VE_API.order.confirm(data).then(({ code }) => {
  847. // if (code == 0) {
  848. // console.log('专家下发处方成功');
  849. // eventBus.emit('discover:submitForm')
  850. // window.location.reload()
  851. // }
  852. // });
  853. };
  854. const farmWorkTypeVal = computed(() => {
  855. const valueMap = {
  856. 生长异常: 1,
  857. 病虫异常: 3,
  858. 营养农事: 2,
  859. };
  860. if (actionType.value.length === 1) {
  861. return valueMap[actionType.value[0]] || null; // 如果只有一个元素,返回对应的值,否则返回 null
  862. } else {
  863. return 1;
  864. }
  865. });
  866. function flattenDomains(data) {
  867. return data.reduce((acc, item) => {
  868. return acc.concat(item.pesticideFertilizerList);
  869. }, []);
  870. }
  871. // 地图
  872. const areaRef = ref(null);
  873. let newFarmMap = new NewFarmMap();
  874. const serveArea = ref(null);
  875. // 农场分区列表
  876. const areaList = ref([]);
  877. const regionId = ref(null);
  878. const farmProgress = ref(0)
  879. // 状况描述相关数据
  880. const situationDescription = ref('')
  881. // 切换分区
  882. const changeRegion = (e) => {
  883. checkedArea.value = false;
  884. newFarmMap.getBlueRegion({ gardenId: gardenId.value, regionId: e }, () => {
  885. // newFarmMap.setBlueRegion([{id: "ws0y1me7h94u"}, {id: "ws0y1me545tg"}])
  886. // serveArea.value = "3.72亩"
  887. });
  888. };
  889. // 所选蓝色分区的面积
  890. const getArea = (val) => {
  891. serveArea.value = val.toFixed(2) + "亩";
  892. };
  893. const checkedArea = ref(false);
  894. const handleArea = (e) => {
  895. newFarmMap.toggleAllArea(e);
  896. };
  897. // 处理上传图片
  898. const handleUploadImage = () => {
  899. // 这里可以添加上传图片的逻辑
  900. console.log('上传图片');
  901. };
  902. // 处理邀请专家诊断
  903. const handleExpertDiagnosis = () => {
  904. // 这里可以添加邀请专家诊断的逻辑
  905. console.log('邀请专家诊断');
  906. };
  907. </script>
  908. <style lang="scss" scoped>
  909. .new-farming-page {
  910. height: 100vh;
  911. position: relative;
  912. overflow: auto;
  913. font-size: 14px;
  914. background: #f2f3f5;
  915. ::v-deep {
  916. .custom-header {
  917. position: fixed;
  918. top: 0;
  919. padding-bottom: 1px;
  920. }
  921. }
  922. .step-wrap {
  923. padding: 12px 0;
  924. }
  925. .box-wrap {
  926. background: #fff;
  927. padding: 10px;
  928. border-radius: 8px;
  929. }
  930. .new-farming-content {
  931. margin: 41px 0 62px 0;
  932. padding: 4px 12px 8px 12px;
  933. width: 100%;
  934. box-sizing: border-box;
  935. // ::v-deep {
  936. // .el-select__input {
  937. // color: #2199F8;
  938. // }
  939. // .el-select__wrapper {
  940. // color: #2199F8;
  941. // min-height: 30px;
  942. // line-height: 28px;
  943. // box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
  944. // }
  945. // .el-select__caret {
  946. // color: #2199F8;
  947. // }
  948. // .el-select__placeholder {
  949. // color: #2199F8;
  950. // }
  951. // .el-radio {
  952. // margin-right: 16px;
  953. // }
  954. // .el-input__wrapper {
  955. // box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
  956. // }
  957. // .el-input__prefix {
  958. // color: #2199F8;
  959. // }
  960. // .el-input__inner {
  961. // color: #2199F8;
  962. // --el-input-placeholder-color: rgba(33, 153, 248, 0.43);
  963. // }
  964. // .el-tag.el-tag--info {
  965. // --el-tag-text-color: #2199F8;
  966. // --el-tag-bg-color: rgba(33, 153, 248, 0.1);
  967. // }
  968. // }
  969. .farm-info {
  970. color: rgba(0, 0, 0, 0.6);
  971. font-size: 14px;
  972. margin-top: 14px;
  973. .info-title {
  974. display: flex;
  975. align-items: center;
  976. justify-content: space-between;
  977. color: rgba(41, 41, 41, 0.3);
  978. .info-more {
  979. display: flex;
  980. align-items: center;
  981. }
  982. }
  983. }
  984. .farm-photo {
  985. margin-top: 10px;
  986. .photo-list {
  987. display: flex;
  988. align-items: center;
  989. width: 100%;
  990. overflow: auto;
  991. padding-bottom: 10px;
  992. .photo-item {
  993. width: 92px;
  994. height: 92px;
  995. border-radius: 8px;
  996. object-fit: cover;
  997. }
  998. .img-item {
  999. img {
  1000. width: 92px;
  1001. height: 92px;
  1002. border-radius: 8px;
  1003. object-fit: cover;
  1004. margin-right: 12px;
  1005. }
  1006. }
  1007. }
  1008. .list-text {
  1009. text-align: center;
  1010. color: rgba(0, 0, 0, 0.5);
  1011. padding-top: 2px;
  1012. }
  1013. }
  1014. .submit-btn {
  1015. z-index: 10;
  1016. position: fixed;
  1017. bottom: 0px;
  1018. left: 0;
  1019. width: 100%;
  1020. display: flex;
  1021. align-items: center;
  1022. justify-content: space-between;
  1023. padding: 12px;
  1024. background: #fff;
  1025. box-sizing: border-box;
  1026. box-shadow: 0 4px 4px rgba(0, 0, 0, 0.4);
  1027. border-top: 1px solid rgba(0, 0, 0, 0.1);
  1028. .btn {
  1029. height: 40px;
  1030. border-radius: 25px;
  1031. line-height: 40px;
  1032. width: 110px;
  1033. text-align: center;
  1034. background: linear-gradient(180deg, #70BFFE, #2199F8);
  1035. color: #FFFFFF;
  1036. font-size: 14px;
  1037. &.second {
  1038. background: #FFFFFF;
  1039. border: 1px solid rgba(153, 153, 153, 0.5);
  1040. color: #666666;
  1041. }
  1042. }
  1043. .btn + .btn {
  1044. margin-left: 12px;
  1045. }
  1046. }
  1047. }
  1048. .card-title {
  1049. font-size: 16px;
  1050. font-weight: bold;
  1051. color: #000;
  1052. display: flex;
  1053. align-items: center;
  1054. // justify-content: space-between;
  1055. .add-tag {
  1056. font-size: 12px;
  1057. color: #2199f8;
  1058. padding: 4px 8px;
  1059. background: rgba(33, 153, 248, 0.16);
  1060. border-radius: 20px;
  1061. font-weight: normal;
  1062. height: 25px;
  1063. line-height: 25px;
  1064. }
  1065. .type-tag {
  1066. margin-left: 5px;
  1067. font-size: 12px;
  1068. color: #000000;
  1069. padding: 0 10px;
  1070. background: rgba(119, 119, 119, 0.1);
  1071. border-radius: 20px;
  1072. font-weight: normal;
  1073. height: 26px;
  1074. line-height: 26px;
  1075. }
  1076. }
  1077. .pb-12 {
  1078. padding-bottom: 12px;
  1079. }
  1080. .farm-card {
  1081. background: #ffffff;
  1082. border-radius: 8px;
  1083. padding: 12px 12px 0 12px;
  1084. width: 100%;
  1085. box-sizing: border-box;
  1086. margin-top: 10px;
  1087. color: rgba(0, 0, 0, 0.4);
  1088. &.progress{
  1089. display: flex;
  1090. align-items: center;
  1091. padding: 12px;
  1092. .progress-title{
  1093. margin-right: 12px;
  1094. }
  1095. ::v-deep{
  1096. .el-radio{
  1097. margin-right: 10px;
  1098. }
  1099. }
  1100. }
  1101. &.map-content {
  1102. margin-top: 12px;
  1103. }
  1104. &.prescription-content {
  1105. padding: 12px;
  1106. }
  1107. }
  1108. .usage-mode-wrap {
  1109. padding: 0 12px;
  1110. margin-top: 12px;
  1111. .info-content {
  1112. padding-top: 14px;
  1113. padding-bottom: 1px;
  1114. }
  1115. .el-form-item--default {
  1116. margin-bottom: 0;
  1117. }
  1118. }
  1119. ::v-deep {
  1120. .el-form-item__label {
  1121. height: 30px;
  1122. line-height: 30px;
  1123. color: rgba(0, 0, 0, 0.4);
  1124. }
  1125. .el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before {
  1126. display: none;
  1127. }
  1128. }
  1129. .info-content {
  1130. padding: 10px 0;
  1131. position: relative;
  1132. .condition-wrap {
  1133. display: flex;
  1134. align-items: center;
  1135. width: 100%;
  1136. .symbol {
  1137. width: 10px;
  1138. // text-align: center;
  1139. // padding: 0 4px;
  1140. }
  1141. }
  1142. .item-input {
  1143. // width: 60%;
  1144. min-width: 140px;
  1145. max-width: 240px;
  1146. }
  1147. .recheck-text {
  1148. padding-left: 6px;
  1149. }
  1150. .info-item {
  1151. display: flex;
  1152. justify-content: space-between;
  1153. align-items: center;
  1154. width: 100%;
  1155. }
  1156. .info-item + .info-item {
  1157. margin-top: 12px;
  1158. }
  1159. .bottom-map {
  1160. width: 100%;
  1161. height: 250px;
  1162. clip-path: inset(0px round 8px);
  1163. }
  1164. .check-btn {
  1165. position: absolute;
  1166. bottom: 16px;
  1167. right: 6px;
  1168. background: rgba(0, 0, 0, 0.6);
  1169. padding: 0 8px;
  1170. border-radius: 8px;
  1171. ::v-deep {
  1172. .el-checkbox {
  1173. color: #fff;
  1174. }
  1175. }
  1176. }
  1177. .area-select {
  1178. padding-bottom: 12px;
  1179. .block {
  1180. width: 12px;
  1181. display: inline-block;
  1182. }
  1183. }
  1184. }
  1185. ::v-deep {
  1186. .el-form-item--default {
  1187. margin-bottom: 8px;
  1188. &.text-item {
  1189. margin-bottom: 2px;
  1190. .el-form-item__content {
  1191. line-height: 24px;
  1192. }
  1193. .el-form-item__label {
  1194. height: 24px;
  1195. line-height: 24px;
  1196. }
  1197. }
  1198. }
  1199. }
  1200. .sub-title {
  1201. display: flex;
  1202. align-items: center;
  1203. justify-content: space-between;
  1204. color: rgba(0, 0, 0, 0.6);
  1205. font-size: 14px;
  1206. .add-tag {
  1207. font-size: 12px;
  1208. color: #2199f8;
  1209. padding: 0 8px;
  1210. border: 1px solid #2199F8;
  1211. border-radius: 5px;
  1212. font-weight: normal;
  1213. height: 28px;
  1214. line-height: 28px;
  1215. }
  1216. }
  1217. .recipe-item {
  1218. width: 100%;
  1219. .recipe-form {
  1220. padding-top: 8px;
  1221. ::v-deep {
  1222. .el-form-item {
  1223. &:last-child {
  1224. margin-bottom: 0;
  1225. }
  1226. }
  1227. }
  1228. }
  1229. .box-item {
  1230. display: flex;
  1231. align-items: center;
  1232. justify-content: space-between;
  1233. color: rgba(0, 0, 0, 0.4);
  1234. .r-text {
  1235. width: 140px;
  1236. text-align: center;
  1237. }
  1238. .form-r {
  1239. width: 60%;
  1240. min-width: 140px;
  1241. max-width: 240px;
  1242. }
  1243. }
  1244. .form-box {
  1245. border: 1px solid rgba(33, 153, 248, 0.8);
  1246. border-radius: 8px;
  1247. padding: 20px 10px;
  1248. width: 100%;
  1249. position: relative;
  1250. // background: rgb(209, 235, 255, 0.3);
  1251. // margin-bottom: 12px;
  1252. .form-index {
  1253. position: absolute;
  1254. left: 0;
  1255. top: 0;
  1256. padding: 0 6px;
  1257. background: #2199F8;
  1258. border-radius: 4px 0 4px 0;
  1259. height: 18px;
  1260. line-height: 18px;
  1261. font-size: 12px;
  1262. color: #fff;
  1263. }
  1264. .input-box {
  1265. &.mark-box {
  1266. padding: 8px 0 12px 0;
  1267. }
  1268. }
  1269. // .input-unit {
  1270. // ::v-deep {
  1271. // .el-input {
  1272. // border: 1px solid #dcdfe6;
  1273. // border-radius: 5px;
  1274. // height: 32px;
  1275. // box-sizing: border-box;
  1276. // }
  1277. // .el-input__wrapper {
  1278. // padding: 0 2px 0 10px;
  1279. // height: 30px;
  1280. // line-height: 30px;
  1281. // min-height: 30px;
  1282. // box-shadow: none;
  1283. // }
  1284. // .el-input__inner {
  1285. // --el-input-inner-height: 30px;
  1286. // height: 30px;
  1287. // line-height: 30px;
  1288. // min-height: 30px;
  1289. // color: #606266;
  1290. // --el-input-placeholder-color: #a8abb2;
  1291. // }
  1292. // .el-input-group__append {
  1293. // box-shadow: none;
  1294. // border: none;
  1295. // background: none;
  1296. // }
  1297. // }
  1298. // }
  1299. .text-center {
  1300. ::v-deep {
  1301. .el-input__inner {
  1302. text-align: center;
  1303. }
  1304. }
  1305. }
  1306. .action-btn {
  1307. display: flex;
  1308. justify-content: flex-end;
  1309. .btn {
  1310. color: #8F8F8F;
  1311. border-radius: 25px;
  1312. padding: 5px 30px;
  1313. }
  1314. .delete-btn {
  1315. color: rgba(255, 89, 89, 0.9);
  1316. background: #fff;
  1317. border: 1px solid rgba(255, 89, 89, 0.9);
  1318. }
  1319. }
  1320. .btn-group {
  1321. padding-top: 12px;
  1322. }
  1323. .sub-item {
  1324. padding-left: 10px;
  1325. .has-sub {
  1326. display: flex;
  1327. flex-direction: column;
  1328. align-items: center;
  1329. .main-name {
  1330. line-height: 20px;
  1331. }
  1332. .sub-name {
  1333. font-size: 10px;
  1334. color: rgba(129, 129, 129, 0.5);
  1335. line-height: 14px;
  1336. }
  1337. }
  1338. .colunm-sub {
  1339. display: flex;
  1340. align-items: center;
  1341. .sub-name {
  1342. font-size: 10px;
  1343. color: rgba(129, 129, 129, 0.5);
  1344. }
  1345. }
  1346. .r-text {
  1347. width: 132px;
  1348. text-align: center;
  1349. font-size: 14px;
  1350. color: #474747;
  1351. }
  1352. .price {
  1353. ::v-deep {
  1354. .el-input__wrapper {
  1355. box-shadow: 0 0 0 1px rgba(33, 153, 248, 0.3) inset;
  1356. }
  1357. .el-input__inner {
  1358. color: #2199f8;
  1359. }
  1360. }
  1361. }
  1362. }
  1363. .form-title {
  1364. font-size: 14px;
  1365. padding-top: 6px;
  1366. color: #000;
  1367. font-weight: 600;
  1368. }
  1369. .box-item + .box-item {
  1370. margin-top: 8px;
  1371. }
  1372. }
  1373. .form-box + .form-box {
  1374. margin-top: 8px;
  1375. }
  1376. .usageMode-wrap {
  1377. padding-top: 8px;
  1378. }
  1379. }
  1380. // 状况描述样式
  1381. .situation-description {
  1382. width: 100%;
  1383. .description-title {
  1384. font-size: 16px;
  1385. font-weight: bold;
  1386. color: #000;
  1387. margin-bottom: 12px;
  1388. }
  1389. .description-content {
  1390. .description-textarea {
  1391. margin-bottom: 10px;
  1392. width: 100%;
  1393. }
  1394. .upload-section {
  1395. .upload-btn {
  1396. width: 112px;
  1397. height: 32px;
  1398. border-radius: 3px;
  1399. border: 1px solid #e0e0e0;
  1400. background: #fff;
  1401. color: #000;
  1402. font-size: 14px;
  1403. display: flex;
  1404. align-items: center;
  1405. justify-content: center;
  1406. margin-bottom: 8px;
  1407. .el-icon {
  1408. margin-right: 6px;
  1409. }
  1410. }
  1411. .upload-tip {
  1412. font-size: 12px;
  1413. color: #999;
  1414. line-height: 1.4;
  1415. }
  1416. }
  1417. }
  1418. }
  1419. // 专家诊断按钮样式
  1420. .expert-diagnosis-btn {
  1421. width: 180px;
  1422. height: 40px;
  1423. border-radius: 24px;
  1424. background: linear-gradient(180deg, #70BFFE 0%, #2199F8 100%);
  1425. color: #FFFFFF;
  1426. display: flex;
  1427. align-items: center;
  1428. justify-content: center;
  1429. margin: 30px auto 0;
  1430. }
  1431. }
  1432. .task-tips-popup {
  1433. width: 75%;
  1434. padding: 28px 28px 20px;
  1435. display: flex;
  1436. flex-direction: column;
  1437. align-items: center;
  1438. justify-content: center;
  1439. .create-farm-icon{
  1440. width: 40px;
  1441. height: 40px;
  1442. margin-bottom: 12px;
  1443. }
  1444. .farm-check-icon{
  1445. width: 68px;
  1446. height: 68px;
  1447. margin-bottom: 12px;
  1448. }
  1449. .create-farm-text{
  1450. font-size: 20px;
  1451. font-weight: 500;
  1452. line-height: 40px;
  1453. margin-bottom: 32px;
  1454. text-align: center;
  1455. &.success-text{
  1456. font-size: 24px;
  1457. font-weight: 500;
  1458. }
  1459. }
  1460. .main-text {
  1461. color: #2199F8;
  1462. }
  1463. .create-farm-btn{
  1464. width: 100%;
  1465. box-sizing: border-box;
  1466. padding: 8px;
  1467. border-radius: 25px;
  1468. font-size: 16px;
  1469. background: #2199F8;
  1470. color: #fff;
  1471. text-align: center;
  1472. }
  1473. }
  1474. </style>