index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <template>
  2. <div class="app-container">
  3. <el-row :gutter="10">
  4. <!--机构数据-->
  5. <el-col :span="4" :xs="24">
  6. <org-tree
  7. v-model="queryParams.orgId"
  8. @defaultKey="getDefaultKey"
  9. @defaultOrg="getDefaultOrg"
  10. @checkChange="checkChange"
  11. @click="clickTreeNode"
  12. ></org-tree>
  13. </el-col>
  14. <el-col :span="20" :xs="24">
  15. <div class="main-right-box">
  16. <div class="main-search-box">
  17. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
  18. <el-form-item label="设备名称" prop="deviceName">
  19. <el-input v-model="queryParams.deviceName" placeholder="请输入关键字" maxlength="50"
  20. @keyup.enter.native="handleQuery" />
  21. </el-form-item>
  22. <el-form-item label="设备类别" prop="assetType" label-width="80">
  23. <el-select style="width: 100%;" v-model="queryParams.assetType" placeholder="请选择设备类别"
  24. @change="searchChangeSelectDevice">
  25. <el-option v-for="dict in dict.type.sys_asset_type" :key="dict.value" :label="dict.label"
  26. :value="`${dict.value}`"></el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item label="设备分类" prop="deviceType" label-width="80">
  30. <el-select style="width: 100%;" v-model="queryParams.deviceType" placeholder="请选择设备种类">
  31. <el-option v-for="item in searchDevices" :key="item.dictValue" :label="item.dictLabel"
  32. :value="item.dictValue"></el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-form>
  36. <el-row :gutter="10">
  37. <el-col :span="1.5">
  38. <el-button
  39. type="primary"
  40. icon="el-icon-search"
  41. size="mini"
  42. @click="handleQuery"
  43. >搜索</el-button
  44. >
  45. </el-col>
  46. <el-col :span="1.5">
  47. <el-button
  48. type="primary"
  49. icon="el-icon-refresh"
  50. size="mini"
  51. @click="resetQuery"
  52. >重置</el-button
  53. >
  54. </el-col>
  55. <el-col :span="1.5">
  56. <el-button
  57. type="primary"
  58. icon="el-icon-plus"
  59. size="mini"
  60. @click="handleAdd"
  61. v-hasPermi="['system:device:add']"
  62. >新增设备</el-button
  63. >
  64. </el-col>
  65. <el-col :span="1.5">
  66. <el-button
  67. type="primary"
  68. icon="el-icon-upload"
  69. size="mini"
  70. @click="handleImport"
  71. v-hasPermi="['system:device:importData']"
  72. >导入设备</el-button
  73. >
  74. </el-col>
  75. <el-col :span="1.5">
  76. <el-button
  77. type="primary"
  78. icon="el-icon-download"
  79. size="mini"
  80. @click="handleOut"
  81. v-hasPermi="['system:device:export']"
  82. >导出模版</el-button
  83. >
  84. </el-col>
  85. <right-toolbar
  86. :showSearch.sync="showSearch"
  87. @queryTable="getList"
  88. ></right-toolbar>
  89. </el-row>
  90. </div>
  91. <el-table
  92. border
  93. height="646"
  94. size="small"
  95. v-loading="loading"
  96. :data="deviceList"
  97. @selection-change="handleSelectionChange"
  98. >
  99. <!-- :header-cell-style="{backgroundColor:'#CCE8F7'}" -->
  100. <!--<el-table-column type="selection" width="55" align="center" />-->
  101. <el-table-column label="序号" align="center" min-width="50">
  102. <template v-slot:default="scope">
  103. <span v-text="getPageIndex(scope.$index)"> </span>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="所属机构" align="left" prop="orgName" />
  107. <el-table-column
  108. label="设备类别"
  109. align="center"
  110. key="assetType"
  111. prop="assetType"
  112. >
  113. <template slot-scope="scope">
  114. <dict-tag
  115. :options="dict.type.sys_asset_type"
  116. :value="scope.row.assetType"
  117. />
  118. </template>
  119. </el-table-column>
  120. <el-table-column
  121. label="设备分类"
  122. align="center"
  123. key="deviceType"
  124. prop="deviceType"
  125. >
  126. <template slot-scope="scope">
  127. <dict-tag
  128. :options="dict.type.sys_device_type"
  129. :value="scope.row.deviceType"
  130. />
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="设备名称" align="center" prop="deviceName" />
  134. <!-- <el-table-column label="设备品牌" align="center" prop="deviceBrand" />
  135. <el-table-column
  136. label="有效期至"
  137. align="center"
  138. prop="checkTime"
  139. width="160"
  140. >
  141. </el-table-column> -->
  142. <!-- <el-table-column label="保修期限" align="center" prop="maintenanceTerm" /> -->
  143. <el-table-column
  144. label="操作"
  145. align="left"
  146. class-name="small-padding fixed-width"
  147. >
  148. <template slot-scope="scope">
  149. <el-button
  150. size="mini"
  151. type="text"
  152. icon="el-icon-edit-outline"
  153. @click="handleUpdate(scope.row)"
  154. v-hasPermi="['system:device:edit']"
  155. >编辑</el-button>
  156. <el-button
  157. size="mini"
  158. type="text"
  159. icon="el-icon-delete"
  160. @click="handleDelete(scope.row)"
  161. v-hasPermi="['system:device:remove']"
  162. >删除</el-button>
  163. </template>
  164. </el-table-column>
  165. </el-table>
  166. <pagination
  167. :total="total"
  168. :page.sync="queryParams.pageNum"
  169. :limit.sync="queryParams.pageSize"
  170. @pagination="getList"
  171. />
  172. </div>
  173. </el-col>
  174. </el-row>
  175. <!-- 添加或修改【请填写功能名称】对话框 -->
  176. <DialogCom
  177. :title="title"
  178. :visible.sync="open"
  179. width="850px"
  180. @close="closeHandler"
  181. append-to-body
  182. >
  183. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  184. <el-row>
  185. <el-col :span="22">
  186. <el-form-item label="所属机构" prop="orgId">
  187. <tree-select
  188. v-model="form.orgId"
  189. :options="deptOptions"
  190. :show-count="true"
  191. :normalizer="tenantIdnormalizer"
  192. :props="{ checkStrictly: true, label: 'name' }"
  193. placeholder="请选择归属机构"
  194. @select="changeSelect"
  195. clearValueText="清除"
  196. :noChildrenText="''"
  197. noOptionsText="没有数据"
  198. noResultsText="没有搜索结果"
  199. />
  200. </el-form-item>
  201. </el-col>
  202. </el-row>
  203. <el-row>
  204. <el-col :span="12">
  205. <el-form-item label="设备类别" prop="assetType">
  206. <el-select
  207. style="width: 100%"
  208. v-model="form.assetType"
  209. placeholder="请选择设备类别"
  210. @change="changeSelectDevice"
  211. >
  212. <el-option
  213. v-for="dict in dict.type.sys_asset_type"
  214. :key="dict.value"
  215. :label="dict.label"
  216. :value="`${dict.value}`"
  217. ></el-option>
  218. </el-select>
  219. </el-form-item>
  220. </el-col>
  221. <el-col :span="12">
  222. <el-form-item label="设备分类" prop="deviceType">
  223. <el-select
  224. style="width: 100%"
  225. v-model="form.deviceType"
  226. placeholder="请选择设备分类"
  227. >
  228. <el-option
  229. v-for="item in devices"
  230. :key="item.dictValue"
  231. :label="item.dictLabel"
  232. :value="item.dictValue"
  233. ></el-option>
  234. </el-select>
  235. </el-form-item>
  236. </el-col>
  237. </el-row>
  238. <el-row>
  239. <el-col :span="12">
  240. <el-form-item label="设备名称" prop="deviceName">
  241. <el-input
  242. v-model="form.deviceName"
  243. placeholder="请输入设备名称"
  244. maxlength="50"
  245. />
  246. </el-form-item>
  247. </el-col>
  248. <el-col :span="12">
  249. <el-form-item label="设备品牌" prop="deviceBrand">
  250. <el-input v-model="form.deviceBrand" placeholder="请输入设备品牌" maxlength="50" />
  251. </el-form-item>
  252. </el-col>
  253. </el-row>
  254. <el-row>
  255. <el-col :span="12">
  256. <el-form-item
  257. v-if="form.deviceType == 2"
  258. label="硬盘录像机"
  259. prop="hostId"
  260. >
  261. <el-select
  262. style="width: 100%"
  263. v-model="form.hostId"
  264. placeholder="请选择关联主机"
  265. >
  266. <el-option
  267. v-for="item in hostList"
  268. :key="item.id"
  269. :label="item.deviceName"
  270. :value="item.id"
  271. ></el-option>
  272. </el-select>
  273. </el-form-item>
  274. </el-col>
  275. <el-col :span="12">
  276. <el-form-item
  277. v-if="form.deviceType == 2"
  278. label="通道号"
  279. prop="channel"
  280. >
  281. <el-input
  282. type="number"
  283. max="64"
  284. min="0"
  285. oninput="if(value<=0)value=null;if(value>=64)value=64;value=parseInt(value)"
  286. v-model="form.channel"
  287. placeholder="请输入关联通道号"
  288. />
  289. </el-form-item>
  290. </el-col>
  291. </el-row>
  292. <el-row>
  293. <el-col :span="12">
  294. <el-form-item
  295. v-if="form.assetType == 0"
  296. label="有效期至"
  297. prop="checkTime"
  298. >
  299. <el-date-picker
  300. style="width: 100%"
  301. clearable
  302. v-model="form.checkTime"
  303. type="date"
  304. value-format="yyyy-MM-dd HH:mm:ss"
  305. placeholder="请选择到期时间"
  306. >
  307. </el-date-picker>
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. <el-row> </el-row>
  312. </el-form>
  313. <div slot="footer" class="dialog-footer">
  314. <el-button type="primary" @click="submitForm">确 定</el-button>
  315. <el-button @click="cancel">取 消</el-button>
  316. </div>
  317. </DialogCom>
  318. <!-- 设备导入对话框 -->
  319. <DialogCom
  320. :title="upload.title"
  321. :visible.sync="upload.open"
  322. width="400px"
  323. append-to-body
  324. >
  325. <el-upload
  326. ref="upload"
  327. :limit="1"
  328. accept=".xlsx, .xls"
  329. :headers="upload.headers"
  330. :action="upload.url"
  331. :disabled="upload.isUploading"
  332. :on-progress="handleFileUploadProgress"
  333. :on-success="handleFileSuccess"
  334. :auto-upload="false"
  335. drag
  336. >
  337. <i class="el-icon-upload"></i>
  338. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  339. </el-upload>
  340. <div slot="footer" class="dialog-footer">
  341. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  342. <el-button @click="upload.open = false">取 消</el-button>
  343. </div>
  344. </DialogCom>
  345. </div>
  346. </template>
  347. <script>
  348. import { getToken } from "@/utils/auth";
  349. import orgDropDown from "../../../components/orgTree/orgDropDown.vue";
  350. import OrgTree from "@/components/orgTree";
  351. import tableList from "@/mixins/tableList";
  352. import treeselect from "@riophae/vue-treeselect";
  353. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  354. import { deptTreeSelect } from "@/api/system/public";
  355. import { getDeviceType } from "@/api/system/dict/data";
  356. import {
  357. listDevice,
  358. getDevice,
  359. delDevice,
  360. addDevice,
  361. updateDevice,
  362. getHostByOrgId,
  363. downInCharge,
  364. } from "@/api/system/device";
  365. export default {
  366. /** 引入基础minxins*/
  367. mixins: [tableList],
  368. dicts: ["sys_asset_type", "sys_device_type"],
  369. name: "Device",
  370. components: { OrgTree, treeselect, orgDropDown },
  371. data() {
  372. return {
  373. checkList: [],
  374. roleOptions: [],
  375. defaultKeys: [],
  376. //是否关联下级
  377. checked: false,
  378. defaultProps: {
  379. children: "children",
  380. label: "name",
  381. },
  382. rules: {
  383. deviceName: [
  384. { required: true, message: "请输入设备名称", trigger: "change" },
  385. ],
  386. orgId: [{ required: true, message: "请选择所属机构", trigger: "blur" }],
  387. assetType: [
  388. { required: true, message: '请选择资产类别', trigger: 'change' },
  389. ],
  390. hostId: [{ required: true, message: '请选择主机', trigger: 'change' }],
  391. channel: [{ required: true, message: '请输入通道号', trigger: 'change' }],
  392. deviceType: [
  393. { required: true, message: "请选择设备分类", trigger: "change" },
  394. ],
  395. checkTime: [
  396. { required: true, message: "请选择有效期", trigger: "blur" },
  397. ],
  398. },
  399. // 遮罩层
  400. loading: true,
  401. // 选中数组
  402. ids: [],
  403. // 非单个停用
  404. single: true,
  405. //搜索tree
  406. deptName: null,
  407. // 非多个停用
  408. multiple: true,
  409. // 显示搜索条件
  410. showSearch: true,
  411. // 总条数
  412. total: 0,
  413. inparm: 0,
  414. // 【请填写功能名称】表格数据
  415. deviceList: [],
  416. devices: null,
  417. searchDevices:null,
  418. //主机集合
  419. hostList: [],
  420. deviceType: 0,
  421. // 弹出层标题
  422. title: "",
  423. // 是否显示弹出层
  424. open: false,
  425. // 查询参数
  426. dept: {
  427. id: null,
  428. },
  429. queryParams: {
  430. pageNum: 1,
  431. pageSize: 10,
  432. orgId: null,
  433. orgName: null,
  434. deviceName: null,
  435. assetType: null,
  436. deviceType: null,
  437. deviceBrand: null,
  438. checkTime: null,
  439. maintenanceTerm: null,
  440. hostId: null,
  441. channel: null,
  442. checkSub: true,
  443. },
  444. // 设备导入参数
  445. upload: {
  446. // 是否显示弹出层(用户导入)
  447. open: false,
  448. // 弹出层标题(用户导入)
  449. title: "",
  450. // 是否停用上传
  451. isUploading: false,
  452. // 设置上传的请求头部
  453. headers: { Authorization: "Bearer " + getToken() },
  454. // 上传的地址
  455. url:
  456. process.env.NODE_ENV === "development"
  457. ? process.env.VUE_APP_BASE_API + "/system/device/importData"
  458. : window.origin + "/system/device/importData",
  459. },
  460. // 表单参数
  461. form: {
  462. orgId: null,
  463. deviceName: null,
  464. assetType: null,
  465. deviceType: null,
  466. deviceBrand: null,
  467. checkTime: null,
  468. maintenanceTerm: null,
  469. hostId: null,
  470. channel: null,
  471. },
  472. // 表单校验
  473. //修改新增中的机构树
  474. deptOptions: [],
  475. selectOrgId: null,
  476. };
  477. },
  478. created() {
  479. this.getDeptTree();
  480. //this.getList();
  481. this.searchChangeSelectDevice(1);
  482. },
  483. watch: {
  484. // 根据名称筛选部门树
  485. deptName(val) {
  486. this.$refs.tree.filter(val);
  487. },
  488. },
  489. methods: {
  490. onOrgSelect(node) {
  491. this.form.orgPath = node.path;
  492. this.form.orgName = node.name;
  493. },
  494. // 文件上传中处理
  495. handleFileUploadProgress(event, file, fileList) {
  496. this.upload.isUploading = true;
  497. },
  498. handleImport() {
  499. this.upload.title = "设备导入";
  500. this.upload.open = true;
  501. },
  502. // 文件上传成功处理
  503. handleFileSuccess(response, file, fileList) {
  504. this.upload.open = false;
  505. this.upload.isUploading = false;
  506. this.$refs.upload.clearFiles();
  507. this.$alert(
  508. "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
  509. response.msg +
  510. "</div>",
  511. "导入结果",
  512. { dangerouslyUseHTMLString: true }
  513. );
  514. this.getList();
  515. },
  516. getDefaultOrg(org) {
  517. this.orgName = org.name;
  518. },
  519. getDefaultKey(key) {
  520. this.queryParams.orgId = key;
  521. this.getList();
  522. },
  523. //单选框状态改变
  524. checkChange(state) {
  525. this.queryParams.checkSub = state;
  526. this.handleQuery();
  527. },
  528. getPageIndex($index) {
  529. //表格序号
  530. return (
  531. (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
  532. );
  533. },
  534. /** 下穿状态改变*/
  535. changeCheckBox() {
  536. this.getList();
  537. },
  538. // 筛选节点
  539. filterNode(value, data) {
  540. if (!value) return true;
  541. return data.name.indexOf(value) !== -1;
  542. },
  543. /** 查询机构树数据 */
  544. // 节点单击事件
  545. handleNodeClick(data) {
  546. this.queryParams.orgId = data.id;
  547. this.selectOrgId = data.id;
  548. this.changeSelect(data);
  549. this.handleQuery();
  550. },
  551. changeSelect(val) {
  552. getHostByOrgId(val).then((response) => {
  553. this.form.hostId = null;
  554. this.hostList = response.data;
  555. });
  556. },
  557. handleOut() {
  558. this.download(
  559. "system/device/downInChargeOfTemplate",
  560. {
  561. ...this.queryParams,
  562. },
  563. `${
  564. this.orgName + "-设备导入模版-" + this.formatTime(new Date(), "YYYYMMhh")
  565. }.xlsx`
  566. );
  567. },
  568. /** 查询【请填写功能名称】列表 */
  569. getList() {
  570. this.loading = true;
  571. listDevice(this.queryParams).then((response) => {
  572. this.deviceList = response.rows;
  573. this.total = response.total;
  574. this.loading = false;
  575. });
  576. },
  577. /** 查询部门下拉树结构 */
  578. getDeptTree() {
  579. deptTreeSelect().then((response) => {
  580. this.deptOptions = response.data;
  581. this.defaultKeys.push(response.data[0].id);
  582. this.queryParams.orgId = response.data[0].id;
  583. this.selectOrgId = response.data[0].id;
  584. this.handleQuery();
  585. });
  586. },
  587. // 节点单击事件
  588. clickTreeNode(data) {
  589. this.queryParams.orgId = data.id;
  590. this.handleQuery();
  591. },
  592. /** treeSelect组件自定义数据*/
  593. tenantIdnormalizer(node, instanceId) {
  594. if (node.children && !node.children.length) {
  595. delete node.children;
  596. }
  597. return {
  598. id: node.id,
  599. label: node.shortName,
  600. children: node.children,
  601. };
  602. },
  603. // 取消按钮
  604. cancel() {
  605. this.open = false;
  606. this.reset();
  607. },
  608. closeHandler() {
  609. this.reset();
  610. },
  611. // 表单重置
  612. reset() {
  613. this.form = {
  614. id: null,
  615. orgId: null,
  616. orgName: null,
  617. deviceName: null,
  618. assetType: null,
  619. deviceType: null,
  620. deviceBrand: null,
  621. checkTime: null,
  622. maintenanceTerm: null,
  623. createTime: null,
  624. updateTime: null,
  625. createBy: null,
  626. updateBy: null,
  627. delFlag: null,
  628. hostId: null,
  629. channel: null,
  630. };
  631. this.resetForm("form");
  632. },
  633. /** 搜索按钮操作 */
  634. handleQuery() {
  635. this.queryParams.pageNum = 1;
  636. this.getList();
  637. },
  638. /** 重置按钮操作 */
  639. resetQuery() {
  640. this.devices = null;
  641. this.searchDevices=null;
  642. this.resetForm("queryForm");
  643. this.handleQuery();
  644. },
  645. // 多选框选中数据
  646. handleSelectionChange(selection) {
  647. this.ids = selection.map((item) => item.id);
  648. this.names = selection.map((item) => item.deviceName);
  649. this.single = selection.length !== 1;
  650. this.multiple = !selection.length;
  651. },
  652. /** 新增按钮操作 */
  653. handleAdd(val) {
  654. this.open = true;
  655. this.title = "新增设备信息";
  656. this.form.orgId = this.selectOrgId;
  657. this.dept.id = this.selectOrgId;
  658. this.changeSelect(this.dept);
  659. this.devices = null;
  660. },
  661. changeSelectDevice(val) {
  662. if (val) {
  663. getDeviceType(val).then((response) => {
  664. this.devices = response.data;
  665. this.form.deviceType = null;
  666. this.queryParams.deviceType = null;
  667. });
  668. }
  669. },
  670. searchChangeSelectDevice(val) {
  671. if (val) {
  672. getDeviceType(val).then(response => {
  673. this.searchDevices = response.data;
  674. this.form.deviceType = null;
  675. this.queryParams.deviceType = null;
  676. })
  677. }
  678. },
  679. /** 修改按钮操作 */
  680. handleUpdate(row) {
  681. this.reset();
  682. const id = row.id || this.ids;
  683. getDevice(id).then((response) => {
  684. this.form = response.data;
  685. this.devices = response.devices;
  686. this.hostList = response.hostList;
  687. this.open = true;
  688. this.title = "编辑设备信息";
  689. });
  690. },
  691. /** 提交按钮 */
  692. submitForm() {
  693. this.$refs["form"].validate((valid) => {
  694. if (valid) {
  695. if (this.form.id != null) {
  696. updateDevice(this.form).then((response) => {
  697. this.$modal.msgSuccess("处理成功");
  698. this.open = false;
  699. this.getList();
  700. });
  701. } else {
  702. addDevice(this.form).then((response) => {
  703. this.$modal.msgSuccess("处理成功");
  704. this.open = false;
  705. this.getList();
  706. });
  707. }
  708. }
  709. });
  710. },
  711. /** 删除按钮操作 */
  712. handleDelete(row) {
  713. const ids = row.id || this.ids;
  714. const names = row.deviceName || this.names;
  715. this.$modal
  716. .confirm('是否确认删除名称为"' + names + '"的数据项?')
  717. .then(function () {
  718. return delDevice(ids);
  719. })
  720. .then(() => {
  721. this.getList();
  722. this.$modal.msgSuccess("删除成功");
  723. })
  724. .catch(() => {});
  725. },
  726. // 提交上传文件
  727. submitFileForm() {
  728. this.$refs.upload.submit();
  729. },
  730. /** 导出按钮操作 */
  731. handleExport() {
  732. this.download(
  733. "system/device/export",
  734. {
  735. ...this.queryParams,
  736. },
  737. `device_${new Date().getTime()}.xlsx`
  738. );
  739. },
  740. },
  741. };
  742. </script>