jiebangDesc.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="content">
  3. <form >
  4. <view class="body user-insert-line">机器名称:{{equipment.name}}</view>
  5. <view class="body user-insert-line">设备编号:{{equipment.clientId}}</view>
  6. <view class="body user-insert-line">归属者:{{equipment.adminUserName}}</view>
  7. <view class="body user-insert-line">地址:{{equipment.fullName}}</view>
  8. <view class="btn-area">
  9. <button type="primary" @click="agree(equipment.id)" style="margin-right: 20px;" >脱机处理</button>
  10. </view>
  11. </form>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data(){
  17. return{
  18. equipment:{},
  19. }
  20. },
  21. onLoad: function(option) {
  22. const equipment = JSON.parse(decodeURIComponent(option.equipment));
  23. //idCardNo
  24. this.equipment = equipment;
  25. },
  26. onShow() {
  27. },
  28. methods: {
  29. agree(id){
  30. var that = this;
  31. uni.showModal({
  32. title: '提示',
  33. content: '是否脱机?',
  34. success: function(res) {
  35. if (res.confirm) {
  36. var token = uni.getStorageSync("token");
  37. uni.request({
  38. url: that.serverurl + '/TEquipment/tuoji',
  39. header: {
  40. 'token': token
  41. },
  42. data:{
  43. "id":id
  44. },
  45. method: "POST",
  46. success: (res) => {
  47. uni.showToast({
  48. title: res.data.message,
  49. duration: 2000
  50. });
  51. },
  52. });
  53. } else if (res.cancel) {}
  54. }
  55. });
  56. },
  57. }
  58. }
  59. </script>
  60. <style>
  61. .content{
  62. padding-top:20upx;
  63. margin-left:20upx;
  64. }
  65. .body {
  66. background-color: #FFFFFF;
  67. padding: 10upx 20upx 10upx 20upx;
  68. display: flex;
  69. flex-direction: row;
  70. justify-content: flex-start;
  71. }
  72. .input {
  73. /* padding: 10upx 20upx 10upx 0upx; */
  74. padding-left: 20upx;
  75. padding-top: 10upx;
  76. background-color: #FFFFFF;
  77. width: 500upx;
  78. height: 50upx;
  79. box-shadow: 0upx 0upx 20upx #D3D3D3;
  80. border-radius: 5upx;
  81. }
  82. .button {
  83. margin: 0 auto;
  84. display: inline-block;
  85. }
  86. button[type=primary] {
  87. background-color: #007aff;
  88. color: #fff;
  89. display: inline-block;
  90. }
  91. .btn-area{
  92. padding-top:60upx;
  93. margin: 0 auto;
  94. width: 50%;
  95. }
  96. .user-insert-line {
  97. width: 600upx;
  98. height: 23px;
  99. border-bottom:solid black 1px;
  100. margin: 0 auto;
  101. }
  102. .user-insert{
  103. width: 400upx;
  104. margin: 0 auto;
  105. }
  106. view{
  107. font-size: 30rpx;
  108. }
  109. </style>