index.vue 58 KB

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