index.vue 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div class="main-bg">
  3. <h1 class="title">区块链合同</h1>
  4. <div class="button-inner clearfix">
  5. <block-button button-id="upload_contract" button-name="上传合同" @click="handleClick" :button-img-src="require('../../static/index/upload_contract.png')"></block-button>
  6. <block-button button-id="template_create" button-name="模版创建" @click="handleClick" :button-img-src="require('../../static/index/template_create.png')"></block-button>
  7. <block-button button-id="temp" :button-name="'草稿箱('+count.temp+')'" @click="handleClick" :button-img-src="require('../../static/index/temp.png')"></block-button>
  8. <block-button button-id="wait_edit" :button-name="'待修改('+count.wait_edit+')'" @click="handleClick" :button-img-src="require('../../static/index/wait_edit.png')"></block-button>
  9. <block-button button-id="wait_sign" :button-name="'待签署('+count.wait_sign+')'" @click="handleClick" :button-img-src="require('../../static/index/wait_sign.png')"></block-button>
  10. <block-button button-id="already_sign" :button-name="'已签署('+count.already_sign+')'" @click="handleClick" :button-img-src="require('../../static/index/already_sign.png')"></block-button>
  11. <block-button class="no-bottom-border" button-id="already_active" :button-name="'已生效('+count.already_active+')'" @click="handleClick" :button-img-src="require('../../static/index/already_active.png')"></block-button>
  12. <block-button class="no-bottom-border" button-id="out_date" :button-name="'已失效('+count.out_date+')'" @click="handleClick" :button-img-src="require('../../static/index/out_date.png')"></block-button>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. import BlockButton from '../components/blockButton.vue';
  18. export default {
  19. name: "index",
  20. components:{
  21. BlockButton
  22. },
  23. data(){
  24. return{
  25. count:{
  26. temp:0,
  27. wait_edit:0,
  28. wait_sign:0,
  29. already_sign:0,
  30. already_active:0,
  31. out_date:0
  32. }
  33. }
  34. },
  35. mounted(){
  36. // console.log(this.ADRESS.indexCount)
  37. this.$http.get(this.ADRESS.indexCount).then((response)=>{
  38. // console.log(response.data)
  39. this.count=response.data.data
  40. })
  41. },
  42. methods:{
  43. handleClick(id){
  44. console.log(id);
  45. }
  46. }
  47. }
  48. </script>
  49. <style scoped>
  50. .main-bg{
  51. background-color: #60c0ff;
  52. height: 100%;
  53. display: flex;
  54. flex-direction: column;
  55. align-items: center;
  56. justify-content: space-around;
  57. }
  58. .no-bottom-border{
  59. border-bottom: 0!important;
  60. }
  61. .button-inner{
  62. width: 9.3rem;
  63. margin: 0 auto 0;
  64. background-color: #fff;
  65. border-radius: 0.1rem;
  66. /*padding-bottom: 0.5rem;*/
  67. }
  68. .title{
  69. text-align: center;
  70. font-size: 0.5rem;
  71. /*margin-top: 0.5rem;*/
  72. color: #fff;
  73. }
  74. </style>