deviceManagement.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. <template>
  2. <div class="deviceManagement">
  3. <!-- 菜单栏 -->
  4. <div>
  5. <el-menu :default-active="menuIndex" class="el-menu-vertical-demo"
  6. @select="(index) => menuHandleSelect(index, false)">
  7. <el-menu-item index="info" v-if="permissions.equipmentInformationManagement">
  8. <i class="el-icon-menu"></i>
  9. <span slot="title">设备信息管理</span>
  10. </el-menu-item>
  11. <el-menu-item index="cost" v-if="permissions.equipmentCostManagement">
  12. <i class="el-icon-document"></i>
  13. <span slot="title">设备成本管理</span>
  14. </el-menu-item>
  15. </el-menu>
  16. </div>
  17. <!-- 主页面 -->
  18. <div class="deviceManagement-container">
  19. <!-- 审核信息管理 -->
  20. <template v-if="menuIndex === 'info'">
  21. <div class="deviceManagement-title">
  22. <div class="deviceManagement-title-left">
  23. <div>设备管理</div>
  24. <el-input placeholder="请输入关键字" v-model.trim="equipmentCode" size="small" style="width: 380px;" clearable>
  25. <el-select v-model="deviceStringType" slot="prepend" style="width: 80px;">
  26. <el-option label="编号" value="1"></el-option>
  27. <el-option label="名称" value="2"></el-option>
  28. </el-select>
  29. <template slot="append">
  30. <el-button @click="searchForDevices">搜索</el-button>
  31. </template>
  32. </el-input>
  33. </div>
  34. <div class="deviceManagement-title-right">
  35. <el-button type="text" @click="editDevice({}, true)">添加设备</el-button>
  36. <el-button type="text" @click="exportDevice()" :loading="allLoading.exportDeviceLoading">导出设备</el-button>
  37. </div>
  38. </div>
  39. <div class="deviceManagement-table">
  40. <el-table :data="deviceManagementList" border height="calc(100% - 10px)" v-loading="allLoading.tableLoading"
  41. :key="12" style="width: 100%;">
  42. <el-table-column prop="deviceCode" label="设备编号"></el-table-column>
  43. <el-table-column prop="deviceName" label="设备名称"></el-table-column>
  44. <el-table-column prop="deviceModel" label="设备型号"></el-table-column>
  45. <el-table-column prop="manufacturer" label="制造商"></el-table-column>
  46. <el-table-column prop="purchaseDate" label="购置日期" width="120"></el-table-column>
  47. <el-table-column prop="maintenanceDate" label="维保日期" width="120"></el-table-column>
  48. <el-table-column prop="operation" label="操作" width="200">
  49. <template slot-scope="scope">
  50. <el-button type="text" @click="editDevice(scope.row, true)">编辑</el-button>
  51. <el-button type="text" @click="deleteDevice(scope.$index, scope.row)">删除</el-button>
  52. <el-button type="text" @click="seeDevice(scope.$index, scope.row)">查看二维码</el-button>
  53. </template>
  54. </el-table-column>
  55. </el-table>
  56. </div>
  57. </template>
  58. <!-- 设备成本管理 -->
  59. <template v-if="menuIndex === 'cost'">
  60. <div class="deviceManagement-title">
  61. <div class="deviceManagement-title-left">
  62. <div>设备成本管理</div>
  63. <el-date-picker v-model="costYmonth" value-format="yyyy-MM" type="month" size="small"
  64. style="width: 120px;margin-right: 20px" :clearable="false" @change="searchDevicesCost"></el-date-picker>
  65. <el-input placeholder="请输入关键字" v-model.trim="costDeviceCode" size="small" style="width: 380px;" clearable>
  66. <template slot="append">
  67. <el-button @click="searchDevicesCost">搜索</el-button>
  68. </template>
  69. </el-input>
  70. </div>
  71. <div class="deviceManagement-title-right">
  72. <el-button type="text" @click="displayFileUpload()" style="margin-right: 10px;">成本数据上传</el-button>
  73. <!-- <el-button type="text">成本模板下载</el-button> -->
  74. <el-link type="primary" :underline="false" href="./upload/设备成本.xlsx" download="设备成本.xlsx">成本模板下载</el-link>
  75. </div>
  76. </div>
  77. <div class="deviceManagement-table">
  78. <el-table :data="deviceCostList" border height="calc(100% - 10px)" @selection-change="handleSelectionChange"
  79. v-loading="allLoading.tableLoading" :key="21" show-summary :summary-method="getSummaries" style="width: 100%;">
  80. <el-table-column type="selection" width="55"></el-table-column>
  81. <el-table-column prop="deviceCode" label="设备编号"></el-table-column>
  82. <el-table-column prop="deviceName" label="设备名称"></el-table-column>
  83. <el-table-column prop="deviceModel" label="设备型号"></el-table-column>
  84. <el-table-column prop="manufacturer" label="制造商"></el-table-column>
  85. <el-table-column prop="monthCost" label="当月成本(元)"></el-table-column>
  86. <el-table-column prop="operation" label="操作" width="120">
  87. <template slot-scope="scope">
  88. <el-button type="text" @click="displaModifyCost(scope.row, true)">修改成本</el-button>
  89. </template>
  90. </el-table-column>
  91. </el-table>
  92. </div>
  93. </template>
  94. <!-- 分页 -->
  95. <div class="deviceManagement-page">
  96. <div>
  97. <el-button v-if="menuIndex == 'cost'" type="primary" size="small" :disabled="tableSelection.length == 0"
  98. @click="batchDeletion()">批量删除</el-button>
  99. </div>
  100. <el-pagination background layout="total, prev, pager, next, sizes" :page-size="pageSize" :total="total"
  101. :page-sizes="[10, 20, 30, 50, 100, 200]" :current-page="pageIndex" @current-change="handleCurrentChange"
  102. @size-change="handleSizeChange" size="small">
  103. </el-pagination>
  104. </div>
  105. </div>
  106. <!-- 新增编辑 -->
  107. <el-dialog title="新增/修改设备" :visible.sync="equipmentVisable" width="780px" top="7.8vh"
  108. :before-close="addEditCallback">
  109. <div class="modifyEquipment">
  110. <el-form :model="equipmentForm" :rules="equipmentRules" ref="equipmentruleForm" label-width="100px"
  111. class="demo-ruleForm">
  112. <el-form-item label="设备编号" prop="deviceCode">
  113. <el-input v-model.trim="equipmentForm.deviceCode" placeholder="请输入设备编码" :maxlength="100"></el-input>
  114. </el-form-item>
  115. <el-form-item label="设备名称" prop="deviceName">
  116. <el-input v-model.trim="equipmentForm.deviceName" placeholder="请输入设备名称" :maxlength="100"></el-input>
  117. </el-form-item>
  118. <el-form-item label="设备型号" prop="deviceModel">
  119. <el-input v-model.trim="equipmentForm.deviceModel" placeholder="请输入设备型号" :maxlength="100"></el-input>
  120. </el-form-item>
  121. <el-form-item label="制造商" prop="manufacturer">
  122. <el-input v-model.trim="equipmentForm.manufacturer" placeholder="请输入制造商" :maxlength="100"></el-input>
  123. </el-form-item>
  124. <el-form-item label="购置日期" prop="purchaseDate">
  125. <el-date-picker v-model="equipmentForm.purchaseDate" value-format="yyyy-MM-dd" type="date"
  126. placeholder="选择日期" style="width: 100%;"></el-date-picker>
  127. </el-form-item>
  128. <el-form-item label="维保日期" prop="maintenanceDate">
  129. <el-date-picker v-model="equipmentForm.maintenanceDate" value-format="yyyy-MM-dd" type="date"
  130. placeholder="选择日期" style="width: 100%;"></el-date-picker>
  131. </el-form-item>
  132. </el-form>
  133. </div>
  134. <span slot="footer" class="dialog-footer">
  135. <el-button @click="closeEquipmentVisable()">取 消</el-button>
  136. <el-button type="primary" @click="submitForm('equipmentruleForm')">确 定</el-button>
  137. </span>
  138. </el-dialog>
  139. <!-- 查看二维码 -->
  140. <!-- <el-dialog :title="`${equipmentItem.deviceCode} - ${equipmentItem.deviceName}`" -->
  141. <el-dialog :title="`查看二维码`"
  142. :visible.sync="equipmentQrCodeVisable" width="600px" top="7.8vh" :before-close="handleClose">
  143. <div class="equipmentQrCode" ref="printContent">
  144. <div class="equipmentQrCodeImg">
  145. <img :src="qrCodeURL" alt="二维码" />
  146. </div>
  147. <div class="equipmentQrCodeText">
  148. <p>设备编号:{{ equipmentItem.deviceCode }}</p>
  149. <p>设备名称:{{ equipmentItem.deviceName }}</p>
  150. </div>
  151. </div>
  152. <span slot="footer" class="dialog-footer">
  153. <el-button type="primary" @click="print()">打 印</el-button>
  154. </span>
  155. </el-dialog>
  156. <!-- 成本数据上传 -->
  157. <el-dialog title="成本数据上传" :visible.sync="uploadFileVisable" width="780px" top="7.8vh" :before-close="handleClose">
  158. <el-form :model="uploadFileFormVal" label-width="100px" class="demo-ruleForm">
  159. <el-form-item label="上传月份">
  160. <el-date-picker v-model="uploadFileFormVal.ymonthStr" value-format="yyyy-MM" type="month" size="small"
  161. style="" :clearable="false"></el-date-picker>
  162. </el-form-item>
  163. <el-form-item label="上传文件">
  164. <el-upload class="upload-demo" :show-file-list="false" :http-request="uploadFileCost"
  165. v-if="!uploadFileFormVal.fileName">
  166. <el-button size="small" type="primary">点击上传</el-button>
  167. </el-upload>
  168. <el-tag closable @close="closeCostFile()" disable-transitions v-else>{{ uploadFileFormVal.fileName }}</el-tag>
  169. </el-form-item>
  170. <div class="textPrompt">上传会更新已有的设备成本!!!</div>
  171. </el-form>
  172. <span slot="footer" class="dialog-footer">
  173. <el-button @click="uploadFileVisable = false">取 消</el-button>
  174. <el-button type="primary" :disabled="!uploadFileFormVal.fileName" :loading="allLoading.costFileLoading"
  175. @click="uploadCostFiles()">确 定</el-button>
  176. </span>
  177. </el-dialog>
  178. <!-- 修改成本 -->
  179. <el-dialog :title="modifyCostTitle" :visible.sync="modifyCostVisable" width="780px" top="7.8vh"
  180. :before-close="handleClose">
  181. <el-form :model="modifyCostform" label-width="100px" style="margin-top: 20px;">
  182. <el-form-item label="当月成本">
  183. <el-input-number v-model="modifyCostform.monthCost" controls-position="right" size="small"
  184. style="width: 60%;"></el-input-number>
  185. <span>(元)</span>
  186. </el-form-item>
  187. </el-form>
  188. <span slot="footer" class="dialog-footer">
  189. <el-button @click="modifyCostVisable = false">取 消</el-button>
  190. <el-button type="primary" :disabled="!modifyCostform.monthCost" :loading="allLoading.modifyCostLoading"
  191. @click="modifyCostAmountOfMoney()">确 定</el-button>
  192. </span>
  193. </el-dialog>
  194. </div>
  195. </template>
  196. <script>
  197. import QRCode from 'qrcode';
  198. export default {
  199. data() {
  200. return {
  201. menuIndex: 'info',
  202. equipmentCode: '',
  203. deviceStringType: '1',
  204. equipmentVisable: false,
  205. equipmentQrCodeVisable: false,
  206. equipmentForm: {},
  207. equipmentItem: {},
  208. qrCodeURL: '',
  209. pageIndex: 1,
  210. pageSize: 20,
  211. total: 0,
  212. equipmentRules: {
  213. deviceCode: [{ required: true, message: '请输入设备编码', trigger: 'blur' }],
  214. deviceName: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
  215. deviceModel: [{ required: true, message: '请输入设备型号', trigger: 'blur' }],
  216. manufacturer: [{ required: true, message: '请输入制造商', trigger: 'blur' }],
  217. purchaseDate: [{ required: true, message: '请选择购置日期', trigger: 'blur' }],
  218. maintenanceDate: [{ required: true, message: '请选择维保日期', trigger: 'blur' }]
  219. },
  220. deviceManagementList: [],
  221. allLoading: {
  222. exportDeviceLoading: false,
  223. tableLoading: false,
  224. costFileLoading: false,
  225. modifyCostLoading: false
  226. },
  227. costYmonth: this.dayjs().format('YYYY-MM'),
  228. costDeviceCode: '',
  229. deviceCostList: [],
  230. uploadFileFormVal: {
  231. file: '',
  232. fileName: '',
  233. ymonthStr: '',
  234. },
  235. uploadFileVisable: false,
  236. modifyCostVisable: false,
  237. modifyCostTitle: '',
  238. modifyCostform: {
  239. monthCost: ''
  240. },
  241. tableSelection: [],
  242. permissions: JSON.parse(sessionStorage.getItem("permissions")),
  243. };
  244. },
  245. mounted() {
  246. if (this.permissions.equipmentInformationManagement) {
  247. this.menuIndex = 'info'
  248. this.getDeviceManagementList()
  249. return
  250. }
  251. if (this.permissions.equipmentCostManagement) {
  252. this.menuIndex = 'cost'
  253. this.getDeviceCostList()
  254. return
  255. }
  256. },
  257. methods: {
  258. // 打印
  259. print() {
  260. this.$print(this.$refs.printContent)
  261. },
  262. getSummaries(param) {
  263. const { columns, data } = param;
  264. const sums = [];
  265. columns.forEach((column, index) => {
  266. if (index === 0) {
  267. sums[index] = '总计';
  268. return;
  269. }
  270. if (index === 5) {
  271. const values = data.map(item => Number(item[column.property]));
  272. if (!values.every(value => isNaN(value))) {
  273. sums[index] = values.reduce((prev, curr) => {
  274. const value = Number(curr);
  275. if (!isNaN(value)) {
  276. return prev + curr;
  277. } else {
  278. return prev;
  279. }
  280. }, 0);
  281. sums[index] += '';
  282. } else {
  283. sums[index] = 'N/A';
  284. }
  285. }
  286. });
  287. return sums;
  288. },
  289. batchDeletion() {
  290. const numbers = this.tableSelection.map(item => item.deviceCode).join(',')
  291. const ids = this.tableSelection.map(item => item.id).join(',')
  292. this.$confirm(`此操作将删除设备编码为【${numbers}】的设备, 是否继续?`, '删除设备', {
  293. confirmButtonText: '确定',
  294. cancelButtonText: '取消',
  295. type: 'warning'
  296. }).then(() => {
  297. this.postData(`/device-cost/deleteBatch`, { ids }).then(() => {
  298. this.$message({
  299. type: 'success',
  300. message: '删除成功!'
  301. });
  302. this.searchDevicesCost()
  303. })
  304. }).catch(() => { });
  305. },
  306. handleSelectionChange(val) {
  307. this.tableSelection = val
  308. },
  309. modifyCostAmountOfMoney() {
  310. const { id, monthCost } = this.modifyCostform
  311. this.allLoading.modifyCostLoading = true
  312. this.postData(`/device-cost/edit`, {
  313. id,
  314. monthCost
  315. }).then(res => {
  316. this.$message.success('修改成功')
  317. this.modifyCostVisable = false
  318. this.getDeviceCostList()
  319. }).finally(() => {
  320. this.allLoading.modifyCostLoading = false
  321. })
  322. },
  323. exportDevice() {
  324. this.allLoading.exportDeviceLoading = true
  325. const formVal = this.deviceStringType === '1'
  326. ? { deviceCode: this.equipmentCode }
  327. : this.deviceStringType === '2'
  328. ? { deviceName: this.equipmentCode }
  329. : {};
  330. this.postData(`/device/exportDevice`, {
  331. ...formVal
  332. }).then((res) => {
  333. this.downloadFiles(res.data, '设备信息表')
  334. }).finally(() => {
  335. this.allLoading.exportDeviceLoading = false
  336. })
  337. },
  338. searchForDevices() {
  339. this.getDeviceManagementList()
  340. },
  341. searchDevicesCost() {
  342. this.getDeviceCostList()
  343. },
  344. getDeviceCostList() {
  345. this.allLoading.tableLoading = true
  346. this.postData(`/device-cost/getDeviceCostPage`, {
  347. pageIndex: this.pageIndex,
  348. pageSize: this.pageSize,
  349. deviceCode: this.costDeviceCode,
  350. ymonth: this.costYmonth
  351. }).then(res => {
  352. const { total, mapList } = res.data
  353. this.deviceCostList = mapList
  354. this.total = total
  355. }).finally(() => {
  356. this.allLoading.tableLoading = false
  357. })
  358. },
  359. getDeviceManagementList() {
  360. const formVal = this.deviceStringType === '1'
  361. ? { deviceCode: this.equipmentCode }
  362. : this.deviceStringType === '2'
  363. ? { deviceName: this.equipmentCode }
  364. : {};
  365. this.allLoading.tableLoading = true
  366. this.postData(`/device/getDevicePage`, {
  367. pageIndex: this.pageIndex,
  368. pageSize: this.pageSize,
  369. ...formVal
  370. }).then(res => {
  371. const { total, data } = res.data
  372. this.deviceManagementList = data
  373. this.total = total
  374. }).finally(() => {
  375. this.allLoading.tableLoading = false
  376. })
  377. },
  378. uploadFileCost(file) {
  379. console.log(file, '<==== 选择文件')
  380. this.uploadFileFormVal = {
  381. ...this.uploadFileFormVal,
  382. file: file.file,
  383. fileName: file.file.name
  384. }
  385. },
  386. closeCostFile() {
  387. this.uploadFileFormVal = {
  388. ...this.uploadFileFormVal,
  389. file: '',
  390. fileName: ''
  391. }
  392. },
  393. displaModifyCost(row) {
  394. this.modifyCostform = { ...row }
  395. this.modifyCostTitle = `修改设备编码【${row.deviceCode}】的成本`
  396. this.modifyCostVisable = true
  397. },
  398. displayFileUpload() {
  399. this.uploadFileFormVal = {
  400. file: '',
  401. fileName: '',
  402. ymonthStr: this.dayjs().format('YYYY-MM'),
  403. }
  404. this.uploadFileVisable = true
  405. },
  406. seeDevice(i, row) {
  407. console.log(JSON.stringify({id: row.id}))
  408. QRCode.toDataURL(JSON.stringify({id: row.id}))
  409. .then(url => {
  410. this.qrCodeURL = url;
  411. })
  412. .catch(err => {
  413. console.error(err);
  414. });
  415. this.equipmentItem = row
  416. this.equipmentQrCodeVisable = true
  417. },
  418. editDevice(row, flag) {
  419. this.equipmentForm = { ...row }
  420. this.equipmentVisable = flag
  421. },
  422. deleteDevice(i, row) {
  423. const { deviceCode, id } = row
  424. this.$confirm(`此操作将删除设备编码为【${deviceCode}】的设备, 是否继续?`, '删除设备', {
  425. confirmButtonText: '确定',
  426. cancelButtonText: '取消',
  427. type: 'warning'
  428. }).then(() => {
  429. this.postData(`/device/delete`, { id }).then(() => {
  430. this.$message({
  431. type: 'success',
  432. message: '删除成功!'
  433. });
  434. this.searchForDevices()
  435. })
  436. }).catch(() => { });
  437. },
  438. submitForm(formName) {
  439. this.$refs[formName].validate((valid) => {
  440. if (valid) {
  441. console.log('submit!');
  442. this.postData('/device/updateOrInsert', this.equipmentForm).then(() => {
  443. this.$message({
  444. message: '操作成功',
  445. type: 'success'
  446. });
  447. this.searchForDevices()
  448. this.equipmentVisable = false
  449. })
  450. } else {
  451. console.log('error submit!!');
  452. return false;
  453. }
  454. });
  455. },
  456. handleCurrentChange(val) {
  457. this.pageIndex = val
  458. this.menuHandleSelect(this.menuIndex, true)
  459. },
  460. handleSizeChange(val) {
  461. this.pageSize = val
  462. this.pageIndex = 1
  463. this.menuHandleSelect(this.menuIndex, true)
  464. },
  465. menuHandleSelect(index, flag = false) {
  466. console.log(flag, '<==== 已修改')
  467. if (!flag) {
  468. this.pageIndex = 1
  469. }
  470. if (index == 'info') {
  471. this.getDeviceManagementList()
  472. }
  473. if (index == 'cost') {
  474. this.searchDevicesCost()
  475. }
  476. this.tableSelection = []
  477. this.menuIndex = index
  478. },
  479. downloadFiles(filePath, fileName) {
  480. const a = document.createElement('a'); // 创建a标签
  481. a.setAttribute('download', fileName + '.xlsx');// download属性
  482. a.setAttribute('href', filePath);// href链接
  483. a.click(); //自执行点击事件
  484. a.remove();
  485. },
  486. uploadCostFiles() {
  487. const file = this.uploadFileFormVal.file
  488. const ymonthStr = this.uploadFileFormVal.ymonthStr
  489. const formData = new FormData()
  490. formData.append('file', file)
  491. formData.append('ymonthStr', ymonthStr)
  492. this.allLoading.costFileLoading = true
  493. this.http.uploadFile(`/device-cost/importDeviceCost`, formData, res => {
  494. if (res.code == 'ok') {
  495. this.$message({
  496. type: 'success',
  497. message: `上传成功`
  498. })
  499. this.searchDevicesCost()
  500. } else {
  501. this.$message({
  502. message: res.msg,
  503. type: 'error'
  504. })
  505. }
  506. this.uploadFileVisable = false
  507. this.allLoading.costFileLoading = false
  508. }, err => {
  509. this.allLoading.costFileLoading = false
  510. })
  511. },
  512. addEditCallback(done) {
  513. this.$refs['equipmentruleForm'].resetFields();
  514. done()
  515. },
  516. closeEquipmentVisable() {
  517. this.$refs['equipmentruleForm'].resetFields();
  518. this.equipmentVisable = false
  519. },
  520. async postData(urls, param) { // 封装请求函数
  521. return new Promise((resolve, reject) => {
  522. this.http.post(urls, { ...param },
  523. res => {
  524. if (res.code == 'ok') {
  525. resolve(res)
  526. } else {
  527. this.$message({
  528. message: res.msg,
  529. type: 'error'
  530. })
  531. reject(res)
  532. }
  533. resolve(res)
  534. },
  535. error => {
  536. this.$message({
  537. message: error,
  538. type: "error"
  539. });
  540. reject(error)
  541. }
  542. )
  543. });
  544. },
  545. },
  546. };
  547. </script>
  548. <style lang="scss" scoped>
  549. .deviceManagement {
  550. display: flex;
  551. flex-direction: row;
  552. height: 100%;
  553. .deviceManagement-title-right {
  554. display: flex;
  555. align-items: center;
  556. padding-right: 10px;
  557. }
  558. .deviceManagement-page {
  559. background: #F2F2F2;
  560. padding: 10px 20px;
  561. display: flex;
  562. box-sizing: border-box;
  563. justify-content: space-between;
  564. }
  565. .deviceManagement-container {
  566. flex: 1;
  567. display: flex;
  568. height: 100%;
  569. flex-direction: column;
  570. }
  571. .deviceManagement-title {
  572. display: flex;
  573. align-items: center;
  574. justify-content: space-between;
  575. background: #F2F2F2;
  576. padding: 10px 10px;
  577. .deviceManagement-title-left {
  578. display: flex;
  579. align-items: center;
  580. margin-right: 20px;
  581. &>div {
  582. width: 100px;
  583. }
  584. }
  585. }
  586. .deviceManagement-table {
  587. flex: 1;
  588. overflow: auto;
  589. }
  590. .modifyEquipment {
  591. height: 378px;
  592. overflow: auto;
  593. padding: 0 20px;
  594. }
  595. .equipmentQrCodeImg {
  596. width: 350px;
  597. height: 350px;
  598. background: red;
  599. margin: auto;
  600. img {
  601. width: 100%;
  602. height: 100%;
  603. }
  604. }
  605. .equipmentQrCodeText {
  606. width: 100%;
  607. font-size: 20px;
  608. padding: 0 20px 10px 20px;
  609. }
  610. .equipmentQrCode {
  611. display: flex;
  612. flex-direction: column;
  613. width: 100%;
  614. height: 60vh;
  615. overflow-y: auto;
  616. overflow-x: hidden;
  617. }
  618. .textPrompt {
  619. color: red;
  620. padding: 0 0 0 30px;
  621. }
  622. }
  623. </style>
  624. <style lang="scss">
  625. .deviceManagement .el-dialog__body {
  626. padding: 0;
  627. }
  628. </style>