index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  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="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. downInCharge,
  369. } from "@/api/system/device";
  370. export default {
  371. /** 引入基础minxins*/
  372. mixins: [tableList],
  373. dicts: ["sys_asset_type", "sys_device_type"],
  374. name: "Device",
  375. components: { OrgTree, orgDropDown },
  376. data() {
  377. return {
  378. checkList: [],
  379. roleOptions: [],
  380. defaultKeys: [],
  381. //是否关联下级
  382. checked: false,
  383. defaultProps: {
  384. children: "children",
  385. label: "name",
  386. },
  387. rules: {
  388. deviceName: [
  389. { required: true, message: "请输入设备名称", trigger: "change" },
  390. ],
  391. orgId: [{ required: true, message: "请选择所属机构", trigger: "blur" }],
  392. assetType: [
  393. { required: true, message: '请选择资产类别', trigger: 'change' },
  394. ],
  395. hostId: [{ required: true, message: '请选择主机', trigger: 'change' }],
  396. channel: [{ required: true, message: '请输入通道号', trigger: 'change' }],
  397. deviceType: [
  398. { required: true, message: "请选择设备分类", trigger: "change" },
  399. ],
  400. checkTime: [
  401. { required: true, message: "请选择有效期", trigger: "blur" },
  402. ],
  403. },
  404. // 遮罩层
  405. loading: true,
  406. // 选中数组
  407. ids: [],
  408. // 非单个停用
  409. single: true,
  410. //搜索tree
  411. deptName: null,
  412. // 非多个停用
  413. multiple: true,
  414. // 显示搜索条件
  415. showSearch: true,
  416. // 总条数
  417. total: 0,
  418. inparm: 0,
  419. // 【请填写功能名称】表格数据
  420. deviceList: [],
  421. devices: null,
  422. searchDevices:null,
  423. //主机集合
  424. hostList: [],
  425. deviceType: 0,
  426. // 弹出层标题
  427. title: "",
  428. // 是否显示弹出层
  429. open: false,
  430. // 查询参数
  431. dept: {
  432. id: null,
  433. },
  434. queryParams: {
  435. pageNum: 1,
  436. pageSize: 10,
  437. orgId: null,
  438. orgName: null,
  439. deviceName: null,
  440. assetType: null,
  441. deviceType: null,
  442. deviceBrand: null,
  443. checkTime: null,
  444. maintenanceTerm: null,
  445. hostId: null,
  446. channel: null,
  447. checkSub: true,
  448. },
  449. // 设备导入参数
  450. upload: {
  451. // 是否显示弹出层(用户导入)
  452. open: false,
  453. // 弹出层标题(用户导入)
  454. title: "",
  455. // 是否停用上传
  456. isUploading: false,
  457. // 设置上传的请求头部
  458. headers: { Authorization: "Bearer " + getToken() },
  459. // 上传的地址
  460. url:
  461. process.env.NODE_ENV === "development"
  462. ? process.env.VUE_APP_BASE_API + "/system/device/importData"
  463. : window.origin + "/system/device/importData",
  464. },
  465. // 表单参数
  466. form: {
  467. orgId: null,
  468. deviceName: null,
  469. assetType: null,
  470. deviceType: null,
  471. deviceBrand: null,
  472. checkTime: null,
  473. maintenanceTerm: null,
  474. hostId: null,
  475. channel: null,
  476. definition:"1",
  477. },
  478. // 表单校验
  479. //修改新增中的机构树
  480. deptOptions: [],
  481. selectOrgId: null,
  482. };
  483. },
  484. created() {
  485. this.getDeptTree();
  486. //this.getList();
  487. this.searchChangeSelectDevice(1);
  488. },
  489. watch: {
  490. // 根据名称筛选部门树
  491. deptName(val) {
  492. this.$refs.tree.filter(val);
  493. },
  494. },
  495. methods: {
  496. onOrgSelect(node) {
  497. this.form.orgPath = node.path;
  498. this.form.orgName = node.name;
  499. },
  500. // 文件上传中处理
  501. handleFileUploadProgress(event, file, fileList) {
  502. this.upload.isUploading = true;
  503. },
  504. handleImport() {
  505. this.upload.title = "设备导入";
  506. this.upload.open = true;
  507. },
  508. // 文件上传成功处理
  509. handleFileSuccess(response, file, fileList) {
  510. this.upload.open = false;
  511. this.upload.isUploading = false;
  512. this.$refs.upload.clearFiles();
  513. this.$alert(
  514. "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
  515. response.msg +
  516. "</div>",
  517. "导入结果",
  518. { dangerouslyUseHTMLString: true }
  519. );
  520. this.getList();
  521. },
  522. getDefaultOrg(org) {
  523. this.orgName = org.name;
  524. },
  525. getDefaultKey(key) {
  526. this.queryParams.orgId = key;
  527. this.getList();
  528. },
  529. //单选框状态改变
  530. checkChange(state) {
  531. this.queryParams.checkSub = state;
  532. this.handleQuery();
  533. },
  534. getPageIndex($index) {
  535. //表格序号
  536. return (
  537. (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
  538. );
  539. },
  540. /** 下穿状态改变*/
  541. changeCheckBox() {
  542. this.getList();
  543. },
  544. // 筛选节点
  545. filterNode(value, data) {
  546. if (!value) return true;
  547. return data.name.indexOf(value) !== -1;
  548. },
  549. /** 查询机构树数据 */
  550. // 节点单击事件
  551. handleNodeClick(data) {
  552. this.queryParams.orgId = data.id;
  553. this.selectOrgId = data.id;
  554. this.changeSelect(data);
  555. this.handleQuery();
  556. },
  557. changeSelect(val) {
  558. getHostByOrgId(val).then((response) => {
  559. this.form.hostId = null;
  560. this.hostList = response.data;
  561. });
  562. },
  563. handleOut() {
  564. this.download(
  565. "system/device/downInChargeOfTemplate",
  566. {
  567. ...this.queryParams,
  568. },
  569. `${
  570. this.orgName + "-设备导入模版-" + this.formatTime(new Date(), "YYYYMMhh")
  571. }.xlsx`
  572. );
  573. },
  574. /** 查询【请填写功能名称】列表 */
  575. getList() {
  576. this.loading = true;
  577. listDevice(this.queryParams).then((response) => {
  578. this.deviceList = response.rows;
  579. this.total = response.total;
  580. this.loading = false;
  581. });
  582. },
  583. /** 查询部门下拉树结构 */
  584. getDeptTree() {
  585. deptTreeSelect().then((response) => {
  586. this.deptOptions = response.data;
  587. this.defaultKeys.push(response.data[0].id);
  588. this.queryParams.orgId = response.data[0].id;
  589. this.selectOrgId = response.data[0].id;
  590. this.handleQuery();
  591. });
  592. },
  593. // 节点单击事件
  594. clickTreeNode(data) {
  595. this.queryParams.orgId = data.id;
  596. this.handleQuery();
  597. },
  598. /** treeSelect组件自定义数据*/
  599. tenantIdnormalizer(node, instanceId) {
  600. if (node.children && !node.children.length) {
  601. delete node.children;
  602. }
  603. return {
  604. id: node.id,
  605. label: node.shortName,
  606. children: node.children,
  607. };
  608. },
  609. // 取消按钮
  610. cancel() {
  611. this.open = false;
  612. this.reset();
  613. },
  614. closeHandler() {
  615. this.reset();
  616. },
  617. // 表单重置
  618. reset() {
  619. this.form = {
  620. id: null,
  621. orgId: null,
  622. orgName: null,
  623. deviceName: null,
  624. assetType: null,
  625. deviceType: null,
  626. deviceBrand: null,
  627. checkTime: null,
  628. maintenanceTerm: null,
  629. createTime: null,
  630. updateTime: null,
  631. createBy: null,
  632. updateBy: null,
  633. delFlag: null,
  634. hostId: null,
  635. channel: null,
  636. definition:"1",
  637. };
  638. this.resetForm("form");
  639. },
  640. /** 搜索按钮操作 */
  641. handleQuery() {
  642. this.queryParams.pageNum = 1;
  643. this.getList();
  644. },
  645. /** 重置按钮操作 */
  646. resetQuery() {
  647. this.devices = null;
  648. this.searchDevices=null;
  649. this.resetForm("queryForm");
  650. this.handleQuery();
  651. },
  652. // 多选框选中数据
  653. handleSelectionChange(selection) {
  654. this.ids = selection.map((item) => item.id);
  655. this.names = selection.map((item) => item.deviceName);
  656. this.single = selection.length !== 1;
  657. this.multiple = !selection.length;
  658. },
  659. /** 新增按钮操作 */
  660. handleAdd(val) {
  661. this.open = true;
  662. this.title = "新增设备信息";
  663. this.form.orgId = this.selectOrgId;
  664. this.dept.id = this.selectOrgId;
  665. this.changeSelect(this.dept);
  666. this.devices = null;
  667. },
  668. changeSelectDevice(val) {
  669. if (val) {
  670. getDeviceType(val).then((response) => {
  671. this.devices = response.data;
  672. this.form.deviceType = null;
  673. this.queryParams.deviceType = null;
  674. });
  675. }
  676. },
  677. searchChangeSelectDevice(val) {
  678. if (val) {
  679. getDeviceType(val).then(response => {
  680. this.searchDevices = response.data;
  681. this.form.deviceType = null;
  682. this.queryParams.deviceType = null;
  683. })
  684. }
  685. },
  686. /** 修改按钮操作 */
  687. handleUpdate(row) {
  688. this.reset();
  689. const id = row.id || this.ids;
  690. getDevice(id).then((response) => {
  691. this.form = response.data;
  692. this.devices = response.devices;
  693. this.hostList = response.hostList;
  694. this.open = true;
  695. this.title = "编辑设备信息";
  696. });
  697. },
  698. /** 提交按钮 */
  699. submitForm() {
  700. this.$refs["form"].validate((valid) => {
  701. if (valid) {
  702. if (this.form.id != null) {
  703. updateDevice(this.form).then((response) => {
  704. this.$modal.msgSuccess("处理成功");
  705. this.open = false;
  706. this.getList();
  707. });
  708. } else {
  709. addDevice(this.form).then((response) => {
  710. this.$modal.msgSuccess("处理成功");
  711. this.open = false;
  712. this.getList();
  713. });
  714. }
  715. }
  716. });
  717. },
  718. /** 删除按钮操作 */
  719. handleDelete(row) {
  720. const ids = row.id || this.ids;
  721. const names = row.deviceName || this.names;
  722. this.$modal
  723. .confirm('是否确认删除名称为"' + names + '"的数据项?')
  724. .then(function () {
  725. return delDevice(ids);
  726. })
  727. .then(() => {
  728. this.getList();
  729. this.$modal.msgSuccess("删除成功");
  730. })
  731. .catch(() => {});
  732. },
  733. // 提交上传文件
  734. submitFileForm() {
  735. this.$refs.upload.submit();
  736. },
  737. /** 导出按钮操作 */
  738. handleExport() {
  739. this.download(
  740. "system/device/export",
  741. {
  742. ...this.queryParams,
  743. },
  744. `device_${new Date().getTime()}.xlsx`
  745. );
  746. },
  747. },
  748. };
  749. </script>
  750. <style lang="scss">
  751. //.vue-treeselect--has-value .vue-treeselect__input {
  752. // line-height: 100%;
  753. // vertical-align: middle;
  754. //}
  755. </style>