index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <template>
  2. <div class="app-container">
  3. <el-row>
  4. <!--用户数据1-->
  5. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  6. <el-form-item label="考试名称" prop="userName">
  7. <el-input
  8. v-model="queryParams.userName"
  9. placeholder="请输入考试名称"
  10. clearable
  11. style="width: 150px"
  12. @keyup.enter.native="handleQuery"
  13. />
  14. </el-form-item>
  15. <el-form-item label="考试时间">
  16. <el-date-picker
  17. v-model="dateRange"
  18. style="width: 240px"
  19. value-format="yyyy-MM-dd"
  20. type="daterange"
  21. range-separator="-"
  22. start-placeholder="开始日期"
  23. end-placeholder="结束日期"
  24. ></el-date-picker>
  25. </el-form-item>
  26. <el-form-item label="模拟器类型" prop="userName">
  27. <el-input
  28. v-model="queryParams.userName"
  29. placeholder="请输入模拟器类型"
  30. clearable
  31. style="width: 240px"
  32. @keyup.enter.native="handleQuery"
  33. />
  34. </el-form-item>
  35. <el-form-item label="考试状态" prop="status">
  36. <el-select
  37. v-model="queryParams.status"
  38. placeholder="考试状态"
  39. clearable
  40. style="width: 150px"
  41. >
  42. <el-option
  43. v-for="dict in dict.type.sys_normal_disable"
  44. :key="dict.value"
  45. :label="dict.label"
  46. :value="dict.value"
  47. />
  48. </el-select>
  49. </el-form-item>
  50. <el-form-item>
  51. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  52. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  53. </el-form-item>
  54. </el-form>
  55. <!-- <el-row :gutter="10" class="mb8">
  56. <el-col :span="1.5">
  57. <el-button
  58. type="primary"
  59. plain
  60. icon="el-icon-plus"
  61. size="mini"
  62. @click="handleAdd"
  63. v-hasPermi="['simulator:task:add']"
  64. >新增</el-button>
  65. </el-col>
  66. <el-col :span="1.5">
  67. <el-button
  68. type="success"
  69. plain
  70. icon="el-icon-edit"
  71. size="mini"
  72. :disabled="single"
  73. @click="handleUpdate"
  74. v-hasPermi="['simulator:user:edit']"
  75. >修改</el-button>
  76. </el-col>
  77. <el-col :span="1.5">
  78. <el-button
  79. type="danger"
  80. plain
  81. icon="el-icon-delete"
  82. size="mini"
  83. :disabled="multiple"
  84. @click="handleDelete"
  85. v-hasPermi="['simulator:user:remove']"
  86. >删除</el-button>
  87. </el-col>
  88. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
  89. </el-row> -->
  90. <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
  91. <el-table-column type="selection" width="50" align="center" />
  92. <el-table-column label="考试名称" align="center" key="userName" prop="userName" v-if="columns[0].visible" :show-overflow-tooltip="true" />
  93. <el-table-column label="考试时间" align="center" key="kaoshiTime" prop="kaoshiTime" v-if="columns[1].visible" :show-overflow-tooltip="true" />
  94. <el-table-column label="模拟器类型" align="center" key="liexing" prop="liexing" v-if="columns[2].visible" :show-overflow-tooltip="true" />
  95. <el-table-column label="创建老师" align="center" key="creater" prop="creater" v-if="columns[3].visible" :show-overflow-tooltip="true" />
  96. <el-table-column label="考试状态" align="center" key="status" v-if="columns[4].visible">
  97. <template slot-scope="scope">
  98. <el-switch
  99. v-model="scope.row.status"
  100. active-value="0"
  101. inactive-value="1"
  102. @change="handleStatusChange(scope.row)"
  103. ></el-switch>
  104. </template>
  105. </el-table-column>
  106. <el-table-column
  107. label="操作"
  108. align="center"
  109. width="160"
  110. class-name="small-padding fixed-width"
  111. >
  112. <template slot-scope="scope">
  113. <el-button
  114. size="mini"
  115. type="text"
  116. icon="el-icon-thumb"
  117. @click="handleInto(scope.row)"
  118. >进入</el-button>
  119. </template>
  120. </el-table-column>
  121. </el-table>
  122. <pagination
  123. v-show="total>0"
  124. :total="total"
  125. :page.sync="queryParams.pageNum"
  126. :limit.sync="queryParams.pageSize"
  127. @pagination="getList"
  128. />
  129. </el-row>
  130. <!-- 添加或修改用户配置对话框 -->
  131. <el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
  132. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  133. <el-row>
  134. <el-col :span="12">
  135. <el-form-item label="型号">
  136. <!-- v-model="form.monitype" -->
  137. <el-select v-model="selectedEquip" placeholder="请选择模拟器型号">
  138. <el-option
  139. value="请选择"
  140. >请选择</el-option>
  141. <el-option
  142. v-for="dict in dict.type.sim_equip_type"
  143. :key="dict.value"
  144. :label="dict.label"
  145. :value="dict.value"
  146. ></el-option>
  147. </el-select>
  148. </el-form-item>
  149. </el-col>
  150. <el-col :span="12">
  151. <el-form-item label="任务名称" prop="userName">
  152. <el-input placeholder="请输入任务名称" maxlength="30" />
  153. </el-form-item>
  154. </el-col>
  155. <div style="text-align: right;">
  156. <el-button @click="toggleSelection(tableData)">选择全部</el-button>
  157. <el-button @click="toggleSelection()">取消选择</el-button>
  158. </div>
  159. </el-row>
  160. <el-table
  161. :data="tableData" border ref="multipleTable" @selection-change="handleSelectionRow"
  162. :span-method="objectSpanMethod"
  163. style="width:100%;text-align:center;margin-left:10px; margin-top:10px">
  164. <el-table-column
  165. prop="xinghao"
  166. label="型号">
  167. </el-table-column>
  168. <el-table-column
  169. prop="xianxiang"
  170. label="故障现象">
  171. </el-table-column>
  172. <el-table-column
  173. prop="name"
  174. label="故障部位">
  175. </el-table-column>
  176. <el-table-column
  177. type="selection" prop="ids"
  178. label="ID"
  179. width="55"></el-table-column>
  180. </el-table>
  181. </el-form>
  182. <div slot="footer" class="dialog-footer">
  183. <el-button type="primary" @click="submitForm">确 定</el-button>
  184. <el-button @click="cancel">取 消</el-button>
  185. </div>
  186. </el-dialog>
  187. </div>
  188. </template>
  189. <style>
  190. .el-table__header tr th .cell{
  191. text-align: center;
  192. }
  193. .el-table__row .cell {
  194. text-align: center;
  195. }
  196. /* .el-form-item__label{
  197. width: 85px !important;
  198. } */
  199. </style>
  200. <script>
  201. import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
  202. import { getToken } from "@/utils/auth";
  203. import Treeselect from "@riophae/vue-treeselect";
  204. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  205. export default {
  206. // name: "Task",
  207. dicts: ['sim_equip_type'],
  208. components: { Treeselect },
  209. data() {
  210. return {
  211. multipleSelection: [],
  212. selectedEquip: '',
  213. selectedZjEquip: '',
  214. // 遮罩层
  215. loading: true,
  216. // 选中数组
  217. ids: [],
  218. // 非单个禁用
  219. single: true,
  220. // 非多个禁用
  221. multiple: true,
  222. // 显示搜索条件
  223. showSearch: true,
  224. // 总条数
  225. total: 0,
  226. // 用户表格数据
  227. userList: null,
  228. // 弹出层标题
  229. title: "",
  230. // 部门树选项
  231. deptOptions: undefined,
  232. // 是否显示弹出层
  233. open: false,
  234. //自检弹出框
  235. zijianopen:false,
  236. // 部门名称
  237. deptName: undefined,
  238. // 默认密码
  239. initPassword: undefined,
  240. // 日期范围
  241. dateRange: [],
  242. // 岗位选项
  243. postOptions: [],
  244. // 角色选项
  245. roleOptions: [],
  246. // 表单参数
  247. form: {},
  248. defaultProps: {
  249. children: "children",
  250. label: "label"
  251. },
  252. // 用户导入参数
  253. upload: {
  254. // 是否显示弹出层(用户导入)
  255. open: false,
  256. // 弹出层标题(用户导入)
  257. title: "",
  258. // 是否禁用上传
  259. isUploading: false,
  260. // 是否更新已经存在的用户数据
  261. updateSupport: 0,
  262. // 设置上传的请求头部
  263. headers: { Authorization: "Bearer " + getToken() },
  264. // 上传的地址
  265. url: process.env.VUE_APP_BASE_API + "/simulator/user/importData"
  266. },
  267. // 查询参数
  268. queryParams: {
  269. pageNum: 1,
  270. pageSize: 10,
  271. userName: undefined,
  272. phonenumber: undefined,
  273. status: undefined,
  274. deptId: undefined
  275. },
  276. // 列信息
  277. columns: [
  278. { key: 0, label: `考试名称`, visible: true },
  279. { key: 1, label: `考试时间`, visible: true },
  280. { key: 2, label: `模拟器类型`, visible: true },
  281. { key: 3, label: `考试状态`, visible: true },
  282. { key: 4, label: `创建老师`, visible: true },
  283. ],
  284. // 表单校验
  285. rules: {
  286. }
  287. };
  288. },
  289. watch: {
  290. // 根据名称筛选部门树
  291. deptName(val) {
  292. this.$refs.tree.filter(val);
  293. },
  294. },
  295. created() {
  296. this.getList();
  297. //this.getDeptTree();
  298. this.getConfigKey("sys.user.initPassword").then(response => {
  299. this.initPassword = response.msg;
  300. });
  301. },
  302. methods: {
  303. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  304. // console.log(this.selectedEquip+'@@@')
  305. //第一列型号
  306. if(columnIndex === 0) {
  307. if(this.selectedEquip==2){
  308. if(rowIndex==0){
  309. return { rowspan: 13, colspan: 1 };
  310. }
  311. return { rowspan: 0, colspan: 0 };
  312. }else if(this.selectedEquip==3){
  313. if(rowIndex==0){
  314. return { rowspan: 16, colspan: 1 };
  315. }
  316. return { rowspan: 0, colspan: 0};
  317. }else{
  318. if(rowIndex==0){
  319. return { rowspan: 11, colspan: 1 };
  320. }else if(rowIndex==11){
  321. return { rowspan: 13, colspan: 1 };
  322. }else if(rowIndex==24){
  323. return { rowspan: 16, colspan: 1 };
  324. }else{
  325. return { rowspan: 0, colspan: 0 };
  326. }
  327. }
  328. }
  329. //第二列故障现象
  330. if(columnIndex === 1) {
  331. if(this.selectedEquip==2){
  332. // console.log(rowIndex+'####')
  333. if(rowIndex<9 && rowIndex % 2 === 0){
  334. return { rowspan: 2, colspan: 1 };
  335. }else if((rowIndex>9&&rowIndex<13)){
  336. return { rowspan: 1, colspan: 1 };
  337. }else{
  338. return { rowspan: 0, colspan: 0 };
  339. }
  340. }else if(this.selectedEquip==3){
  341. if(rowIndex<7 && rowIndex % 2 === 0){
  342. return { rowspan: 2, colspan: 1 };
  343. }else if((rowIndex==8)){
  344. return { rowspan: 3, colspan: 1 };
  345. }else if(rowIndex==11){
  346. return { rowspan: 2, colspan: 1 };
  347. }else if(rowIndex>12 && rowIndex<16){
  348. return { rowspan: 1, colspan: 1 };
  349. }else{
  350. return { rowspan: 0, colspan: 0 };
  351. }
  352. }else{
  353. if(rowIndex<7 && rowIndex % 2 === 0){
  354. return { rowspan: 2, colspan: 1 };
  355. }else if((rowIndex>7&&rowIndex<11) || (rowIndex>20&&rowIndex<24) || (rowIndex>36)){
  356. return { rowspan: 1, colspan: 1 };
  357. }else if((rowIndex==35) || (rowIndex>10 && rowIndex<20) && rowIndex % 2 === 1){
  358. return { rowspan: 2, colspan: 1 };
  359. }else if(rowIndex>23 && rowIndex<32 && rowIndex % 2 === 0){
  360. return { rowspan: 2, colspan: 1 };
  361. }else if(rowIndex==32){
  362. return { rowspan: 3, colspan: 1 };
  363. }else{
  364. return { rowspan: 0, colspan: 0 };
  365. }
  366. }
  367. }
  368. //故障部位 和 选择
  369. if(columnIndex === 2 || columnIndex === 3){
  370. //return { rowspan: 1, colspan: 1 };
  371. }
  372. },
  373. objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
  374. //第二列故障现象
  375. if(columnIndex === 0) {
  376. if(rowIndex<7 && rowIndex % 2 === 0){
  377. return { rowspan: 2, colspan: 1 };
  378. }else if((rowIndex>7&&rowIndex<11) || (rowIndex>20&&rowIndex<24) || (rowIndex>36)){
  379. return { rowspan: 1, colspan: 1 };
  380. }else if((rowIndex==35) || (rowIndex>10 && rowIndex<20) && rowIndex % 2 === 1){
  381. return { rowspan: 2, colspan: 1 };
  382. }else if(rowIndex>23 && rowIndex<32 && rowIndex % 2 === 0){
  383. return { rowspan: 2, colspan: 1 };
  384. }else if(rowIndex==32){
  385. return { rowspan: 3, colspan: 1 };
  386. }else{
  387. return { rowspan: 0, colspan: 0 };
  388. }
  389. }
  390. },
  391. // 根据选择的option获取新的数据
  392. // getNewTableData(option) {
  393. // // 逻辑处理返回新的数据数组
  394. // return [
  395. // // ...新数据
  396. // ];
  397. // },
  398. toggleSelection(rows) {
  399. if (rows) {
  400. rows.forEach(row => {
  401. this.$refs.multipleTable.toggleRowSelection(row);
  402. console.log(row.ids+'###')
  403. console.log(row.name+'@@@')
  404. });
  405. } else {
  406. this.$refs.multipleTable.clearSelection();
  407. }
  408. },
  409. handleSelectionRow(val) {
  410. this.multipleSelection = val;
  411. },
  412. /** 查询用户列表 */
  413. getList() {
  414. this.loading = true;
  415. listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
  416. //将返回值注释
  417. this.userList = response.rows;
  418. this.total = response.total;
  419. this.loading = false;
  420. }
  421. );
  422. },
  423. /** 查询部门下拉树结构 */
  424. getDeptTree() {
  425. deptTreeSelect().then(response => {
  426. this.deptOptions = response.data;
  427. });
  428. },
  429. // 筛选节点
  430. filterNode(value, data) {
  431. if (!value) return true;
  432. return data.label.indexOf(value) !== -1;
  433. },
  434. // 节点单击事件
  435. handleNodeClick(data) {
  436. this.queryParams.deptId = data.id;
  437. this.handleQuery();
  438. },
  439. // 用户状态修改
  440. handleStatusChange(row) {
  441. let text = row.status === "0" ? "启用" : "停用";
  442. this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
  443. return changeUserStatus(row.userId, row.status);
  444. }).then(() => {
  445. this.$modal.msgSuccess(text + "成功");
  446. }).catch(function() {
  447. row.status = row.status === "0" ? "1" : "0";
  448. });
  449. },
  450. //清除故障
  451. clearFaultChange(row,number,nametext){
  452. console.log()
  453. // console.log(nametext+'###')
  454. // console.log(row[nametext]+'@@@')
  455. // console.log(row.name1+'@@@')
  456. let text1 = '清除所有模拟器故障';
  457. console.log(nametext + '###name1');
  458. if(nametext != 'all'){
  459. text1 = '清除'+ number +'号坐席模拟器故障';
  460. }
  461. this.$modal.confirm('确认要"' + text1 + '"吗?').then(function() {
  462. // return changeUserStatus(row.userId, row.status);
  463. }).then(() => {
  464. this.$modal.msgSuccess(text1 + "成功");
  465. }).catch(function() {
  466. // row.status = row.status === "0" ? "1" : "0";
  467. });
  468. },
  469. // 取消按钮
  470. cancel() {
  471. this.open = false;
  472. this.zijianopen = false;
  473. this.reset();
  474. },
  475. // 表单重置
  476. reset() {
  477. this.form = {
  478. userId: undefined,
  479. deptId: undefined,
  480. userName: undefined,
  481. password: undefined,
  482. phonenumber: undefined,
  483. email: undefined,
  484. sex: undefined,
  485. status: "0",
  486. remark: undefined,
  487. postIds: [],
  488. roleIds: []
  489. };
  490. this.resetForm("form");
  491. },
  492. /** 搜索按钮操作 */
  493. handleQuery() {
  494. this.queryParams.pageNum = 1;
  495. this.getList();
  496. },
  497. /** 重置按钮操作 */
  498. resetQuery() {
  499. this.dateRange = [];
  500. this.resetForm("queryForm");
  501. this.queryParams.deptId = undefined;
  502. this.$refs.tree.setCurrentKey(null);
  503. this.handleQuery();
  504. },
  505. // 多选框选中数据
  506. handleSelectionChange(selection) {
  507. this.ids = selection.map(item => item.userId);
  508. this.single = selection.length != 1;
  509. this.multiple = !selection.length;
  510. },
  511. // 更多操作触发
  512. handleCommand(command, row) {
  513. switch (command) {
  514. case "handleResetPwd":
  515. this.handleResetPwd(row);
  516. break;
  517. case "handleAuthRole":
  518. this.handleAuthRole(row);
  519. break;
  520. default:
  521. break;
  522. }
  523. },
  524. /** 新增按钮操作 */
  525. handleAdd() {
  526. this.reset();
  527. getUser().then(response => {
  528. this.postOptions = response.posts;
  529. this.roleOptions = response.roles;
  530. this.open = true;
  531. this.title = "新增训练任务";
  532. this.form.password = this.initPassword;
  533. });
  534. },
  535. /* 故障设置自检 **/
  536. handleInspect() {
  537. //this.reset();
  538. getUser().then(response => {
  539. //this.postOptions = response.posts;
  540. //this.roleOptions = response.roles;
  541. this.zijianopen = true;
  542. this.title = "故障设置自检";
  543. });
  544. },
  545. /** 修改按钮操作 */
  546. handleUpdate(row) {
  547. this.reset();
  548. const userId = row.userId || this.ids;
  549. getUser(userId).then(response => {
  550. this.form = response.data;
  551. this.postOptions = response.posts;
  552. this.roleOptions = response.roles;
  553. this.$set(this.form, "postIds", response.postIds);
  554. this.$set(this.form, "roleIds", response.roleIds);
  555. this.open = true;
  556. this.title = "修改用户";
  557. this.form.password = "";
  558. });
  559. },
  560. /** 重置密码按钮操作 */
  561. handleResetPwd(row) {
  562. this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
  563. confirmButtonText: "确定",
  564. cancelButtonText: "取消",
  565. closeOnClickModal: false,
  566. inputPattern: /^.{5,20}$/,
  567. inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
  568. inputValidator: (value) => {
  569. if (/<|>|"|'|\||\\/.test(value)) {
  570. return "不能包含非法字符:< > \" ' \\\ |"
  571. }
  572. },
  573. }).then(({ value }) => {
  574. resetUserPwd(row.userId, value).then(response => {
  575. this.$modal.msgSuccess("修改成功,新密码是:" + value);
  576. });
  577. }).catch(() => {});
  578. },
  579. /** 进入操作 */
  580. handleInto: function(row) {
  581. const userId = row.userId;
  582. console.log(userId)
  583. this.$router.push("/people/exam-exam1/examid/" + userId);
  584. },
  585. /** 提交按钮 */
  586. submitForm: function() {
  587. this.$refs["form"].validate(valid => {
  588. if (valid) {
  589. if (this.form.userId != undefined) {
  590. updateUser(this.form).then(response => {
  591. this.$modal.msgSuccess("修改成功");
  592. this.open = false;
  593. this.getList();
  594. });
  595. } else {
  596. addUser(this.form).then(response => {
  597. this.$modal.msgSuccess("新增成功");
  598. this.open = false;
  599. this.getList();
  600. });
  601. }
  602. }
  603. });
  604. },
  605. /** 删除按钮操作 */
  606. handleDelete(row) {
  607. const userIds = row.userId || this.ids;
  608. this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
  609. return delUser(userIds);
  610. }).then(() => {
  611. this.getList();
  612. this.$modal.msgSuccess("删除成功");
  613. }).catch(() => {});
  614. },
  615. //训练任务下发
  616. handleIssued(row) {
  617. const userIds = row.userId || this.ids;
  618. this.$modal.confirm('是否确定编号为"' + userIds + '"的训练任务?').then(function() {
  619. //return delUser(userIds);
  620. }).then(() => {
  621. this.getList();
  622. this.$modal.msgSuccess("删除成功");
  623. }).catch(() => {});
  624. },
  625. /** 导出按钮操作 */
  626. handleExport() {
  627. this.download('simulator/user/export', {
  628. ...this.queryParams
  629. }, `user_${new Date().getTime()}.xlsx`)
  630. },
  631. /** 导入按钮操作 */
  632. handleImport() {
  633. this.upload.title = "用户导入";
  634. this.upload.open = true;
  635. },
  636. /** 下载模板操作 */
  637. importTemplate() {
  638. this.download('simulator/user/importTemplate', {
  639. }, `user_template_${new Date().getTime()}.xlsx`)
  640. },
  641. // 文件上传中处理
  642. handleFileUploadProgress(event, file, fileList) {
  643. this.upload.isUploading = true;
  644. },
  645. // 文件上传成功处理
  646. handleFileSuccess(response, file, fileList) {
  647. this.upload.open = false;
  648. this.upload.isUploading = false;
  649. this.$refs.upload.clearFiles();
  650. this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
  651. this.getList();
  652. },
  653. // 提交上传文件
  654. submitFileForm() {
  655. this.$refs.upload.submit();
  656. }
  657. }
  658. };
  659. </script>