tabAll.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <van-nav-bar
  3. title="智慧“和顺”"
  4. left-text="民宗干事"
  5. left-arrow
  6. @click-left="onClickLeft"
  7. />
  8. <van-image
  9. width="100%"
  10. height="10rem"
  11. fit="cover"
  12. src="https://img1.baidu.com/it/u=2086445453,3056906789&fm=253&fmt=auto&app=138&f=GIF?w=1378&h=400"
  13. />
  14. <div class="tabtitlelay">
  15. <div class="tabtitle1"></div>
  16. <div class="tabtitle">我的待办</div>
  17. <div class="tabtitle2">(</div>
  18. <div class="tabtitle3">15</div>
  19. <div class="tabtitle4">)</div>
  20. <van-icon name="ellipsis" class="tabtitle5" @click="goToBeDone"/>
  21. </div>
  22. <div class="flexll">
  23. <div class="ffl2">
  24. <div class="textRegular">待处理</div>
  25. <div class="textRed">{{con1}}</div>
  26. </div>
  27. <div class="verticalLine"></div>
  28. <div class="ffl2">
  29. <div class="textRegular">已处理</div>
  30. <div class="textBlue">8</div>
  31. </div>
  32. </div>
  33. <div class="hLine"></div>
  34. <div class="tabtitlelay">
  35. <div class="tabtitle1"></div>
  36. <div class="tabtitle">场所管理</div>
  37. </div>
  38. <van-grid :border="false">
  39. <van-grid-item icon="photo-o" to="/placeRegister" text="场所登记" @click="getsome2" />
  40. <van-grid-item icon="photo-o" to="/placePerson" text="场所人员信息" @click="getsome3" />
  41. <van-grid-item icon="photo-o" text="牌位管理" />
  42. </van-grid>
  43. <div class="hLine"></div>
  44. <div class="tabtitlelay">
  45. <div class="tabtitle1"></div>
  46. <div class="tabtitle">活动管理</div>
  47. </div>
  48. <van-grid :border="false" >
  49. <van-grid-item icon="photo-o" to="/placeActivityList" text="场所活动" />
  50. <van-grid-item icon="photo-o" to="/selfMeetingList" text="私设聚会点" />
  51. <van-grid-item icon="photo-o" to="/abnormalCrowd" text="信教群众异常" />
  52. <van-grid-item icon="photo-o" text="场所检查" />
  53. <van-grid-item icon="photo-o" text="安防设施异常" />
  54. <van-grid-item icon="photo-o" text="负责人会议" />
  55. <van-grid-item icon="photo-o" to="/setting" text="其他" />
  56. </van-grid>
  57. </template>
  58. <script>
  59. import tool from "@/tool";
  60. export default {
  61. data() {
  62. return{
  63. title:'民宗干事',
  64. username:"",
  65. sms:"",
  66. password:"",
  67. password2:"",
  68. con1:"0",
  69. }
  70. },
  71. created(){
  72. let id=this.$route.query.id;
  73. this.getSome();
  74. this.TokenLogin();
  75. },
  76. methods:{
  77. //跳转
  78. goToBeDone(){
  79. this.$router.push("/toBeDone")
  80. },
  81. onClickLeft(){
  82. history.back();
  83. },
  84. async TokenLogin(){
  85. let that=this;
  86. //SDK中 getToken() 方法获取免登token
  87. // window.xm.getToken().then(async function(token){
  88. // console.log(token);
  89. // const inputForm ={
  90. // 'token': token
  91. // }
  92. // var res = await this.$API.yin.TokenLogin.get(inputForm);
  93. // })
  94. const inputForm ={
  95. 'token': "ssssssss"
  96. }
  97. var res = await this.$API.yin.TokenLogin.get(inputForm);
  98. console.log(res);
  99. //this.$store.commit('setUser',data);
  100. // if (res.type == 1) {
  101. // this.$router.replace({
  102. // path: "/main",
  103. // });
  104. // } else {
  105. // Toast.fail(res.message);
  106. // }
  107. },
  108. getSome(){
  109. },
  110. async getsome2(){
  111. let that=this;
  112. //SDK中 getToken() 方法获取免登token
  113. window.xm.getToken().then(function(token){
  114. console.log(token);
  115. that.con1="哈哈"+token;
  116. window.xm.showToast({
  117. message:that.con1
  118. })
  119. })
  120. const inputForm ={
  121. 'iamRequestId': '120010',
  122. 'iamRemoteUser': 'admin12022',
  123. 'iamRemotePwd': ''
  124. }
  125. // login(inputForm).then(({data}) => {
  126. // this.$store.commit('setUser',data);
  127. // })
  128. //var res = await this.$API.yin.TokenLogin.post(inputForm);
  129. var res = await this.$API.yin.SchemaService.post(inputForm);
  130. if (res.type == 1) {
  131. this.$router.replace({
  132. path: "/main",
  133. });
  134. } else {
  135. Toast.fail(res.message);
  136. }
  137. },
  138. async getsome3(){
  139. console.log("11");
  140. var datas = {
  141. username: "admin",
  142. };
  143. var res = await this.$API.my.OrderDetails.get(datas);
  144. this.con1=res;
  145. console.log(res);
  146. },
  147. //用户数据同步测试用(用户保存)
  148. async getUser1(){
  149. const inputForm ={
  150. 'iamRequestId': '120010',
  151. 'iamRemoteUser': 'admin',
  152. 'iamRemotePwd': '11',
  153. 'loginName': 'yzt2',
  154. 'name': '同步用户2',
  155. 'password': '111',
  156. 'idcard': '320911199010000002',
  157. 'email': '818166662@qq.com',
  158. 'phone': '88868882',
  159. 'mobile': '1829999992',
  160. 'loginFlag': '1',
  161. 'photo': '',
  162. 'sign': '个性签名2',
  163. }
  164. var res = await this.$API.yin.UserCreateService.post(inputForm);
  165. console.log(res);
  166. },
  167. //(用户更新)
  168. async getUser2(){
  169. const inputForm ={
  170. 'iamRequestId': '120010',
  171. 'iamRemoteUser': 'admin',
  172. 'iamRemotePwd': '11',
  173. 'uid': '1639158103696228354',
  174. 'loginName': 'yzt222',
  175. 'name': '11',
  176. // 'password': '',
  177. // 'idcard': '',
  178. // 'email': '',
  179. // 'phone': '',
  180. // 'mobile': '',
  181. // 'loginFlag': '',
  182. // 'photo': '',
  183. // 'sign': '',
  184. }
  185. var res = await this.$API.yin.UserUpdateService.post(inputForm);
  186. console.log(res);
  187. },
  188. //(用户删除)
  189. async getUser3(){
  190. const inputForm ={
  191. 'iamRequestId': '120010',
  192. 'iamRemoteUser': 'admin',
  193. 'iamRemotePwd': '111',
  194. 'uid': '1639158103696228354',
  195. }
  196. var res = await this.$API.yin.UserDeleteService.post(inputForm);
  197. console.log(res);
  198. },
  199. },
  200. };
  201. </script>
  202. <style>
  203. </style>