Intelligentdoorlock.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <template>
  2. <view class="billall">
  3. <!-- 列表 -->
  4. <!-- <t-table>
  5. <t-tr>
  6. <t-th>序号</t-th>
  7. <t-th>姓名</t-th>
  8. <t-th>年龄</t-th>
  9. <t-th>爱好</t-th>
  10. <t-th>操作</t-th>
  11. </t-tr>
  12. <t-tr v-for="item in tableList" :key="item.id">
  13. <t-td>{{ item.id + 1 }}</t-td>
  14. <t-td>{{ item.name }}</t-td>
  15. <t-td>{{ item.age }}</t-td>
  16. <t-td>{{ item.hobby }}</t-td>
  17. <t-td align="left"> <u-button @click="edit(item)" size="small" type="primary" :plain="true" text="编辑"></u-button></t-td>
  18. </t-tr>
  19. </t-table> -->
  20. <view class="u-listdata">
  21. <view style="padding:10rpx 0 0 30rpx">
  22. 共有 <span style="color: red">{{totalnumber}}</span>条记录
  23. </view>
  24. <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
  25. <u-list-item v-for="(item, index) in indexList" :key="index">
  26. <view class="companylist">
  27. <view class="settled" @click="kaimen(item)">
  28. 开门记录
  29. </view>
  30. <!-- <view class="outstanding" @click="mensuo(item)">
  31. 门锁信息
  32. </view> -->
  33. <view class="outstanding1" @click="mima(item)">
  34. 临时密码
  35. </view>
  36. <view class="outstanding2" @click="seedetail(item)">
  37. 查看租户
  38. </view>
  39. <h3>{{item.name}}</h3>
  40. <view class="Currentamount">
  41. 房间编号:{{item.roomid}}
  42. </view>
  43. <view class="Currentamount">
  44. 用户总数量: {{item.usernum}}
  45. </view>
  46. <view class="Currentamount">
  47. 设备编号:¥{{item.deviceId}}
  48. </view>
  49. <view class="Currentamount">
  50. 网关编号: {{item.deviceno}}
  51. </view>
  52. <view class="Currentamount">
  53. 安装时间: {{item.installationtime}}
  54. </view>
  55. </view>
  56. </u-list-item>
  57. </u-list>
  58. </view>
  59. <!-- 门锁信息 -->
  60. <u-popup :show="showms" mode="bottom" @close="closems" :closeable='true'>
  61. <view class="mensuoxx">
  62. <h3>临时密码</h3>
  63. <u-cell-group>
  64. <u-cell icon="lock-opened-fill" title="临时密码" :value='lsmima'></u-cell>
  65. </u-cell-group>
  66. </view>
  67. </u-popup>
  68. </view>
  69. </template>
  70. <script>
  71. // import tTable from '@/components/t-table/t-table.vue';
  72. // import tTh from '@/components/t-table/t-th.vue';
  73. // import tTr from '@/components/t-table/t-tr.vue';
  74. // import tTd from '@/components/t-table/t-td.vue';
  75. export default {
  76. components: {
  77. // tTable,
  78. // tTh,
  79. // tTr,
  80. // tTd
  81. },
  82. data() {
  83. return {
  84. showms: false,
  85. totalnumber: 0,
  86. setyesno: true,
  87. lsmima:'',
  88. indexList: [],
  89. dataList: [],
  90. dataForm: {
  91. "currentPage": 0,
  92. "deviceId": "",
  93. "pageSize": 10,
  94. "roomId": "",
  95. "tempPwd": "",
  96. "tenantsId": "",
  97. "userName": ""
  98. },
  99. showtype: false,
  100. showdct: false,
  101. mytitle: '',
  102. alldata: [],
  103. showfloor: false,
  104. loading: false,
  105. columns: [],
  106. pd: true,
  107. columnData: [],
  108. myday: '',
  109. mytype: '全部',
  110. showPicker: false,
  111. }
  112. },
  113. //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
  114. onLoad() {
  115. this.getalldata();
  116. },
  117. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  118. onReady() {
  119. // 微信小程序需要用此写法
  120. },
  121. //监听页面隐藏
  122. onHide() {},
  123. //监听窗口尺寸变化
  124. onResize() {},
  125. //监听页面卸载
  126. onUnload() {},
  127. //监听用户下拉动作,一般用于下拉刷新
  128. onPullDownRefresh() {},
  129. methods: {
  130. seedetail(e) {
  131. uni.navigateTo({
  132. url: `/pages/Workorder/Intelligentdoorlock/Tenantdetails/Tenantdetails?companyOrgId=${e.roomid}`
  133. });
  134. },
  135. kaimen(e) {
  136. uni.navigateTo({
  137. url: `/pages/Workorder/Intelligentdoorlock/Dooropeningrecord/Dooropeningrecord?companyOrgId=${e.roomid}`
  138. });
  139. },
  140. mima(e) {
  141. let postdata={
  142. "currentPage": 0,
  143. "deviceId": "",
  144. "pageSize": 10,
  145. "roomId": e.roomid,
  146. "tempPwd": "",
  147. "tenantsId": "",
  148. "userName": ""
  149. };
  150. this.$api.post('/lock/getTempPwd',postdata)
  151. .then(res => {
  152. if (res.data.code == 0) {
  153. this.showms = true;
  154. this.lsmima=res.data.data;
  155. console.log('111111111111111111',this.lsmima)
  156. } else {
  157. }
  158. })
  159. },
  160. closems() {
  161. this.showms = false
  162. // console.log('close');
  163. },
  164. scrolltolower() {
  165. if (this.pd) {
  166. this.getalldata();
  167. } else {
  168. return
  169. }
  170. },
  171. getalldata() {
  172. this.$api.post('/lock/page', this.dataForm)
  173. .then(res => {
  174. this.totalnumber = res.data.data.total;
  175. if (res.data.data.list.length != 0) {
  176. this.indexList.push(...res.data.data.list);
  177. this.dataForm.currentPage = this.dataForm.currentPage + 1;
  178. this.pd = true;
  179. } else {
  180. uni.showToast({
  181. title: '暂无更多数据了',
  182. icon: 'none',
  183. duration: 1500
  184. })
  185. this.pd = false;
  186. }
  187. })
  188. },
  189. }
  190. }
  191. </script>
  192. <style lang="scss">
  193. .mensuoxx {
  194. width: 750rpx;
  195. height: 500rpx;
  196. h3 {
  197. width: 100%;
  198. height: 80rpx;
  199. text-align: center;
  200. line-height: 80rpx;
  201. margin-bottom: 50rpx;
  202. }
  203. }
  204. .Currentamount {
  205. padding-left: 30rpx;
  206. min-height: 50rpx;
  207. line-height: 50rpx;
  208. color: #BCB3A7;
  209. span {
  210. color: #FA5555;
  211. padding-left: 9rpx;
  212. }
  213. }
  214. .Callfee {
  215. width: 100rpx;
  216. height: 45rpx;
  217. text-align: center;
  218. line-height: 45rpx;
  219. color: #5C8FFF;
  220. border: 1px solid #5C8FFF;
  221. font-size: 22rpx;
  222. position: absolute;
  223. bottom: 10rpx;
  224. right: 10px;
  225. font-weight: bold;
  226. }
  227. .companylist {
  228. margin: 20rpx 30rpx;
  229. background: #fff;
  230. min-height: 380rpx;
  231. border-radius: 10px;
  232. position: relative;
  233. h3 {
  234. height: 70rpx;
  235. line-height: 70rpx;
  236. padding-left: 30rpx;
  237. }
  238. }
  239. .settled {
  240. background-color: #09C700;
  241. width: 120rpx;
  242. height: 60rpx;
  243. text-align: center;
  244. line-height: 60rpx;
  245. color: #fff;
  246. font-size: 14rpx;
  247. position: absolute;
  248. top: 0px;
  249. right: 0px;
  250. border-top-right-radius: 10rpx;
  251. border-bottom-left-radius: 10rpx;
  252. }
  253. .outstanding {
  254. background-color: #09C700;
  255. width: 120rpx;
  256. height: 60rpx;
  257. text-align: center;
  258. line-height: 60rpx;
  259. color: #fff;
  260. font-size: 14rpx;
  261. position: absolute;
  262. top: 110rpx;
  263. right: 0px;
  264. border-top-left-radius: 10rpx;
  265. border-bottom-left-radius: 10rpx;
  266. }
  267. .outstanding1 {
  268. background-color: #09C700;
  269. width: 120rpx;
  270. height: 60rpx;
  271. text-align: center;
  272. line-height: 60rpx;
  273. color: #fff;
  274. font-size: 14rpx;
  275. position: absolute;
  276. top:42%;
  277. right: 0px;
  278. border-top-left-radius: 10rpx;
  279. border-bottom-left-radius: 10rpx;
  280. }
  281. .outstanding2 {
  282. background-color: #09C700;
  283. width: 120rpx;
  284. height: 60rpx;
  285. text-align: center;
  286. line-height: 60rpx;
  287. color: #fff;
  288. font-size: 14rpx;
  289. position: absolute;
  290. bottom: 0px;
  291. right: 0px;
  292. border-top-left-radius: 10rpx;
  293. border-bottom-right-radius: 10rpx;
  294. }
  295. .billall {}
  296. .topbill {
  297. display: flex;
  298. justify-content: space-around;
  299. align-items: center;
  300. height: 100rpx;
  301. background-color: #e6e6e6;
  302. }
  303. .topbilledit {
  304. display: flex;
  305. justify-content: space-around;
  306. align-items: center;
  307. }
  308. .changetime1 {
  309. padding-right: 10rpx;
  310. }
  311. </style>