tabAll.vue 8.5 KB

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