Intelligentdoorlock.vue 7.9 KB

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