index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. <template>
  2. <div class="global-variable" v-loading="loading">
  3. <div class="condition">
  4. <el-form
  5. ref="ruleForm"
  6. :inline="true"
  7. :model="formInline"
  8. class="demo-form-inline"
  9. >
  10. <el-form-item label="批次编号:" prop="batchCode">
  11. <el-input
  12. v-model="formInline.batchCode"
  13. placeholder="请输入批次编号"
  14. size="small"
  15. ></el-input>
  16. </el-form-item>
  17. <el-form-item label="状态:" prop="transferState">
  18. <el-select
  19. v-model="formInline.transferState"
  20. placeholder="请选择状态"
  21. size="small "
  22. >
  23. <el-option
  24. v-for="item in stateDataList"
  25. :key="item.value"
  26. :label="item.lable"
  27. :value="item.value"
  28. ></el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item>
  32. <el-button type="primary" @click="onSubmit" size="small"
  33. >查询</el-button
  34. >
  35. <el-button @click="reset('ruleForm')" size="small">重置</el-button>
  36. </el-form-item>
  37. </el-form>
  38. </div>
  39. <div class="list-page">
  40. <div class="newly">
  41. <el-button type="primary" @click="addData" size="small">新增</el-button>
  42. </div>
  43. <el-table
  44. class="center-align-table"
  45. :data="tableData"
  46. border
  47. :cell-style="rowStyle"
  48. stripe
  49. style="width: 100%"
  50. >
  51. <!-- Table Columns -->
  52. <el-table-column
  53. fixed
  54. prop="batchCode"
  55. align="center"
  56. label="批次编号"
  57. width="230"
  58. >
  59. </el-table-column>
  60. <el-table-column prop="fieldCode" align="center" label="风场编号">
  61. </el-table-column>
  62. <el-table-column
  63. prop="engineCount"
  64. align="center"
  65. label="机组数量"
  66. width="100"
  67. >
  68. </el-table-column>
  69. <el-table-column prop="" align="center" label="异常状态" width="100">
  70. <template slot-scope="scope">
  71. {{ scope.row.transferState == 2 ? "异常" : "未异常" }}
  72. </template>
  73. </el-table-column>
  74. <el-table-column
  75. prop="abnormal"
  76. label="异常信息"
  77. width="100"
  78. align="center"
  79. >
  80. <template slot-scope="scope">
  81. <el-button
  82. v-if="scope.row.transferState == 2"
  83. @click="particulars(scope.row)"
  84. type="text"
  85. size="small"
  86. >详情</el-button
  87. >
  88. <span v-else>/</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column prop="" align="center" label="状态" width="100">
  92. <template slot-scope="scope">
  93. {{
  94. scope.row.transferState == -1
  95. ? "未转换"
  96. : scope.row.transferState == 0
  97. ? "转换中"
  98. : scope.row.transferState == 1
  99. ? "转换成功"
  100. : scope.row.transferState == 2
  101. ? "转换失败"
  102. : "/"
  103. }}
  104. </template>
  105. </el-table-column>
  106. <el-table-column prop="transferTypeName" align="center" label="类型">
  107. </el-table-column>
  108. <el-table-column
  109. prop="transferFinishTime"
  110. align="center"
  111. label="转换时间"
  112. >
  113. </el-table-column>
  114. <el-table-column
  115. prop="transition"
  116. align="center"
  117. fixed="right"
  118. label="操作"
  119. width="150"
  120. >
  121. <template slot-scope="scope">
  122. <el-button
  123. v-if="
  124. scope.row.transferState !== -1 &&
  125. (scope.row.transferAddr !== null ||
  126. scope.row.transferAddr !== '')
  127. "
  128. @click="handleEdit(scope.row)"
  129. type="text"
  130. size="small"
  131. >编辑</el-button
  132. >
  133. <el-button
  134. @click="handleClick(scope.row.downloadUrl)"
  135. type="text"
  136. size="small"
  137. >下载</el-button
  138. >
  139. <el-button
  140. v-if="
  141. scope.row.transferState == -1 &&
  142. (scope.row.transferAddr === null ||
  143. scope.row.transferAddr === '')
  144. "
  145. @click="editTransferState(scope.row, '转换')"
  146. type="text"
  147. size="small"
  148. >转换</el-button
  149. >
  150. <el-button
  151. v-else
  152. @click="editTransferState(scope.row, '重新转换')"
  153. type="text"
  154. size="small"
  155. >重新转换</el-button
  156. >
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. <div class="pagination-container">
  161. <el-pagination
  162. @current-change="handleCurrentChange"
  163. :current-page.sync="formInline.pageNum"
  164. layout="total, prev, pager, next"
  165. :page-size="formInline.pageSize"
  166. :total="formInline.totalSize"
  167. >
  168. </el-pagination>
  169. </div>
  170. </div>
  171. <!-- 弹出层 -->
  172. <!-- 新增 -->
  173. <el-dialog
  174. title="新增(批次列表为空时,请前往性能分析下批次管理中添加批次!)"
  175. :visible.sync="nuedialog"
  176. class="dialogBox"
  177. width="900px"
  178. :before-close="handleCloses"
  179. >
  180. <div v-loading="loadingView" class="views">
  181. <el-form ref="form" :model="newform" label-width="150px">
  182. <el-row>
  183. <el-form-item
  184. label="批次编号:"
  185. prop="batchCode"
  186. :rules="batchCodeRules"
  187. >
  188. <el-select
  189. filterable
  190. v-model="newform.batchCode"
  191. placeholder="请选择批次编号"
  192. size="small"
  193. >
  194. <el-option
  195. v-for="item in batchList"
  196. :key="item"
  197. :label="item"
  198. :value="item"
  199. ></el-option>
  200. </el-select>
  201. </el-form-item>
  202. </el-row>
  203. <el-row
  204. v-for="(item, index) in newform.dataTransferTypePathDtoList"
  205. :key="item.transferType"
  206. >
  207. <el-col :span="11">
  208. <el-form-item
  209. :label="item.transferTypeName + ':'"
  210. :prop="'transferAddr_' + index"
  211. :rules="getFileAddrRules(index)"
  212. >
  213. <el-input
  214. :min="1"
  215. v-model="item.transferAddr"
  216. :placeholder="'请输入' + item.transferTypeName"
  217. size="small"
  218. @change="ensureMinValue(item, 'transferAddr')"
  219. ></el-input>
  220. </el-form-item>
  221. </el-col>
  222. <el-col :span="13">
  223. <el-form-item
  224. :label="item.timeGranularityName + ':'"
  225. :prop="'timeGranularity_' + index"
  226. :rules="getTimeGranularityRules(index)"
  227. >
  228. <el-input
  229. type="number"
  230. :min="1"
  231. v-model="item.timeGranularity"
  232. :placeholder="'请输入' + item.timeGranularityName"
  233. size="small"
  234. @input="ensureMinValue(item, 'timeGranularity')"
  235. >
  236. <template slot="append">秒</template></el-input
  237. >
  238. </el-form-item>
  239. </el-col>
  240. </el-row>
  241. </el-form>
  242. <span slot="footer" class="dialog-footer">
  243. <el-button @click="cancel('form')" size="small">取 消</el-button>
  244. <el-button type="primary" @click="newly('form')" size="small"
  245. >确 定</el-button
  246. >
  247. </span>
  248. </div>
  249. </el-dialog>
  250. <!-- 编辑 -->
  251. <el-dialog
  252. title="编辑"
  253. :visible.sync="editNuedialog"
  254. class="dialogBox"
  255. width="900px"
  256. :before-close="handleCloses"
  257. >
  258. <div v-loading="loadingViewEdit" class="views">
  259. <el-form
  260. ref="editForm"
  261. :model="newEditForm"
  262. label-width="160px"
  263. :rules="editRules"
  264. >
  265. <el-row>
  266. <el-form-item label="批次编号:" prop="batchCode">
  267. <el-select
  268. v-model="newEditForm.batchCode"
  269. placeholder="请选择批次编号"
  270. size="small"
  271. disabled
  272. >
  273. <el-option
  274. v-for="item in batchList"
  275. :key="item"
  276. :label="item"
  277. :value="item"
  278. ></el-option>
  279. </el-select>
  280. </el-form-item>
  281. </el-row>
  282. <el-row>
  283. <el-col :span="11">
  284. <el-form-item
  285. :label="
  286. newEditForm.dataTransferTypePathDtoList[0].transferTypeName +
  287. ':'
  288. "
  289. prop="dataTransferTypePathDtoList.0.transferAddr"
  290. >
  291. <!-- :rules="{
  292. required: true,
  293. message:
  294. '请输入' +
  295. newEditForm.dataTransferTypePathDtoList[0].transferTypeName,
  296. trigger: 'blur',
  297. }" -->
  298. <el-input
  299. disabled
  300. v-model="
  301. newEditForm.dataTransferTypePathDtoList[0].transferAddr
  302. "
  303. :placeholder="
  304. '请输入' +
  305. newEditForm.dataTransferTypePathDtoList[0].transferTypeName
  306. "
  307. size="small"
  308. ></el-input>
  309. </el-form-item>
  310. </el-col>
  311. <el-col :span="13">
  312. <el-form-item
  313. :label="
  314. newEditForm.dataTransferTypePathDtoList[0]
  315. .timeGranularityName + ':'
  316. "
  317. prop="dataTransferTypePathDtoList.0.timeGranularity"
  318. :rules="{
  319. required: true,
  320. message:
  321. '请输入' +
  322. newEditForm.dataTransferTypePathDtoList[0]
  323. .timeGranularityName,
  324. trigger: 'blur',
  325. }"
  326. >
  327. <el-input
  328. type="number"
  329. :min="1"
  330. v-model="
  331. newEditForm.dataTransferTypePathDtoList[0].timeGranularity
  332. "
  333. :placeholder="
  334. '请输入' +
  335. newEditForm.dataTransferTypePathDtoList[0]
  336. .timeGranularityName
  337. "
  338. size="small"
  339. >
  340. <template slot="append">秒</template></el-input
  341. >
  342. </el-form-item>
  343. </el-col>
  344. </el-row>
  345. </el-form>
  346. <span slot="footer" class="dialog-footer">
  347. <el-button @click="editCancel('editForm')" size="small"
  348. >取 消</el-button
  349. >
  350. <el-button type="primary" @click="editly('editForm')" size="small"
  351. >确 定</el-button
  352. >
  353. </span>
  354. </div>
  355. </el-dialog>
  356. <!-- 异常信息详情 -->
  357. <el-dialog
  358. title="异常详情"
  359. :visible.sync="unusualdialog"
  360. width="800px"
  361. :before-close="handleCloses"
  362. >
  363. {{ errInfo }}
  364. </el-dialog>
  365. <!-- 转换\重新转换 -->
  366. <el-dialog
  367. :title="editTransferStateTitle"
  368. :visible.sync="editTransferStateLoading"
  369. width="400px"
  370. :before-close="handleCloses"
  371. >
  372. <div v-loading="loadingViewEdit" class="views">
  373. <el-form
  374. ref="editStateForm"
  375. :model="editTransferStateForm"
  376. label-width="160px"
  377. >
  378. <el-form-item
  379. label="数据转换路径:"
  380. prop="dataTransferTypePath"
  381. :rules="{
  382. required: true,
  383. message: '请输入数据转换路径',
  384. trigger: 'blur',
  385. }"
  386. >
  387. <el-input
  388. v-model="editTransferStateForm.dataTransferTypePath"
  389. :placeholder="'请输入数据转换路径'"
  390. size="small"
  391. ></el-input>
  392. </el-form-item>
  393. </el-form>
  394. <span slot="footer" class="dialog-footer">
  395. <el-button @click="editstateCancel('editStateForm')" size="small"
  396. >取 消</el-button
  397. >
  398. <el-button
  399. type="primary"
  400. @click="editStately('editStateForm')"
  401. size="small"
  402. >确 定</el-button
  403. >
  404. </span>
  405. </div>
  406. </el-dialog>
  407. </div>
  408. </template>
  409. <script>
  410. import {
  411. queryDataTransferList,
  412. fieldBatchListForDataTransfer,
  413. addDataTransferList,
  414. editTimeGranularityQuery,
  415. dataTransfer,
  416. } from "@/api/dataManage";
  417. import axios from "axios";
  418. export default {
  419. data() {
  420. return {
  421. loading: false,
  422. editTransferStateForm: {
  423. transferAddr: "",
  424. dataTransferTypePath: "",
  425. },
  426. editTransferStateTitle: "",
  427. editTransferStateLoading: false,
  428. loadingView: false,
  429. formInline: {
  430. batchCode: "",
  431. transferState: "",
  432. pageNum: 1,
  433. pageSize: 10,
  434. totalSize: 0,
  435. },
  436. batchCodeRules: [
  437. {
  438. required: true,
  439. message: "批次编号不能为空",
  440. trigger: ["change", "blur"],
  441. },
  442. ],
  443. editRules: {
  444. batchCode: {
  445. required: true,
  446. message: "批次编号不能为空",
  447. trigger: ["change", "blur"],
  448. },
  449. },
  450. rules: {
  451. batchCode: {
  452. required: true,
  453. message: "批次编号不能为空",
  454. trigger: "change",
  455. },
  456. },
  457. errInfo: "",
  458. stateDataList: [
  459. {
  460. lable: "未转换",
  461. value: -1,
  462. },
  463. {
  464. lable: "转换中",
  465. value: 0,
  466. },
  467. {
  468. lable: "转换成功",
  469. value: 1,
  470. },
  471. {
  472. lable: "转换失败",
  473. value: 2,
  474. },
  475. ],
  476. batchList: [],
  477. tableData: [],
  478. nuedialog: false,
  479. unusualdialog: false,
  480. newform: {
  481. batchCode: "",
  482. dataTransferTypePathDtoList: [],
  483. },
  484. editNuedialog: false,
  485. loadingViewEdit: false,
  486. newEditForm: {
  487. batchCode: "",
  488. dataTransferTypePathDtoList: [{}],
  489. },
  490. };
  491. },
  492. created() {
  493. this.getTableList();
  494. this.getBatchCodeList();
  495. },
  496. methods: {
  497. handleCloses(done) {
  498. this.$confirm("确认关闭?")
  499. .then((_) => {
  500. this.getBatchCodeList();
  501. done();
  502. })
  503. .catch((_) => {});
  504. },
  505. ensureMinValue(item, field) {
  506. if (item[field] < 1) {
  507. item[field] = 1;
  508. }
  509. },
  510. editstateCancel(formName) {
  511. this.$refs[formName] && this.$refs[formName].resetFields();
  512. this.editTransferStateForm = {};
  513. this.editTransferStateForm.dataTransferTypePath = "";
  514. this.editTransferStateLoading = false;
  515. this.loadingViewEdit = false;
  516. this.getBatchCodeList();
  517. },
  518. editStately(formName) {
  519. this.$refs[formName].validate((valid) => {
  520. if (valid) {
  521. this.loadingViewEdit = true;
  522. dataTransfer({
  523. dataTransferAddr: this.editTransferStateForm.dataTransferTypePath,
  524. dataTransferType: this.editTransferStateForm.transferType,
  525. batchCode: this.editTransferStateForm.batchCode,
  526. })
  527. .then((res) => {
  528. this.$message({
  529. message: "操作成功",
  530. type: "success",
  531. });
  532. this.getTableList();
  533. this.editstateCancel();
  534. })
  535. .catch((error) => {
  536. this.loadingViewEdit = false;
  537. });
  538. } else {
  539. return false;
  540. }
  541. });
  542. },
  543. //转换\重新转换
  544. editTransferState(row, title) {
  545. this.editTransferStateForm = row;
  546. this.editTransferStateTitle = title;
  547. this.editTransferStateLoading = true;
  548. },
  549. handleEdit(row) {
  550. this.editNuedialog = true;
  551. this.newEditForm.batchCode = row.batchCode;
  552. this.newEditForm.dataTransferTypePathDtoList[0] = row;
  553. },
  554. editCancel() {
  555. this.newform = {
  556. batchCode: "",
  557. dataTransferTypePathDtoList: [{}],
  558. };
  559. this.editNuedialog = false;
  560. this.loadingViewEdit = false;
  561. this.getTableList();
  562. this.getBatchCodeList();
  563. },
  564. editly(formName) {
  565. this.$refs[formName].validate((valid) => {
  566. if (valid) {
  567. this.loadingViewEdit = true;
  568. editTimeGranularityQuery({
  569. timeGranularity:
  570. this.newEditForm.dataTransferTypePathDtoList[0].timeGranularity,
  571. dataTransferType:
  572. this.newEditForm.dataTransferTypePathDtoList[0].transferType,
  573. batchCode: this.newEditForm.batchCode,
  574. })
  575. .then((res) => {
  576. this.$message({
  577. message: "编辑成功",
  578. type: "success",
  579. });
  580. this.editCancel();
  581. })
  582. .catch((error) => {
  583. console.log("shibai", error);
  584. this.loadingViewEdit = false;
  585. });
  586. } else {
  587. return false;
  588. }
  589. });
  590. },
  591. getFileAddrRules(index) {
  592. return [{ validator: this.validateFileAddr, trigger: "blur" }];
  593. },
  594. getTimeGranularityRules(index) {
  595. return [
  596. {
  597. validator: (rule, value, callback) =>
  598. this.validateTimeGranularity(rule, value, callback, index),
  599. trigger: "blur",
  600. },
  601. ];
  602. },
  603. validateFileAddr(rule, value, callback) {
  604. // 判断是否至少有一项 transferAddr 有值
  605. const hasFileAddr = this.newform.dataTransferTypePathDtoList.some(
  606. (item) => item.transferAddr
  607. );
  608. if (!hasFileAddr) {
  609. callback(new Error("请至少填写一个数据路径"));
  610. } else {
  611. callback();
  612. }
  613. },
  614. validateTimeGranularity(rule, value, callback, index) {
  615. // 判断对应的 transferAddr 有值,则对应的 timeGranularity 也必须有值
  616. const currentItem = this.newform.dataTransferTypePathDtoList[index];
  617. if (currentItem.transferAddr && !currentItem.timeGranularity) {
  618. callback(new Error("请填写时间粒度"));
  619. } else {
  620. callback();
  621. }
  622. },
  623. cancel(formName) {
  624. this.$refs[formName] && this.$refs[formName].resetFields();
  625. this.newform = {
  626. batchCode: "",
  627. dataTransferTypePathDtoList: [],
  628. };
  629. this.getBatchCodeList();
  630. this.nuedialog = false;
  631. this.loadingView = false;
  632. },
  633. rowStyle() {
  634. return "text-align:center";
  635. },
  636. // 查询
  637. onSubmit() {
  638. this.getTableList();
  639. },
  640. // 重置
  641. reset(formName) {
  642. this.$refs[formName].resetFields();
  643. this.getTableList();
  644. },
  645. // 新增
  646. newly(formName) {
  647. this.$refs[formName].validate((valid) => {
  648. if (valid) {
  649. console.log(this.newform, "newform");
  650. this.loadingView = true;
  651. addDataTransferList({ ...this.newform })
  652. .then((res) => {
  653. this.$message({
  654. message: "新增成功",
  655. type: "success",
  656. });
  657. this.getTableList();
  658. this.cancel();
  659. this.loadingView = false;
  660. })
  661. .catch(() => {
  662. this.loadingView = false;
  663. });
  664. } else {
  665. return false;
  666. }
  667. });
  668. },
  669. //异常详情
  670. particulars(row) {
  671. this.unusualdialog = true;
  672. this.errInfo = row.errInfo;
  673. },
  674. //下载
  675. async handleClick(downloadUrl) {
  676. let newWindow = window.open(downloadUrl, "_blank");
  677. if (
  678. !newWindow ||
  679. newWindow.closed ||
  680. typeof newWindow.closed == "undefined"
  681. ) {
  682. alert("弹出窗口已被阻止!请允许弹出式窗口访问本网站。");
  683. }
  684. },
  685. // async handleClick() {
  686. // try {
  687. // // 获取 HTML 内容
  688. // const response = await axios.get("/downLoadApi", {
  689. // responseType: "blob",
  690. // }); // 确保响应类型为 Blob
  691. // const reader = new FileReader();
  692. // reader.onload = function (event) {
  693. // const htmlContent = event.target.result; // 读取的 HTML 内容
  694. // const newWindow = window.open("", "_blank");
  695. // newWindow.document.open();
  696. // newWindow.document.write(htmlContent);
  697. // newWindow.document.close();
  698. // // 获取当前页面的 URL
  699. // const currentUrl = window.location.href;
  700. // const proxyUrl = currentUrl.substring(0, currentUrl.indexOf("/", 8)); // 从第8个字符开始搜索,找到第一个 "/" 为止
  701. // // 拼接代理地址和接口路径
  702. // const apiEndpoint = proxyUrl + "/downLoadApi";
  703. // // 拼接新的路径
  704. // const newUrl = apiEndpoint + "/downLoadApi";
  705. // // 设置 base 元素
  706. // const baseElement = newWindow.document.createElement("base");
  707. // baseElement.href = newUrl; // 使用代理地址和接口路径
  708. // newWindow.document.head.appendChild(baseElement);
  709. // };
  710. // reader.readAsText(response.data, "utf-8"); // 以 UTF-8 编码读取 Blob
  711. // } catch (error) {
  712. // console.error("Failed to fetch data:", error);
  713. // this.$message.error("无法打开新链接");
  714. // }
  715. // },
  716. async getTableList() {
  717. try {
  718. this.loading = true;
  719. const result = await queryDataTransferList({
  720. ...this.formInline,
  721. totalSize: undefined,
  722. });
  723. this.tableData = result.data.list;
  724. this.formInline.totalSize = result.data.totalSize;
  725. this.loading = false;
  726. } catch (error) {
  727. this.$message({
  728. type: "error",
  729. message: "请检查是否连接网络",
  730. });
  731. }
  732. },
  733. //分页数据切换
  734. handleCurrentChange(val) {
  735. this.formInline.pageNum = val;
  736. this.getTableList();
  737. },
  738. //新增按钮
  739. addData() {
  740. if (this.batchList === null || this.batchList.length === 0) {
  741. this.$confirm(
  742. "批次列表为空,请前往性能分析菜单下的批次管理中添加批次!确认跳转到批次管理菜单吗?",
  743. "提示",
  744. {
  745. confirmButtonText: "确定",
  746. cancelButtonText: "取消",
  747. type: "warning",
  748. }
  749. )
  750. .then(() => {
  751. this.$router.push("/home/performance/batchMag?id=22");
  752. this.$message({
  753. type: "success",
  754. message: "成功!",
  755. });
  756. })
  757. .catch(() => {
  758. this.$message({
  759. type: "info",
  760. message: "已取消",
  761. });
  762. });
  763. } else {
  764. this.nuedialog = true;
  765. }
  766. },
  767. //获取批次编号列表接口
  768. async getBatchCodeList() {
  769. this.loading = true;
  770. try {
  771. const result = await fieldBatchListForDataTransfer();
  772. this.batchList = result.data.batchCodeList;
  773. this.newform.dataTransferTypePathDtoList =
  774. result.data.dataTransferTypeVoList;
  775. this.loading = false;
  776. } catch (error) {
  777. this.loading = false;
  778. }
  779. },
  780. },
  781. };
  782. </script>
  783. <style lang="scss" scoped>
  784. ::v-deep.dialogBox {
  785. .el-form-item__content .el-input--small .el-input__inner {
  786. width: 188px !important;
  787. }
  788. .el-row {
  789. margin: 5px 0;
  790. }
  791. .dialog-footer {
  792. margin-top: 20px;
  793. justify-content: center !important;
  794. }
  795. .el-input-group {
  796. width: auto;
  797. }
  798. }
  799. </style>