123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <template>
- <van-nav-bar
- title="智慧“和顺”"
- left-text="民宗干事"
- left-arrow
- @click-left="onClickLeft"
- />
- <!-- <van-image
- width="100%"
- height="10rem"
- fit="cover"
- src="https://img1.baidu.com/it/u=2086445453,3056906789&fm=253&fmt=auto&app=138&f=GIF?w=1378&h=400"
- /> -->
- <van-swipe :autoplay="3000" lazy-render>
- <van-swipe-item v-for="image in BannerImgurls" :key="image" >
- <van-image width="100%" height="10rem" fit="cover" :src="image" />
- </van-swipe-item>
- </van-swipe>
- <div class="tabtitlelay">
- <div class="tabtitle1"></div>
- <div class="tabtitle">我的待办</div>
- <div class="tabtitle2">(</div>
- <div class="tabtitle3">15</div>
- <div class="tabtitle4">)</div>
- <van-icon name="ellipsis" class="tabtitle5" @click="goToBeDone" />
- </div>
- <div class="flexll">
- <div class="ffl2">
- <div class="textRegular">待处理</div>
- <div class="textRed">{{con1}}</div>
- </div>
- <div class="verticalLine"></div>
- <div class="ffl2">
- <div class="textRegular">已处理</div>
- <div class="textBlue">8</div>
- </div>
- </div>
- <div class="hLine"></div>
- <div class="tabtitlelay">
- <div class="tabtitle1"></div>
- <div class="tabtitle">场所管理</div>
- </div>
- <van-grid :border="false">
- <van-grid-item icon="../../../loginbg/csdj.png" text="场所登记" @click="goPlaceRegister"/>
- <van-grid-item icon="../../../loginbg/csry.png" text="场所人员信息" @click="goPlacePerson" />
- <van-grid-item icon="../../../loginbg/cspw.png" text="牌位管理" @click="goPlaceTablet"/>
- </van-grid>
- <div class="hLine"></div>
- <div class="tabtitlelay">
- <div class="tabtitle1"></div>
- <div class="tabtitle">活动管理</div>
- </div>
- <van-grid :border="false" >
- <van-grid-item icon="../../../loginbg/hd_cshd.png" @click="placeActivity" text="场所活动" />
- <van-grid-item icon="../../../loginbg/hd_ssjhd.png" @click="selfMeetingList" text="私设聚会点" />
- <van-grid-item icon="../../../loginbg/hd_xjqz.png" @click="differentbelieversList" text="信教群众异常" />
- <van-grid-item icon="../../../loginbg/hd_jc.png" text="场所检查" @click="tohd_jc" />
- <van-grid-item icon="../../../loginbg/hd_af.png" text="安防设施异常" @click="tohd_af" />
- <van-grid-item icon="../../../loginbg/hd_hy.png" text="负责人会议" @click="tohd_hy" />
- <van-grid-item icon="../../../loginbg/hd_qt.png" to="/setting" text="其他" @click="tohd_qt" />
- </van-grid>
- </template>
- <script>
- import tool from "@/tool";
- import qs from "qs";
- import userSets from "@/api/sys/userSets";
- export default {
- data() {
- return{
- title:'民宗干事',
- username:"",
- sms:"",
- password:"",
- password2:"",
- con1:"0",
- 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']
- }
- },
- created(){
- let id=this.$route.query.id;
- this.TokenLogin2();
- this.getBannerImg();//获取轮播图
- this.getSelectColor();//获取主题颜色
- },
- methods:{
- goToBeDone() {
- this.$router.push("/toBeDone");
- },
- goPlaceRegister() {
- this.$router.push("/placeRegister");
- },
- goPlacePerson() {
- this.$router.push("/placePerson");
- },
- goPlaceTablet(){
- this.$router.push("/placeTablet");
- },
- onClickLeft(){
- history.back();
- },
- tohd_jc(){
- //this.onlineXm.xmNavTo("../activityMan\siteInspection\siteInspectionList");
- this.$router.push("/siteInspectionList");
- },
- tohd_af(){
- this.$router.push("/securityFacilitiesErrList");
- },
- tohd_hy(){
- this.$router.push("/religiousConferenceList");
- },
- tohd_qt(){
- this.$router.push("/securityFacilitiesErrList");
- },
- // 活动场所
- placeActivity(){
- this.$router.push("/placeActivityList")
- },
- selfMeetingList(){
- this.$router.push("/selfMeetingList")
- },
- differentbelieversList(){
- this.$router.push("/differentbelieversList")
- },
- async TokenLogin(){
- let that=this;
- //添加PCtoken过期判断,(请求拦截到token过期,会设置PCtoken为空,为空的时候再调用免登功能)
- if(this.$store.state.pctoken==""||this.$store.state.pctoken==undefined){
- //SDK中 getToken() 方法获取免登token
- //window.xm.getToken().then(async function(token){//上线取消注释
- let token="test";//上线注释
- const inputForm =qs.stringify({
- 'token': token
- }, { allowDots: true, arrayFormat: 'indices' })
- var res = await this.$API.yin.TokenLogin.get(inputForm);
- //存PCtoken
- this.$store.commit('setPcToken',res.PcToken);
- this.$store.commit('setUser',res.account);
- //})//上线取消注释
- }
- },
- TokenLogin2(){
- let that=this;
- //添加PCtoken过期判断,(请求拦截到token过期,会设置PCtoken为空,为空的时候再调用免登功能)
- if(this.$store.state.pctoken==""||this.$store.state.pctoken==undefined){
- //SDK中 getToken() 方法获取免登token
- //window.xm.getToken().then(async function(token){//上线取消注释
- let token="test";//上线注释
- new userSets()
- .TokenLogin({
- token: token
- })
- .then((res) => {
- that.$store.commit('setPcToken',res.PcToken);
- that.$store.commit('setUser',res.account);
- });
- //})//上线取消注释
- }
- },
- getBannerImg(){
- new userSets()
- .BannerImg({
- 'current': 1,
- 'size': 5,
- 'orders':[],
- })
- .then((res) => {
- let bs=[];
- for(let i=0;i<res.records.length;i++){
- bs.push(res.records[i].bannerImg);
- }
- //需添加url拼接
- //this.BannerImgurls=bs;
- //console.log(this.BannerImgurls);
- });
- },
- getSelectColor(){
- let that=this;
- new userSets()
- .SelectColor({
- 'current': 1,
- 'size': 5,
- 'orders':[],
- })
- .then((res) => {
- //console.log(res.records[0].selectColor.substring(1, 7));
- //存PCtoken
- that.$store.commit('setSelectColor',res.records[0].selectColor.substring(1, 7));
- });
- },
- //测试接口,可删除
- async gettest(){
- let that=this;
- //SDK中 getToken() 方法获取免登token
- window.xm.getToken().then(function(token){
- console.log(token);
- that.con1="哈哈"+token;
- window.xm.showToast({
- message:that.con1
- })
- })
- //测试数据同步接口的
- const inputForm ={
- 'iamRequestId': '120010',
- 'iamRemoteUser': 'admin12022',
- 'iamRemotePwd': ''
- }
- var res = await this.$API.yin.SchemaService.post(inputForm);
- if (res.type == 1) {
- this.$router.replace({
- path: "/main",
- });
- } else {
- Toast.fail(res.message);
- }
- },
- //测试接口,可删除
- async gettest2(){
- var datas = {
- username: "admin",
- };
- var res = await this.$API.my.OrderDetails.get(datas);
- this.con1=res;
- console.log(res);
- },
- //用户数据同步测试用(用户保存)
- async gettestUser1(){
- const inputForm ={
- 'iamRequestId': '120010',
- 'iamRemoteUser': 'admin',
- 'iamRemotePwd': '11',
- 'loginName': 'yzt2',
- 'name': '同步用户2',
- 'password': '111',
- 'idcard': '320911199010000002',
- 'email': '818166662@qq.com',
- 'phone': '88868882',
- 'mobile': '1829999992',
- 'loginFlag': '1',
- 'photo': '',
- 'sign': '个性签名2',
- }
- var res = await this.$API.yin.UserCreateService.post(inputForm);
- console.log(res);
- },
- //(用户更新)
- async gettestUser2(){
- const inputForm ={
- 'iamRequestId': '120010',
- 'iamRemoteUser': 'admin',
- 'iamRemotePwd': '11',
- 'uid': '1639158103696228354',
- 'loginName': 'yzt222',
- 'name': '11',
- // 'password': '',
- // 'idcard': '',
- // 'email': '',
- // 'phone': '',
- // 'mobile': '',
- // 'loginFlag': '',
- // 'photo': '',
- // 'sign': '',
- }
- var res = await this.$API.yin.UserUpdateService.post(inputForm);
- console.log(res);
- },
- //(用户删除)
- async gettestUser3(){
- const inputForm ={
- 'iamRequestId': '120010',
- 'iamRemoteUser': 'admin',
- 'iamRemotePwd': '111',
- 'uid': '1639158103696228354',
- }
- var res = await this.$API.yin.UserDeleteService.post(inputForm);
- console.log(res);
- },
- },
- };
- </script>
- <style>
- </style>
|