tabAll.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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. <van-swipe :autoplay="3000" lazy-render>
  15. <van-swipe-item v-for="image in BannerImgurls" :key="image" >
  16. <van-image width="100%" height="10rem" fit="cover" :src="image" />
  17. </van-swipe-item>
  18. </van-swipe>
  19. <div class="tabtitlelay">
  20. <div class="tabtitle1"></div>
  21. <div class="tabtitle">我的待办</div>
  22. <div class="tabtitle2">(</div>
  23. <div class="tabtitle3">15</div>
  24. <div class="tabtitle4">)</div>
  25. <van-icon name="ellipsis" class="tabtitle5" @click="goToBeDone" />
  26. </div>
  27. <div class="flexll">
  28. <div class="ffl2">
  29. <div class="textRegular">待处理</div>
  30. <div class="textRed">{{con1}}</div>
  31. </div>
  32. <div class="verticalLine"></div>
  33. <div class="ffl2">
  34. <div class="textRegular">已处理</div>
  35. <div class="textBlue">8</div>
  36. </div>
  37. </div>
  38. <div class="hLine"></div>
  39. <div class="tabtitlelay">
  40. <div class="tabtitle1"></div>
  41. <div class="tabtitle">场所管理</div>
  42. </div>
  43. <van-grid :border="false">
  44. <van-grid-item icon="../../../loginbg/csdj.png" text="场所登记" @click="goPlaceRegister"/>
  45. <van-grid-item icon="../../../loginbg/csry.png" text="场所人员信息" @click="goPlacePerson" />
  46. <van-grid-item icon="../../../loginbg/cspw.png" text="牌位管理" @click="goPlaceTablet"/>
  47. </van-grid>
  48. <div class="hLine"></div>
  49. <div class="tabtitlelay">
  50. <div class="tabtitle1"></div>
  51. <div class="tabtitle">活动管理</div>
  52. </div>
  53. <van-grid :border="false" >
  54. <van-grid-item icon="../../../loginbg/hd_cshd.png" @click="placeActivity" text="场所活动" />
  55. <van-grid-item icon="../../../loginbg/hd_ssjhd.png" @click="selfMeetingList" text="私设聚会点" />
  56. <van-grid-item icon="../../../loginbg/hd_xjqz.png" @click="differentbelieversList" text="信教群众异常" />
  57. <van-grid-item icon="../../../loginbg/hd_jc.png" text="场所检查" @click="tohd_jc" />
  58. <van-grid-item icon="../../../loginbg/hd_af.png" text="安防设施异常" @click="tohd_af" />
  59. <van-grid-item icon="../../../loginbg/hd_hy.png" text="负责人会议" @click="tohd_hy" />
  60. <van-grid-item icon="../../../loginbg/hd_qt.png" to="/setting" text="其他" @click="tohd_qt" />
  61. </van-grid>
  62. </template>
  63. <script>
  64. import tool from "@/tool";
  65. import qs from "qs";
  66. import userSets from "@/api/sys/userSets";
  67. export default {
  68. data() {
  69. return{
  70. title:'民宗干事',
  71. username:"",
  72. sms:"",
  73. password:"",
  74. password2:"",
  75. con1:"0",
  76. BannerImgurls:['https://img1.baidu.com/it/u=2086445453,3056906789&fm=253&fmt=auto&app=138&f=GIF?w=1378&h=400','https://img1.baidu.com/it/u=2086445453,3056906789&fm=253&fmt=auto&app=138&f=GIF?w=1378&h=400']
  77. }
  78. },
  79. created(){
  80. let id=this.$route.query.id;
  81. this.TokenLogin2();
  82. this.getBannerImg();//获取轮播图
  83. this.getSelectColor();//获取主题颜色
  84. },
  85. methods:{
  86. goToBeDone() {
  87. this.$router.push("/toBeDone");
  88. },
  89. goPlaceRegister() {
  90. this.$router.push("/placeRegister");
  91. },
  92. goPlacePerson() {
  93. this.$router.push("/placePerson");
  94. },
  95. goPlaceTablet(){
  96. this.$router.push("/placeTablet");
  97. },
  98. onClickLeft(){
  99. history.back();
  100. },
  101. tohd_jc(){
  102. //this.onlineXm.xmNavTo("../activityMan\siteInspection\siteInspectionList");
  103. this.$router.push("/siteInspectionList");
  104. },
  105. tohd_af(){
  106. this.$router.push("/securityFacilitiesErrList");
  107. },
  108. tohd_hy(){
  109. this.$router.push("/religiousConferenceList");
  110. },
  111. tohd_qt(){
  112. this.$router.push("/securityFacilitiesErrList");
  113. },
  114. // 活动场所
  115. placeActivity(){
  116. this.$router.push("/placeActivityList")
  117. },
  118. selfMeetingList(){
  119. this.$router.push("/selfMeetingList")
  120. },
  121. differentbelieversList(){
  122. this.$router.push("/differentbelieversList")
  123. },
  124. async TokenLogin(){
  125. let that=this;
  126. //添加PCtoken过期判断,(请求拦截到token过期,会设置PCtoken为空,为空的时候再调用免登功能)
  127. if(this.$store.state.pctoken==""||this.$store.state.pctoken==undefined){
  128. //SDK中 getToken() 方法获取免登token
  129. //window.xm.getToken().then(async function(token){//上线取消注释
  130. let token="test";//上线注释
  131. const inputForm =qs.stringify({
  132. 'token': token
  133. }, { allowDots: true, arrayFormat: 'indices' })
  134. var res = await this.$API.yin.TokenLogin.get(inputForm);
  135. //存PCtoken
  136. this.$store.commit('setPcToken',res.PcToken);
  137. this.$store.commit('setUser',res.account);
  138. //})//上线取消注释
  139. }
  140. },
  141. TokenLogin2(){
  142. let that=this;
  143. //添加PCtoken过期判断,(请求拦截到token过期,会设置PCtoken为空,为空的时候再调用免登功能)
  144. if(this.$store.state.pctoken==""||this.$store.state.pctoken==undefined){
  145. //SDK中 getToken() 方法获取免登token
  146. //window.xm.getToken().then(async function(token){//上线取消注释
  147. let token="test";//上线注释
  148. new userSets()
  149. .TokenLogin({
  150. token: token
  151. })
  152. .then((res) => {
  153. that.$store.commit('setPcToken',res.PcToken);
  154. that.$store.commit('setUser',res.account);
  155. });
  156. //})//上线取消注释
  157. }
  158. },
  159. getBannerImg(){
  160. new userSets()
  161. .BannerImg({
  162. 'current': 1,
  163. 'size': 5,
  164. 'orders':[],
  165. })
  166. .then((res) => {
  167. let bs=[];
  168. for(let i=0;i<res.records.length;i++){
  169. bs.push(res.records[i].bannerImg);
  170. }
  171. //需添加url拼接
  172. //this.BannerImgurls=bs;
  173. //console.log(this.BannerImgurls);
  174. });
  175. },
  176. getSelectColor(){
  177. let that=this;
  178. new userSets()
  179. .SelectColor({
  180. 'current': 1,
  181. 'size': 5,
  182. 'orders':[],
  183. })
  184. .then((res) => {
  185. //console.log(res.records[0].selectColor.substring(1, 7));
  186. //存PCtoken
  187. that.$store.commit('setSelectColor',res.records[0].selectColor.substring(1, 7));
  188. });
  189. },
  190. //测试接口,可删除
  191. async gettest(){
  192. let that=this;
  193. //SDK中 getToken() 方法获取免登token
  194. window.xm.getToken().then(function(token){
  195. console.log(token);
  196. that.con1="哈哈"+token;
  197. window.xm.showToast({
  198. message:that.con1
  199. })
  200. })
  201. //测试数据同步接口的
  202. const inputForm ={
  203. 'iamRequestId': '120010',
  204. 'iamRemoteUser': 'admin12022',
  205. 'iamRemotePwd': ''
  206. }
  207. var res = await this.$API.yin.SchemaService.post(inputForm);
  208. if (res.type == 1) {
  209. this.$router.replace({
  210. path: "/main",
  211. });
  212. } else {
  213. Toast.fail(res.message);
  214. }
  215. },
  216. //测试接口,可删除
  217. async gettest2(){
  218. var datas = {
  219. username: "admin",
  220. };
  221. var res = await this.$API.my.OrderDetails.get(datas);
  222. this.con1=res;
  223. console.log(res);
  224. },
  225. //用户数据同步测试用(用户保存)
  226. async gettestUser1(){
  227. const inputForm ={
  228. 'iamRequestId': '120010',
  229. 'iamRemoteUser': 'admin',
  230. 'iamRemotePwd': '11',
  231. 'loginName': 'yzt2',
  232. 'name': '同步用户2',
  233. 'password': '111',
  234. 'idcard': '320911199010000002',
  235. 'email': '818166662@qq.com',
  236. 'phone': '88868882',
  237. 'mobile': '1829999992',
  238. 'loginFlag': '1',
  239. 'photo': '',
  240. 'sign': '个性签名2',
  241. }
  242. var res = await this.$API.yin.UserCreateService.post(inputForm);
  243. console.log(res);
  244. },
  245. //(用户更新)
  246. async gettestUser2(){
  247. const inputForm ={
  248. 'iamRequestId': '120010',
  249. 'iamRemoteUser': 'admin',
  250. 'iamRemotePwd': '11',
  251. 'uid': '1639158103696228354',
  252. 'loginName': 'yzt222',
  253. 'name': '11',
  254. // 'password': '',
  255. // 'idcard': '',
  256. // 'email': '',
  257. // 'phone': '',
  258. // 'mobile': '',
  259. // 'loginFlag': '',
  260. // 'photo': '',
  261. // 'sign': '',
  262. }
  263. var res = await this.$API.yin.UserUpdateService.post(inputForm);
  264. console.log(res);
  265. },
  266. //(用户删除)
  267. async gettestUser3(){
  268. const inputForm ={
  269. 'iamRequestId': '120010',
  270. 'iamRemoteUser': 'admin',
  271. 'iamRemotePwd': '111',
  272. 'uid': '1639158103696228354',
  273. }
  274. var res = await this.$API.yin.UserDeleteService.post(inputForm);
  275. console.log(res);
  276. },
  277. },
  278. };
  279. </script>
  280. <style>
  281. </style>