Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

1482 řádky
43 KiB

  1. <template>
  2. <div class="box-center">
  3. <!-- 头 -->
  4. <div class="app-top">
  5. <div class="app-titel" style="margin-top: 5px">
  6. <div class="div-lab">
  7. <div class="label">添加时间:</div>
  8. <el-date-picker
  9. v-model="time"
  10. type="daterange"
  11. class="div-inp"
  12. range-separator="-"
  13. start-placeholder="开始日期"
  14. :default-time="['00:00:00', '23:59:59']"
  15. value-format="yyyy-MM-dd"
  16. end-placeholder="结束日期"
  17. @change="timeChange"
  18. >
  19. </el-date-picker>
  20. </div>
  21. <div class="div-lab">
  22. <el-input
  23. v-model="changeValue"
  24. clearable
  25. placeholder="请输入"
  26. maxlength="20"
  27. @change="selectChange"
  28. style="width: 363px"
  29. >
  30. <el-select
  31. v-model="selflag"
  32. slot="prepend"
  33. class="input-with-select"
  34. style="width: 115px"
  35. placeholder="请选择"
  36. @change="selChange"
  37. >
  38. <el-option label="设备编号" value="1"></el-option>
  39. <!-- <el-option label="版本号" value="2"></el-option> -->
  40. <el-option label="批次号" value="3"></el-option>
  41. <el-option label="代理商名称" value="4"></el-option>
  42. <el-option label="公司名称" value="5"></el-option>
  43. <el-option label="楼盘名称" value="6"></el-option>
  44. </el-select>
  45. </el-input>
  46. </div>
  47. <div class="div-lab">
  48. <div class="label">设备状态:</div>
  49. <el-select
  50. class="div-inp"
  51. clearable
  52. filterable
  53. collapse-tags
  54. v-model="searchForm.acceptanceStatus"
  55. placeholder="请选择"
  56. >
  57. <el-option
  58. v-for="item in equipmentStatusList"
  59. :key="item.value"
  60. :label="item.label"
  61. :value="item.value"
  62. >
  63. </el-option>
  64. </el-select>
  65. </div>
  66. <!-- <div class="div-lab">
  67. <div class="label">售出状态</div>
  68. <el-select
  69. class="div-inp"
  70. multiple
  71. clearable
  72. collapse-tags
  73. v-model="searchForm.keywordsId"
  74. placeholder="请选择"
  75. >
  76. <el-option
  77. v-for="item in options"
  78. :key="item.value"
  79. :label="item.label"
  80. :value="item.value"
  81. >
  82. </el-option>
  83. </el-select>
  84. </div> -->
  85. <div class="div-lab">
  86. <div class="label">领用状态:</div>
  87. <el-select
  88. class="div-inp"
  89. clearable
  90. filterable
  91. collapse-tags
  92. v-model="searchForm.receiveType"
  93. placeholder="请选择"
  94. >
  95. <el-option
  96. v-for="item in receiveTypeList"
  97. :key="item.value"
  98. :label="item.label"
  99. :value="item.value"
  100. >
  101. </el-option>
  102. </el-select>
  103. </div>
  104. <!--
  105. <div class="div-lab">
  106. <div class="label">录音状态</div>
  107. <el-select
  108. class="div-inp"
  109. multiple
  110. clearable
  111. collapse-tags
  112. v-model="searchForm.audioStatus"
  113. placeholder="请选择"
  114. >
  115. <el-option
  116. v-for="item in audioStatusList"
  117. :key="item.value"
  118. :label="item.label"
  119. :value="item.value"
  120. >
  121. </el-option>
  122. </el-select>
  123. </div> -->
  124. <!-- <div class="div-lab">
  125. <div class="label">上传状态</div>
  126. <el-select
  127. class="div-inp"
  128. multiple
  129. clearable
  130. collapse-tags
  131. v-model="searchForm.uploadStatus"
  132. placeholder="请选择"
  133. >
  134. <el-option
  135. v-for="item in uploadStatusList"
  136. :key="item.value"
  137. :label="item.label"
  138. :value="item.value"
  139. >
  140. </el-option>
  141. </el-select>
  142. </div> -->
  143. <!-- <div class="div-lab">
  144. <div class="label">关机状态</div>
  145. <el-select
  146. class="div-inp"
  147. multiple
  148. clearable
  149. collapse-tags
  150. v-model="searchForm.offStatus"
  151. placeholder="请选择"
  152. >
  153. <el-option
  154. v-for="item in offStatusList"
  155. :key="item.value"
  156. :label="item.label"
  157. :value="item.value"
  158. >
  159. </el-option>
  160. </el-select>
  161. </div> -->
  162. </div>
  163. <div class="app-titel" style="margin-top: 15px">
  164. <!-- <div class="label" style="color: #ffffff">筛选相关:</div> -->
  165. <div style="margin-left: 20px">
  166. <el-button type="primary" @click="screen">筛选</el-button>
  167. </div>
  168. <div style="margin-left: 20px">
  169. <el-button @click="reset">清空筛选条件</el-button>
  170. </div>
  171. </div>
  172. <div class="app-titel" style="margin-top: 15px">
  173. <!-- <div class="label" style="color: #ffffff">筛选相关:</div> -->
  174. <!-- <div style="margin-left: 20px">
  175. <el-button
  176. @click="Batchreturn()"
  177. type="primary"
  178. :disabled="multipleSelection.length == 0"
  179. >批量归还</el-button
  180. >
  181. </div> -->
  182. <div style="margin-left: 20px">
  183. <el-button
  184. @click="infoMasstransfer()"
  185. type="primary"
  186. v-if="equ_index_bind"
  187. :disabled="multipleSelection.length == 0"
  188. >批量绑定</el-button
  189. >
  190. </div>
  191. <div style="margin-left: 20px">
  192. <el-button
  193. @click="zkequipmentUnbind()"
  194. type="primary"
  195. v-if="equ_index_unbind"
  196. :disabled="multipleSelection.length == 0"
  197. >批量解绑</el-button
  198. >
  199. </div>
  200. <div style="margin-left: 20px">
  201. <el-button
  202. @click="infoBulkbinding()"
  203. v-if="euq_index_batch"
  204. type="primary"
  205. :disabled="multipleSelection.length == 0"
  206. >批量绑定批次号</el-button
  207. >
  208. </div>
  209. <div style="margin-left: 20px" v-if="equ_index_add">
  210. <el-button @click="infoadd()" type="primary">添加</el-button>
  211. </div>
  212. </div>
  213. </div>
  214. <!-- 表格 -->
  215. <div class="cen-tab">
  216. <el-table
  217. :data="tableData"
  218. stripe
  219. @selection-change="handleSelectionChange"
  220. style="width: 100%"
  221. >
  222. <el-table-column type="selection" width="55"> </el-table-column>
  223. <el-table-column type="index" label="序号" align="center">
  224. </el-table-column>
  225. <el-table-column prop="imei" label="设备编号" align="center">
  226. </el-table-column>
  227. <el-table-column prop="batchId" label="批次号" align="center">
  228. </el-table-column>
  229. <el-table-column prop="agentName" label="代理商" align="center">
  230. </el-table-column>
  231. <el-table-column prop="orgName" label="公司" align="center">
  232. </el-table-column>
  233. <el-table-column prop="houseName" label="楼盘" align="center">
  234. </el-table-column>
  235. <el-table-column prop="userName" label="领用人" align="center">
  236. </el-table-column>
  237. <el-table-column prop="userPhone" label="领用人手机" align="center">
  238. </el-table-column>
  239. <el-table-column prop="receiveType" label="领用状态" align="center">
  240. <template slot-scope="{ row }">
  241. {{
  242. row.receiveType == 1
  243. ? "未领用"
  244. : row.receiveType == 2
  245. ? "使用中"
  246. : "已归还"
  247. }}
  248. </template>
  249. </el-table-column>
  250. <!-- <el-table-column prop="date" label="在线状态" align="center">
  251. </el-table-column>
  252. <el-table-column prop="date" label="录音状态" align="center">
  253. </el-table-column>
  254. <el-table-column prop="name" label="上传状态" align="center">
  255. </el-table-column> -->
  256. <el-table-column
  257. prop="autoSwitch"
  258. label="自动转写开关"
  259. align="center"
  260. width="100"
  261. >
  262. <template slot-scope="{ row }">
  263. {{ row.autoSwitch == 0 ? "已关闭" : "已开启" }}
  264. </template>
  265. </el-table-column>
  266. <el-table-column
  267. prop="defaultTransliteration"
  268. label="转写方式"
  269. align="center"
  270. >
  271. <template slot-scope="{ row }">
  272. {{ row.defaultTransliteration == 0 ? "科大讯飞" : "思必驰" }}
  273. </template>
  274. </el-table-column>
  275. <el-table-column
  276. prop="acceptanceStatus"
  277. label="设备状态"
  278. align="center"
  279. >
  280. <template slot-scope="{ row }">
  281. {{
  282. row.acceptanceStatus == 0
  283. ? "已验收"
  284. : row.acceptanceStatus == 1
  285. ? "未验收"
  286. : row.acceptanceStatus == 2
  287. ? "维修中"
  288. : row.acceptanceStatus == 3
  289. ? "更换中"
  290. : "已报损"
  291. }}
  292. </template>
  293. </el-table-column>
  294. <!-- <el-table-column prop="name" label="转写方式" align="center">
  295. </el-table-column> -->
  296. <!-- <el-table-column prop="name" label="开机指示灯" align="center">
  297. </el-table-column> -->
  298. <!-- <el-table-column
  299. prop="name"
  300. label="电池电量"
  301. width="200"
  302. align="center"
  303. >
  304. <template slot-scope="{ row }">
  305. <el-progress :percentage="80" :color="customColors"></el-progress>
  306. </template>
  307. </el-table-column>
  308. <el-table-column prop="name" label="信号强度" align="center">
  309. </el-table-column>
  310. <el-table-column prop="name" label="待上传文件" align="center">
  311. </el-table-column>
  312. <el-table-column prop="name" label="更新时间" align="center">
  313. </el-table-column>
  314. <el-table-column prop="name" label="开机时间" align="center">
  315. </el-table-column>
  316. <el-table-column prop="name" label="关机时间" align="center">
  317. </el-table-column>
  318. <el-table-column prop="name" label="关机类型" align="center">
  319. </el-table-column> -->
  320. <el-table-column
  321. prop="createTime"
  322. label="添加时间"
  323. align="center"
  324. width="150"
  325. >
  326. </el-table-column>
  327. <!-- <el-table-column prop="name" label="购买时间" align="center">
  328. </el-table-column> -->
  329. <el-table-column
  330. prop="bindHouseTime"
  331. label="绑定楼盘时间"
  332. align="center"
  333. width="150"
  334. >
  335. </el-table-column>
  336. <!-- <el-table-column
  337. prop="name"
  338. label="绑定代理时间"
  339. align="center"
  340. width="150"
  341. >
  342. </el-table-column> -->
  343. <!-- scope -->
  344. <el-table-column label="操作" align="center" fixed="right" width="200">
  345. <template slot-scope="{ row }">
  346. <!-- <el-button v-if="row.receiveType == 2 && euq_index_back" type="text" @click="toinifoThereturn()">归还</el-button>
  347. <el-button v-if="equ_index_change" type="text" @click="infotranscription()">转写方式</el-button>
  348. <el-button v-if="equ_index_auto" type="text" @click="isAutoSwitch()">自动转写</el-button>
  349. <el-button v-if="row.acceptanceStatus == 1 && equ_index_makeSure" type="text" @click="acceptance()">验收</el-button>
  350. <el-button v-if="row.acceptanceStatus != (1 || 0) && euq_index_normal" type="text" @click="getRight()">恢复正常</el-button>
  351. <el-button v-if="orgType == 0 && equ_index_bind&&row.receiveType!=2" type="text" @click="toinfobinding()">绑定</el-button>
  352. <el-button v-if="equ_index_del&&row.receiveType!=2" type="text" @click="toinifodelete()">删除</el-button> -->
  353. <el-dropdown v-if="(row.receiveType == 2 && euq_index_back)||equ_index_change||equ_index_auto||(row.acceptanceStatus == 1 && equ_index_makeSure)||(row.acceptanceStatus != (1 || 0) && euq_index_normal)||( equ_index_bind&&row.receiveType!=2)||(equ_index_del&&row.receiveType!=2)||(equ_index_ubind&&row.propertyId)" @command="handleCommand($event, row)" trigger="click">
  354. <span style="color: #409eff; font-size: 12px; margin-left: 10px; cursor: pointer;">
  355. 更多<i class="el-icon-arrow-down el-icon--right"></i>
  356. </span>
  357. <el-dropdown-menu slot="dropdown">
  358. <el-dropdown-item
  359. command="toinifoThereturn"
  360. v-if="row.receiveType == 2 && euq_index_back"
  361. >归还</el-dropdown-item
  362. >
  363. <el-dropdown-item
  364. command="infotranscription"
  365. v-if="equ_index_change"
  366. >转写方式</el-dropdown-item
  367. >
  368. <el-dropdown-item command="isAutoSwitch" v-if="equ_index_auto"
  369. >自动转写</el-dropdown-item
  370. >
  371. <el-dropdown-item
  372. command="acceptance"
  373. v-if="row.acceptanceStatus == 1 && equ_index_makeSure"
  374. >验收</el-dropdown-item
  375. >
  376. <!-- <el-dropdown-item
  377. command="getRight"
  378. v-if="row.acceptanceStatus != (1 || 0) && euq_index_normal"
  379. >恢复正常</el-dropdown-item
  380. > -->
  381. <el-dropdown-item
  382. command="toinfobinding"
  383. v-if="equ_index_bind&&row.receiveType!=2"
  384. >绑定</el-dropdown-item
  385. >
  386. <el-dropdown-item
  387. command="equipmentUnbind"
  388. v-if="equ_index_ubind&&row.propertyId"
  389. >解绑</el-dropdown-item
  390. >
  391. <!-- <el-dropdown-item command="infoeditor">修改</el-dropdown-item> -->
  392. <el-dropdown-item command="toinifodelete" v-if="equ_index_del&&row.receiveType!=2"
  393. >删除</el-dropdown-item
  394. >
  395. </el-dropdown-menu>
  396. </el-dropdown>
  397. </template>
  398. </el-table-column>
  399. </el-table>
  400. <div style="display: flex; justify-content: flex-end; margin-top: 10px">
  401. <el-pagination
  402. @size-change="handleSizeChange"
  403. @current-change="handleCurrentChange"
  404. :current-page="currentPage"
  405. :page-sizes="[10, 30, 50]"
  406. :page-size="size"
  407. layout="total, sizes, prev, pager, next, jumper"
  408. :total="total"
  409. >
  410. </el-pagination>
  411. </div>
  412. </div>
  413. <el-dialog
  414. title="新增设备"
  415. :visible.sync="dialogVisible"
  416. @close="resetImei"
  417. >
  418. <el-form
  419. :model="addForm"
  420. label-position="labelPosition"
  421. ref="addForm"
  422. :rules="addRules"
  423. label-width="100px"
  424. >
  425. <el-form-item label="设备号" prop="imei">
  426. <el-input v-model="addForm.imei" style="width: 80%" maxlength="20" clearable></el-input>
  427. </el-form-item>
  428. <!-- <el-form-item label="转写方式" prop="defaultTransliteration">
  429. <el-radio-group v-model="addForm.defaultTransliteration">
  430. <el-radio label="3">关闭转写</el-radio>
  431. <el-radio label="6">科大讯飞</el-radio>
  432. <el-radio label="9">思必驰</el-radio>
  433. </el-radio-group>
  434. </el-form-item> -->
  435. <el-form-item label="批次号" prop="batchId">
  436. <el-select
  437. v-model="addForm.batchId"
  438. style="width: 80%"
  439. clearable
  440. filterable
  441. placeholder="请选择"
  442. >
  443. <el-option
  444. v-for="item in batchList"
  445. :key="item.id"
  446. :label="item.batchId"
  447. :value="item.batchId"
  448. >
  449. </el-option>
  450. </el-select>
  451. </el-form-item>
  452. <el-form-item label="备注" prop="remark">
  453. <el-input
  454. type="textarea"
  455. style="width: 80%"
  456. maxlength="50"
  457. show-word-limit
  458. v-model="addForm.remark"
  459. ></el-input>
  460. </el-form-item>
  461. </el-form>
  462. <div slot="footer" class="dialog-footer">
  463. <el-button @click="dialogVisible = false">取 消</el-button>
  464. <el-button type="primary" @click="addEquipment()">保存</el-button>
  465. </div>
  466. </el-dialog>
  467. <el-dialog title="编辑" :visible.sync="dialogVisible2">
  468. <el-form
  469. :model="editForm"
  470. label-position="labelPosition"
  471. ref="editForm"
  472. label-width="140px"
  473. >
  474. <el-form-item label="设备号" prop="imei">
  475. <el-input
  476. v-model="editForm.imei"
  477. maxlength="20"
  478. clearable
  479. style="width: 80%"
  480. disabled
  481. ></el-input>
  482. </el-form-item>
  483. <el-form-item label="设备状态" prop="acceptanceStatus">
  484. <el-radio-group v-model="editForm.acceptanceStatus">
  485. <el-radio label="0">正常</el-radio>
  486. <el-radio label="1">报损</el-radio>
  487. </el-radio-group>
  488. </el-form-item>
  489. <el-form-item
  490. label="报损原因"
  491. prop="desc"
  492. v-if="editForm.acceptanceStatus == 1"
  493. >
  494. <el-input
  495. type="textarea"
  496. style="width: 80%"
  497. v-model="editForm.desc"
  498. maxlength="50"
  499. show-word-limit
  500. ></el-input>
  501. </el-form-item>
  502. </el-form>
  503. <div slot="footer" class="dialog-footer">
  504. <el-button @click="dialogVisible2 = false">取 消</el-button>
  505. <el-button type="primary" @click="editor()">保存</el-button>
  506. </div>
  507. </el-dialog>
  508. <el-dialog title="绑定" :visible.sync="dialogVisible3" @close="resetBind">
  509. <el-form
  510. :model="bindForm"
  511. label-position="labelPosition"
  512. ref="bindForm"
  513. :rules="bindRules"
  514. label-width="100px"
  515. >
  516. <!-- <el-form-item label="绑定" prop="choic">
  517. <el-radio-group v-model="bindForm.choic">
  518. <el-radio label="3">楼盘</el-radio>
  519. <el-radio label="6">代理商</el-radio>
  520. </el-radio-group>
  521. </el-form-item> -->
  522. <el-form-item label="楼盘" prop="houseId">
  523. <el-select
  524. filterable
  525. clearable
  526. v-model="bindForm.houseId"
  527. style="width: 80%"
  528. placeholder="请选择"
  529. @change="houseChange"
  530. >
  531. <el-option
  532. v-for="item in houseList"
  533. :key="item.id"
  534. :label="item.propertyName"
  535. :value="item.id"
  536. >
  537. </el-option>
  538. </el-select>
  539. </el-form-item>
  540. <el-form-item label="备注:" prop="remark">
  541. <el-input
  542. type="textarea"
  543. style="width: 80%"
  544. v-model="bindForm.remark"
  545. maxlength="50"
  546. show-word-limit
  547. ></el-input>
  548. </el-form-item>
  549. </el-form>
  550. <div slot="footer" class="dialog-footer">
  551. <el-button @click="dialogVisible3 = false">取 消</el-button>
  552. <el-button type="primary" @click="binding()">保存</el-button>
  553. </div>
  554. </el-dialog>
  555. <el-dialog
  556. title="批量绑定批次号"
  557. width="40%"
  558. :visible.sync="dialogVisible4"
  559. @close="resetBatch"
  560. >
  561. <el-form
  562. :model="batchForm"
  563. label-position="labelPosition"
  564. ref="batchForm"
  565. label-width="140px"
  566. :rules="batchRules"
  567. >
  568. <el-form-item label="批次号" prop="batchId">
  569. <el-select
  570. v-model="batchForm.batchId"
  571. style="width: 80%"
  572. placeholder="请选择"
  573. filterable
  574. clearable
  575. >
  576. <el-option
  577. v-for="item in batchList"
  578. :key="item.id"
  579. :label="item.batchId"
  580. :value="item.batchId"
  581. >
  582. </el-option>
  583. </el-select>
  584. </el-form-item>
  585. </el-form>
  586. <div slot="footer" class="dialog-footer">
  587. <el-button @click="dialogVisible4 = false">取 消</el-button>
  588. <el-button type="primary" @click="Bulkbinding()">保存</el-button>
  589. </div>
  590. </el-dialog>
  591. <el-dialog
  592. title="批量转移"
  593. width="40%"
  594. :visible.sync="dialogVisible5"
  595. @close="resetBind"
  596. >
  597. <el-form
  598. :model="bindForm"
  599. label-position="labelPosition"
  600. ref="allbindForm"
  601. :rules="bindRules"
  602. label-width="140px"
  603. >
  604. <el-form-item label="楼盘" prop="houseId">
  605. <el-select
  606. filterable
  607. v-model="bindForm.houseId"
  608. style="width: 80%"
  609. placeholder="请选择"
  610. @change="houseChange"
  611. >
  612. <el-option
  613. v-for="item in houseList"
  614. :key="item.id"
  615. :label="item.propertyName"
  616. :value="item.id"
  617. >
  618. </el-option>
  619. </el-select>
  620. </el-form-item>
  621. </el-form>
  622. <div slot="footer" class="dialog-footer">
  623. <el-button @click="dialogVisible5 = false">取 消</el-button>
  624. <el-button type="primary" @click="Masstransfer()">保存</el-button>
  625. </div>
  626. </el-dialog>
  627. <el-dialog
  628. title="领用"
  629. :visible.sync="receiveVisible"
  630. @close="resetReceive"
  631. >
  632. <el-form
  633. :model="receiveForm"
  634. label-position="labelPosition"
  635. ref="receiveForm"
  636. :rules="receiveRules"
  637. label-width="100px"
  638. >
  639. <el-form-item label="楼盘" prop="batchId">
  640. <el-select
  641. v-model="receiveForm.batchId"
  642. style="width: 80%"
  643. placeholder="请选择"
  644. >
  645. <el-option
  646. v-for="item in options"
  647. :key="item.id"
  648. :label="item.batchId"
  649. :value="item.batchId"
  650. >
  651. </el-option>
  652. </el-select>
  653. </el-form-item>
  654. <el-form-item label="顾问" prop="batchId">
  655. <el-select
  656. v-model="receiveForm.houseList"
  657. style="width: 80%"
  658. placeholder="请选择"
  659. >
  660. <el-option
  661. v-for="item in options"
  662. :key="item.id"
  663. :label="item.batchId"
  664. :value="item.batchId"
  665. >
  666. </el-option>
  667. </el-select>
  668. </el-form-item>
  669. </el-form>
  670. <div slot="footer" class="dialog-footer">
  671. <el-button @click="receiveVisible = false">取 消</el-button>
  672. <el-button type="primary" @click="saveReceive()">保存</el-button>
  673. </div>
  674. </el-dialog>
  675. </div>
  676. </template>
  677. <script>
  678. import { mapGetters } from "vuex";
  679. export default {
  680. data() {
  681. return {
  682. time: [],
  683. changeValue: "",
  684. selflag: "1",
  685. searchForm: {
  686. name: "",
  687. imei: "", //设备号
  688. batchId: "", //批次号
  689. // equipmentType: "", //设备类型
  690. receiveType: "", //领用状态
  691. defaultTransliteration: "", //转写方式
  692. startDate: "", //开始时间
  693. endDate: "", //结束时间
  694. agentName: "", //代理商名称
  695. orgName: "", //公司名称
  696. houseName: "", //楼盘名称
  697. acceptanceStatus: "", //设备状态
  698. audioStatus: "", //录音状态
  699. uploadStatus: "", //上传状态
  700. offStatus: "", //关机状态
  701. },
  702. options: [],
  703. audioStatusList: [
  704. {
  705. value: true,
  706. label: "开启",
  707. },
  708. {
  709. value: false,
  710. label: "关闭",
  711. },
  712. ],
  713. uploadStatusList: [
  714. {
  715. value: true,
  716. label: "无上传",
  717. },
  718. {
  719. value: false,
  720. label: "上传中",
  721. },
  722. ],
  723. equipmentStatusList: [
  724. {
  725. value: "0",
  726. label: "已验收",
  727. },
  728. {
  729. value: "1",
  730. label: "未验收",
  731. },
  732. // {
  733. // value: "2",
  734. // label: "维修中",
  735. // },
  736. // {
  737. // value: "3",
  738. // label: "更换中",
  739. // },
  740. // {
  741. // value: "4",
  742. // label: "已报损",
  743. // },
  744. ],
  745. offStatusList: [
  746. {
  747. value: "1",
  748. label: "正常关机",
  749. },
  750. {
  751. value: "2",
  752. label: "低电关机",
  753. },
  754. {
  755. value: "3",
  756. label: "异常关机",
  757. },
  758. ],
  759. receiveTypeList: [
  760. {
  761. value: "1",
  762. label: "未领用",
  763. },
  764. {
  765. value: "2",
  766. label: "使用中",
  767. },
  768. {
  769. value: "3",
  770. label: "已归还",
  771. },
  772. ],
  773. currentPage: 1,
  774. size: 10,
  775. total: 10,
  776. value: "",
  777. input: "",
  778. orgType: localStorage.getItem("orgType"),
  779. tableData: [],
  780. houseList: [],
  781. batchList: [],
  782. dialogVisible: false,
  783. dialogVisible2: false,
  784. dialogVisible3: false,
  785. dialogVisible4: false,
  786. dialogVisible5: false,
  787. receiveVisible: false,
  788. batchForm: {
  789. batchId: "",
  790. imeis: "",
  791. },
  792. ruleForm: {
  793. areaName: "",
  794. provinceItem: [],
  795. },
  796. addForm: {
  797. imei: "",
  798. // defaultTransliteration: "",
  799. batchId: "",
  800. remark: "",
  801. },
  802. bindForm: {
  803. remark: "",
  804. houseId: "",
  805. // choic: "3",
  806. },
  807. editForm: {
  808. imei: "123",
  809. desc: "",
  810. acceptanceStatus: "0",
  811. },
  812. receiveForm: {},
  813. receiveRules: {
  814. houseId: [{ required: true, message: "请选择楼盘", trigger: "blur" }],
  815. batchId: { required: true, message: "请选择顾问", trigger: "blur" },
  816. },
  817. batchRules: {
  818. batchId: { required: true, message: "请选择批次号", trigger: "blur" },
  819. },
  820. addRules: {
  821. imei: [{ required: true, message: "请填写设备号", trigger: "blur" }],
  822. batchId: { required: true, message: "请选择批次号", trigger: "blur" },
  823. },
  824. bindRules: {
  825. houseId: [{ required: true, message: "请选择楼盘", trigger: "blur" }],
  826. },
  827. multipleSelection: [],
  828. customColors: [
  829. { color: "#f56c6c", percentage: 20 },
  830. { color: "#e6a23c", percentage: 40 },
  831. { color: "#5cb87a", percentage: 60 },
  832. { color: "#1989fa", percentage: 80 },
  833. { color: "#6f7ad3", percentage: 100 },
  834. ],
  835. };
  836. },
  837. computed: {
  838. ...mapGetters(["permissions"]),
  839. },
  840. created() {
  841. this.equ_index_add = this.permissions["equ_index_add"];
  842. this.equ_index_bind = this.permissions["equ_index_bind"];
  843. this.equ_index_unbind = this.permissions["equ_index_unbind"];
  844. this.equ_index_ubind = this.permissions["equ_index_ubind"];
  845. this.equ_index_change = this.permissions["equ_index_change"];
  846. this.equ_index_auto = this.permissions["equ_index_auto"];
  847. this.equ_index_makeSure = this.permissions["equ_index_makeSure"];
  848. this.equ_index_del = this.permissions["equ_index_del"];
  849. this.euq_index_batch = this.permissions["euq_index_batch"];
  850. this.euq_index_back = this.permissions["euq_index_back"];
  851. this.euq_index_normal = this.permissions["euq_index_normal"];
  852. },
  853. mounted() {
  854. // 获取设备列表
  855. this.equipmentManagement();
  856. // 获取批次列表
  857. this.zkequipmentbatchList();
  858. // 获取列表
  859. this.zkhousePage();
  860. },
  861. methods: {
  862. // 获取批次列表
  863. zkequipmentbatchList() {
  864. this.$api.api.zkequipmentbatchList().then((res) => {
  865. // console.log(res)
  866. this.batchList = res.data;
  867. });
  868. },
  869. handleCommand(e, row) {
  870. console.log(row);
  871. this[e](row);
  872. },
  873. receive(row) {
  874. this.receiveVisible = true;
  875. // this.bindForm.imeis = row.imei;
  876. },
  877. saveReceive() {},
  878. resetReceive() {},
  879. selChange() {
  880. this.changeValue = "";
  881. this.searchForm.imei = "";
  882. this.searchForm.batchId = "";
  883. this.searchForm.agentName = "";
  884. this.searchForm.orgName = "";
  885. this.searchForm.houseName = "";
  886. },
  887. selectChange(e) {
  888. this.searchForm.imei = "";
  889. this.searchForm.batchId = "";
  890. this.searchForm.agentName = "";
  891. this.searchForm.orgName = "";
  892. this.searchForm.houseName = "";
  893. if (!e) retun;
  894. if (this.selflag == 1) {
  895. // 设备编号
  896. this.searchForm.imei = e;
  897. }
  898. if (this.selflag == 3) {
  899. // 批次号
  900. this.searchForm.batchId = e;
  901. }
  902. if (this.selflag == 4) {
  903. // 代理商名称
  904. this.searchForm.agentName = e;
  905. }
  906. if (this.selflag == 5) {
  907. // 公司名称
  908. this.searchForm.orgName = e;
  909. }
  910. if (this.selflag == 6) {
  911. // 楼盘名称
  912. this.searchForm.houseName = e;
  913. }
  914. },
  915. reset() {
  916. this.changeValue = "";
  917. this.searchForm = {
  918. name: "",
  919. imei: "", //设备号
  920. batchId: "", //批次号
  921. // equipmentType: "", //设备类型
  922. receiveType: "", //领用状态
  923. defaultTransliteration: "", //转写方式
  924. startDate: "", //开始时间
  925. endDate: "", //结束时间
  926. agentName: "", //代理商名称
  927. orgName: "", //公司名称
  928. houseName: "", //楼盘名称
  929. acceptanceStatus: "", //设备状态
  930. audioStatus: "", //录音状态
  931. uploadStatus: "", //上传状态
  932. offStatus: "", //关机状态
  933. };
  934. this.currentPage = 1;
  935. this.equipmentManagement();
  936. },
  937. resetImei() {
  938. this.addForm = {
  939. imei: "",
  940. // defaultTransliteration: "",
  941. batchId: "",
  942. remark: "",
  943. };
  944. this.$refs.addForm.resetFields()
  945. },
  946. resetBind() {
  947. this.bindForm = {
  948. remark: "",
  949. houseId: "",
  950. };
  951. },
  952. houseChange(e) {
  953. console.log(e);
  954. let idx = this.houseList.findIndex((item) => item.id == e);
  955. if (idx != -1) {
  956. this.bindForm.orgCode = this.houseList[idx].orgCode;
  957. }
  958. },
  959. screen() {
  960. this.currentPage = 1;
  961. console.log(this.searchForm);
  962. this.equipmentManagement();
  963. },
  964. equipmentManagement() {
  965. this.$api.api
  966. .equipmentManagement({
  967. size: this.size,
  968. current: this.currentPage,
  969. timeType:1,
  970. orgType: localStorage.getItem("orgType"),
  971. orgCode: localStorage.getItem("orgCode"),
  972. agentId: localStorage.getItem("agentId"),
  973. houseId: localStorage.getItem("houseId"),
  974. ...this.searchForm,
  975. })
  976. .then((res) => {
  977. // console.log(res);
  978. this.tableData = res.data.records;
  979. this.total = res.data.total;
  980. });
  981. },
  982. //批量绑定
  983. infoBulkbinding() {
  984. this.dialogVisible4 = true;
  985. },
  986. resetBatch() {
  987. this.batchForm = {
  988. batchId: "",
  989. imeis: "",
  990. };
  991. },
  992. //批量绑定确认
  993. Bulkbinding() {
  994. this.$refs.batchForm.validate((valid) => {
  995. if (valid) {
  996. let arr = [];
  997. this.multipleSelection.map((item) => arr.push(item.imei));
  998. let obj = {
  999. batchId: this.batchForm.batchId,
  1000. imeis: arr.join(","),
  1001. };
  1002. this.$api.api.zkequipmentBindBatchId(obj).then((res) => {
  1003. console.log(res);
  1004. this.$message.success("绑定成功");
  1005. this.equipmentManagement();
  1006. this.dialogVisible5 = false;
  1007. });
  1008. }
  1009. });
  1010. this.dialogVisible4 = false;
  1011. },
  1012. //批量转移
  1013. infoMasstransfer() {
  1014. this.dialogVisible5 = true;
  1015. },
  1016. zkequipmentUnbind() {
  1017. this.$confirm("确认批量解绑吗?", "提示", {
  1018. confirmButtonText: "确定",
  1019. cancelButtonText: "取消",
  1020. type: "warning",
  1021. })
  1022. .then(() => {
  1023. let str = [];
  1024. this.multipleSelection.map((item) => {
  1025. if (item.receiveType != 2) {
  1026. str.push(item.imei);
  1027. }
  1028. });
  1029. console.log(str);
  1030. this.$api.api
  1031. .zkequipmentUnbind({
  1032. imeis: str.join(","),
  1033. })
  1034. .then((res) => {
  1035. this.$message({
  1036. type: "success",
  1037. message: "操作成功!",
  1038. });
  1039. this.equipmentManagement();
  1040. });
  1041. })
  1042. .catch(() => {
  1043. // this.$message({
  1044. // type: "info",
  1045. // message: "已取消操作",
  1046. // });
  1047. });
  1048. },
  1049. equipmentUnbind(row){
  1050. this.$confirm("确认解绑吗?", "提示", {
  1051. confirmButtonText: "确定",
  1052. cancelButtonText: "取消",
  1053. type: "warning",
  1054. })
  1055. .then(() => {
  1056. this.$api.api
  1057. .zkequipmentUnbind({
  1058. imeis: row.imei,
  1059. })
  1060. .then((res) => {
  1061. this.$message({
  1062. type: "success",
  1063. message: "操作成功!",
  1064. });
  1065. this.equipmentManagement();
  1066. });
  1067. })
  1068. .catch(() => {
  1069. // this.$message({
  1070. // type: "info",
  1071. // message: "已取消操作",
  1072. // });
  1073. });
  1074. },
  1075. //批量转移确认
  1076. Masstransfer() {
  1077. this.$refs.allbindForm.validate((valid) => {
  1078. if (valid) {
  1079. console.log(this.bindForm);
  1080. let arr = [];
  1081. this.multipleSelection.map((item) => arr.push(item.imei));
  1082. let obj = {
  1083. houseId: this.bindForm.houseId,
  1084. orgCode: this.bindForm.orgCode,
  1085. imeis: arr.join(","),
  1086. };
  1087. this.$api.api.equipmentbind(obj).then((res) => {
  1088. console.log(res);
  1089. this.$message.success("绑定成功");
  1090. this.equipmentManagement();
  1091. this.dialogVisible5 = false;
  1092. });
  1093. }
  1094. });
  1095. },
  1096. timeChange(e) {
  1097. if (e) {
  1098. this.searchForm.startDate = e[0];
  1099. this.searchForm.endDate = e[1];
  1100. }
  1101. },
  1102. //批量归还
  1103. Batchreturn() {
  1104. this.$confirm("确认批量归还吗?", "提示", {
  1105. confirmButtonText: "确定",
  1106. cancelButtonText: "取消",
  1107. type: "warning",
  1108. })
  1109. .then(() => {
  1110. let str = [];
  1111. this.multipleSelection.map((item) => {
  1112. if (item.receiveType == 2) {
  1113. str.push(item.imei);
  1114. }
  1115. });
  1116. this.$api.api
  1117. .equipmentUnbind({
  1118. imeis: str.join(","),
  1119. })
  1120. .then((res) => {
  1121. this.$message({
  1122. type: "success",
  1123. message: "操作成功!",
  1124. });
  1125. this.equipmentManagement();
  1126. });
  1127. })
  1128. .catch(() => {
  1129. this.$message({
  1130. type: "info",
  1131. message: "已取消操作",
  1132. });
  1133. });
  1134. },
  1135. handleSelectionChange(val) {
  1136. // this.multipleSelection = [];
  1137. // val.map((item) => {
  1138. // this.multipleSelection.push(item.id);
  1139. // });
  1140. this.multipleSelection = val;
  1141. console.log(this.multipleSelection);
  1142. },
  1143. //绑定
  1144. toinfobinding(row) {
  1145. if(row.receiveType==2){
  1146. this.$message.warning('设备使用中不能删除')
  1147. return
  1148. }
  1149. this.dialogVisible3 = true;
  1150. this.bindForm.imeis = row.imei;
  1151. },
  1152. //确认绑定
  1153. binding() {
  1154. this.$refs.bindForm.validate((valid) => {
  1155. if (valid) {
  1156. console.log(this.bindForm);
  1157. this.$api.api.equipmentbind(this.bindForm).then((res) => {
  1158. console.log(res);
  1159. this.$message.success("绑定成功");
  1160. this.equipmentManagement();
  1161. this.dialogVisible3 = false;
  1162. });
  1163. }
  1164. });
  1165. },
  1166. //编辑
  1167. infoeditor() {
  1168. this.dialogVisible2 = true;
  1169. },
  1170. //确认编辑
  1171. editor() {
  1172. this.dialogVisible2 = false;
  1173. },
  1174. //新增
  1175. infoadd() {
  1176. this.dialogVisible = true;
  1177. },
  1178. zkhousePage() {
  1179. this.$api.api
  1180. .findHouseByUser({
  1181. orgType: localStorage.getItem("orgType"),
  1182. })
  1183. .then((res) => {
  1184. // console.log(res)
  1185. this.houseList = res.data;
  1186. // this.searchForm.houseId = res.data[0].id;
  1187. // 列表获取
  1188. // this.correctFindbypage();
  1189. });
  1190. },
  1191. //确认新增
  1192. addEquipment() {
  1193. this.$refs.addForm.validate((valid) => {
  1194. if (valid) {
  1195. console.log(this.addForm);
  1196. this.$api.api.equipmentAdd(this.addForm).then((res) => {
  1197. console.log(res);
  1198. this.$message.success("添加成功");
  1199. this.dialogVisible = false;
  1200. this.equipmentManagement();
  1201. });
  1202. }
  1203. });
  1204. },
  1205. // 回复正常
  1206. getRight(row) {
  1207. this.$confirm("确认恢复么?", "提示", {
  1208. confirmButtonText: "确定",
  1209. cancelButtonText: "取消",
  1210. type: "warning",
  1211. })
  1212. .then(() => {
  1213. this.$api.api
  1214. .backToNormal({
  1215. id: row.id,
  1216. })
  1217. .then((res) => {
  1218. this.$message({
  1219. type: "success",
  1220. message: "成功!",
  1221. });
  1222. this.equipmentManagement();
  1223. });
  1224. })
  1225. .catch(() => {
  1226. // this.$message({
  1227. // type: "info",
  1228. // message: "已取消",
  1229. // });
  1230. });
  1231. },
  1232. //验收
  1233. acceptance(row) {
  1234. this.$confirm("确认验收吗?", "提示", {
  1235. confirmButtonText: "确定",
  1236. cancelButtonText: "取消",
  1237. type: "warning",
  1238. })
  1239. .then(() => {
  1240. this.$api.api
  1241. .equipmentAcceptance({
  1242. imeis: row.imei,
  1243. })
  1244. .then((res) => {
  1245. this.$message({
  1246. type: "success",
  1247. message: "验收成功!",
  1248. });
  1249. this.equipmentManagement();
  1250. });
  1251. })
  1252. .catch((err) => {
  1253. // this.$message({
  1254. // type: "info",
  1255. // message: "已取消验收",
  1256. // });
  1257. console.log(err);
  1258. });
  1259. },
  1260. // 自动转写开关
  1261. isAutoSwitch(row) {
  1262. this.$confirm(
  1263. `确认${row.autoSwitch == 0 ? "开启" : "关闭"}自动转写?`,
  1264. "提示",
  1265. {
  1266. confirmButtonText: "确定",
  1267. cancelButtonText: "取消",
  1268. type: "warning",
  1269. }
  1270. )
  1271. .then(() => {
  1272. this.$api.api
  1273. .equipmentZxOn({
  1274. id: row.id,
  1275. autoSwitch: row.autoSwitch == 0 ? 1 : 0,
  1276. })
  1277. .then((res) => {
  1278. this.$message({
  1279. type: "success",
  1280. message: "修改成功!",
  1281. });
  1282. this.equipmentManagement();
  1283. });
  1284. })
  1285. .catch(() => {
  1286. // this.$message({
  1287. // type: "info",
  1288. // message: "已取消",
  1289. // });
  1290. });
  1291. },
  1292. // 转写开关
  1293. infotranscription(row) {
  1294. this.$confirm(
  1295. `确认修改转写方式为${
  1296. row.defaultTransliteration == 0 ? "思必驰" : "科大讯飞"
  1297. }?`,
  1298. "提示",
  1299. {
  1300. confirmButtonText: "确定",
  1301. cancelButtonText: "取消",
  1302. type: "warning",
  1303. }
  1304. )
  1305. .then(() => {
  1306. this.$api.api
  1307. .updateTranslationMethod({
  1308. id: row.id,
  1309. defaultTransliteration: row.defaultTransliteration == 0 ? 1 : 0,
  1310. })
  1311. .then((res) => {
  1312. this.$message({
  1313. type: "success",
  1314. message: "修改成功!",
  1315. });
  1316. this.equipmentManagement();
  1317. });
  1318. })
  1319. .catch(() => {
  1320. // this.$message({
  1321. // type: "info",
  1322. // message: "已取消",
  1323. // });
  1324. });
  1325. },
  1326. //归还
  1327. toinifoThereturn(row) {
  1328. this.$confirm("确认归还吗?", "提示", {
  1329. confirmButtonText: "确定",
  1330. cancelButtonText: "取消",
  1331. type: "warning",
  1332. })
  1333. .then(() => {
  1334. this.$api.api
  1335. .equipmentUnbind({
  1336. imeis: row.imei,
  1337. })
  1338. .then((res) => {
  1339. this.$message({
  1340. type: "success",
  1341. message: "归还成功!",
  1342. });
  1343. this.equipmentManagement();
  1344. });
  1345. })
  1346. .catch(() => {
  1347. // this.$message({
  1348. // type: "info",
  1349. // message: "已取消归还",
  1350. // });
  1351. });
  1352. },
  1353. //删除
  1354. toinifodelete(row) {
  1355. if(row.receiveType==2){
  1356. this.$message.warning('设备使用中不能删除')
  1357. return
  1358. }
  1359. this.$confirm("此操作将永久删除, 是否继续?", "提示", {
  1360. confirmButtonText: "确定",
  1361. cancelButtonText: "取消",
  1362. type: "warning",
  1363. })
  1364. .then(() => {
  1365. this.$api.api
  1366. .equipmentZxOnDelete({
  1367. id: row.id,
  1368. })
  1369. .then((res) => {
  1370. this.$message({
  1371. type: "success",
  1372. message: "删除成功!",
  1373. });
  1374. this.equipmentManagement();
  1375. });
  1376. })
  1377. .catch(() => {
  1378. // this.$message({
  1379. // type: "info",
  1380. // message: "已取消删除",
  1381. // });
  1382. });
  1383. },
  1384. handleSizeChange(val) {
  1385. console.log(`每页 ${val} 条`);
  1386. this.size = val;
  1387. this.equipmentManagement();
  1388. },
  1389. handleCurrentChange(val) {
  1390. console.log(`当前页: ${val}`);
  1391. this.currentPage = val;
  1392. this.equipmentManagement();
  1393. },
  1394. },
  1395. };
  1396. </script>
  1397. <style scoped="scoped" lang="scss" >
  1398. .box-center {
  1399. width: 100%;
  1400. padding: 15px;
  1401. min-width: 1000px;
  1402. padding-bottom: 100px;
  1403. }
  1404. .cen-tab {
  1405. width: 100%;
  1406. padding: 15px;
  1407. background: #ffffff;
  1408. margin-top: 15px;
  1409. }
  1410. .tophove {
  1411. color: #ffffff;
  1412. background: #2671e2;
  1413. }
  1414. .app-top {
  1415. width: 100%;
  1416. background: #ffffff;
  1417. box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
  1418. border-radius: 4px;
  1419. padding-top: 15px;
  1420. padding-bottom: 15px;
  1421. .app-titel {
  1422. width: 100%;
  1423. display: flex;
  1424. align-items: center;
  1425. flex-wrap: wrap;
  1426. .label {
  1427. font-size: 14px;
  1428. font-weight: 400;
  1429. color: #32363d;
  1430. line-height: 32px;
  1431. margin-left: 15px;
  1432. min-width: 78px;
  1433. }
  1434. .toptimeqhuan {
  1435. height: 30px;
  1436. background: #ffffff;
  1437. display: flex;
  1438. align-items: center;
  1439. }
  1440. .toptimeqhuan div {
  1441. padding-left: 20px;
  1442. padding-right: 20px;
  1443. text-align: center;
  1444. line-height: 30px;
  1445. font-size: 14px;
  1446. margin-right: 15px;
  1447. border-radius: 4px;
  1448. border: 1px solid #e0e0e0;
  1449. }
  1450. }
  1451. }
  1452. .div-lab {
  1453. display: flex;
  1454. margin: 5px;
  1455. }
  1456. .div-inp {
  1457. width: 250px;
  1458. }
  1459. </style>