main.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <template>
  2. <div id="main" class="main">
  3. <header-bar></header-bar>
  4. <!-- <el-table
  5. :data="tableData"
  6. style="width: 100%;margin;top:200px"
  7. :default-sort = "{prop: 'date', order: 'descending'}"
  8. >
  9. <el-table-column label="交易时间" prop="time" width="78" fixed />
  10. <el-table-column label="资产小计" prop="total" width="78" fixed>
  11. <template slot-scope="scope">
  12. <span style="color: #940819">{{ scope.row.total.toFixed(2) }}</span>
  13. </template>
  14. </el-table-column>
  15. <template v-if="bankList && bankList.length > 0">
  16. <tbody v-for="(item) in bankList" :key="item.id">
  17. <el-table-column :render-header="(h, obj) => renderHeader(h, obj, item)" align="center">
  18. <el-table-column label="收入" align="right" width="80" :prop="'rmbIncome-' + item.id">
  19. </el-table-column>
  20. <el-table-column label="支出" align="right" width="80" :prop="'rmbExpenditure-' + item.id">
  21. </el-table-column>
  22. <el-table-column label="余额" align="right" width="80" :prop="'rmbAmount-' + item.id">
  23. </el-table-column>
  24. </el-table-column>
  25. </tbody>
  26. </template>
  27. </el-table> -->
  28. <!-- <header>
  29. <ul class="nav">
  30. <img class="logo" src="../assets/logo.png" alt=""></img>
  31. <li>
  32. <router-link to="/main/fjhxCloudVue/#/wel/index">针筒</router-link>
  33. </li>
  34. <li class="active">
  35. <router-link to="/main/canvas/">canvas</router-link>
  36. </li>
  37. <li>
  38. <router-link to="/main/iotPlatformRoom/#/wel/index">云帆</router-link>
  39. </li>
  40. <li>
  41. <router-link to="/main/about">主服务about</router-link>
  42. </li>
  43. </ul>
  44. <div class="fr">
  45. <el-input
  46. class="input-search"
  47. placeholder="请输入关键词"
  48. suffix-icon="el-icon-search"
  49. v-model="input1">
  50. </el-input>
  51. <el-dropdown class="dropdown-box">
  52. <span class="el-dropdown-link">
  53. 中文<i class="el-icon-arrow-down el-icon--right"></i>
  54. </span>
  55. <el-dropdown-menu slot="dropdown">
  56. <el-dropdown-item>English</el-dropdown-item>
  57. <el-dropdown-item>中文</el-dropdown-item>
  58. </el-dropdown-menu>
  59. </el-dropdown>
  60. <el-badge :value="12" class="badge">
  61. <i class="el-icon-message-solid"></i>
  62. </el-badge>
  63. <div class="user-img">
  64. <img src="../assets/icon_people.png" alt=""></img>
  65. </div>
  66. <el-dropdown class="dropdown-box">
  67. <span class="el-dropdown-link">;
  68. leehom<i class="el-icon-arrow-down el-icon--right"></i>
  69. </span>
  70. <el-dropdown-menu slot="dropdown">
  71. <el-dropdown-item>个人中心</el-dropdown-item>
  72. <el-dropdown-item>退出</el-dropdown-item>
  73. </el-dropdown-menu>
  74. </el-dropdown>
  75. </div>
  76. </header> -->
  77. <!-- <span @click="changeParentState">主项目的数据:{{ commonData.parent }},点击变回1</span> -->
  78. <content>
  79. <!-- <left-mneu></left-mneu> -->
  80. <div class="router-warp">
  81. <div id="appContainer"></div>
  82. <router-view></router-view>
  83. </div>
  84. </content>
  85. </div>
  86. </template>
  87. <script>
  88. import leftMneu from '@/components/left-menu'
  89. import { registerMicroApps, start } from 'qiankun'
  90. import headerBar from '@/components/header-bar'
  91. import { getAll } from '@/libs/micros'
  92. import router from '../router'
  93. import store from '../store'
  94. console.log(process.env.NODE_ENV)
  95. const state = getAll()
  96. state.router = router
  97. registerMicroApps([
  98. {
  99. name: 'app-vue-hash',
  100. entry: 'http://localhost:8081',
  101. container: '#appContainer',
  102. activeRule: '/main/app-vue-hash',
  103. props:{
  104. data:state,
  105. },
  106. },
  107. {
  108. name: 'fjhxCloudVue',
  109. entry: (process.env.NODE_ENV === "development") ? 'http://localhost:1777' : 'https://wdly.bytesail.cn:10002',
  110. //entry: (process.env.NODE_ENV === "development") ? 'https://wdly.bytesail.cn:10002' : 'https://wdly.bytesail.cn:10002',
  111. container: '#appContainer',
  112. activeRule: '/main/fjhxCloudVue',
  113. props:{
  114. data:state,
  115. },
  116. },
  117. {
  118. name: 'iotPlatformRoom',
  119. entry: 'http://localhost:1888',
  120. container: '#appContainer',
  121. activeRule: '/main/iotPlatformRoom',
  122. props:{
  123. data:state,
  124. },
  125. },
  126. {
  127. name: 'canvas',
  128. entry: 'http://localhost:8080',
  129. container: '#appContainer',
  130. activeRule: '/main/canvas',
  131. props:{
  132. data:getAll()
  133. },
  134. },
  135. ]);
  136. start();
  137. export default {
  138. components:{
  139. leftMneu,
  140. headerBar
  141. },
  142. data() {
  143. return {
  144. input1: null,
  145. tableData:[],
  146. bankList:[],
  147. }
  148. },
  149. computed: {
  150. commonData() {
  151. return this.$store.state.commonData
  152. },
  153. },
  154. methods: {
  155. renderHeader(h, para, item) {
  156. return h('div', {
  157. attrs: {
  158. class: 'cell',
  159. },
  160. domProps: {
  161. innerHTML: item.name + '</br>(' + item.accountNumber + ')',
  162. },
  163. })
  164. },
  165. changeParentState() {
  166. this.$store.commit('setCommonData', { parent: 1 })
  167. },
  168. getData(){
  169. },
  170. },
  171. created(){
  172. //this.getData()
  173. },
  174. }
  175. </script>
  176. <style>
  177. .loading-9 {
  178. --r1: 154%;
  179. --r2: 68.5%;
  180. width: 60px;
  181. height: 60px;
  182. border-radius: 50%;
  183. background:
  184. radial-gradient(var(--r1) var(--r2) at top, #0000 79.5%, #269af2 80%) center left,
  185. radial-gradient(var(--r1) var(--r2) at bottom, #269af2 79.5%, #0000 80%) center center,
  186. radial-gradient(var(--r1) var(--r2) at top, #0000 79.5%, #269af2 80%) center right,
  187. #ccc;
  188. background-size: 50.5% 220%;
  189. background-position: -100% 0%, 0% 0%, 100% 0%;
  190. background-repeat: no-repeat;
  191. animation: p9 .3s infinite linear;
  192. }
  193. @keyframes p9 {
  194. 33% {
  195. background-position: 0% 33%, 100% 33%, 200% 33%
  196. }
  197. 66% {
  198. background-position: -100% 66%, 0% 66%, 100% 66%
  199. }
  200. 100% {
  201. background-position: 0% 100%, 100% 100%, 200% 100%
  202. }
  203. }
  204. </style>
  205. <style scoped lang="less">
  206. .main {
  207. height: 100%;
  208. background: #f1f1f1;
  209. position: relative;
  210. content{
  211. display: flex;
  212. min-height: 100%;
  213. .left-menu{
  214. width: 244px;
  215. }
  216. .router-warp{
  217. width:100%;
  218. min-height:calc(~'100vh - 64px');
  219. }
  220. }
  221. .nav {
  222. display: flex;
  223. padding: 0;
  224. margin: 0;
  225. li {
  226. width: 128px;
  227. height: 64px;
  228. font-size: 16px;
  229. font-weight: 700;
  230. text-align: center;
  231. line-height: 64px;
  232. list-style: none;
  233. }
  234. li.active {
  235. background: #0084ff;
  236. color: #fff;
  237. a {
  238. color: #fff;
  239. }
  240. }
  241. }
  242. header {
  243. z-index: 10;
  244. left: 0;
  245. right: 0;
  246. top: 0;
  247. height: 64px;
  248. background: #fff;
  249. display: flex;
  250. justify-content: space-between;
  251. .logo {
  252. margin: 16px 42px;
  253. display: block;
  254. }
  255. .fr {
  256. display: flex;
  257. .input-search {
  258. margin: 12px 40px 12px 0;
  259. width: 240px;
  260. input {
  261. }
  262. }
  263. .dropdown-box {
  264. margin: 0 24px 0 0px;
  265. line-height: 64px;
  266. }
  267. .badge {
  268. margin: 22px 24px 22px 0;
  269. height: 20px;
  270. width: 20px;
  271. i {
  272. color: #bbbbbb;
  273. }
  274. }
  275. .user-img {
  276. margin: 12px 12px 12px 0;
  277. }
  278. }
  279. }
  280. }
  281. header > a {
  282. margin: 0 20px;
  283. }
  284. .appContainer {
  285. background: #ccc;
  286. padding: 20px;
  287. }
  288. </style>
  289. <style>
  290. /* #appContainer div[id^='__qiankun_microapp_wrapper_']>div {
  291. height: calc(100vh - 64px);
  292. } */
  293. body,
  294. html,
  295. #appContainer,
  296. #appContainer div[id^='__qiankun_microapp_wrapper_'] {
  297. padding: 0;
  298. margin: 0;
  299. height: 100%;
  300. width: 100%;
  301. }
  302. </style>