index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  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:instrumentCalibration: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:instrumentCalibration: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:instrumentCalibration: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:instrumentCalibration: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:instrumentCalibration: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:instrumentCalibration: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:instrumentCalibration: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:instrumentCalibration: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><br>检查要求:<br>
  118. 1.外观检查:流量计外观检查无明显瑕疵,设备完整良好;仪表位号牌齐全。现场检查符合要求的,在“外观检查”项中打”✔“,不符合打“×”。<br>
  119. 2.安装检查:流量计回装位置正确。现场检查符合要求的,在“安装检查”项中打”✔“,不符合打“×”。<br>
  120. 3.功能检查:流量计校验完成,功能完好;一次阀已经投用,具备使用条件。现场检查符合要求的,在“功能检查”项中打”✔“,不符合打“×”。<br>
  121. 以上检查中不符合要求的,必须按照该条检查内容的要求立即整改。如不能立即整改的,请立即汇报相关负责人并采取临时应对措施。
  122. </div>
  123. <el-table v-loading="loading" :data="instrumentCalibrationList" @selection-change="handleSelectionChange" :height="clientHeight" border>
  124. <el-table-column type="selection" width="55" align="center" />
  125. <el-table-column label="审批状态" align="center" prop="approveStatus" width="100">
  126. <template slot-scope="scope">
  127. <el-tag v-if="scope.row.approveStatus==0">未审批</el-tag>
  128. <el-tag v-if="scope.row.approveStatus==1" type="warning">待确认</el-tag>
  129. <el-tag v-if="scope.row.approveStatus==3" type="success">已确认1</el-tag>
  130. <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true"/>
  134. <el-table-column label="流量计位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
  135. <el-table-column label="外观检查" align="center" prop="visualInspection" :show-overflow-tooltip="true"/>
  136. <el-table-column label="安装检查" align="center" prop="installationInspection" :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:instrumentCalibration: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:instrumentCalibration: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="installationInspection">
  205. <el-radio v-model="form.installationInspection" label="✔" border>✔</el-radio>
  206. <el-radio v-model="form.installationInspection" label="✖" border>✖</el-radio>
  207. </el-form-item>
  208. <el-form-item label="功能检查" prop="functionalCheck">
  209. <el-radio v-model="form.functionalCheck" label="✔" border>✔</el-radio>
  210. <el-radio v-model="form.functionalCheck" label="✖" border>✖</el-radio>
  211. </el-form-item>
  212. <el-form-item label="确认人1" prop="confirm1">
  213. <el-select v-model="form.confirm1" clearable filterable style="width: 100%;"
  214. placeholder="请选择确认人1">
  215. <el-option v-for="user in userOptions"
  216. :label="user.nickName"
  217. :value="user.userId+''"
  218. :key="user.userId"/>
  219. </el-select>
  220. </el-form-item>
  221. <el-form-item label="确认人2" prop="confirm2">
  222. <el-select v-model="form.confirm2" clearable filterable style="width: 100%;"
  223. placeholder="请选择确认人2">
  224. <el-option v-for="user in userOptions"
  225. :label="user.nickName"
  226. :value="user.userId+''"
  227. :key="user.userId"/>
  228. </el-select>
  229. </el-form-item>
  230. <el-form-item label="确认时间" prop="confirmationDate">
  231. <el-date-picker clearable size="small" style="width: 200px"
  232. v-model="form.confirmationDate"
  233. type="date"
  234. value-format="yyyy-MM-dd"
  235. placeholder="选择确认时间">
  236. </el-date-picker>
  237. </el-form-item>
  238. <el-form-item label="备注" prop="remarks">
  239. <el-input v-model="form.remarks" placeholder="请输入备注" />
  240. </el-form-item>
  241. </el-form>
  242. <div slot="footer" class="dialog-footer">
  243. <el-button type="primary" @click="submitForm">确 定</el-button>
  244. <el-button @click="cancel">取 消</el-button>
  245. </div>
  246. </el-dialog>
  247. <!-- 用户导入对话框 -->
  248. <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
  249. <el-upload
  250. ref="upload"
  251. :limit="1"
  252. accept=".xlsx, .xls"
  253. :headers="upload.headers"
  254. :action="upload.url"
  255. :disabled="upload.isUploading"
  256. :on-progress="handleFileUploadProgress"
  257. :on-success="handleFileSuccess"
  258. :auto-upload="false"
  259. drag
  260. >
  261. <i class="el-icon-upload"></i>
  262. <div class="el-upload__text">
  263. 将文件拖到此处,或
  264. <em>点击上传</em>
  265. </div>
  266. <div class="el-upload__tip" slot="tip">
  267. <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
  268. <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
  269. <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
  270. <input name="type" :value="upload.type" hidden />
  271. </form>
  272. </div>
  273. <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
  274. </el-upload>
  275. <div slot="footer" class="dialog-footer">
  276. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  277. <el-button @click="upload.open = false">取 消</el-button>
  278. </div>
  279. </el-dialog>
  280. <!-- 附件对话框 -->
  281. <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
  282. width="1000px">
  283. <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
  284. </el-dialog>
  285. <!-- 驳回原因对话框 -->
  286. <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="reason.open" append-to-body title="驳回"
  287. width="1000px">
  288. <el-table :data="items" border>
  289. <el-table-column label="单元号" align="center" prop="unit" :show-overflow-tooltip="true"/>
  290. <el-table-column label="流量计位号" align="center" prop="devNo" :show-overflow-tooltip="true"/>
  291. <el-table-column label="驳回原因" align="center" prop="reason" :show-overflow-tooltip="true">
  292. <template slot-scope="scope">
  293. <el-input v-model="scope.row.reason" placeholder="请输入驳回原因"/>
  294. </template>
  295. </el-table-column>
  296. </el-table>
  297. <div slot="footer" class="dialog-footer">
  298. <el-button type="primary" @click="submitReasonForm">确 定</el-button>
  299. <el-button @click="reasonCancel">取 消</el-button>
  300. </div>
  301. </el-dialog>
  302. </div>
  303. </template>
  304. <script>
  305. import {
  306. addInstrumentCalibration,
  307. delInstrumentCalibration,
  308. exportInstrumentCalibration,
  309. getInstrumentCalibration,
  310. handleConfirmInstrumentCalibration,
  311. handleTurnDownInstrumentCalibration,
  312. importTemplate,
  313. listInstrumentCalibration,
  314. updateInstrumentCalibration,
  315. updateInstrumentCalibrationBatch,
  316. } from "@/api/pssr/instrumentCalibration";
  317. import {treeselect} from "@/api/system/dept";
  318. import {getToken} from "@/utils/auth";
  319. import Treeselect from "@riophae/vue-treeselect";
  320. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  321. import {listUserNoPage} from "@/api/system/user";
  322. import {listFile} from "@/api/pssr/file";
  323. import {doApprove} from "@/api/pssr/approve";
  324. export default {
  325. dicts:['pssr_approve_status'],
  326. name: "InstrumentCalibration",
  327. components: { Treeselect },
  328. props: {
  329. subId: {
  330. type: Number,
  331. default: 0
  332. },
  333. isApprove: {
  334. type: Number,
  335. default: 0
  336. },
  337. },
  338. data() {
  339. return {
  340. reason: {
  341. open: false
  342. },
  343. doc: {
  344. file: "",
  345. // 是否显示弹出层(报告附件)
  346. open: false,
  347. fileList: [],
  348. queryParams: {
  349. itemId: null,
  350. subId: this.subId,
  351. forShort: 'ybjy'
  352. },
  353. },
  354. userOptions: [],
  355. // 遮罩层
  356. loading: true,
  357. // 选中数组
  358. ids: [],
  359. items: [],
  360. // 非单个禁用
  361. single: true,
  362. // 非多个禁用
  363. multiple: true,
  364. // 显示搜索条件
  365. showSearch: false,
  366. // 总条数
  367. total: 0,
  368. // 仪校验表格数据
  369. instrumentCalibrationList: [],
  370. // 弹出层标题
  371. title: "",
  372. // 部门树选项
  373. deptOptions: undefined,
  374. clientHeight:300,
  375. // 是否显示弹出层
  376. open: false,
  377. openBatch: false,
  378. // 用户导入参数
  379. upload: {
  380. //下载模板请求地址
  381. downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
  382. //下载模板类型
  383. type: 'calibration',
  384. // 是否显示弹出层(用户导入)
  385. open: false,
  386. // 弹出层标题(用户导入)
  387. title: "",
  388. // 是否禁用上传
  389. isUploading: false,
  390. // 是否更新已经存在的用户数据
  391. updateSupport: 0,
  392. // 设置上传的请求头部
  393. headers: { Authorization: "Bearer " + getToken() },
  394. // 上传的地址
  395. url: process.env.VUE_APP_BASE_API + "/pssr/instrumentCalibration/importData?subId=" + this.subId
  396. },
  397. // 查询参数
  398. queryParams: {
  399. pageNum: 1,
  400. pageSize: 20,
  401. subId: this.subId,
  402. approveId: null,
  403. unit: null,
  404. devNo: null,
  405. visualInspection: null,
  406. installationInspection: null,
  407. functionalCheck: null,
  408. meterChecker: null,
  409. processValidator: null,
  410. confirmationDate: null,
  411. createrCode: null,
  412. createdate: null,
  413. updaterCode: null,
  414. updatedate: null,
  415. deptId: null,
  416. remarks: null
  417. },
  418. // 表单参数
  419. form: {},
  420. // 表单校验
  421. rules: {
  422. confirm1: [{required: true, message: "人员不可为空", trigger: "blur"}],
  423. confirm2: [{required: true, message: "人员不可为空", trigger: "blur"}],
  424. }
  425. };
  426. },
  427. watch: {
  428. // 根据名称筛选部门树
  429. deptName(val) {
  430. this.$refs.tree.filter(val);
  431. }
  432. },
  433. created() {
  434. //设置表格高度对应屏幕高度
  435. this.$nextTick(() => {
  436. this.clientHeight = document.body.clientHeight - 350
  437. })
  438. this.getList();
  439. this.getTreeselect();
  440. listUserNoPage({}).then(res => {
  441. this.userOptions = res.data
  442. });
  443. },
  444. methods: {
  445. /** 查询仪校验列表 */
  446. getList() {
  447. this.loading = true;
  448. listInstrumentCalibration(this.queryParams).then(response => {
  449. this.instrumentCalibrationList = response.rows;
  450. this.total = response.total;
  451. this.loading = false;
  452. });
  453. },
  454. /** 查询部门下拉树结构 */
  455. getTreeselect() {
  456. treeselect().then(response => {
  457. this.deptOptions = response.data;
  458. });
  459. },
  460. // 取消按钮
  461. cancel() {
  462. this.open = false;
  463. this.reset();
  464. },
  465. // 表单重置
  466. reset() {
  467. this.form = {
  468. id: null,
  469. subId: this.subId,
  470. approveId: null,
  471. unit: null,
  472. devNo: null,
  473. visualInspection: null,
  474. installationInspection: null,
  475. functionalCheck: null,
  476. meterChecker: null,
  477. processValidator: null,
  478. confirmationDate: null,
  479. delFlag: null,
  480. createrCode: null,
  481. createdate: null,
  482. updaterCode: null,
  483. updatedate: null,
  484. deptId: null,
  485. remarks: null
  486. };
  487. this.resetForm("form");
  488. },
  489. /** 搜索按钮操作 */
  490. handleQuery() {
  491. this.queryParams.pageNum = 1;
  492. this.getList();
  493. },
  494. /** 重置按钮操作 */
  495. resetQuery() {
  496. this.resetForm("queryForm");
  497. this.handleQuery();
  498. },
  499. // 多选框选中数据
  500. handleSelectionChange(selection) {
  501. this.items=selection;
  502. this.ids = selection.map(item => item.id)
  503. this.single = selection.length!==1
  504. this.multiple = !selection.length
  505. },
  506. /** 新增按钮操作 */
  507. handleAdd() {
  508. this.reset();
  509. this.open = true;
  510. this.title = "添加仪校验";
  511. },
  512. /** 修改按钮操作 */
  513. handleUpdate(row) {
  514. this.reset();
  515. const id = row.id || this.ids
  516. getInstrumentCalibration(id).then(response => {
  517. this.form = response.data;
  518. this.open = true;
  519. this.title = "修改仪校验";
  520. });
  521. },
  522. /** 提交按钮 */
  523. submitForm() {
  524. this.$refs["form"].validate(valid => {
  525. if (valid) {
  526. if (this.form.id != null) {
  527. updateInstrumentCalibration(this.form).then(response => {
  528. this.msgSuccess("修改成功");
  529. this.open = false;
  530. this.getList();
  531. });
  532. } else {
  533. addInstrumentCalibration(this.form).then(response => {
  534. this.msgSuccess("新增成功");
  535. this.open = false;
  536. this.getList();
  537. });
  538. }
  539. }
  540. });
  541. },
  542. /** 删除按钮操作 */
  543. handleDelete(row) {
  544. const ids = row.id || this.ids;
  545. this.$confirm('是否确认删除?', "警告", {
  546. confirmButtonText: "确定",
  547. cancelButtonText: "取消",
  548. type: "warning"
  549. }).then(function() {
  550. return delInstrumentCalibration(ids);
  551. }).then(() => {
  552. this.getList();
  553. this.msgSuccess("删除成功");
  554. })
  555. },
  556. /** 导出按钮操作 */
  557. handleExport() {
  558. const queryParams = this.queryParams;
  559. this.$confirm('是否确认导出所有仪校验数据项?', "警告", {
  560. confirmButtonText: "确定",
  561. cancelButtonText: "取消",
  562. type: "warning"
  563. }).then(function() {
  564. return exportInstrumentCalibration(queryParams);
  565. }).then(response => {
  566. this.download(response.msg);
  567. })
  568. },
  569. /** 导入按钮操作 */
  570. handleImport() {
  571. this.upload.title = "用户导入";
  572. this.upload.open = true;
  573. },
  574. /** 下载模板操作 */
  575. importTemplate() {
  576. this.$refs['downloadFileForm'].submit()
  577. },
  578. // 文件上传中处理
  579. handleFileUploadProgress(event, file, fileList) {
  580. this.upload.isUploading = true;
  581. },
  582. // 文件上传成功处理
  583. handleFileSuccess(response, file, fileList) {
  584. this.upload.open = false;
  585. this.upload.isUploading = false;
  586. this.$refs.upload.clearFiles();
  587. this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
  588. this.getList();
  589. },
  590. // 提交上传文件
  591. submitFileForm() {
  592. this.$refs.upload.submit();
  593. },
  594. /** 确认按钮操作*/
  595. handleApprove() {
  596. doApprove(this.subId).then(res => {
  597. this.msgSuccess("已发起确认流程");
  598. this.getList();
  599. })
  600. },
  601. handleConfirmApprove() {
  602. let data = {
  603. ids: this.ids,
  604. subId: this.subId,
  605. taskType: this.isApprove
  606. }
  607. handleConfirmInstrumentCalibration(data).then(res => {
  608. this.msgSuccess("确认成功");
  609. this.getList()
  610. this.$emit('refreshHisList');
  611. })
  612. },
  613. handleTurnDown(val) {
  614. this.reason.open=true;
  615. },
  616. userFormat(userId) {
  617. for (let item of this.userOptions) {
  618. if (item.userId == userId) {
  619. return item.nickName
  620. }
  621. }
  622. },
  623. /** 报告附件按钮操作 */
  624. handleDoc(row) {
  625. this.doc.fileList=[]
  626. this.doc.open = true;
  627. this.doc.queryParams.itemId = row.id
  628. this.getFileList()
  629. },
  630. getFileList() {
  631. listFile(this.doc.queryParams).then(response => {
  632. this.doc.fileList = response.rows;
  633. this.doc.fileList.forEach(item => {
  634. item.fileUrl = process.env.VUE_APP_BASE_API + item.fileUrl;
  635. });
  636. });
  637. },
  638. reasonCancel() {
  639. this.reason.open = false;
  640. },
  641. submitReasonForm(){
  642. handleTurnDownInstrumentCalibration(this.items).then(res => {
  643. this.msgSuccess("驳回成功");
  644. this.reason.open = false;
  645. this.$emit('refreshHisList');
  646. })
  647. }
  648. }
  649. };
  650. </script>