form.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  1. <script setup>
  2. import { ref, computed, watch, nextTick, reactive } from "vue";
  3. import { onLoad } from "@dcloudio/uni-app";
  4. import { getRuiYingReportDetail } from "@/api/ruiying";
  5. import { useDataDictStore } from "@/store/modules/dataDict";
  6. import dayjs from "dayjs";
  7. const props = defineProps({
  8. type: {
  9. type: String,
  10. default: "edit",
  11. },
  12. });
  13. const NON_PROD_FIELDS = [
  14. { key: "repairTime", label: "设备故障" },
  15. { key: "selfStopTime", label: "设备保养" },
  16. { key: "accidentTime", label: "工程质量" },
  17. { key: "complexityTime", label: "技术受限" },
  18. { key: "rectificationTime", label: "生产组织" },
  19. { key: "waitingStopTime", label: "不可抗力" },
  20. { key: "partyaDesign", label: "甲方设计" },
  21. { key: "partyaPrepare", label: "甲方准备" },
  22. { key: "partyaResource", label: "甲方资源" },
  23. { key: "relocationTime", label: "生产配合" },
  24. { key: "winterBreakTime", label: "待命" },
  25. { key: "otherNptTime", label: "其他非生产时间" },
  26. ];
  27. const FORM_KEYS = [
  28. "id",
  29. "deptId",
  30. "projectId",
  31. "taskId",
  32. "deptName",
  33. "contractName",
  34. "taskName",
  35. "repairStatus",
  36. "technique",
  37. "wellCategory",
  38. "designWellDepth",
  39. "wellControlLevel",
  40. "casingPipeSize",
  41. "dailyFuel",
  42. "currentOperation",
  43. "nextPlan",
  44. "ratedProductionTime",
  45. "productionTime",
  46. "totalStaffNum",
  47. "onDutyStaffNum",
  48. "leaveStaffNum",
  49. "reportDetails",
  50. "constructionBrief",
  51. "remark",
  52. "createTime",
  53. "opinion",
  54. "repairTime",
  55. "selfStopTime",
  56. "accidentTime",
  57. "complexityTime",
  58. "rectificationTime",
  59. "waitingStopTime",
  60. "partyaDesign",
  61. "partyaPrepare",
  62. "partyaResource",
  63. "relocationTime",
  64. "winterBreakTime",
  65. "otherNptTime",
  66. "otherNptReason",
  67. "status",
  68. "auditStatus",
  69. "location",
  70. ];
  71. const formType = ref("edit");
  72. const initFormData = () => {
  73. const base = {
  74. ratedProductionTime: 0,
  75. productionTime: 0,
  76. constructionBrief: "",
  77. reportDetails: [],
  78. };
  79. // 初始化所有非生产时间字段为 0
  80. NON_PROD_FIELDS.forEach((field) => {
  81. base[field.key] = 0;
  82. });
  83. return base;
  84. };
  85. const form = ref(initFormData());
  86. const formatT = (arr) =>
  87. `${arr[0].toString().padStart(2, "0")}:${arr[1].toString().padStart(2, "0")}`;
  88. async function loadDetail(id) {
  89. try {
  90. const { data } = await getRuiYingReportDetail({ id });
  91. form.value = initFormData();
  92. FORM_KEYS.forEach((key) => {
  93. if (
  94. Object.prototype.hasOwnProperty.call(data, key) &&
  95. data[key] !== null &&
  96. data[key] !== undefined
  97. ) {
  98. form.value[key] = data[key];
  99. }
  100. });
  101. form.value.reportDetails = form.value.reportDetails.map((item) => ({
  102. reportDate: item.reportDate || form.value.createTime,
  103. duration: item.duration || 0,
  104. constructionDetail: item.constructionDetail || "",
  105. currentOperation: item.currentOperation || "",
  106. startTime: formatT(item.startTime),
  107. endTime: formatT(item.endTime),
  108. }));
  109. if (!form.value.reportDetails.length) {
  110. addReportDetailRow();
  111. }
  112. form.value.id = id;
  113. if (props.type.includes("approval") && data.auditStatus !== 10) {
  114. formType.value = "readonly";
  115. }
  116. if (props.type.includes("edit") && data.status !== 0) {
  117. formType.value = "readonly";
  118. }
  119. if (props.type.includes("detail")) {
  120. formType.value = "readonly";
  121. }
  122. } finally {
  123. }
  124. }
  125. const addReportDetailRow = () => {
  126. if (!form.value.reportDetails) {
  127. form.value.reportDetails = [];
  128. }
  129. form.value.reportDetails.push({
  130. reportDate: form.value.createTime ?? dayjs().valueOf(),
  131. startTime: "08:00",
  132. endTime: "08:00",
  133. duration: 0,
  134. constructionDetail: "",
  135. currentOperation: "",
  136. });
  137. };
  138. const removeReportDetailRow = (index) => {
  139. if (index === 0) {
  140. uni.showToast({ title: "至少填写一条生产动态", icon: "none" });
  141. return;
  142. }
  143. form.value.reportDetails?.splice(index, 1);
  144. };
  145. const dictStore = useDataDictStore();
  146. const nptReasonOptions = ref([]);
  147. const rigStatusOptions = ref([]);
  148. const techniqueOptions = ref([]);
  149. const loadOptions = () => {
  150. nptReasonOptions.value = dictStore
  151. .getStrDictOptions("ryNptReason")
  152. .map((v) => ({
  153. text: v.label,
  154. value: v.value,
  155. }));
  156. rigStatusOptions.value = dictStore
  157. .getStrDictOptions("repairStatus")
  158. .map((v) => ({
  159. text: v.label,
  160. value: v.value,
  161. }));
  162. techniqueOptions.value = dictStore
  163. .getStrDictOptions("rq_iot_project_technology_ry")
  164. .map((v) => ({
  165. text: v.label,
  166. value: v.value,
  167. }));
  168. };
  169. onLoad((options) => {
  170. if (dictStore.dataDict.length <= 0) {
  171. dictStore.loadDataDictList().then(() => {
  172. loadOptions();
  173. });
  174. } else loadOptions();
  175. loadDetail(options.id);
  176. });
  177. const defaultProps = computed(() => ({
  178. inputBorder: false,
  179. clearable: false,
  180. placeholder: "请输入",
  181. style: {
  182. "text-align": "right",
  183. },
  184. styles: {
  185. disableColor: "#fff",
  186. },
  187. }));
  188. const disabled = computed(() => (field) => {
  189. if (field === "edit")
  190. return (
  191. formType.value === "readonly" ||
  192. props.type.includes("approval") ||
  193. props.type.includes("detail")
  194. );
  195. else return formType.value === "readonly";
  196. });
  197. const transitTime = computed(() => {
  198. const cap = form.value.productionTime ?? 0;
  199. const gas = form.value.ratedProductionTime ?? 0;
  200. if (!gas) return { original: 0, value: "0%" };
  201. const original = cap / gas;
  202. return { original, value: (original * 100).toFixed(2) + "%" };
  203. });
  204. const formRef = ref(null);
  205. const onDutyStaffNum = computed(() => {
  206. return (form.value.totalStaffNum ?? 0) - (form.value.leaveStaffNum ?? 0);
  207. });
  208. // 辅助函数:计算总时间
  209. const sumNonProdTimes = () => {
  210. let sum = 0;
  211. NON_PROD_FIELDS.forEach((field) => {
  212. sum += Number(form.value[field.key] || 0);
  213. });
  214. return sum;
  215. };
  216. // 校验函数:总时间必须为 24
  217. const validateTotalTime = (rule, value, data, callback) => {
  218. const rateTime = Number(form.value.ratedProductionTime || 0);
  219. const time = Number(form.value.productionTime || 0);
  220. const nonProdSum = sumNonProdTimes();
  221. let total = 0;
  222. let msg = "";
  223. total = parseFloat((time + nonProdSum).toFixed(2));
  224. msg = `生产(${time})+非生产(${nonProdSum})=${total}H,必须等于额定${rateTime}H`;
  225. if (Math.abs(total - rateTime) > 0.01) {
  226. callback(msg);
  227. }
  228. return true;
  229. };
  230. const rules = reactive({
  231. repairStatus: {
  232. rules: [{ required: true, errorMessage: "请输入施工状态" }],
  233. },
  234. ratedProductionTime: {
  235. rules: [
  236. { required: true, errorMessage: "请输入额定生产时间" },
  237. { validateFunction: validateTotalTime },
  238. ],
  239. },
  240. productionTime: {
  241. rules: [
  242. { required: true, errorMessage: "请输入生产时间" },
  243. { validateFunction: validateTotalTime },
  244. ],
  245. },
  246. constructionBrief: {
  247. rules: [
  248. {
  249. required: props.type === "approval",
  250. errorMessage: `请输入当日施工简报`,
  251. },
  252. ],
  253. },
  254. });
  255. const allTimeKeys = [
  256. "ratedProductionTime",
  257. "productionTime",
  258. ...NON_PROD_FIELDS.map((f) => f.key),
  259. ];
  260. watch(
  261. () => allTimeKeys.map((key) => form.value[key]),
  262. () => {
  263. nextTick(() => {
  264. formRef.value?.validateField(["ratedProductionTime", "productionTime"]);
  265. });
  266. }
  267. );
  268. defineExpose({ formRef, form, loadDetail });
  269. const orange = computed(() => {
  270. const rateTime = Number(form.value.ratedProductionTime || 0);
  271. const time = Number(form.value.productionTime || 0);
  272. const nonProdSum = sumNonProdTimes();
  273. let total = 0;
  274. let msg = "";
  275. total = parseFloat((time + nonProdSum).toFixed(2));
  276. msg = `生产(${time})+非生产(${nonProdSum})=${total}H,必须等于额定${rateTime}H`;
  277. if (Math.abs(total - rateTime) > 0.01) return true;
  278. return false;
  279. });
  280. const reportDetailsTimeRangeRef = ref(null);
  281. const startTime = ref("00:00");
  282. const startDefaultTime = ref("08:00");
  283. const endTime = ref("24:00");
  284. const endDefaultTime = ref("08:00");
  285. const reportDetailIndex = ref(0);
  286. const handleClickTimeRangeItem = (index) => {
  287. reportDetailIndex.value = index;
  288. reportDetailsTimeRangeRef.value.open();
  289. };
  290. const calculateDuration = (row) => {
  291. if (!row.startTime || !row.endTime) {
  292. row.duration = 0;
  293. return;
  294. }
  295. const todayStr = dayjs().format("YYYY-MM-DD");
  296. const start = dayjs(`${todayStr} ${row.startTime}`);
  297. const end = dayjs(`${todayStr} ${row.endTime}`);
  298. let diffMinutes = end.diff(start, "minute");
  299. if (diffMinutes < 0) {
  300. diffMinutes += 1440;
  301. }
  302. row.duration = Number((diffMinutes / 60).toFixed(2));
  303. };
  304. const reportDetailsTimeRange = (data) => {
  305. form.value.reportDetails[reportDetailIndex.value].startTime = data[0];
  306. form.value.reportDetails[reportDetailIndex.value].endTime = data[1];
  307. calculateDuration(form.value.reportDetails[reportDetailIndex.value]);
  308. };
  309. </script>
  310. <template>
  311. <view class="content">
  312. <view class="tip">
  313. <view class="item">
  314. <view class="left">
  315. <span>运行时效:</span>
  316. 生产时间/额定生产时间
  317. </view>
  318. <span class="right red"> >100% 红色预警 </span>
  319. </view>
  320. <view class="item">
  321. <view class="left">
  322. <span>时间平衡:</span>
  323. 生产 + 非生产 = 额定生产
  324. </view>
  325. <span class="right orange"> ≠额定生产 橙色预警 </span>
  326. </view>
  327. <view class="item">
  328. <view class="left">
  329. <span>油量消耗:</span>
  330. 当日油耗
  331. </view>
  332. <span class="right blue"> >3500升 蓝色预警 </span>
  333. </view>
  334. </view>
  335. <view v-if="!type.includes('approval') && form.opinion" class="opinion">
  336. <span class="left">审批意见:</span>
  337. <span class="right"> {{ form.opinion }} </span>
  338. </view>
  339. <uni-forms
  340. ref="formRef"
  341. labelWidth="auto"
  342. :model="form"
  343. :rules="rules"
  344. validateTrigger="blur"
  345. err-show-type="toast">
  346. <uni-forms-item label="施工队伍" name="deptName">
  347. <span class="readOnly">{{ form.deptName }}</span>
  348. </uni-forms-item>
  349. <uni-forms-item label="项目" name="contractName">
  350. <span class="readOnly">{{ form.contractName }}</span>
  351. </uni-forms-item>
  352. <uni-forms-item label="任务" name="taskName">
  353. <span class="readOnly">{{ form.taskName }}</span>
  354. </uni-forms-item>
  355. <uni-forms-item label="施工区域" name="location">
  356. <span class="readOnly">{{ form.location }}</span>
  357. </uni-forms-item>
  358. <uni-forms-item label="施工状态" name="repairStatus" required>
  359. <uni-data-select
  360. :clear="true"
  361. align="right"
  362. placeholder="请选择"
  363. :localdata="rigStatusOptions"
  364. placement="top"
  365. :disabled="disabled('edit')"
  366. v-model="form.repairStatus" />
  367. </uni-forms-item>
  368. <uni-forms-item label="施工工艺" name="technique">
  369. <uni-data-select
  370. :clear="true"
  371. align="right"
  372. placeholder="请选择"
  373. :localdata="techniqueOptions"
  374. placement="top"
  375. :disabled="disabled('edit')"
  376. v-model="form.technique" />
  377. </uni-forms-item>
  378. <uni-forms-item label="井别" name="wellCategory">
  379. <uni-easyinput
  380. v-bind="defaultProps"
  381. v-model="form.wellCategory"
  382. :disabled="disabled('edit')" />
  383. </uni-forms-item>
  384. <uni-forms-item label="设计井深(m)" name="designWellDepth">
  385. <uni-easyinput
  386. v-bind="defaultProps"
  387. v-model="form.designWellDepth"
  388. :disabled="disabled('edit')" />
  389. </uni-forms-item>
  390. <uni-forms-item label="井控级别" name="wellControlLevel">
  391. <uni-easyinput
  392. v-bind="defaultProps"
  393. v-model="form.wellControlLevel"
  394. :disabled="disabled('edit')" />
  395. </uni-forms-item>
  396. <uni-forms-item label="套生段产管尺寸(mm)" name="casingPipeSize">
  397. <uni-easyinput
  398. v-bind="defaultProps"
  399. v-model="form.casingPipeSize"
  400. :disabled="disabled('edit')" />
  401. </uni-forms-item>
  402. <uni-forms-item label="当日油耗(升)" name="dailyFuel">
  403. <uni-easyinput
  404. type="number"
  405. :class="{ 'blue-text': Number(form.dailyFuel) > 3500 }"
  406. v-bind="defaultProps"
  407. :disabled="disabled('edit')"
  408. v-model="form.dailyFuel" />
  409. </uni-forms-item>
  410. <uni-forms-item label="目前工序" name="currentOperation">
  411. <uni-easyinput
  412. type="textarea"
  413. autoHeight
  414. v-bind="defaultProps"
  415. v-model="form.currentOperation"
  416. :disabled="disabled('edit')"
  417. :maxlength="1000" />
  418. </uni-forms-item>
  419. <uni-forms-item label="下步工序" name="nextPlan">
  420. <uni-easyinput
  421. type="textarea"
  422. autoHeight
  423. v-bind="defaultProps"
  424. v-model="form.nextPlan"
  425. :disabled="disabled('edit')"
  426. :maxlength="1000" />
  427. </uni-forms-item>
  428. <uni-forms-item label="运行时效" name="transitTime">
  429. <span
  430. class="readOnly"
  431. :class="{ 'red-text': transitTime.original > 1.0 }"
  432. >{{ transitTime.value }}</span
  433. >
  434. </uni-forms-item>
  435. <uni-forms-item label="全员数量" name="totalStaffNum">
  436. <uni-easyinput
  437. type="number"
  438. v-bind="defaultProps"
  439. :disabled="disabled('edit')"
  440. v-model="form.totalStaffNum" />
  441. </uni-forms-item>
  442. <uni-forms-item label="在岗人数" name="onDutyStaffNum">
  443. <uni-easyinput
  444. type="number"
  445. v-bind="defaultProps"
  446. disabled
  447. v-model="onDutyStaffNum" />
  448. </uni-forms-item>
  449. <uni-forms-item label="休假人员数量" name="leaveStaffNum">
  450. <uni-easyinput
  451. type="number"
  452. v-bind="defaultProps"
  453. :disabled="disabled('edit')"
  454. v-model="form.leaveStaffNum" />
  455. </uni-forms-item>
  456. <!-- <uni-forms-item label="生产动态" name="productionStatus" required>
  457. <uni-easyinput
  458. type="textarea"
  459. autoHeight
  460. v-bind="defaultProps"
  461. v-model="form.productionStatus"
  462. :disabled="disabled('edit')"
  463. :maxlength="1000" />
  464. </uni-forms-item> -->
  465. <uni-forms-item
  466. label="当日施工简报"
  467. :required="type === 'approval'"
  468. name="constructionBrief">
  469. <uni-easyinput
  470. type="textarea"
  471. autoHeight
  472. v-bind="defaultProps"
  473. :disabled="type !== 'approval'"
  474. v-model="form.constructionBrief"
  475. :maxlength="2000" />
  476. </uni-forms-item>
  477. <uni-forms-item label="备注" name="remark">
  478. <uni-easyinput
  479. type="textarea"
  480. autoHeight
  481. v-bind="defaultProps"
  482. :disabled="disabled('edit')"
  483. v-model="form.remark"
  484. :maxlength="1000" />
  485. </uni-forms-item>
  486. <uv-divider text="生产时间" textPosition="left"></uv-divider>
  487. <uni-forms-item
  488. label="额定生产时间(H)"
  489. name="ratedProductionTime"
  490. required>
  491. <uni-easyinput
  492. type="number"
  493. v-bind="defaultProps"
  494. :class="{ 'orange-text': orange }"
  495. :disabled="disabled('edit')"
  496. v-model="form.ratedProductionTime" />
  497. </uni-forms-item>
  498. <uni-forms-item label="生产时间(H)" name="productionTime" required>
  499. <uni-easyinput
  500. type="number"
  501. v-bind="defaultProps"
  502. :class="{ 'orange-text': orange }"
  503. :disabled="disabled('edit')"
  504. v-model="form.productionTime" />
  505. </uni-forms-item>
  506. <uv-divider text="生产动态" textPosition="left"></uv-divider>
  507. <uni-forms-item v-if="!disabled('edit')">
  508. <button
  509. type="primary"
  510. size="mini"
  511. class="detail-btn"
  512. @click="addReportDetailRow()">
  513. 添加一行
  514. </button>
  515. </uni-forms-item>
  516. <template v-for="(item, index) in form.reportDetails" :key="index">
  517. <uv-divider v-if="index !== 0" class="divider"></uv-divider>
  518. <uni-forms-item
  519. label="日期"
  520. required
  521. :name="['reportDetails', index, 'reportDate']"
  522. :rules="[{ required: true, errorMessage: '请选择日期' }]">
  523. <uni-datetime-picker
  524. class="datetime-picker"
  525. type="date"
  526. returnType="timestamp"
  527. v-model="item.reportDate"
  528. :border="false"
  529. :disabled="disabled('edit')" />
  530. </uni-forms-item>
  531. <uni-forms-item :label="`${$t('ruiDu.timeNode')}:`" required>
  532. <view
  533. class="item-content"
  534. @click="disabled('edit') ? '' : handleClickTimeRangeItem(index)">
  535. <view class="time-range-item" v-if="item.startTime && item.endTime">
  536. {{ item.startTime }} 至 {{ item.endTime }}
  537. </view>
  538. <view class="time-range-item" v-else>
  539. {{ selectPlaceholder }}
  540. </view>
  541. </view>
  542. </uni-forms-item>
  543. <uni-forms-item label="时长(H)">
  544. <span class="readOnly">{{ item.duration }}</span>
  545. </uni-forms-item>
  546. <uni-forms-item
  547. label="工况"
  548. required
  549. :name="['reportDetails', index, 'currentOperation']"
  550. :rules="[{ required: true, errorMessage: '请输入工况' }]">
  551. <uni-easyinput
  552. type="textarea"
  553. autoHeight
  554. v-bind="defaultProps"
  555. :disabled="disabled('edit')"
  556. v-model="item.currentOperation"
  557. :maxlength="2000" />
  558. </uni-forms-item>
  559. <!-- <uni-forms-item
  560. label="结束井深(m)"
  561. required
  562. :name="['reportDetails', index, 'currentDepth']"
  563. :rules="[{ required: true, errorMessage: '请输入结束深度' }, { validateFunction: validateLastCurrentDepth }]">
  564. <uni-easyinput
  565. type="number"
  566. v-bind="defaultProps"
  567. :disabled="disabled('edit')"
  568. v-model.number="item.currentDepth" />
  569. </uni-forms-item> -->
  570. <uni-forms-item
  571. label="详情"
  572. required
  573. :name="['reportDetails', index, 'constructionDetail']"
  574. :rules="[{ required: true, errorMessage: '请输入详情' }]">
  575. <uni-easyinput
  576. type="textarea"
  577. autoHeight
  578. v-bind="defaultProps"
  579. :disabled="disabled('edit')"
  580. v-model="item.constructionDetail"
  581. :maxlength="2000" />
  582. </uni-forms-item>
  583. <uni-forms-item v-if="!disabled('edit')" label="操作">
  584. <button
  585. type="warn"
  586. size="mini"
  587. class="detail-btn"
  588. @click="removeReportDetailRow(index)">
  589. 删除
  590. </button>
  591. </uni-forms-item>
  592. </template>
  593. <uv-divider text="非生产时间" textPosition="left"></uv-divider>
  594. <uni-forms-item
  595. v-for="field in NON_PROD_FIELDS"
  596. :key="field.key"
  597. :label="field.label + '(H)'"
  598. :name="field.key">
  599. <uni-easyinput
  600. type="number"
  601. :class="{ 'orange-text': orange }"
  602. v-bind="defaultProps"
  603. :disabled="disabled('edit')"
  604. v-model="form[field.key]" />
  605. </uni-forms-item>
  606. <uni-forms-item label="其他非生产原因" name="otherNptReason">
  607. <uni-easyinput
  608. type="textarea"
  609. autoHeight
  610. v-bind="defaultProps"
  611. v-model="form.otherNptReason"
  612. :disabled="disabled('edit')"
  613. :maxlength="1000" />
  614. </uni-forms-item>
  615. <uni-forms-item
  616. v-if="type.includes('approval')"
  617. label="审批意见"
  618. name="opinion">
  619. <uni-easyinput
  620. type="textarea"
  621. autoHeight
  622. v-bind="defaultProps"
  623. :disabled="disabled('approval')"
  624. v-model="form.opinion"
  625. :maxlength="1000" />
  626. </uni-forms-item>
  627. </uni-forms>
  628. </view>
  629. <tpf-time-range
  630. ref="reportDetailsTimeRangeRef"
  631. :startTime="startTime"
  632. :startDefaultTime="startDefaultTime"
  633. :endTime="endTime"
  634. :endDefaultTime="endDefaultTime"
  635. @timeRange="reportDetailsTimeRange"></tpf-time-range>
  636. </template>
  637. <style lang="scss" scoped>
  638. .content {
  639. background-color: white;
  640. padding: 16px 16px;
  641. border-radius: 8px;
  642. box-sizing: border-box;
  643. }
  644. .uni-forms {
  645. margin-top: 10px;
  646. height: 100%;
  647. .uni-form {
  648. height: 100%;
  649. }
  650. .uni-forms-item {
  651. display: flex;
  652. align-items: center;
  653. flex: 1;
  654. margin-bottom: 6px;
  655. border-bottom: 1px dashed #cacccf;
  656. }
  657. :deep(.uni-forms-item__content) {
  658. text-align: right;
  659. .readOnly {
  660. padding-right: 10px;
  661. }
  662. }
  663. :deep(.uni-forms-item__label) {
  664. height: 44px;
  665. font-weight: 500;
  666. font-size: 14px;
  667. color: #333333 !important;
  668. width: max-content !important;
  669. }
  670. :deep(.uni-select) {
  671. border: none;
  672. text-align: right;
  673. padding-right: 0;
  674. .uniui-bottom:before {
  675. content: "\e6b5" !important;
  676. font-size: 16px !important;
  677. }
  678. }
  679. :deep(.uni-easyinput__content-textarea) {
  680. min-height: inherit;
  681. margin: 10px;
  682. }
  683. :deep(.is-disabled) {
  684. color: #333333 !important;
  685. }
  686. :deep(.red-text > .is-disabled) {
  687. color: rgb(220 38 38 / 0.8) !important;
  688. }
  689. :deep(.orange-text > .is-disabled) {
  690. color: rgb(234 88 12 / 0.8) !important;
  691. }
  692. :deep(.uni-select--disabled) {
  693. background-color: #fff;
  694. }
  695. }
  696. .red-text {
  697. color: rgb(220 38 38 / 0.8) !important;
  698. }
  699. .blue-text {
  700. color: rgb(59 130 246 / 0.8) !important;
  701. }
  702. .orange-text {
  703. color: rgb(234 88 12 / 0.8) !important;
  704. }
  705. .red {
  706. border: 1px solid rgb(254 226 226);
  707. color: rgb(220 38 38 / 0.8);
  708. background-color: rgb(254 226 226);
  709. }
  710. .orange {
  711. border: 1px solid rgb(254 215 170);
  712. color: rgb(234 88 12 / 0.8);
  713. background-color: rgb(254 215 170);
  714. }
  715. .blue {
  716. border: 1px solid rgb(219 234 254);
  717. color: rgb(59 130 246 / 0.8);
  718. background-color: rgb(240 249 255);
  719. }
  720. .tip {
  721. border-radius: 8px;
  722. border: 1px solid #e5e5e5;
  723. background-color: rgba(239, 246, 255, 0.8);
  724. box-sizing: border-box;
  725. padding: 10px;
  726. display: flex;
  727. flex-direction: column;
  728. gap: 6px;
  729. .item {
  730. display: flex;
  731. align-items: center;
  732. justify-content: space-between;
  733. font-size: 12px;
  734. .left {
  735. color: rgb(75 85 99);
  736. span {
  737. color: rgb(31 41 55);
  738. font-weight: 600;
  739. }
  740. }
  741. .right {
  742. display: inline-flex;
  743. align-items: center;
  744. border-radius: 4px;
  745. padding: 2px 4px;
  746. font-weight: 500;
  747. }
  748. }
  749. }
  750. .opinion {
  751. border-radius: 8px;
  752. border: 1px solid rgb(254 240 138);
  753. background-color: rgb(254 252 232);
  754. box-sizing: border-box;
  755. padding: 10px;
  756. display: flex;
  757. align-items: center;
  758. justify-content: space-between;
  759. font-size: 12px;
  760. margin-top: 10px;
  761. .left {
  762. font-weight: 600;
  763. color: rgb(133 77 14);
  764. }
  765. .right {
  766. font-weight: 500;
  767. color: rgb(75 85 99);
  768. }
  769. }
  770. .divider {
  771. margin: 0;
  772. transform: translateY(-7px);
  773. :deep(.uv-line) {
  774. border-width: 2px !important;
  775. border-color: rgb(41, 121, 255) !important;
  776. }
  777. }
  778. </style>