sampleList.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  1. <!-- 样品列表页面 -->
  2. <template>
  3. <view class="mainBox">
  4. <uni-nav-bar
  5. fixed="true"
  6. statusBar="true"
  7. left-icon="back"
  8. :title="title"
  9. @clickLeft="handleClose"
  10. >
  11. </uni-nav-bar>
  12. <!-- <view class="nav-placeholder"></view> -->
  13. <view class="wrapper">
  14. <scroll-view class="scroll-wrapper" scroll-y>
  15. <view class="sample-list">
  16. <view
  17. class="sample-item"
  18. v-for="(sample, sampleIndex) in projectId
  19. ? tableData.filter((item) => item.id == projectId)
  20. : tableData"
  21. :key="sampleIndex"
  22. >
  23. <view class="sample-header" @click="toggleExpand(sampleIndex)">
  24. <view class="sample-info">
  25. <view class="info-row">
  26. <text class="label">编码:</text>
  27. <text class="value">{{ sample.categoryCode }}</text>
  28. </view>
  29. <view class="info-row">
  30. <text class="label">名称:</text>
  31. <text class="value">{{ sample.categoryName }}</text>
  32. </view>
  33. <view class="info-row" v-if="sample.batchNo">
  34. <text class="label">批次号:</text>
  35. <text class="value">{{ sample.batchNo }}</text>
  36. </view>
  37. <view class="info-row" v-if="sample.packageNo">
  38. <text class="label">包装编码:</text>
  39. <text class="value">{{ sample.packageNo }}</text>
  40. </view>
  41. </view>
  42. <view
  43. class="expand-arrow"
  44. :class="{ expanded: expandedItems[sampleIndex] }"
  45. >›</view
  46. >
  47. </view>
  48. <view
  49. class="quality-table-wrapper"
  50. v-if="expandedItems[sampleIndex]"
  51. >
  52. <scroll-view class="quality-table-scroll" scroll-x>
  53. <view class="quality-table">
  54. <view class="table-header">
  55. <view class="table-cell">质检项名称</view>
  56. <view class="table-cell">质检内容</view>
  57. <view class="table-cell">质检结果</view>
  58. <view class="table-cell">质检方案编码</view>
  59. <view class="table-cell">质检方案名称</view>
  60. <view class="table-cell">质检类型</view>
  61. <view class="table-cell">工艺参数</view>
  62. </view>
  63. <view class="table-body">
  64. <view
  65. class="table-row"
  66. v-for="(
  67. quality, qualityIndex
  68. ) in sample.qualitySampleTemplateList"
  69. :key="qualityIndex"
  70. >
  71. <view class="table-cell">
  72. <text
  73. class="cell-text"
  74. :class="{ warn: quality.qualityResults === 2 }"
  75. >{{ quality.inspectionName }}</text
  76. >
  77. </view>
  78. <view class="table-cell">
  79. <u-input
  80. v-model="quality.qualityResultContent"
  81. placeholder="请输入"
  82. border="none"
  83. @change="
  84. clientEnvironmentId == 10
  85. ? newHandleInput(
  86. sample.qualitySampleTemplateList,
  87. sampleIndex,
  88. )
  89. : handleInput(
  90. quality,
  91. quality.qualityResultContent,
  92. tableData,
  93. )
  94. "
  95. :class="{ warn: quality.qualityResults === 2 }"
  96. :disabled="
  97. type === 'detail' ||
  98. ((!pageName || pageName == 'myList') &&
  99. sample.correlationId)
  100. "
  101. >
  102. <template #suffix v-if="quality.unitName">
  103. <text class="unit">{{ quality.unitName }}</text>
  104. </template>
  105. </u-input>
  106. </view>
  107. <view
  108. class="table-cell"
  109. v-if="
  110. ['炉水电导率', '给水电导率'].includes(
  111. quality.inspectionName,
  112. )
  113. "
  114. ></view>
  115. <view class="table-cell" v-else>
  116. <u-input
  117. disabled
  118. placeholder=" "
  119. v-if="
  120. type === 'detail' ||
  121. ((!pageName || pageName == 'myList') &&
  122. sample.correlationId)
  123. "
  124. border="surround"
  125. :value="
  126. quality.qualityResults &&
  127. qualityResultsList.find(
  128. (item) => item.value == quality.qualityResults,
  129. ).text
  130. "
  131. >
  132. </u-input>
  133. <uni-data-picker
  134. v-else
  135. v-model="quality.qualityResults"
  136. placeholder="请选择"
  137. :localdata="qualityResultsList"
  138. @change="qualityResultsListChange(tableData)"
  139. :clear-icon="false"
  140. >
  141. </uni-data-picker>
  142. </view>
  143. <view class="table-cell">
  144. <text
  145. class="cell-text"
  146. :class="{ warn: quality.qualityResults === 2 }"
  147. >{{ quality.qualitySchemeTemplateCode }}</text
  148. >
  149. </view>
  150. <view class="table-cell">
  151. <text
  152. class="cell-text"
  153. :class="{ warn: quality.qualityResults === 2 }"
  154. >{{ quality.qualitySchemeTemplateName }}</text
  155. >
  156. </view>
  157. <view class="table-cell">
  158. <text
  159. class="cell-text"
  160. :class="{ warn: quality.qualityResults === 2 }"
  161. >{{ quality.categoryLevelClassName }}</text
  162. >
  163. </view>
  164. <view class="table-cell parameter-cell">
  165. <text
  166. class="cell-text"
  167. :class="{ warn: quality.qualityResults === 2 }"
  168. >
  169. <text v-if="quality.textType == 3">
  170. {{ quality.symbol }}
  171. {{ quality.minValue }}-{{ quality.maxValue }}
  172. </text>
  173. <text v-else-if="quality.textType == 8">
  174. 标准值:{{ quality.defaultValue
  175. }}{{ quality.unitName || "" }} 下限:{{
  176. quality.minValue || 0
  177. }}{{ quality.unitName || "" }} 上限:{{
  178. quality.minValue || 0
  179. }}{{ quality.unitName || "" }}
  180. </text>
  181. <text v-else>
  182. {{ quality.symbol }} {{ quality.defaultValue }}
  183. </text>
  184. <text v-if="quality.textType != 8">
  185. {{ quality.unitName }}</text
  186. >
  187. </text>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </scroll-view>
  193. </view>
  194. <view class="quality-summary" v-if="sample.qualityResults">
  195. <view style="min-width: 10px; margin-left: 16rpx">
  196. <text>
  197. {{
  198. sample.status == 1
  199. ? "已检"
  200. : sample.status == 2
  201. ? "已派单"
  202. : sample.status == 3
  203. ? "已请托"
  204. : "待检"
  205. }}
  206. </text>
  207. </view>
  208. <view>
  209. <text class="summary-label">样品质检结果:</text>
  210. <text
  211. class="summary-value"
  212. :class="getQualityResultClass(sample.qualityResults)"
  213. >
  214. {{ formatQualityResult(sample.qualityResults) }}
  215. </text>
  216. </view>
  217. </view>
  218. </view>
  219. <view class="empty-state" v-if="!tableData || tableData.length === 0">
  220. <text>暂无数据</text>
  221. </view>
  222. </view>
  223. </scroll-view>
  224. <view style="height: 84rpx"></view>
  225. <view class="footerButton">
  226. <u-button @click="handleClose" type="default" text="返回"></u-button>
  227. <u-button
  228. v-if="
  229. type != 'view' &&
  230. !isCorrelationId &&
  231. workData.status != 1 &&
  232. clientEnvironmentId != 10
  233. "
  234. type="primary"
  235. @click="save"
  236. text="保存"
  237. ></u-button>
  238. <u-button
  239. v-if="type != 'view' && !isCorrelationId && workData.status != 1"
  240. type="primary"
  241. @click="exeReportWork"
  242. text="报工"
  243. ></u-button>
  244. </view>
  245. </view>
  246. <u-toast ref="uToast"></u-toast>
  247. </view>
  248. </template>
  249. <script>
  250. import {
  251. getById,
  252. update,
  253. queryQualityInventory,
  254. exeReportWork,
  255. getTaskmonadById,
  256. } from "@/api/inspectionWork/index.js";
  257. import { handleInput, qualityResultsListChange } from "./unit.js";
  258. import dayjs from "dayjs";
  259. export default {
  260. components: {},
  261. data() {
  262. return {
  263. title: "样品列表",
  264. rowIndex: 0,
  265. type: "",
  266. pageName: "",
  267. tableData: [],
  268. handleInput,
  269. qualityResultsListChange,
  270. isCorrelationId: false,
  271. expandedItems: {},
  272. workData: {},
  273. inventoryList: [],
  274. projectId: "",
  275. qualityResultsList: [
  276. {
  277. text: "合格",
  278. value: 1,
  279. },
  280. {
  281. text: "不合格",
  282. value: 2,
  283. },
  284. {
  285. text: "让步接收",
  286. value: 3,
  287. },
  288. ],
  289. };
  290. },
  291. onLoad(data) {
  292. if (data.workId) {
  293. this.projectId = data.projectId;
  294. this.type = data.type || "";
  295. this.pageName = data.pageName || "";
  296. this.clientEnvironmentId =
  297. uni.getStorageSync("userInfo").clientEnvironmentId;
  298. let api = [
  299. "myInspectionProjectEntrusted",
  300. "myInspectionProjectTask",
  301. ].includes(this.pageName)
  302. ? getTaskmonadById
  303. : getById;
  304. api(data.workId).then((res) => {
  305. this.workData = res;
  306. if (data.projectId) {
  307. const qualitySampleList = res.qualitySampleList.filter(
  308. (item) => item.id == data.projectId,
  309. );
  310. if (
  311. qualitySampleList[0].correlationId &&
  312. ![
  313. "myInspectionProjectEntrusted",
  314. "myInspectionProjectTask",
  315. ].includes(this.pageName)
  316. ) {
  317. this.isCorrelationId = true;
  318. } else {
  319. qualitySampleList[0].status = 1;
  320. }
  321. } else {
  322. this.isCorrelationId = true;
  323. res.qualitySampleList.forEach((item) => {
  324. if (
  325. !item.correlationId ||
  326. [
  327. "myInspectionProjectEntrusted",
  328. "myInspectionProjectTask",
  329. ].includes(this.pageName)
  330. ) {
  331. this.isCorrelationId = false;
  332. item.status = 1;
  333. }
  334. });
  335. }
  336. this.tableData = res.qualitySampleList.map((item) => {
  337. if (
  338. !item.qualitySampleTemplateList.length &&
  339. res.templateList.length
  340. ) {
  341. item.qualitySampleTemplateList = JSON.parse(
  342. JSON.stringify(res.templateList),
  343. );
  344. }
  345. return item;
  346. });
  347. });
  348. this.expandedItems = {};
  349. this.getQueryQualityInventory(data.workId);
  350. }
  351. },
  352. methods: {
  353. async getQueryQualityInventory(workId) {
  354. const res = await queryQualityInventory({
  355. qualityWorkerId: workId,
  356. size: -1,
  357. });
  358. if (res.list.length > 0) {
  359. this.inventoryList = res.list;
  360. }
  361. },
  362. handleClose() {
  363. uni.navigateBack();
  364. },
  365. handleConfirm() {
  366. this.tableData.forEach((item) => {
  367. if (!this.pageName && item.correlationId) {
  368. return;
  369. }
  370. item.status = 1;
  371. });
  372. const pages = getCurrentPages();
  373. const prevPage = pages[pages.length - 2];
  374. if (prevPage) {
  375. prevPage.$vm.handleConfirm &&
  376. prevPage.$vm.handleConfirm(this.tableData, this.rowIndex);
  377. }
  378. uni.navigateBack();
  379. },
  380. toggleExpand(index) {
  381. this.$set(this.expandedItems, index, !this.expandedItems[index]);
  382. },
  383. setNum() {
  384. let sampleQualifiedNumber = 0; // 样品合格数
  385. let sampleNoQualifiedNumber = 0; // 样品不合格数
  386. let sampleQualificationRate = 0; //样品合格率
  387. let sampleNoQualificationRate = 0; //样品不合格率
  388. let qualifiedNumber = 0; // 合格数
  389. let noQualifiedNumber = 0; // 不合格数
  390. let qualificationRate = 0; // 合格率
  391. let noQualificationRate = 0; //不合格率
  392. this.tableData.forEach((item) => {
  393. if (item.qualityResults == 2) {
  394. sampleNoQualifiedNumber += item.measureQuantity;
  395. }
  396. });
  397. sampleQualifiedNumber =
  398. this.workData.sampleQuantity - sampleNoQualifiedNumber;
  399. sampleQualificationRate =
  400. ((sampleQualifiedNumber / this.workData.sampleQuantity) * 100).toFixed(
  401. 2,
  402. ) || "";
  403. sampleNoQualificationRate =
  404. (
  405. (sampleNoQualifiedNumber / this.workData.sampleQuantity) *
  406. 100
  407. ).toFixed(2) || "";
  408. if (this.workData.qualityMode == 2 && this.workData.qualityResults == 2) {
  409. qualifiedNumber = sampleQualifiedNumber;
  410. noQualifiedNumber = this.workData.total - sampleQualifiedNumber;
  411. } else {
  412. qualifiedNumber = this.workData.total - sampleNoQualifiedNumber;
  413. noQualifiedNumber = sampleNoQualifiedNumber;
  414. }
  415. qualificationRate =
  416. ((qualifiedNumber / this.workData.total) * 100).toFixed(2) || "";
  417. noQualificationRate =
  418. ((noQualifiedNumber / this.workData.total) * 100).toFixed(2) || "";
  419. this.workData.sampleQualifiedNumber = sampleQualifiedNumber;
  420. this.workData.sampleNoQualifiedNumber = sampleNoQualifiedNumber;
  421. this.workData.sampleQualificationRate = sampleQualificationRate;
  422. this.workData.sampleNoQualificationRate = sampleNoQualificationRate;
  423. this.workData.qualifiedNumber = qualifiedNumber;
  424. this.workData.noQualifiedNumber = noQualifiedNumber;
  425. this.workData.qualificationRate = qualificationRate;
  426. this.workData.noQualificationRate = noQualificationRate;
  427. // qualityMode
  428. },
  429. /* 保存编辑 */
  430. save() {
  431. this.workData.isUpdate = 1;
  432. this.setNum();
  433. let params = {
  434. ...this.workData,
  435. sampleList: this.tableData,
  436. planTemplateList: this.workData.templateList,
  437. templateList: this.workData.templateList,
  438. qualityInventoryList: this.inventoryList,
  439. };
  440. update(params)
  441. .then((msg) => {
  442. uni.$emit("successInit");
  443. this.back();
  444. })
  445. .catch((e) => {});
  446. },
  447. exeReportWork() {
  448. if (this.clientEnvironmentId == 10) {
  449. this.doExeReportWork();
  450. } else if (
  451. ["myInspectionProjectEntrusted", "myInspectionProjectTask"].includes(
  452. this.pageName,
  453. )
  454. ) {
  455. this.doExeReportWork();
  456. } else {
  457. uni.showActionSheet({
  458. itemList: ["合格", "不合格"],
  459. success: (res) => {
  460. this.workData.qualityResults = res.tapIndex === 0 ? 1 : 2;
  461. this.doExeReportWork();
  462. },
  463. });
  464. }
  465. },
  466. doExeReportWork() {
  467. this.workData.isUpdate = 1;
  468. this.tableData.qualityTimeEnd = dayjs().format("YYYY-MM-DD HH:mm:ss");
  469. this.workData.executeUserId = uni.getStorageSync("userInfo").userId;
  470. this.workData.executeUserName = uni.getStorageSync("userInfo").name;
  471. if (this.clientEnvironmentId == 10) {
  472. this.workData.qualityResults = this.tableData[0].qualityResults;
  473. }
  474. this.setNum();
  475. let params = {
  476. ...this.workData,
  477. sampleList: this.tableData,
  478. planTemplateList: this.workData.templateList,
  479. templateList: this.workData.templateList,
  480. qualityInventoryList: this.inventoryList,
  481. };
  482. exeReportWork(params)
  483. .then((msg) => {
  484. uni.$emit("successInit");
  485. this.back();
  486. })
  487. .catch((e) => {});
  488. },
  489. formatQualityResult(value) {
  490. const map = {
  491. 1: "合格",
  492. 2: "不合格",
  493. 3: "让步接收",
  494. };
  495. return map[value] || "";
  496. },
  497. //宇信特殊处理
  498. newHandleInput(arr, index) {
  499. let num = arr.find(
  500. (item) => item.inspectionName == "炉水电导率",
  501. )?.qualityResultContent;
  502. let num1 = arr.find(
  503. (item) => item.inspectionName == "给水电导率",
  504. )?.qualityResultContent;
  505. console.log(num, num1);
  506. arr.forEach((item, i) => {
  507. if (num && num1 && item.inspectionName == "干度值") {
  508. let val = parseFloat((((num - num1 / 1000) / num) * 100).toFixed(5));
  509. this.$set(
  510. this.tableData[index].qualitySampleTemplateList[i],
  511. "qualityResultContent",
  512. val,
  513. );
  514. this.handleInput(item, val, this.tableData);
  515. }
  516. });
  517. },
  518. getQualityResultClass(value) {
  519. return {
  520. 1: "result-pass",
  521. 2: "result-fail",
  522. 3: "result-concession",
  523. }[value];
  524. },
  525. },
  526. };
  527. </script>
  528. <style lang="scss" scoped>
  529. .mainBox {
  530. height: 100vh;
  531. display: flex;
  532. flex-direction: column;
  533. background-color: #f3f8fb;
  534. }
  535. .nav-placeholder {
  536. height: calc(var(--status-bar-height, 0px) + 44px);
  537. }
  538. .wrapper {
  539. flex: 1;
  540. display: flex;
  541. flex-direction: column;
  542. overflow: hidden;
  543. }
  544. .scroll-wrapper {
  545. flex: 1;
  546. height: 0;
  547. padding: 20rpx;
  548. .sample-list {
  549. padding-bottom: 20rpx;
  550. .sample-item {
  551. background: #fff;
  552. border-radius: 30rpx;
  553. margin-bottom: 20rpx;
  554. overflow: hidden;
  555. // box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
  556. // border: 1rpx solid #f0f0f0;
  557. .quality-summary {
  558. padding: 24rpx;
  559. background: #fff;
  560. border-top: 1rpx solid #f5f3f3;
  561. display: flex;
  562. align-items: center;
  563. justify-content: space-between;
  564. font-size: 28rpx;
  565. font-weight: bold;
  566. .summary-label {
  567. color: #333;
  568. margin-right: 20rpx;
  569. }
  570. .summary-value {
  571. padding: 8rpx 20rpx;
  572. border-radius: 8rpx;
  573. &.result-pass {
  574. color: #52c41a;
  575. background: #f6ffed;
  576. }
  577. &.result-fail {
  578. color: #ff4d4f;
  579. background: #fff2f0;
  580. }
  581. &.result-concession {
  582. color: #faad14;
  583. background: #fffbe6;
  584. }
  585. }
  586. }
  587. .empty-state {
  588. padding: 100rpx 0;
  589. text-align: center;
  590. font-size: 28rpx;
  591. color: #999;
  592. }
  593. .sample-header {
  594. display: flex;
  595. justify-content: space-between;
  596. align-items: center;
  597. padding: 40rpx 40rpx 20rpx 40rpx;
  598. background: #ffffff;
  599. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
  600. .sample-info {
  601. flex: 1;
  602. }
  603. .info-row {
  604. display: flex;
  605. margin-bottom: 8rpx;
  606. &:last-child {
  607. margin-bottom: 0;
  608. }
  609. .label {
  610. font-size: 28rpx;
  611. color: #333;
  612. font-weight: 800;
  613. margin-right: 10rpx;
  614. min-width: 120rpx;
  615. }
  616. .value {
  617. font-size: 26rpx;
  618. color: #333;
  619. flex: 1;
  620. font-weight: 800;
  621. }
  622. }
  623. .expand-arrow {
  624. font-size: 40rpx;
  625. color: #999;
  626. margin-left: 20rpx;
  627. transform: rotate(0deg);
  628. transition: transform 0.3s;
  629. background: #fff;
  630. width: 48rpx;
  631. height: 48rpx;
  632. border-radius: 50%;
  633. display: flex;
  634. align-items: center;
  635. justify-content: center;
  636. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  637. &.expanded {
  638. transform: rotate(90deg);
  639. }
  640. }
  641. }
  642. .quality-table-wrapper {
  643. // margin: 20rpx;
  644. margin-top: 0;
  645. // border-radius: 12rpx;
  646. overflow: hidden;
  647. // box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  648. }
  649. // 自定义滚动条样式
  650. ::v-deep .quality-table-scroll ::-webkit-scrollbar {
  651. width: 6rpx;
  652. height: 6rpx;
  653. }
  654. ::v-deep .quality-table-scroll ::-webkit-scrollbar-track {
  655. background: #f1f1f1;
  656. border-radius: 3rpx;
  657. }
  658. ::v-deep .quality-table-scroll ::-webkit-scrollbar-thumb {
  659. background: #c1c1c1;
  660. border-radius: 3rpx;
  661. }
  662. ::v-deep .quality-table-scroll ::-webkit-scrollbar-thumb:hover {
  663. background: #a8a8a8;
  664. }
  665. ::v-deep .table-cell:last-child::-webkit-scrollbar {
  666. width: 4rpx;
  667. }
  668. ::v-deep .table-cell:last-child::-webkit-scrollbar-track {
  669. background: #f9f9f9;
  670. border-radius: 2rpx;
  671. }
  672. ::v-deep .table-cell:last-child::-webkit-scrollbar-thumb {
  673. background: #d9d9d9;
  674. border-radius: 2rpx;
  675. }
  676. .quality-table-scroll {
  677. width: 100%;
  678. }
  679. .quality-table {
  680. min-width: 100%;
  681. width: 1540rpx;
  682. background: #fff;
  683. }
  684. .table-header {
  685. display: flex;
  686. background: #f5f5f5;
  687. border-bottom: 2rpx solid #e5e5e5;
  688. .table-cell {
  689. padding: 24rpx 12rpx;
  690. font-size: 26rpx;
  691. font-weight: bold;
  692. color: #333;
  693. text-align: center;
  694. border-right: 1rpx solid #e5e5e5;
  695. white-space: nowrap;
  696. flex-shrink: 0;
  697. display: flex;
  698. align-items: center;
  699. justify-content: center;
  700. background: #f5f5f5;
  701. width: 200rpx;
  702. &:last-child {
  703. border-right: none;
  704. background: #f5f5f5;
  705. }
  706. &:nth-child(2) {
  707. width: 260rpx;
  708. }
  709. &:nth-child(3) {
  710. width: 220rpx;
  711. }
  712. &:nth-child(7) {
  713. width: 260rpx;
  714. }
  715. }
  716. }
  717. .table-body {
  718. .table-row {
  719. display: flex;
  720. border-bottom: 1rpx solid #e5e5e5;
  721. transition: background 0.2s;
  722. &:nth-child(even) {
  723. // background: #fafafa;
  724. }
  725. &:last-child {
  726. border-bottom: none;
  727. }
  728. .table-cell {
  729. padding: 20rpx 12rpx;
  730. font-size: 24rpx;
  731. // color: #666;
  732. text-align: center;
  733. border-right: 1rpx solid #e5e5e5;
  734. white-space: nowrap;
  735. flex-shrink: 0;
  736. display: flex;
  737. align-items: center;
  738. justify-content: center;
  739. width: 200rpx;
  740. &:last-child {
  741. border-right: none;
  742. // background: #f5f5f5;
  743. }
  744. &:nth-child(2) {
  745. width: 260rpx;
  746. }
  747. &:nth-child(3) {
  748. width: 220rpx;
  749. }
  750. &:nth-child(7) {
  751. width: 260rpx !important;
  752. }
  753. .cell-text {
  754. overflow: hidden;
  755. text-overflow: ellipsis;
  756. white-space: nowrap;
  757. max-width: 100%;
  758. &.warn {
  759. color: #ff4d4f;
  760. }
  761. }
  762. .unit {
  763. font-size: 22rpx;
  764. color: #999;
  765. margin-left: 6rpx;
  766. }
  767. &.parameter-cell {
  768. max-height: 120rpx;
  769. overflow-y: auto;
  770. align-items: flex-start;
  771. padding: 16rpx 12rpx;
  772. width: 200rpx;
  773. }
  774. }
  775. }
  776. }
  777. }
  778. }
  779. }
  780. .footerButton {
  781. width: 100%;
  782. height: 84rpx;
  783. display: flex;
  784. position: fixed;
  785. bottom: 0;
  786. z-index: 10;
  787. background-color: #fff;
  788. /deep/.u-button {
  789. height: 100%;
  790. }
  791. > view {
  792. flex: 1;
  793. }
  794. }
  795. .warn {
  796. color: #ff4d4f !important;
  797. }
  798. /deep/.text-color {
  799. font-size: 28rpx;
  800. }
  801. </style>