index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  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>
  5. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  6. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  7. </el-form-item>
  8. </el-form>
  9. <el-row :gutter="10" class="mb8">
  10. <el-col :span="1.5">
  11. <el-button
  12. type="primary"
  13. icon="el-icon-plus"
  14. size="mini"
  15. @click="handleAdd"
  16. v-hasPermi="['eoeg:eoegChange:add']"
  17. >新增
  18. </el-button>
  19. </el-col>
  20. <el-col :span="1.5">
  21. <el-button
  22. type="success"
  23. icon="el-icon-edit"
  24. size="mini"
  25. :disabled="single"
  26. @click="handleUpdate"
  27. v-hasPermi="['eoeg:eoegChange:edit']"
  28. >修改
  29. </el-button>
  30. </el-col>
  31. <el-col :span="1.5">
  32. <el-button
  33. type="danger"
  34. icon="el-icon-delete"
  35. size="mini"
  36. :disabled="multiple"
  37. @click="handleDelete"
  38. v-hasPermi="['eoeg:eoegChange:remove']"
  39. >删除
  40. </el-button>
  41. </el-col>
  42. <el-col :span="1.5">
  43. <el-button
  44. type="warning"
  45. icon="el-icon-download"
  46. size="mini"
  47. @click="handleExport"
  48. v-hasPermi="['eoeg:eoegChange:export']"
  49. >导出
  50. </el-button>
  51. </el-col>
  52. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  53. </el-row>
  54. <el-table v-loading="loading" :data="eoegChangeList" @selection-change="handleSelectionChange"
  55. :height="clientHeight" border>
  56. <el-table-column type="selection" width="55" align="center" fixed="left"/>
  57. <el-table-column label="申请状态" align="center" prop="approveStatus"
  58. :show-overflow-tooltip="true" width="150" fixed="left"/>
  59. <el-table-column label="锁编号" align="center" prop="lockNo" :show-overflow-tooltip="true" width="200"
  60. fixed="left"/>
  61. <el-table-column label="措施变更描述" align="center" prop="changeDescribe" :show-overflow-tooltip="true"
  62. width="200"/>
  63. <el-table-column label="状态变更原因" align="center" prop="changeReason" :show-overflow-tooltip="true"
  64. width="200"/>
  65. <el-table-column label="申请人" align="center" prop="applicantName" :show-overflow-tooltip="true" width="200"/>
  66. <el-table-column label="申请时间" align="center" prop="applicationTime" width="100">
  67. <template slot-scope="scope">
  68. <span>{{ parseTime(scope.row.applicationTime, '{y}-{m}-{d}') }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="评估及临时的安全措施" align="center" prop="safa" :show-overflow-tooltip="true"
  72. width="200"/>
  73. <el-table-column label="评估人" align="center" prop="safaerName" :show-overflow-tooltip="true" width="200"/>
  74. <el-table-column label="评估时间" align="center" prop="safaTime" width="100">
  75. <template slot-scope="scope">
  76. <span>{{ parseTime(scope.row.safaTime, '{y}-{m}-{d}') }}</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="批准人" align="center" prop="approverName" :show-overflow-tooltip="true" width="200"/>
  80. <el-table-column label="批准时间" align="center" prop="approveTime" width="100">
  81. <template slot-scope="scope">
  82. <span>{{ parseTime(scope.row.approveTime, '{y}-{m}-{d}') }}</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="措施确认人" align="center" prop="confirmerName"
  86. :show-overflow-tooltip="true" width="200"/>
  87. <el-table-column label="措施确认时间" align="center" prop="confirmTime" width="100">
  88. <template slot-scope="scope">
  89. <span>{{ parseTime(scope.row.confirmTime, '{y}-{m}-{d}') }}</span>
  90. </template>
  91. </el-table-column>
  92. <el-table-column label="措施执行人" align="center" prop="executorName" :show-overflow-tooltip="true" width="200"/>
  93. <el-table-column label="措施执行时间" align="center" prop="executionTime" width="100">
  94. <template slot-scope="scope">
  95. <span>{{ parseTime(scope.row.executionTime, '{y}-{m}-{d}') }}</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column label="变更确认人" align="center" prop="changeConfirmerName" :show-overflow-tooltip="true"
  99. width="200"/>
  100. <el-table-column label="变更确认人确认时间" align="center" prop="changeConfirmTime" width="180">
  101. <template slot-scope="scope">
  102. <span>{{ parseTime(scope.row.changeConfirmTime, '{y}-{m}-{d}') }}</span>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="变更执行人" align="center" prop="changeExecutorName" :show-overflow-tooltip="true"
  106. width="200"/>
  107. <el-table-column label="变更执行时间" align="center" prop="changeExecutorTime" width="100">
  108. <template slot-scope="scope">
  109. <span>{{ parseTime(scope.row.changeExecutorTime, '{y}-{m}-{d}') }}</span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column label="班长" align="center" prop="monitorName" :show-overflow-tooltip="true" width="200"/>
  113. <el-table-column label="班长确认时间" align="center" prop="monitorTime" width="100">
  114. <template slot-scope="scope">
  115. <span>{{ parseTime(scope.row.monitorTime, '{y}-{m}-{d}') }}</span>
  116. </template>
  117. </el-table-column>
  118. <el-table-column label="状态恢复后,之前采取的安全措施是否已撤销:" align="center" prop="revokeConfirm"
  119. :show-overflow-tooltip="true" width="200"/>
  120. <el-table-column label="组织保护措施状态变更执行" align="center" prop="changeExecution"
  121. :show-overflow-tooltip="true" width="200"/>
  122. <el-table-column label="组织保护措施是否已经恢复至变更前的状态" align="center" prop="resetConfirm"
  123. :show-overflow-tooltip="true" width="200"/>
  124. <el-table-column label="确认人1" align="center" prop="resetConfirmerName1"
  125. :show-overflow-tooltip="true" width="200"/>
  126. <el-table-column label="确认时间1" align="center" prop="resetConfirmTime1" width="100">
  127. <template slot-scope="scope">
  128. <span>{{ parseTime(scope.row.resetConfirmTime1, '{y}-{m}-{d}') }}</span>
  129. </template>
  130. </el-table-column>
  131. <el-table-column label="确认人2" align="center" prop="resetConfirmerName2"
  132. :show-overflow-tooltip="true" width="200"/>
  133. <el-table-column label="确认时间2" align="center" prop="resetConfirmTime2" width="100">
  134. <template slot-scope="scope">
  135. <span>{{ parseTime(scope.row.resetConfirmTime2, '{y}-{m}-{d}') }}</span>
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="200"/>
  139. <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
  140. <template slot-scope="scope">
  141. <el-button
  142. size="mini"
  143. type="text"
  144. icon="el-icon-edit"
  145. @click="handleUpdate(scope.row)"
  146. v-hasPermi="['eoeg:eoegChange:edit']"
  147. >修改
  148. </el-button>
  149. <el-button
  150. size="mini"
  151. type="text"
  152. icon="el-icon-delete"
  153. @click="handleDelete(scope.row)"
  154. v-hasPermi="['eoeg:eoegChange:remove']"
  155. >删除
  156. </el-button>
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. <pagination
  161. v-show="total>0"
  162. :total="total"
  163. :page.sync="queryParams.pageNum"
  164. :limit.sync="queryParams.pageSize"
  165. @pagination="getList"
  166. />
  167. <!-- 添加或修改EOEG 锁开锁关申请对话框 -->
  168. <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
  169. <el-form ref="form" :model="form" :rules="rules" label-width="180px">
  170. <el-form-item label="破锁编号" prop="lockNo">
  171. <el-select v-model="form.lockNo" placeholder="请选择锁编号" multiple clearable size="small" filterable
  172. style="width: 100%">
  173. <el-option v-for="item in lockList" :key="item.uniqueIdentifier" :label="item.uniqueIdentifier"
  174. :value="item.uniqueIdentifier">
  175. </el-option>
  176. </el-select>
  177. </el-form-item>
  178. <el-form-item label="组织保护措施变更描述" prop="changeDescribe">
  179. <el-input type="textarea" v-model="form.changeDescribe" placeholder="请输入组织保护措施变更描述"/>
  180. </el-form-item>
  181. <el-form-item label="状态变更原因" prop="changeReason">
  182. <el-input type="textarea" v-model="form.changeReason" placeholder="请输入状态变更原因"/>
  183. </el-form-item>
  184. <el-form-item label="安全评估及临时的安全措施" prop="safa">
  185. <el-input type="textarea" v-model="form.safa" placeholder="请输入安全评估及临时的安全措施"/>
  186. </el-form-item>
  187. <el-form-item label="评估人" prop="safaer">
  188. <el-select clearable filterable v-model="form.safaer">
  189. <el-option v-for="item in staffmgrOptions" :key="item.userId" :label="item.name" :value="item.userId">
  190. </el-option>
  191. </el-select>
  192. </el-form-item>
  193. <el-form-item label="措施执行人" prop="executor">
  194. <el-select clearable filterable v-model="form.executor" @change="compareToStaff('executor')">
  195. <el-option v-for="item in classStaffOptions" :key="item.userId" :label="item.name" :value="item.userId">
  196. </el-option>
  197. </el-select>
  198. </el-form-item>
  199. <el-form-item label="变更执行人" prop="changeExecutor">
  200. <el-select clearable filterable v-model="form.changeExecutor" @change="compareToStaff('changeExecutor')">
  201. <el-option v-for="item in classStaffOptions" :key="item.userId" :label="item.name" :value="item.userId">
  202. </el-option>
  203. </el-select>
  204. </el-form-item>
  205. <el-form-item label="变更确认人" prop="changeConfirmer">
  206. <el-select clearable filterable v-model="form.changeConfirmer" @change="compareToStaff('changeConfirmer')">
  207. <el-option v-for="item in classStaffOptions" :key="item.userId" :label="item.name" :value="item.userId">
  208. </el-option>
  209. </el-select>
  210. </el-form-item>
  211. <el-form-item label="备注" prop="remarks">
  212. <el-input v-model="form.remarks" placeholder="请输入备注"/>
  213. </el-form-item>
  214. </el-form>
  215. <div slot="footer" class="dialog-footer">
  216. <el-button type="primary" @click="submitForm">确 定</el-button>
  217. <el-button @click="cancel">取 消</el-button>
  218. </div>
  219. </el-dialog>
  220. <!-- 用户导入对话框 -->
  221. <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
  222. <el-upload
  223. ref="upload"
  224. :limit="1"
  225. accept=".xlsx, .xls"
  226. :headers="upload.headers"
  227. :action="upload.url + '?updateSupport=' + upload.updateSupport"
  228. :disabled="upload.isUploading"
  229. :on-progress="handleFileUploadProgress"
  230. :on-success="handleFileSuccess"
  231. :auto-upload="false"
  232. drag
  233. >
  234. <i class="el-icon-upload"></i>
  235. <div class="el-upload__text">
  236. 将文件拖到此处,或
  237. <em>点击上传</em>
  238. </div>
  239. <div class="el-upload__tip" slot="tip">
  240. <el-checkbox v-model="upload.updateSupport"/>
  241. 是否更新已经存在的用户数据
  242. <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
  243. </div>
  244. <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
  245. </el-upload>
  246. <div slot="footer" class="dialog-footer">
  247. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  248. <el-button @click="upload.open = false">取 消</el-button>
  249. </div>
  250. </el-dialog>
  251. </div>
  252. </template>
  253. <script>
  254. import {
  255. listEoegChange,
  256. getEoegChange,
  257. delEoegChange,
  258. addEoegChange,
  259. updateEoegChange,
  260. exportEoegChange,
  261. importTemplate
  262. } from "@/api/eoeg/eoegChange";
  263. import {treeselect} from "@/api/system/dept";
  264. import {getToken} from "@/utils/auth";
  265. import Treeselect from "@riophae/vue-treeselect";
  266. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  267. import {listEoegLock} from "@/api/eoeg/eoegLock";
  268. import {listStaffmgr, listStaffmgrByActualposts} from "@/api/plant/staffmgr";
  269. export default {
  270. name: "EoegChange",
  271. components: {Treeselect},
  272. data() {
  273. return {
  274. // 遮罩层
  275. loading: true,
  276. // 选中数组
  277. ids: [],
  278. lockList: [],
  279. staffmgrOptions: [],
  280. classStaffOptions: [],
  281. // 非单个禁用
  282. single: true,
  283. // 非多个禁用
  284. multiple: true,
  285. // 显示搜索条件
  286. showSearch: false,
  287. // 总条数
  288. total: 0,
  289. // EOEG 锁开锁关申请表格数据
  290. eoegChangeList: [],
  291. // 弹出层标题
  292. title: "",
  293. // 部门树选项
  294. deptOptions: undefined,
  295. clientHeight: 300,
  296. // 是否显示弹出层
  297. open: false,
  298. // 用户导入参数
  299. upload: {
  300. // 是否显示弹出层(用户导入)
  301. open: false,
  302. // 弹出层标题(用户导入)
  303. title: "",
  304. // 是否禁用上传
  305. isUploading: false,
  306. // 是否更新已经存在的用户数据
  307. updateSupport: 0,
  308. // 设置上传的请求头部
  309. headers: {Authorization: "Bearer " + getToken()},
  310. // 上传的地址
  311. url: process.env.VUE_APP_BASE_API + "/eoeg/eoegChange/importData"
  312. },
  313. // 查询参数
  314. queryParams: {
  315. pageNum: 1,
  316. pageSize: 20,
  317. changeDescribe: null,
  318. changeReason: null,
  319. applicant: null,
  320. applicantName: null,
  321. applicationTime: null,
  322. safa: null,
  323. safaer: null,
  324. safaerName: null,
  325. safaTime: null,
  326. approver: null,
  327. approverName: null,
  328. approveTime: null,
  329. executor: null,
  330. executorName: null,
  331. executionTime: null,
  332. confirmer: null,
  333. confirmerName: null,
  334. confirmTime: null,
  335. changeExecution: null,
  336. changeExecutor: null,
  337. changeExecutorName: null,
  338. changeExecutorTime: null,
  339. resetConfirm: null,
  340. resetConfirmer1: null,
  341. resetConfirmerName1: null,
  342. resetConfirmTime1: null,
  343. resetConfirmer2: null,
  344. resetConfirmerName2: null,
  345. resetConfirmTime2: null,
  346. revokeConfirm: null,
  347. remarks: null,
  348. status: null,
  349. createrCode: null,
  350. createdate: null,
  351. updaterCode: null,
  352. updatedate: null,
  353. deptId: null,
  354. approveStatus: null,
  355. apNo: null,
  356. processId: null,
  357. lockNo: null,
  358. changeConfirmer: null,
  359. changeConfirmerName: null,
  360. changeConfirmTime: null,
  361. monitor: null,
  362. monitorName: null,
  363. monitorTime: null
  364. },
  365. // 表单参数
  366. form: {},
  367. // 表单校验
  368. rules: {
  369. lockNo: [
  370. { required: true, message: '锁编号不能为空', trigger: 'change' }
  371. ],
  372. changeDescribe: [
  373. { required: true, message: '组织保护措施变更描述不能为空', trigger: 'blur' }
  374. ],
  375. changeReason: [
  376. { required: true, message: '状态变更原因不能为空', trigger: 'blur' }
  377. ],
  378. safa: [
  379. { required: true, message: '安全评估及临时的安全措施不能为空', trigger: 'blur' }
  380. ],
  381. safaer: [
  382. { required: true, message: '评估人不能为空', trigger: 'change' }
  383. ],
  384. executor: [
  385. { required: true, message: '措施执行人不能为空', trigger: 'change' }
  386. ],
  387. changeExecutor: [
  388. { required: true, message: '变更执行人不能为空', trigger: 'change' }
  389. ],
  390. changeConfirmer: [
  391. { required: true, message: '变更确认人不能为空', trigger: 'change' }
  392. ],
  393. }
  394. };
  395. },
  396. watch: {
  397. // 根据名称筛选部门树
  398. deptName(val) {
  399. this.$refs.tree.filter(val);
  400. }
  401. },
  402. created() {
  403. //设置表格高度对应屏幕高度
  404. this.$nextTick(() => {
  405. this.clientHeight = document.body.clientHeight - 250
  406. })
  407. this.getList();
  408. this.getTreeselect();
  409. this.getLockList();
  410. this.getSaferList();
  411. this.getClassStaffList();
  412. },
  413. methods: {
  414. compareToStaff(field) {
  415. // 定义验证规则:字段名和错误消息
  416. const validationRules = [
  417. {
  418. fields: ['changeConfirmer', 'executor'],
  419. message: '变更确认人不能与措施执行人为同一人!'
  420. },
  421. {
  422. fields: ['changeConfirmer', 'changeExecutor'],
  423. message: '变更确认人不能与变更执行人为同一人!'
  424. },
  425. {
  426. fields: ['executor', 'changeExecutor'],
  427. message: '措施执行人不能与变更执行人为同一人!'
  428. }
  429. ];
  430. const isValidValue = (value) => {
  431. return value !== null && value !== undefined && value !== '';
  432. };
  433. // 使用循环检查所有规则
  434. for (const rule of validationRules) {
  435. const [field1, field2] = rule.fields;
  436. const value1 = this.form[field1];
  437. const value2 = this.form[field2];
  438. // 只有当两个字段都有有效值且相等时才提示
  439. if (isValidValue(value1) && isValidValue(value2) && value1 === value2) {
  440. this.$alert(rule.message, "警告", {dangerouslyUseHTMLString: true});
  441. this.form[field] = null;
  442. break;
  443. }
  444. }
  445. },
  446. getSaferList() {
  447. listStaffmgrByActualposts({actualposts: "14,16,24,25,26"}).then(response => {
  448. this.staffmgrOptions = response.data;
  449. });
  450. },
  451. getClassStaffList() {
  452. listStaffmgrByActualposts({actualposts: "10,11,12,34"}).then(response => {
  453. this.classStaffOptions = response.data;
  454. });
  455. },
  456. getLockList() {
  457. listEoegLock({}).then(response => {
  458. this.lockList = response.rows;
  459. });
  460. },
  461. /** 查询EOEG 锁开锁关申请列表 */
  462. getList() {
  463. this.loading = true;
  464. listEoegChange(this.queryParams).then(response => {
  465. this.eoegChangeList = response.rows;
  466. this.total = response.total;
  467. this.loading = false;
  468. });
  469. },
  470. /** 查询部门下拉树结构 */
  471. getTreeselect() {
  472. treeselect().then(response => {
  473. this.deptOptions = response.data;
  474. });
  475. },
  476. // 取消按钮
  477. cancel() {
  478. this.open = false;
  479. this.reset();
  480. },
  481. // 表单重置
  482. reset() {
  483. this.form = {
  484. id: null,
  485. changeDescribe: null,
  486. changeReason: null,
  487. applicant: null,
  488. applicantName: null,
  489. applicationTime: null,
  490. safa: null,
  491. safaer: null,
  492. safaerName: null,
  493. safaTime: null,
  494. approver: null,
  495. approverName: null,
  496. approveTime: null,
  497. executor: null,
  498. executorName: null,
  499. executionTime: null,
  500. confirmer: null,
  501. confirmerName: null,
  502. confirmTime: null,
  503. changeExecution: null,
  504. changeExecutor: null,
  505. changeExecutorName: null,
  506. changeExecutorTime: null,
  507. resetConfirm: null,
  508. resetConfirmer1: null,
  509. resetConfirmerName1: null,
  510. resetConfirmTime1: null,
  511. resetConfirmer2: null,
  512. resetConfirmerName2: null,
  513. resetConfirmTime2: null,
  514. revokeConfirm: null,
  515. remarks: null,
  516. status: 0,
  517. delFlag: null,
  518. createrCode: null,
  519. createdate: null,
  520. updaterCode: null,
  521. updatedate: null,
  522. deptId: null,
  523. approveStatus: "0",
  524. apNo: null,
  525. processId: null,
  526. lockNo: null,
  527. changeConfirmer: null,
  528. changeConfirmerName: null,
  529. changeConfirmTime: null,
  530. monitor: null,
  531. monitorName: null,
  532. monitorTime: null
  533. };
  534. this.resetForm("form");
  535. },
  536. /** 搜索按钮操作 */
  537. handleQuery() {
  538. this.queryParams.pageNum = 1;
  539. this.getList();
  540. },
  541. /** 重置按钮操作 */
  542. resetQuery() {
  543. this.resetForm("queryForm");
  544. this.handleQuery();
  545. },
  546. // 多选框选中数据
  547. handleSelectionChange(selection) {
  548. this.ids = selection.map(item => item.id)
  549. this.single = selection.length !== 1
  550. this.multiple = !selection.length
  551. },
  552. /** 新增按钮操作 */
  553. handleAdd() {
  554. this.reset();
  555. this.open = true;
  556. this.title = "添加EOEG 锁开锁关申请";
  557. },
  558. /** 修改按钮操作 */
  559. handleUpdate(row) {
  560. this.reset();
  561. const id = row.id || this.ids
  562. getEoegChange(id).then(response => {
  563. this.form = response.data;
  564. this.open = true;
  565. this.title = "修改EOEG 锁开锁关申请";
  566. });
  567. },
  568. /** 提交按钮 */
  569. submitForm() {
  570. this.$refs["form"].validate(valid => {
  571. if (valid) {
  572. if (this.form.id != null) {
  573. updateEoegChange(this.form).then(response => {
  574. this.msgSuccess("修改成功");
  575. this.open = false;
  576. this.getList();
  577. });
  578. } else {
  579. addEoegChange(this.form).then(response => {
  580. this.msgSuccess("新增成功");
  581. this.open = false;
  582. this.getList();
  583. });
  584. }
  585. }
  586. });
  587. },
  588. /** 删除按钮操作 */
  589. handleDelete(row) {
  590. const ids = row.id || this.ids;
  591. this.$confirm('是否确认删除?', "警告", {
  592. confirmButtonText: "确定",
  593. cancelButtonText: "取消",
  594. type: "warning"
  595. }).then(function () {
  596. return delEoegChange(ids);
  597. }).then(() => {
  598. this.getList();
  599. this.msgSuccess("删除成功");
  600. })
  601. },
  602. /** 导出按钮操作 */
  603. handleExport() {
  604. const queryParams = this.queryParams;
  605. this.$confirm('是否确认导出所有EOEG 锁开锁关申请数据项?', "警告", {
  606. confirmButtonText: "确定",
  607. cancelButtonText: "取消",
  608. type: "warning"
  609. }).then(function () {
  610. return exportEoegChange(queryParams);
  611. }).then(response => {
  612. this.download(response.msg);
  613. })
  614. },
  615. /** 导入按钮操作 */
  616. handleImport() {
  617. this.upload.title = "用户导入";
  618. this.upload.open = true;
  619. },
  620. /** 下载模板操作 */
  621. importTemplate() {
  622. importTemplate().then(response => {
  623. this.download(response.msg);
  624. });
  625. },
  626. // 文件上传中处理
  627. handleFileUploadProgress(event, file, fileList) {
  628. this.upload.isUploading = true;
  629. },
  630. // 文件上传成功处理
  631. handleFileSuccess(response, file, fileList) {
  632. this.upload.open = false;
  633. this.upload.isUploading = false;
  634. this.$refs.upload.clearFiles();
  635. this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
  636. this.getList();
  637. },
  638. // 提交上传文件
  639. submitFileForm() {
  640. this.$refs.upload.submit();
  641. }
  642. }
  643. };
  644. </script>