form.vue 23 KB

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