index.vue 24 KB

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