Index.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div id="app-base-software-open">
  3. <div class="one-block-1">
  4. <span>
  5. 1. 调用其它软件(exe、bash等可执行程序)
  6. </span>
  7. <p/>
  8. <span class="sub-content">
  9. 注:请先将【powershell.exe】复制到【electron-egg/build/extraResources】目录中
  10. </span>
  11. </div>
  12. <div class="one-block-2">
  13. <a-list bordered :data-source="data">
  14. <a-list-item slot="renderItem" slot-scope="item" @click="openSoft(item.id)">
  15. {{ item.content }}
  16. <a-button type="link">
  17. 执行
  18. </a-button>
  19. </a-list-item>
  20. </a-list>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import { ipcApiRoute } from '@/api/main'
  26. const data = [
  27. {
  28. content: 'powershell.exe',
  29. id: 'powershell.exe'
  30. }
  31. ];
  32. export default {
  33. data() {
  34. return {
  35. data,
  36. };
  37. },
  38. methods: {
  39. openSoft (id) {
  40. const self = this;
  41. this.$ipc.on(ipcApiRoute.openSoftware, (event, result) => {
  42. if (!result) {
  43. self.$message.error('程序不存在');
  44. }
  45. })
  46. this.$ipc.send(ipcApiRoute.openSoftware, id);
  47. },
  48. }
  49. };
  50. </script>
  51. <style lang="less" scoped>
  52. #app-base-software-open {
  53. padding: 0px 10px;
  54. text-align: left;
  55. width: 100%;
  56. .one-block-1 {
  57. font-size: 16px;
  58. padding-top: 10px;
  59. .sub-content {
  60. font-size: 14px;
  61. }
  62. }
  63. .one-block-2 {
  64. padding-top: 10px;
  65. }
  66. }
  67. </style>