index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885
  1. <!-- -->
  2. <template>
  3. <div class="con" v-loading.fullscreen.lock="loading">
  4. <div class="h-header">
  5. <vcenter>
  6. <div>
  7. 关键字:
  8. </div>
  9. <div class="h-input">
  10. <el-input v-model="inpuKey" placeholder="输入角色名称"></el-input>
  11. </div>
  12. <div>
  13. <el-button type="primary" @click="search(inpuKey)">查询</el-button>
  14. <el-button>导出</el-button>
  15. </div>
  16. </vcenter>
  17. </div>
  18. <div class="h-body">
  19. <div style="padding:0 20px;">
  20. <el-button type="primary">新增角色</el-button>
  21. <el-button>修改权限</el-button>
  22. </div>
  23. <el-table height="520" :data="tableData" style="width: 100%;padding:0 20px;">
  24. <el-table-column
  25. v-for="(item,i) in tableHeader"
  26. :key="i"
  27. :prop="item.name"
  28. :label="item.label"
  29. >
  30. <template slot-scope="scope">
  31. <span
  32. @click="view_device(scope.row)"
  33. class="o-span"
  34. v-if="item.label==='设备数量'"
  35. >{{scope['row'].cameraNum}}</span>
  36. <div class="logo-add" v-else-if="item.label==='加载界面logo'">
  37. <div @click="showLoadingLogo(scope.row,'scene')">
  38. <img :src="scope['row'].sceneLogo" alt />
  39. <span>+</span>
  40. </div>
  41. </div>
  42. <div class="logo-add" v-else-if="item.label==='加载地面logo'">
  43. <div @click="showLoadingLogo(scope.row,'floor')">
  44. <img :src="scope['row'].floorLogo" alt />
  45. <span>+</span>
  46. </div>
  47. </div>
  48. <div class="logo-add" v-else-if="item.label==='背景音乐'">
  49. <div @click="showLoadingLogo(scope.row,'music')">
  50. <img :src="scope['row'].bgMusic?require('@/assets/images/icon_mp3.png'):''" alt />
  51. <span v-if="!scope['row'].bgMusic">+</span>
  52. </div>
  53. </div>
  54. <span v-else-if="item.label==='子账号数量'">{{scope['row'].subNum+scope['row'].num}}</span>
  55. <div
  56. class="time-data"
  57. v-else-if="item.label==='到期时间'"
  58. >
  59. <div class="select-data" @click="daoqiDate = scope.row">
  60. <el-date-picker
  61. v-model="value1"
  62. @change="dateChange"
  63. value-format="yyyy-MM-dd"
  64. type="date"
  65. placeholder="选择日期">
  66. </el-date-picker>
  67. </div>
  68. <span>{{scope.row[item.name]?$base.dateFormat('yyyy-MM-dd', new Date(scope.row[item.name])):'暂无到期时间'}}</span></div>
  69. <span v-else>{{scope.row[item.name]}}</span>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. <div class="p-con">
  74. <el-pagination
  75. @size-change="handleSizeChange"
  76. @current-change="handleCurrentChange"
  77. :current-page.sync="currentPage"
  78. :page-size="size"
  79. layout="prev, pager, next, jumper"
  80. :total="total"
  81. ></el-pagination>
  82. </div>
  83. </div>
  84. </div>
  85. </template>
  86. <script>
  87. // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  88. // 例如:import 《组件名称》 from '《组件路径》';
  89. import vcenter from '@/components/vcenter'
  90. import { serverName } from '@/utils/http'
  91. const tableHeader = [
  92. {
  93. name: 'daihao',
  94. label: '角色名称'
  95. },
  96. {
  97. name: 'sceneLogo',
  98. label: '创建人'
  99. },
  100. {
  101. name: 'floorLogo',
  102. label: '创建时间'
  103. },
  104. {
  105. name: 'lasttime',
  106. label: '上次修改时间'
  107. },
  108. {
  109. name: 'lasttime',
  110. label: '备注'
  111. }
  112. ]
  113. let saveTypes = {
  114. scene: '加载界面logo',
  115. floor: '加载地面logo',
  116. music: '背景音乐'
  117. }
  118. let sceneTypeArr = {
  119. scene: 'sceneLogo',
  120. floor: 'floorLogo',
  121. music: 'bgMusic'
  122. }
  123. export default {
  124. // import引入的组件需要注入到对象中才能使用
  125. components: {
  126. vcenter
  127. },
  128. data () {
  129. // 这里存放数据
  130. let dropdownActives = [{
  131. text: '企业账号',
  132. id: 'account'
  133. },
  134. {
  135. text: '设备ID',
  136. id: 'childName'
  137. }]
  138. let placeholder = {
  139. account: '输入企业账号查询',
  140. childName: '输入设备ID查询'
  141. }
  142. return {
  143. dropdownActives,
  144. dropdown_active: {
  145. text: '企业账号',
  146. id: 'account'
  147. },
  148. placeholder,
  149. fileList: [],
  150. currentlogo_id: '',
  151. homepic: '',
  152. saveTypes,
  153. saveType: 'scene',
  154. isAdd: false,
  155. serverName,
  156. c_num: '',
  157. tableData: [],
  158. tableHeader,
  159. dialogFormVisible: false,
  160. chargeVisible: false,
  161. deviceFormVisible: false,
  162. loadinglogoVisible: false,
  163. currentPage: 1,
  164. num: 1,
  165. loading: false,
  166. formLabelWidth: '100px',
  167. errMsg: '该ID不可用',
  168. userName: '',
  169. recharge_id: '',
  170. daoqiDate: '',
  171. form_charge: {
  172. userName: '',
  173. point: '',
  174. recharge: ''
  175. },
  176. form: {
  177. name: '',
  178. region: '',
  179. date1: '',
  180. date2: '',
  181. delivery: false,
  182. type: [],
  183. resource: '',
  184. desc: ''
  185. },
  186. form_device: {
  187. d_userName: '',
  188. d_name: '',
  189. d_device: []
  190. },
  191. size: 10,
  192. total: 0,
  193. c_id: null,
  194. c_subNum: '',
  195. c_userName: '',
  196. c_name: '',
  197. addDevies: [
  198. {
  199. value: '',
  200. isAvailable: false,
  201. hasCheck: false
  202. }
  203. ],
  204. inpuKey: '',
  205. value1: ''
  206. }
  207. },
  208. // 监听属性 类似于data概念
  209. computed: {
  210. token () {
  211. return window.localStorage.getItem('zfb_token')
  212. }
  213. },
  214. // 监控data中的数据变化
  215. watch: {
  216. currentPage () {
  217. this.refresh()
  218. },
  219. size () {
  220. this.refresh()
  221. },
  222. num (newVal, oldVal) {
  223. if (newVal > oldVal) {
  224. this.addDevies.push({
  225. value: '',
  226. isAvailable: false,
  227. hasCheck: false
  228. })
  229. } else {
  230. this.addDevies.pop()
  231. }
  232. }
  233. },
  234. // 方法集合
  235. methods: {
  236. unbind (item) {
  237. this.$confirm('此操作将解除该设备的绑定, 是否继续?', '提示', {
  238. confirmButtonText: '确定',
  239. cancelButtonText: '取消',
  240. type: 'warning'
  241. }).then(() => {
  242. this.$http({
  243. method: 'post',
  244. data: {
  245. childName: item.childName
  246. },
  247. url: '/company/unbindDevice',
  248. headers: {
  249. token: window.localStorage.getItem('zfb_token')
  250. }
  251. }).then(res => {
  252. if (res.code === 200) {
  253. this.$alert('解除成功', '提示', {
  254. confirmButtonText: '确定',
  255. callback: action => {
  256. this.deviceFormVisible = false
  257. this.refresh()
  258. }
  259. })
  260. } else {
  261. this.$notify.error({
  262. title: '错误',
  263. message: res.message
  264. })
  265. }
  266. })
  267. }).catch(() => {
  268. this.$message({
  269. type: 'info',
  270. message: '已取消删除'
  271. })
  272. })
  273. },
  274. dropClick (item) {
  275. this.inpuKey = ''
  276. this.userName = ''
  277. this.dropdown_active = item
  278. },
  279. beforeAvatarUpload (file) {
  280. const isLt5M = file.size / 1024 / 1024 < 5
  281. const isMp3 =
  282. file.type === 'audio/mp3' ||
  283. file.type === 'audio/x-ms-wma' ||
  284. file.type === 'audio/wav'
  285. if (this.saveType === 'music') {
  286. if (!isMp3) {
  287. this.$message.error('暂不支持该音频格式')
  288. return false
  289. }
  290. }
  291. if (!isLt5M) {
  292. this.$message.error('上传文件大小不能超过 5MB')
  293. return false
  294. }
  295. return true
  296. },
  297. handleChange (file, fileList) {
  298. if (fileList.length > 1) {
  299. this.fileList = fileList.slice(-1)
  300. }
  301. },
  302. dateChange (data) {
  303. // let data1 = new Date(data)
  304. this.$confirm('此操作将会更新该企业账号的到期时间, 是否继续?', '提示', {
  305. confirmButtonText: '确定',
  306. cancelButtonText: '取消',
  307. type: 'warning'
  308. }).then(() => {
  309. console.log(data)
  310. this.$http({
  311. method: 'post',
  312. data: {
  313. id: this.daoqiDate.id,
  314. expirationDate: data
  315. },
  316. url: '/company/updateExpirationTime',
  317. headers: {
  318. token: window.localStorage.getItem('zfb_token')
  319. }
  320. }).then(res => {
  321. if (res.code === 200) {
  322. this.$alert('更新成功', '提示', {
  323. confirmButtonText: '确定',
  324. callback: action => {
  325. this.refresh()
  326. }
  327. })
  328. } else {
  329. this.$notify.error({
  330. title: '错误',
  331. message: res.message
  332. })
  333. }
  334. })
  335. }).catch(() => {
  336. this.$message({
  337. type: 'info',
  338. message: '已取消'
  339. })
  340. })
  341. },
  342. upload_success (data) {
  343. this.homepic = data.message
  344. },
  345. upload_fail (data) {
  346. this.$notify.error({
  347. title: '上传失败',
  348. message: data.message
  349. })
  350. },
  351. handleSizeChange (val) {
  352. console.log(`每页 ${val} 条`)
  353. },
  354. handleCurrentChange (val) {
  355. console.log(`当前页: ${val}`)
  356. },
  357. _checkInput: function (e) {
  358. this.form_charge.recharge += ''
  359. this.form_charge.recharge = this.form_charge.recharge.replace(
  360. /[^\d]/g,
  361. ''
  362. )
  363. if (
  364. Number(this.form_charge.recharge) &&
  365. this.form_charge.recharge > 999999999
  366. ) {
  367. this.form_charge.recharge = 999999999
  368. }
  369. },
  370. saveLoadingLogo () {
  371. if (!this.homepic && this.saveType !== 'music') {
  372. this.$notify.error({
  373. title: '保存失败',
  374. message: '请上传图片'
  375. })
  376. } else {
  377. let params
  378. if (this.saveType === 'scene') {
  379. params = {
  380. id: this.currentlogo_id,
  381. sceneLogo: this.homepic || null
  382. }
  383. } else if (this.saveType === 'music') {
  384. params = {
  385. id: this.currentlogo_id,
  386. bgMusic: this.homepic || ''
  387. }
  388. } else {
  389. params = {
  390. id: this.currentlogo_id,
  391. floorLogo: this.homepic || null
  392. }
  393. }
  394. this.$http({
  395. method: 'post',
  396. data: params,
  397. url: '/company/updateCompany',
  398. headers: {
  399. token: window.localStorage.getItem('zfb_token')
  400. }
  401. }).then(res => {
  402. if (res.code === 200) {
  403. this.$alert('保存成功', '提示', {
  404. confirmButtonText: '确定',
  405. callback: action => {
  406. this.loadinglogoVisible = false
  407. this.refresh()
  408. }
  409. })
  410. } else {
  411. this.$notify.error({
  412. title: '保存失败',
  413. message: res.message
  414. })
  415. }
  416. })
  417. }
  418. },
  419. refresh () {
  420. this.loading = true
  421. this.getData()
  422. this.loading = false
  423. },
  424. search (item) {
  425. this.userName = item
  426. this.refresh()
  427. },
  428. save_reCharge () {
  429. this.$confirm('此操作将对该账号进行充值, 是否继续?', '提示', {
  430. confirmButtonText: '确定',
  431. cancelButtonText: '取消',
  432. type: 'warning'
  433. })
  434. .then(() => {
  435. this.loading = true
  436. let params = {
  437. id: this.recharge_id,
  438. point: Number(this.form_charge.recharge)
  439. }
  440. this.$http({
  441. method: 'post',
  442. data: params,
  443. url: '/company/addPoint',
  444. headers: {
  445. token: window.localStorage.getItem('zfb_token')
  446. }
  447. }).then(res => {
  448. if (res.code === 200) {
  449. this.$alert('充值成功', '提示', {
  450. confirmButtonText: '确定',
  451. callback: action => {
  452. this.clearInfo()
  453. }
  454. })
  455. } else {
  456. this.loading = false
  457. this.$notify.error({
  458. title: '充值失败',
  459. message: res.message
  460. })
  461. }
  462. })
  463. })
  464. .catch(() => {
  465. this.$message({
  466. type: 'info',
  467. message: '已取消充值'
  468. })
  469. })
  470. },
  471. async show_reCharge (item) {
  472. this.chargeVisible = true
  473. this.recharge_id = item.id
  474. this.form_charge = {
  475. userName: item.userName,
  476. point: item.point,
  477. recharge: ''
  478. }
  479. },
  480. async showLoadingLogo (item, type) {
  481. console.log(item)
  482. this.saveType = type
  483. this.homepic = item[sceneTypeArr[type]] || ''
  484. this.currentlogo_id = item.id
  485. this.loadinglogoVisible = true
  486. },
  487. async view_device (item, search = false) {
  488. this.deviceFormVisible = true
  489. // this.d_subNum = item.subNum
  490. this.form_device.d_userName = item.userName
  491. this.form_device.d_name = item.name
  492. let params = {
  493. userName: item.userName
  494. }
  495. this.form_device.d_device = (await this.$http({
  496. method: 'post',
  497. data: params,
  498. url: '/company/selectCompanyDevice',
  499. headers: {
  500. token: window.localStorage.getItem('zfb_token')
  501. }
  502. })).message
  503. setTimeout(() => {
  504. let items = Array.from(this.$refs.dcon.querySelectorAll('.d-body'))
  505. let offTop = 0
  506. items.forEach(item => {
  507. item.style.background = '#fff'
  508. let txt = item.querySelectorAll('span')[1].innerText
  509. if (txt === this.userName.trim() && search) {
  510. offTop = item.offsetTop - 311
  511. item.style.background = '#ccc'
  512. }
  513. })
  514. document.querySelector('#dcon').scrollTop = offTop
  515. }, 0)
  516. },
  517. add (item) {
  518. this.dialogFormVisible = true
  519. this.c_subNum = item.subNum
  520. this.c_num = item.num
  521. this.c_userName = item.userName
  522. this.c_name = item.name
  523. this.c_id = item.id
  524. },
  525. clearInfo () {
  526. this.num = 1
  527. this.addDevies = [
  528. {
  529. value: '',
  530. isAvailable: false,
  531. hasCheck: false
  532. }
  533. ]
  534. this.dialogFormVisible = false
  535. this.chargeVisible = false
  536. this.recharge_id = ''
  537. this.form_charge = {
  538. userName: '',
  539. point: '',
  540. recharge: ''
  541. }
  542. this.refresh()
  543. },
  544. canIsave () {
  545. let temp = []
  546. for (let i = 0; i < this.addDevies.length; i++) {
  547. if (this.addDevies[i].isAvailable === true) {
  548. temp.push(this.addDevies[i].value)
  549. } else {
  550. temp = []
  551. return false
  552. }
  553. }
  554. return temp.join(';')
  555. },
  556. save (userName) {
  557. let params = {
  558. childName: this.canIsave() || null,
  559. userName: userName || null,
  560. id: this.c_id || null,
  561. subNum: this.c_subNum || null
  562. }
  563. this.loading = true
  564. this.$http({
  565. method: 'post',
  566. data: params,
  567. url: '/company/addDevice',
  568. headers: {
  569. token: window.localStorage.getItem('zfb_token')
  570. }
  571. }).then(res => {
  572. if (res.code === 200) {
  573. this.$alert('添加成功', '提示', {
  574. confirmButtonText: '确定',
  575. callback: action => {
  576. this.clearInfo()
  577. }
  578. })
  579. } else {
  580. this.loading = false
  581. this.$notify.error({
  582. title: '错误',
  583. message: res.message
  584. })
  585. }
  586. })
  587. },
  588. checkLegal (item) {
  589. if (item.value) {
  590. let params = {
  591. childName: item.value
  592. }
  593. this.$http({
  594. method: 'post',
  595. data: params,
  596. url: '/company/checkDevice',
  597. headers: {
  598. token: window.localStorage.getItem('zfb_token')
  599. }
  600. }).then(res => {
  601. if (res.code === 200) {
  602. item.isAvailable = true
  603. } else {
  604. item.isAvailable = false
  605. this.errMsg = '该ID不可用'
  606. }
  607. item.hasCheck = true
  608. })
  609. } else {
  610. item.isAvailable = false
  611. item.hasCheck = true
  612. this.errMsg = 'ID不能为空'
  613. }
  614. },
  615. async getData () {
  616. let params = {
  617. userName: this.userName || ''
  618. }
  619. let result
  620. if (this.dropdown_active.id === 'childName' && this.userName) {
  621. result = await this.$http({
  622. method: 'post',
  623. data: {
  624. childName: this.userName
  625. },
  626. url: '/company/findCompanyDevice',
  627. headers: {
  628. token: window.localStorage.getItem('zfb_token')
  629. }
  630. })
  631. let {message, code} = result
  632. if (message && code === 200) {
  633. this.view_device(message, true)
  634. } else {
  635. this.$notify.error({
  636. title: '无法找到对应设备'
  637. })
  638. }
  639. } else {
  640. result = await this.$http({
  641. method: 'post',
  642. data: params,
  643. url: '/company/selectCompanyNum',
  644. headers: {
  645. token: window.localStorage.getItem('zfb_token'),
  646. pageNum: this.currentPage,
  647. pageSize: this.size
  648. }
  649. })
  650. this.tableData = result.message.list
  651. this.total = result.message.total
  652. this.currentPage = result.message.pageNum
  653. }
  654. }
  655. },
  656. // 生命周期 - 创建完成(可以访问当前this实例)
  657. created () {},
  658. // 生命周期 - 挂载完成(可以访问DOM元素)
  659. mounted () {
  660. console.log('mounted')
  661. this.refresh()
  662. },
  663. beforeCreate () {}, // 生命周期 - 创建之前
  664. beforeMount () {}, // 生命周期 - 挂载之前
  665. beforeUpdate () {}, // 生命周期 - 更新之前
  666. updated () {}, // 生命周期 - 更新之后
  667. beforeDestroy () {}, // 生命周期 - 销毁之前
  668. destroyed () {}, // 生命周期 - 销毁完成
  669. activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
  670. }
  671. </script>
  672. <style lang="scss" scoped>
  673. .con {
  674. .time-data{
  675. position: relative;
  676. .select-data{
  677. position: absolute;
  678. left: 0;
  679. top: 0;
  680. opacity: 0;
  681. cursor: pointer;
  682. }
  683. >span{
  684. color: #0175dc;
  685. }
  686. }
  687. .ei-num {
  688. .el-input-number {
  689. width: 90%;
  690. }
  691. }
  692. .clear-music {
  693. position: relative;
  694. text-align: right;
  695. top: -30px;
  696. color: #999;
  697. cursor: pointer;
  698. }
  699. .musicIcon {
  700. width: 100%;
  701. height: 100%;
  702. line-height: 1;
  703. margin-top: 35px;
  704. img {
  705. width: 50px;
  706. height: auto;
  707. }
  708. p {
  709. font-weight: bold;
  710. font-size: 14px;
  711. color: #000;
  712. line-height: 20px;
  713. height: 20px;
  714. margin-top: 20px;
  715. }
  716. }
  717. .icon-plus {
  718. margin-left: 15px;
  719. width: 40px;
  720. height: 38px;
  721. line-height: 38px;
  722. text-align: center;
  723. background: #f5f7fa;
  724. color: #999;
  725. cursor: pointer;
  726. font-size: 13px;
  727. display: inline-block;
  728. border: 1px solid #dcdfe6;
  729. border-radius: 4px;
  730. &:hover {
  731. border: 1px solid #c0c4cc;
  732. }
  733. }
  734. .add-num {
  735. margin-left: 15px;
  736. width: 250px;
  737. .icon-close,
  738. .icon-correct {
  739. line-height: 1;
  740. color: #999;
  741. }
  742. input[type="number"]::-webkit-inner-spin-button,
  743. input[type="number"]::-webkit-outer-spin-button {
  744. -webkit-appearance: none;
  745. margin: 0;
  746. }
  747. }
  748. .ei-input {
  749. width: 100%;
  750. max-height: 200px;
  751. overflow-y: auto;
  752. .input-con {
  753. display: inline-block;
  754. width: 45%;
  755. margin: 2px 5px 2px 0;
  756. height: 60px;
  757. position: relative;
  758. .el-input_err {
  759. & /deep/ .el-input__inner {
  760. border: 1px solid #f56c6c;
  761. }
  762. }
  763. .el-input_success {
  764. & /deep/ .el-input__inner {
  765. border: 1px solid #67c23a;
  766. }
  767. }
  768. span {
  769. color: #f56c6c;
  770. font-size: 12px;
  771. line-height: 1;
  772. padding-top: 4px;
  773. position: absolute;
  774. left: 0;
  775. }
  776. }
  777. }
  778. .h-header {
  779. height: 80px;
  780. background-color: #fff;
  781. padding-left: 20px;
  782. box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.1);
  783. border-radius: 3px;
  784. div {
  785. display: inline-block;
  786. }
  787. .h-input {
  788. width: 220px;
  789. }
  790. }
  791. .h-body {
  792. width: 100%;
  793. margin: 30px 0 0;
  794. padding-top: 20px;
  795. box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.1);
  796. border-radius: 3px;
  797. background-color: #fff;
  798. .logo-add {
  799. div {
  800. cursor: pointer;
  801. line-height: 40px;
  802. border: 1px dotted #dcdfe6;
  803. border-radius: 4px;
  804. font-weight: bold;
  805. font-size: 18px;
  806. display: inline-block;
  807. width: 40px;
  808. height: 40px;
  809. background: #f5f7fa;
  810. position: relative;
  811. img {
  812. width: 100%;
  813. height: 100%;
  814. position: absolute;
  815. top: 0;
  816. left: 0;
  817. }
  818. span {
  819. position: absolute;
  820. z-index: 100;
  821. left: 0;
  822. top: 0;
  823. width: 100%;
  824. height: 100%;
  825. }
  826. }
  827. }
  828. .o-span {
  829. color: #0175dc;
  830. cursor: pointer;
  831. }
  832. .p-con {
  833. width: 100%;
  834. text-align: right;
  835. padding: 25px 20px 30px;
  836. }
  837. }
  838. .d-table {
  839. border: 1px solid #ccc;
  840. .d-con {
  841. max-height: 200px;
  842. overflow-y: scroll;
  843. }
  844. .d-header {
  845. font-weight: bold;
  846. }
  847. .d-header,
  848. .d-body {
  849. height: 40px;
  850. line-height: 40px;
  851. width: 100%;
  852. border-bottom: 1px solid #ccc;
  853. &:last-child {
  854. border: none;
  855. }
  856. span {
  857. text-align: center;
  858. display: inline-block;
  859. width: 24%;
  860. }
  861. .unbind{
  862. cursor: pointer;
  863. }
  864. }
  865. }
  866. }
  867. </style>