index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  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" clearable>
  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%;" clearable 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="center"
  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="24">
  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. :popper-append-to-body="false"
  210. placeholder="请选择设备类别"
  211. @change="changeSelectDevice"
  212. >
  213. <el-option
  214. v-for="dict in dict.type.sys_asset_type"
  215. :key="dict.value"
  216. :label="dict.label"
  217. :value="`${dict.value}`"
  218. ></el-option>
  219. </el-select>
  220. </el-form-item>
  221. </el-col>
  222. <el-col :span="12">
  223. <el-form-item label="设备分类" prop="deviceType">
  224. <el-select
  225. style="width: 100%"
  226. :popper-append-to-body="false"
  227. v-model="form.deviceType"
  228. placeholder="请选择设备分类"
  229. >
  230. <el-option
  231. v-for="item in devices"
  232. :key="item.dictValue"
  233. :label="item.dictLabel"
  234. :value="item.dictValue"
  235. ></el-option>
  236. </el-select>
  237. </el-form-item>
  238. </el-col>
  239. </el-row>
  240. <el-row>
  241. <el-col :span="12">
  242. <el-form-item label="设备名称" prop="deviceName">
  243. <el-input
  244. v-model="form.deviceName"
  245. placeholder="请输入设备名称"
  246. maxlength="50"
  247. />
  248. </el-form-item>
  249. </el-col>
  250. <el-col :span="12">
  251. <el-form-item label="设备品牌" prop="deviceBrand">
  252. <el-input v-model="form.deviceBrand" placeholder="请输入设备品牌" maxlength="50" />
  253. </el-form-item>
  254. </el-col>
  255. </el-row>
  256. <el-row>
  257. <el-col :span="12">
  258. <el-form-item
  259. v-if="form.deviceType == 2"
  260. label="硬盘录像机"
  261. prop="hostId"
  262. >
  263. <el-select
  264. style="width: 100%"
  265. v-model="form.hostId"
  266. placeholder="请选择关联主机"
  267. >
  268. <el-option
  269. v-for="item in hostList"
  270. :key="item.id"
  271. :label="item.deviceName"
  272. :value="item.id"
  273. ></el-option>
  274. </el-select>
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="12">
  278. <el-form-item
  279. v-if="form.deviceType == 2"
  280. label="通道号"
  281. prop="channel"
  282. >
  283. <el-input
  284. type="number"
  285. max="64"
  286. min="0"
  287. oninput="if(value<=0)value=null;if(value>=64)value=64;value=parseInt(value)"
  288. v-model="form.channel"
  289. placeholder="请输入关联通道号"
  290. />
  291. </el-form-item>
  292. </el-col>
  293. <el-col :span="12">
  294. <el-form-item label="是否高清" v-if="form.deviceType == 2" >
  295. <el-switch v-model="form.definition" active-value="1" inactive-value="0"></el-switch>
  296. </el-form-item>
  297. </el-col>
  298. </el-row>
  299. <el-row>
  300. <el-col :span="12">
  301. <el-form-item
  302. v-if="form.assetType == 0"
  303. label="有效期至"
  304. prop="checkTime"
  305. >
  306. <el-date-picker
  307. style="width: 100%"
  308. clearable
  309. v-model="form.checkTime"
  310. type="date"
  311. value-format="yyyy-MM-dd"
  312. placeholder="请选择到期时间"
  313. >
  314. </el-date-picker>
  315. </el-form-item>
  316. </el-col>
  317. </el-row>
  318. <el-row> </el-row>
  319. </el-form>
  320. <div slot="footer" class="dialog-footer">
  321. <el-button type="primary" @click="submitForm">确 定</el-button>
  322. <el-button @click="cancel">取 消</el-button>
  323. </div>
  324. </DialogCom>
  325. <!-- 设备导入对话框 -->
  326. <DialogCom
  327. :title="upload.title"
  328. :visible.sync="upload.open"
  329. width="400px"
  330. append-to-body
  331. >
  332. <el-upload
  333. ref="upload"
  334. :limit="1"
  335. accept=".xlsx, .xls"
  336. :headers="upload.headers"
  337. :action="upload.url"
  338. :disabled="upload.isUploading"
  339. :on-progress="handleFileUploadProgress"
  340. :on-success="handleFileSuccess"
  341. :auto-upload="false"
  342. drag
  343. >
  344. <i class="el-icon-upload"></i>
  345. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  346. </el-upload>
  347. <div slot="footer" class="dialog-footer">
  348. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  349. <el-button @click="upload.open = false">取 消</el-button>
  350. </div>
  351. </DialogCom>
  352. </div>
  353. </template>
  354. <script>
  355. import { getToken } from "@/utils/auth";
  356. import orgDropDown from "../../../components/orgTree/orgDropDown.vue";
  357. import OrgTree from "@/components/orgTree";
  358. import tableList from "@/mixins/tableList";
  359. import { deptTreeSelect } from "@/api/system/public";
  360. import { getDeviceType } from "@/api/system/dict/data";
  361. import {
  362. listDevice,
  363. getDevice,
  364. delDevice,
  365. addDevice,
  366. updateDevice,
  367. getHostByOrgId,
  368. getDeviceByHost,
  369. downInCharge,
  370. } from "@/api/system/device";
  371. export default {
  372. /** 引入基础minxins*/
  373. mixins: [tableList],
  374. dicts: ["sys_asset_type", "sys_device_type"],
  375. name: "Device",
  376. components: { OrgTree, orgDropDown },
  377. data() {
  378. return {
  379. checkList: [],
  380. roleOptions: [],
  381. defaultKeys: [],
  382. //是否关联下级
  383. checked: false,
  384. defaultProps: {
  385. children: "children",
  386. label: "name",
  387. },
  388. rules: {
  389. deviceName: [
  390. { required: true, message: "请输入设备名称", trigger: "change" },
  391. ],
  392. orgId: [{ required: true, message: "请选择所属机构", trigger: "blur" }],
  393. assetType: [
  394. { required: true, message: '请选择资产类别', trigger: 'change' },
  395. ],
  396. hostId: [{ required: true, message: '请选择主机', trigger: 'change' }],
  397. channel: [{ required: true, message: '请输入通道号', trigger: 'change' }],
  398. deviceType: [
  399. { required: true, message: "请选择设备分类", trigger: "change" },
  400. ],
  401. checkTime: [
  402. { required: true, message: "请选择有效期", trigger: "blur" },
  403. ],
  404. },
  405. // 遮罩层
  406. loading: true,
  407. // 选中数组
  408. ids: [],
  409. // 非单个停用
  410. single: true,
  411. //搜索tree
  412. deptName: null,
  413. // 非多个停用
  414. multiple: true,
  415. // 显示搜索条件
  416. showSearch: true,
  417. // 总条数
  418. total: 0,
  419. inparm: 0,
  420. // 【请填写功能名称】表格数据
  421. deviceList: [],
  422. devices: null,
  423. searchDevices:null,
  424. //主机集合
  425. hostList: [],
  426. deviceType: 0,
  427. // 弹出层标题
  428. title: "",
  429. // 是否显示弹出层
  430. open: false,
  431. // 查询参数
  432. dept: {
  433. id: null,
  434. },
  435. queryParams: {
  436. pageNum: 1,
  437. pageSize: 10,
  438. orgId: null,
  439. orgName: null,
  440. deviceName: null,
  441. assetType: null,
  442. deviceType: null,
  443. deviceBrand: null,
  444. checkTime: null,
  445. maintenanceTerm: null,
  446. hostId: null,
  447. channel: null,
  448. checkSub: true,
  449. },
  450. // 设备导入参数
  451. upload: {
  452. // 是否显示弹出层(用户导入)
  453. open: false,
  454. // 弹出层标题(用户导入)
  455. title: "",
  456. // 是否停用上传
  457. isUploading: false,
  458. // 设置上传的请求头部
  459. headers: { Authorization: "Bearer " + getToken() },
  460. // 上传的地址
  461. url:
  462. process.env.NODE_ENV === "development"
  463. ? process.env.VUE_APP_BASE_API + "/system/device/importData"
  464. : window.origin + "/system/device/importData",
  465. },
  466. // 表单参数
  467. form: {
  468. orgId: null,
  469. deviceName: null,
  470. assetType: null,
  471. deviceType: null,
  472. deviceBrand: null,
  473. checkTime: null,
  474. maintenanceTerm: null,
  475. hostId: null,
  476. channel: null,
  477. definition:"1",
  478. },
  479. // 表单校验
  480. //修改新增中的机构树
  481. deptOptions: [],
  482. selectOrgId: null,
  483. };
  484. },
  485. created() {
  486. this.getDeptTree();
  487. //this.getList();
  488. this.searchChangeSelectDevice(1);
  489. },
  490. watch: {
  491. // 根据名称筛选部门树
  492. deptName(val) {
  493. this.$refs.tree.filter(val);
  494. },
  495. },
  496. methods: {
  497. onOrgSelect(node) {
  498. this.form.orgPath = node.path;
  499. this.form.orgName = node.name;
  500. },
  501. // 文件上传中处理
  502. handleFileUploadProgress(event, file, fileList) {
  503. this.upload.isUploading = true;
  504. },
  505. handleImport() {
  506. this.upload.title = "设备导入";
  507. this.upload.open = true;
  508. },
  509. // 文件上传成功处理
  510. handleFileSuccess(response, file, fileList) {
  511. this.upload.open = false;
  512. this.upload.isUploading = false;
  513. this.$refs.upload.clearFiles();
  514. this.$alert(
  515. "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
  516. response.msg +
  517. "</div>",
  518. "导入结果",
  519. { dangerouslyUseHTMLString: true }
  520. );
  521. this.getList();
  522. },
  523. getDefaultOrg(org) {
  524. this.orgName = org.name;
  525. },
  526. getDefaultKey(key) {
  527. this.queryParams.orgId = key;
  528. this.getList();
  529. },
  530. //单选框状态改变
  531. checkChange(state) {
  532. this.queryParams.checkSub = state;
  533. this.handleQuery();
  534. },
  535. getPageIndex($index) {
  536. //表格序号
  537. return (
  538. (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
  539. );
  540. },
  541. /** 下穿状态改变*/
  542. changeCheckBox() {
  543. this.getList();
  544. },
  545. // 筛选节点
  546. filterNode(value, data) {
  547. if (!value) return true;
  548. return data.name.indexOf(value) !== -1;
  549. },
  550. /** 查询机构树数据 */
  551. // 节点单击事件
  552. handleNodeClick(data) {
  553. this.queryParams.orgId = data.id;
  554. this.selectOrgId = data.id;
  555. this.changeSelect(data);
  556. this.handleQuery();
  557. },
  558. changeSelect(val) {
  559. getHostByOrgId(val).then((response) => {
  560. this.form.hostId = null;
  561. this.hostList = response.data;
  562. });
  563. },
  564. handleOut() {
  565. this.download(
  566. "system/device/downInChargeOfTemplate",
  567. {
  568. ...this.queryParams,
  569. },
  570. `${
  571. this.orgName + "-设备导入模版-" + this.formatTime(new Date(), "YYYYMMhh")
  572. }.xlsx`
  573. );
  574. },
  575. /** 查询【请填写功能名称】列表 */
  576. getList() {
  577. this.loading = true;
  578. listDevice(this.queryParams).then((response) => {
  579. this.deviceList = response.rows;
  580. this.total = response.total;
  581. this.loading = false;
  582. });
  583. },
  584. /** 查询部门下拉树结构 */
  585. getDeptTree() {
  586. deptTreeSelect().then((response) => {
  587. this.deptOptions = response.data;
  588. this.defaultKeys.push(response.data[0].id);
  589. this.queryParams.orgId = response.data[0].id;
  590. this.selectOrgId = response.data[0].id;
  591. this.handleQuery();
  592. });
  593. },
  594. // 节点单击事件
  595. clickTreeNode(data) {
  596. this.queryParams.orgId = data.id;
  597. this.handleQuery();
  598. },
  599. /** treeSelect组件自定义数据*/
  600. tenantIdnormalizer(node, instanceId) {
  601. if (node.children && !node.children.length) {
  602. delete node.children;
  603. }
  604. return {
  605. id: node.id,
  606. label: node.shortName,
  607. children: node.children,
  608. };
  609. },
  610. // 取消按钮
  611. cancel() {
  612. this.open = false;
  613. this.reset();
  614. },
  615. closeHandler() {
  616. this.reset();
  617. },
  618. // 表单重置
  619. reset() {
  620. this.form = {
  621. id: null,
  622. orgId: null,
  623. orgName: null,
  624. deviceName: null,
  625. assetType: null,
  626. deviceType: null,
  627. deviceBrand: null,
  628. checkTime: null,
  629. maintenanceTerm: null,
  630. createTime: null,
  631. updateTime: null,
  632. createBy: null,
  633. updateBy: null,
  634. delFlag: null,
  635. hostId: null,
  636. channel: null,
  637. definition:"1",
  638. };
  639. this.resetForm("form");
  640. },
  641. /** 搜索按钮操作 */
  642. handleQuery() {
  643. this.queryParams.pageNum = 1;
  644. this.getList();
  645. },
  646. /** 重置按钮操作 */
  647. resetQuery() {
  648. this.devices = null;
  649. this.searchDevices=null;
  650. this.resetForm("queryForm");
  651. this.handleQuery();
  652. },
  653. // 多选框选中数据
  654. handleSelectionChange(selection) {
  655. this.ids = selection.map((item) => item.id);
  656. this.names = selection.map((item) => item.deviceName);
  657. this.single = selection.length !== 1;
  658. this.multiple = !selection.length;
  659. },
  660. /** 新增按钮操作 */
  661. handleAdd(val) {
  662. this.open = true;
  663. this.title = "新增设备信息";
  664. this.form.orgId = this.selectOrgId;
  665. this.dept.id = this.selectOrgId;
  666. this.changeSelect(this.dept);
  667. this.devices = null;
  668. },
  669. changeSelectDevice(val) {
  670. if (val) {
  671. getDeviceType(val).then((response) => {
  672. this.devices = response.data;
  673. this.form.deviceType = null;
  674. this.queryParams.deviceType = null;
  675. });
  676. }
  677. },
  678. searchChangeSelectDevice(val) {
  679. if (val) {
  680. getDeviceType(val).then(response => {
  681. this.searchDevices = response.data;
  682. this.form.deviceType = null;
  683. this.queryParams.deviceType = null;
  684. })
  685. }
  686. },
  687. /** 修改按钮操作 */
  688. handleUpdate(row) {
  689. this.reset();
  690. const id = row.id || this.ids;
  691. getDevice(id).then((response) => {
  692. this.form = response.data;
  693. this.devices = response.devices;
  694. this.hostList = response.hostList;
  695. this.open = true;
  696. this.title = "编辑设备信息";
  697. });
  698. },
  699. /** 提交按钮 */
  700. submitForm() {
  701. this.$refs["form"].validate((valid) => {
  702. if (valid) {
  703. if (this.form.id != null) {
  704. updateDevice(this.form).then((response) => {
  705. this.$modal.msgSuccess("处理成功");
  706. this.open = false;
  707. this.getList();
  708. });
  709. } else {
  710. addDevice(this.form).then((response) => {
  711. this.$modal.msgSuccess("处理成功");
  712. this.open = false;
  713. this.getList();
  714. });
  715. }
  716. }
  717. });
  718. },
  719. /** 删除按钮操作 */
  720. handleDelete(row) {
  721. const ids = row.id || this.ids;
  722. const names = row.deviceName || this.names;
  723. this.$modal
  724. .confirm('是否确认删除名称为"' + names + '"的数据项?')
  725. .then(function () {
  726. return delDevice(ids);
  727. })
  728. .then(() => {
  729. this.getList();
  730. this.$modal.msgSuccess("删除成功");
  731. })
  732. .catch(() => {});
  733. },
  734. // 提交上传文件
  735. submitFileForm() {
  736. this.$refs.upload.submit();
  737. },
  738. /** 导出按钮操作 */
  739. handleExport() {
  740. this.download(
  741. "system/device/export",
  742. {
  743. ...this.queryParams,
  744. },
  745. `device_${new Date().getTime()}.xlsx`
  746. );
  747. },
  748. },
  749. };
  750. </script>
  751. <style lang="scss">
  752. //.vue-treeselect--has-value .vue-treeselect__input {
  753. // line-height: 100%;
  754. // vertical-align: middle;
  755. //}
  756. </style>