index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="单元号" prop="unit">
  5. <el-input
  6. v-model="queryParams.unit"
  7. placeholder="请输入单元号"
  8. clearable
  9. size="small"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item label="设备电机位号" prop="devNo">
  14. <el-input
  15. v-model="queryParams.devNo"
  16. placeholder="请输入设备电机位号"
  17. clearable
  18. size="small"
  19. @keyup.enter.native="handleQuery"
  20. />
  21. </el-form-item>
  22. <el-form-item>
  23. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  24. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  25. </el-form-item>
  26. </el-form>
  27. <el-row :gutter="10" class="mb8">
  28. <el-col :span="1.5">
  29. <el-button
  30. type="primary"
  31. icon="el-icon-plus"
  32. size="mini"
  33. @click="handleAdd"
  34. v-hasPermi="['pssr:motor:add']"
  35. v-if="isApprove==0"
  36. >新增</el-button>
  37. </el-col>
  38. <el-col :span="1.5">
  39. <el-button
  40. type="success"
  41. icon="el-icon-edit"
  42. size="mini"
  43. :disabled="single"
  44. @click="handleUpdate"
  45. v-hasPermi="['pssr:motor:edit']"
  46. v-if="isApprove==0"
  47. >修改</el-button>
  48. </el-col>
  49. <el-col :span="1.5">
  50. <el-button
  51. type="danger"
  52. icon="el-icon-delete"
  53. size="mini"
  54. :disabled="multiple"
  55. @click="handleDelete"
  56. v-hasPermi="['pssr:motor:remove']"
  57. v-if="isApprove==0"
  58. >删除</el-button>
  59. </el-col>
  60. <el-col :span="1.5">
  61. <el-button
  62. type="info"
  63. icon="el-icon-upload2"
  64. size="mini"
  65. @click="handleImport"
  66. v-hasPermi="['pssr:motor:edit']"
  67. v-if="isApprove==0"
  68. >导入</el-button>
  69. </el-col>
  70. <el-col :span="1.5">
  71. <el-button
  72. type="warning"
  73. icon="el-icon-download"
  74. size="mini"
  75. @click="handleExport"
  76. v-hasPermi="['pssr:motor:export']"
  77. v-if="isApprove==0"
  78. >导出</el-button>
  79. </el-col>
  80. <el-col :span="1.5">
  81. <el-button
  82. type="success"
  83. icon="el-icon-s-promotion"
  84. size="mini"
  85. @click="handleApprove"
  86. v-if="isApprove==0"
  87. v-hasPermi="['pssr:motor:edit']"
  88. >发起审批
  89. </el-button>
  90. </el-col>
  91. <el-col :span="1.5">
  92. <el-button
  93. type="primary"
  94. icon="el-icon-check"
  95. size="mini"
  96. v-if="isApprove==4||isApprove==5"
  97. @click="handleConfirmApprove"
  98. v-hasPermi="['pssr:motor:edit']"
  99. >确认
  100. </el-button>
  101. </el-col>
  102. <el-col :span="1.5">
  103. <el-button
  104. type="danger"
  105. icon="el-icon-refresh-left"
  106. size="mini"
  107. v-if="isApprove==2"
  108. :disabled="multiple"
  109. @click="handleTurnDown"
  110. v-hasPermi="['pssr:motor:edit']"
  111. >驳回
  112. </el-button>
  113. </el-col>
  114. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  115. </el-row>
  116. <div style="width: 100%;text-align: center;margin-bottom: 15px">
  117. <H2>现场设备电机检查确认清单</H2>
  118. <br>
  119. 检查要求:<br>
  120. 1.外观检查:设备的电机外观检查无变形锈蚀,设备完整良好;电机电缆完好,敷设合理,连接正确。现场检查符合要求的,在“外观检查”项中打”✔“,不符合打“×”。<br>
  121. 2.功能检查:设备的电机试验合格;送电完成,具备投用条件。现场检查符合要求的,在“功能检查”项中打”✔“,不符合打“×”。<br>
  122. 以上检查中不符合要求的,必须按照该条检查内容的要求立即整改。如不能立即整改的,请立即汇报相关负责人并采取临时应对措施。
  123. </div>
  124. <el-table v-loading="loading" :data="motorList" @selection-change="handleSelectionChange" :height="clientHeight" border>
  125. <el-table-column type="selection" width="55" align="center" />
  126. <el-table-column label="审批状态" align="center" prop="approveStatus" width="100">
  127. <template slot-scope="scope">
  128. <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
  129. <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
  130. <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
  131. <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
  132. </template>
  133. </el-table-column>
  134. <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true"/>
  135. <el-table-column label="设备电机位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
  136. <el-table-column label="外观检查" align="center" prop="visualInspection" :show-overflow-tooltip="true"/>
  137. <el-table-column label="功能检查" align="center" prop="functionalCheck" :show-overflow-tooltip="true"/>
  138. <el-table-column label="确认人1" align="center" prop="confirm1" :show-overflow-tooltip="true"
  139. width="150">
  140. <template slot-scope="scope">
  141. <span>{{ userFormat(scope.row.confirm1) }}</span>
  142. </template>
  143. </el-table-column>
  144. <el-table-column label="确认人2" align="center" prop="confirm2" :show-overflow-tooltip="true"
  145. width="150">
  146. <template slot-scope="scope">
  147. <span>{{ userFormat(scope.row.confirm2) }}</span>
  148. </template>
  149. </el-table-column>
  150. <el-table-column label="确认时间" align="center" prop="confirmationDate" width="100">
  151. <template slot-scope="scope">
  152. <span>{{ parseTime(scope.row.confirmationDate, '{y}-{m}-{d}') }}</span>
  153. </template>
  154. </el-table-column>
  155. <el-table-column label="驳回原因" align="center" prop="reason" :show-overflow-tooltip="true"/>
  156. <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
  157. <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width" v-if="isApprove==0">
  158. <template slot-scope="scope">
  159. <el-button
  160. size="mini"
  161. type="text"
  162. icon="el-icon-folder"
  163. v-if="scope.row.approveStatus!=2"
  164. @click="handleDoc(scope.row)"
  165. >附件
  166. </el-button>
  167. <el-button
  168. size="mini"
  169. type="text"
  170. icon="el-icon-edit"
  171. @click="handleUpdate(scope.row)"
  172. v-hasPermi="['pssr:motor:edit']"
  173. >修改</el-button>
  174. <el-button
  175. size="mini"
  176. type="text"
  177. icon="el-icon-delete"
  178. @click="handleDelete(scope.row)"
  179. v-hasPermi="['pssr:motor:remove']"
  180. >删除</el-button>
  181. </template>
  182. </el-table-column>
  183. </el-table>
  184. <pagination
  185. v-show="total>0"
  186. :total="total"
  187. :page.sync="queryParams.pageNum"
  188. :limit.sync="queryParams.pageSize"
  189. @pagination="getList"
  190. />
  191. <!-- 添加或修改电机设备对话框 -->
  192. <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
  193. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  194. <el-form-item label="单元号" prop="unit">
  195. <el-input v-model="form.unit" placeholder="请输入单元号" />
  196. </el-form-item>
  197. <el-form-item label="设备电机位号" prop="devNo">
  198. <el-input v-model="form.devNo" placeholder="请输入设备电机位号" />
  199. </el-form-item>
  200. <el-form-item label="外观检查" prop="visualInspection">
  201. <el-radio v-model="form.visualInspection" label="✔" border>✔</el-radio>
  202. <el-radio v-model="form.visualInspection" label="✖" border>✖</el-radio>
  203. </el-form-item>
  204. <el-form-item label="功能检查" prop="functionalCheck">
  205. <el-radio v-model="form.functionalCheck" label="✔" border>✔</el-radio>
  206. <el-radio v-model="form.functionalCheck" label="✖" border>✖</el-radio>
  207. </el-form-item>
  208. <el-form-item label="确认人1" prop="confirm1">
  209. <el-select v-model="form.confirm1" clearable filterable style="width: 100%;"
  210. placeholder="请选择确认人1">
  211. <el-option v-for="user in userOptions"
  212. :label="user.nickName"
  213. :value="user.userId+''"
  214. :key="user.userId"/>
  215. </el-select>
  216. </el-form-item>
  217. <el-form-item label="确认人2" prop="confirm2">
  218. <el-select v-model="form.confirm2" clearable filterable style="width: 100%;"
  219. placeholder="请选择确认人2">
  220. <el-option v-for="user in userOptions"
  221. :label="user.nickName"
  222. :value="user.userId+''"
  223. :key="user.userId"/>
  224. </el-select>
  225. </el-form-item>
  226. <el-form-item label="检查时间" prop="confirmationDate">
  227. <el-date-picker clearable size="small" style="width: 200px"
  228. v-model="form.confirmationDate"
  229. type="date"
  230. value-format="yyyy-MM-dd"
  231. placeholder="选择检查时间">
  232. </el-date-picker>
  233. </el-form-item>
  234. <el-form-item label="备注" prop="remarks">
  235. <el-input v-model="form.remarks" placeholder="请输入备注" />
  236. </el-form-item>
  237. </el-form>
  238. <div slot="footer" class="dialog-footer">
  239. <el-button type="primary" @click="submitForm">确 定</el-button>
  240. <el-button @click="cancel">取 消</el-button>
  241. </div>
  242. </el-dialog>
  243. <!-- 用户导入对话框 -->
  244. <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
  245. <el-upload
  246. ref="upload"
  247. :limit="1"
  248. accept=".xlsx, .xls"
  249. :headers="upload.headers"
  250. :action="upload.url"
  251. :disabled="upload.isUploading"
  252. :on-progress="handleFileUploadProgress"
  253. :on-success="handleFileSuccess"
  254. :auto-upload="false"
  255. drag
  256. >
  257. <i class="el-icon-upload"></i>
  258. <div class="el-upload__text">
  259. 将文件拖到此处,或
  260. <em>点击上传</em>
  261. </div>
  262. <div class="el-upload__tip" slot="tip">
  263. <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
  264. <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
  265. <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
  266. <input name="type" :value="upload.type" hidden />
  267. </form>
  268. </div>
  269. <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
  270. </el-upload>
  271. <div slot="footer" class="dialog-footer">
  272. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  273. <el-button @click="upload.open = false">取 消</el-button>
  274. </div>
  275. </el-dialog>
  276. <!-- 附件对话框 -->
  277. <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
  278. width="1000px">
  279. <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
  280. </el-dialog>
  281. <!-- 驳回原因对话框 -->
  282. <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="reason.open" append-to-body title="驳回"
  283. width="1000px">
  284. <el-table :data="items" border>
  285. <el-table-column label="设备电机位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
  286. <el-table-column label="驳回原因" align="center" prop="reason" :show-overflow-tooltip="true">
  287. <template slot-scope="scope">
  288. <el-input v-model="scope.row.reason" placeholder="请输入驳回原因"/>
  289. </template>
  290. </el-table-column>
  291. </el-table>
  292. <div slot="footer" class="dialog-footer">
  293. <el-button type="primary" @click="submitReasonForm">确 定</el-button>
  294. <el-button @click="reasonCancel">取 消</el-button>
  295. </div>
  296. </el-dialog>
  297. </div>
  298. </template>
  299. <script>
  300. import {
  301. addMotor,
  302. delMotor,
  303. exportMotor,
  304. getMotor,
  305. handleConfirmMotor,
  306. handleTurnDownMotor,
  307. importTemplate,
  308. listMotor,
  309. updateMotor,
  310. updateMotorBatch,
  311. } from "@/api/pssr/motor";
  312. import {treeselect} from "@/api/system/dept";
  313. import {getToken} from "@/utils/auth";
  314. import Treeselect from "@riophae/vue-treeselect";
  315. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  316. import {getPssrUser} from "@/api/pssr/aboveall";
  317. import {listFile} from "@/api/pssr/file";
  318. import {doApprove} from "@/api/pssr/approve";
  319. import {updateMaterialBatch} from "@/api/pssr/material";
  320. export default {
  321. dicts:['pssr_approve_status'],
  322. name: "Motor",
  323. components: { Treeselect },
  324. props: {
  325. subId: {
  326. type: Number,
  327. default: 0
  328. },
  329. isApprove: {
  330. type: Number,
  331. default: 0
  332. },
  333. },
  334. data() {
  335. return {
  336. reason: {
  337. open: false
  338. },
  339. doc: {
  340. file: "",
  341. // 是否显示弹出层(报告附件)
  342. open: false,
  343. fileList: [],
  344. queryParams: {
  345. itemId: null,
  346. subId: this.subId,
  347. forShort: 'djsb'
  348. },
  349. },
  350. userOptions: [],
  351. // 遮罩层
  352. loading: true,
  353. // 选中数组
  354. ids: [],
  355. items: [],
  356. // 非单个禁用
  357. single: true,
  358. // 非多个禁用
  359. multiple: true,
  360. // 显示搜索条件
  361. showSearch: false,
  362. // 总条数
  363. total: 0,
  364. // 电机设备表格数据
  365. motorList: [],
  366. // 弹出层标题
  367. title: "",
  368. // 部门树选项
  369. deptOptions: undefined,
  370. clientHeight:300,
  371. // 是否显示弹出层
  372. open: false,
  373. openBatch: false,
  374. // 用户导入参数
  375. upload: {
  376. //下载模板请求地址
  377. downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
  378. //下载模板类型
  379. type: 'motor',
  380. // 是否显示弹出层(用户导入)
  381. open: false,
  382. // 弹出层标题(用户导入)
  383. title: "",
  384. // 是否禁用上传
  385. isUploading: false,
  386. // 是否更新已经存在的用户数据
  387. updateSupport: 0,
  388. // 设置上传的请求头部
  389. headers: { Authorization: "Bearer " + getToken() },
  390. // 上传的地址
  391. url: process.env.VUE_APP_BASE_API + "/pssr/motor/importData?subId=" + this.subId
  392. },
  393. // 查询参数
  394. queryParams: {
  395. pageNum: 1,
  396. pageSize: 20,
  397. subId: this.subId,
  398. approveId: null,
  399. unit: null,
  400. devNo: null,
  401. visualInspection: null,
  402. functionalCheck: null,
  403. motorChecker: null,
  404. processValidator: null,
  405. confirmationDate: null,
  406. createrCode: null,
  407. createdate: null,
  408. updaterCode: null,
  409. updatedate: null,
  410. deptId: null,
  411. remarks: null
  412. },
  413. // 表单参数
  414. form: {},
  415. // 表单校验
  416. rules: {
  417. confirm1: [{required: true, message: "人员不可为空", trigger: "blur"}],
  418. confirm2: [{required: true, message: "人员不可为空", trigger: "blur"}],
  419. }
  420. };
  421. },
  422. watch: {
  423. // 根据名称筛选部门树
  424. deptName(val) {
  425. this.$refs.tree.filter(val);
  426. }
  427. },
  428. created() {
  429. //设置表格高度对应屏幕高度
  430. this.$nextTick(() => {
  431. this.clientHeight = document.body.clientHeight - 350
  432. })
  433. this.getList();
  434. this.getTreeselect();
  435. getPssrUser({}).then(res => {
  436. this.userOptions = res.data
  437. });
  438. },
  439. methods: {
  440. /** 查询电机设备列表 */
  441. getList() {
  442. this.loading = true;
  443. listMotor(this.queryParams).then(response => {
  444. this.motorList = response.rows;
  445. this.total = response.total;
  446. this.loading = false;
  447. });
  448. },
  449. /** 查询部门下拉树结构 */
  450. getTreeselect() {
  451. treeselect().then(response => {
  452. this.deptOptions = response.data;
  453. });
  454. },
  455. // 取消按钮
  456. cancel() {
  457. this.open = false;
  458. this.reset();
  459. },
  460. // 表单重置
  461. reset() {
  462. this.form = {
  463. id: null,
  464. subId: this.subId,
  465. approveId: null,
  466. unit: null,
  467. devNo: null,
  468. visualInspection: null,
  469. functionalCheck: null,
  470. motorChecker: null,
  471. processValidator: null,
  472. confirmationDate: null,
  473. delFlag: null,
  474. createrCode: null,
  475. createdate: null,
  476. updaterCode: null,
  477. updatedate: null,
  478. deptId: null,
  479. remarks: null
  480. };
  481. this.resetForm("form");
  482. },
  483. /** 搜索按钮操作 */
  484. handleQuery() {
  485. this.queryParams.pageNum = 1;
  486. this.getList();
  487. },
  488. /** 重置按钮操作 */
  489. resetQuery() {
  490. this.resetForm("queryForm");
  491. this.handleQuery();
  492. },
  493. // 多选框选中数据
  494. handleSelectionChange(selection) {
  495. this.items=selection;
  496. this.ids = selection.map(item => item.id)
  497. this.single = selection.length!==1
  498. this.multiple = !selection.length
  499. },
  500. /** 新增按钮操作 */
  501. handleAdd() {
  502. this.reset();
  503. this.open = true;
  504. this.title = "添加电机设备";
  505. },
  506. /** 修改按钮操作 */
  507. handleUpdate(row) {
  508. this.reset();
  509. const id = row.id || this.ids
  510. getMotor(id).then(response => {
  511. this.form = response.data;
  512. this.open = true;
  513. this.title = "修改电机设备";
  514. });
  515. },
  516. /** 提交按钮 */
  517. submitForm() {
  518. this.$refs["form"].validate(valid => {
  519. if (valid) {
  520. if (this.form.id != null) {
  521. updateMotor(this.form).then(response => {
  522. this.msgSuccess("修改成功");
  523. this.open = false;
  524. this.getList();
  525. });
  526. } else {
  527. addMotor(this.form).then(response => {
  528. this.msgSuccess("新增成功");
  529. this.open = false;
  530. this.getList();
  531. });
  532. }
  533. }
  534. });
  535. },
  536. /** 删除按钮操作 */
  537. handleDelete(row) {
  538. const ids = row.id || this.ids;
  539. this.$confirm('是否确认删除?', "警告", {
  540. confirmButtonText: "确定",
  541. cancelButtonText: "取消",
  542. type: "warning"
  543. }).then(function() {
  544. return delMotor(ids);
  545. }).then(() => {
  546. this.getList();
  547. this.msgSuccess("删除成功");
  548. })
  549. },
  550. /** 导出按钮操作 */
  551. handleExport() {
  552. const queryParams = this.queryParams;
  553. this.$confirm('是否确认导出所有电机设备数据项?', "警告", {
  554. confirmButtonText: "确定",
  555. cancelButtonText: "取消",
  556. type: "warning"
  557. }).then(function() {
  558. return exportMotor(queryParams);
  559. }).then(response => {
  560. this.download(response.msg);
  561. })
  562. },
  563. /** 导入按钮操作 */
  564. handleImport() {
  565. this.upload.title = "用户导入";
  566. this.upload.open = true;
  567. },
  568. /** 下载模板操作 */
  569. importTemplate() {
  570. this.$refs['downloadFileForm'].submit()
  571. },
  572. // 文件上传中处理
  573. handleFileUploadProgress(event, file, fileList) {
  574. this.upload.isUploading = true;
  575. },
  576. // 文件上传成功处理
  577. handleFileSuccess(response, file, fileList) {
  578. this.upload.open = false;
  579. this.upload.isUploading = false;
  580. this.$refs.upload.clearFiles();
  581. this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
  582. this.getList();
  583. },
  584. // 提交上传文件
  585. submitFileForm() {
  586. this.$refs.upload.submit();
  587. },
  588. /** 确认按钮操作*/
  589. handleApprove() {
  590. doApprove(this.subId).then(res => {
  591. this.msgSuccess("已发起确认流程");
  592. this.getList();
  593. })
  594. },
  595. handleConfirmApprove() {
  596. let data = {
  597. ids: this.ids,
  598. subId: this.subId,
  599. taskType: this.isApprove
  600. }
  601. handleConfirmMotor(data).then(res => {
  602. this.msgSuccess("确认成功");
  603. this.getList()
  604. this.$emit('refreshHisList');
  605. })
  606. },
  607. handleTurnDown(val) {
  608. this.reason.open=true;
  609. },
  610. userFormat(userId) {
  611. for (let item of this.userOptions) {
  612. if (item.userId == userId) {
  613. return item.nickName
  614. }
  615. }
  616. },
  617. /** 报告附件按钮操作 */
  618. handleDoc(row) {
  619. this.doc.fileList=[]
  620. this.doc.open = true;
  621. this.doc.queryParams.itemId = row.id
  622. this.getFileList()
  623. },
  624. getFileList() {
  625. listFile(this.doc.queryParams).then(response => {
  626. this.doc.fileList = response.rows;
  627. this.doc.fileList.forEach(item => {
  628. item.fileUrl = process.env.VUE_APP_BASE_API + item.fileUrl;
  629. });
  630. });
  631. },
  632. reasonCancel() {
  633. this.reason.open = false;
  634. },
  635. submitReasonForm(){
  636. handleTurnDownMotor(this.items).then(res => {
  637. this.msgSuccess("驳回成功");
  638. this.reason.open = false;
  639. this.$emit('refreshHisList');
  640. })
  641. },
  642. handleBatch(){
  643. this.reset();
  644. this.openBatch = true
  645. },
  646. // 取消按钮
  647. cancelBatch() {
  648. this.openBatch = false;
  649. this.reset();
  650. },
  651. /** 提交按钮 */
  652. submitFormBatch() {
  653. this.$refs["form"].validate(valid => {
  654. if (valid) {
  655. this.form.ids = this.ids
  656. updateMotorBatch(this.form).then(response => {
  657. this.msgSuccess("修改成功");
  658. this.open = false;
  659. this.getList();
  660. });
  661. }
  662. });
  663. },
  664. }
  665. };
  666. </script>