From 24327e8eb3dccfa7c6c750004e97e5a003166e33 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Tue, 08 Mar 2022 11:57:54 +0800
Subject: [PATCH] +人员查询基础页,屏蔽群众人员查询,巡查页面修复
---
/dev/null | 88 --------
pages/alarm_list/alarm_list.vue | 62 +++++
pages/grabOrders/grabOrdersZAXC/grabOrders.vue | 28 ++
pages/grabOrders/personnelCount/personnelCount.vue | 247 ++++++++++++++++++++++
store/state.js | 4
pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue | 3
store/actions.js | 192 ++++++++--------
7 files changed, 429 insertions(+), 195 deletions(-)
diff --git a/pages/alarm_list/alarm_list.vue b/pages/alarm_list/alarm_list.vue
index b151d4b..8a2e499 100644
--- a/pages/alarm_list/alarm_list.vue
+++ b/pages/alarm_list/alarm_list.vue
@@ -15,14 +15,70 @@
<script>
import pageNav from '@/components/page-nav/page-nav.vue';
- import list from "./demo.config.js";
+ // import list from "./demo.config.js";
export default {
components: {
pageNav
},
data() {
+ let list = [{
+ groupName: '基础功能',
+ list: [{
+ path: '/pages/alarm_list/integral/integral',
+ icon: 'cell',
+ title: '查积分',
+ }, {
+ path: '/pages/grabOrders/taskCount/taskCount/grabOrders',
+ icon: 'sticky',
+ title: '查任务',
+ }]
+ },
+ {
+ groupName: '业务功能',
+ list: [{
+ path: 'pages/alarm_list/organ/organ',
+ icon: 'layout',
+ title: '组织申请',
+ }, {
+ path: 'pages/alarm_list/industry/industry',
+ icon: 'tabbar',
+ title: '行业政策',
+ },
+ {
+ path: 'pages/grabOrders/personnelCount/personnelCount',
+ icon: 'tabbar',
+ title: '人员统计',
+ },
+ ]
+ }
+ ];
+
+ let who = this.$store.state.roleid == "1417092295132561409" ?
+ "民警" :
+ (this.$store.state.roleid == "1430798487303671810" ?
+ '管理员' :
+ this.$store.state.roleid == "1123598816738675201" ?
+ '超级管理员' :
+ "其他")
+ // console.log(this.$store.state.roleid)
+ // console.log(who)
+ let lists = [];
+ for (let k in list) {
+ let listin = list[k].list;
+ lists.push(list[k]);
+ lists[k].list = [];
+ for (let kin in listin) {
+ if (who == "其他") {
+ if (listin[kin].title == "人员统计") {
+ continue;
+ }
+ }
+ lists[k].list.push(listin[kin])
+ }
+ }
+ // console.log(lists)
return {
- list: list,
+ list: lists,
title: '基础功能示例合集',
desc: '众多示例覆盖开发过程的各个需求,正在不断完善中。可让您快速集成,开箱即用。'
}
@@ -35,7 +91,7 @@
},
},
onShow() {
-
+
},
created() {
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/feedback.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/feedback.vue"
deleted file mode 100644
index 1a5bbe4..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/feedback.vue"
+++ /dev/null
@@ -1,425 +0,0 @@
-<template>
- <view class="mapJQtijiao">
- <u-top-tips ref="uTips"></u-top-tips>
- <!-- <view class="head">
- <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
- :background="{ background: '#0cd7e5' }">
- <div>
- 处理结果
- </div>
- </u-navbar>
- </view> -->
- <view class="mapJQtijiaomain">
- <view class="title" style="padding-top: 0.5rem;">任务完成者:</view>
- <view class="f">
- <view class="fren-main" style="margin:0 1rem;">
- <view class="fren-main-but">
- <u-button @click="checkedAll" :plain="true" type="primary" size="mini">全选</u-button><br />
- </view>
- <!-- <u-button @click="checkedAllFill">全不选</u-button> -->
- <u-checkbox-group @change="checkboxGroupChange">
- <u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list"
- :key="index" :name="item.name">{{item.name}}</u-checkbox>
- </u-checkbox-group>
- </view>
- </view>
- <view class="title" style="padding-top: 0.5rem;">请输入任务心得:</view>
- <view class="f">
- <view class="main" style="margin:0 1rem;">
- <textarea rows="9" cols="27" placeholder="请输入任务心得。" class="textareas" v-model="content"></textarea>
- </view>
- </view>
- <view class="title" style="padding-top: 0.5rem;">请输入任务意见:</view>
- <view class="f">
- <view class="main" style="margin:0 1rem;">
- <textarea rows="9" cols="27" placeholder="请输入任务意见。" class="textareas" v-model="yj"></textarea>
- </view>
- </view>
- <view class="title">照片上传:</view>
- <view class="t">
- <view class="main">
- <image @tap="takePhoto" src="/static/JQimg/xiangji.png" mode=""></image>
- </view>
- <view class="mains">
- <seeImgs class="seeImgs" :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs>
- </view>
- </view>
- <view class="title">视频上传:</view>
- <view class="s">
- <view class="main">
- <image @tap="takeVideo" src="/static/JQimg/shiping.png" mode=""></image>
- </view>
- <view class="mains">
- <seeImgs class="seeImgsVideo" :imgs="[]" :videos="videos" @del="delVideo" :type="'videos'">
- </seeImgs>
- </view>
- </view>
- <view class="butb">
- <!-- custom-style -->
- <button class="submits" type="primary" @click="upData">我反馈</button>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import seeImgs from 'components/seeImges/seeImges.vue'
- export default {
- components: {
- seeImgs
- },
- data() {
- return {
- content: '', //心得
- yj: '', //意见
- imgs: [],
- videos: [],
- data: {}
- }
- },
- onBackPress(e) {
- console.log("监听返回按钮事件1", e);
- uni.redirectTo({
- url: "/pages/grabOrders/grabOrdersZAFFPX/grabOrders?detailData=0"
- })
- // 此处一定姚要return为true,否则页面不会返回到指定路径
- return true;
- },
- methods: {
- onLoad: function(option) {
- var b;
- if (option.data == undefined) {
- this.data = {
- rname: '无数据',
- content: '无数据',
- district: '无数据',
- place: '无数据',
- time: '无数据',
- num: "无数据",
- ourNum: "无数据",
- inNum: "无数据",
- infor: "无数据"
- }
- return;
- }
- try {
- b = JSON.parse(option.data);
- } catch (e) {
- //TODO handle the exception
- }
- // console.log(b);
- console.log(b, "bbbbbbbb")
- this.data = b;
- },
- upData() {
- // console.log('开始上传');
- let video = "",
- imgs = "",
- that = this;
- for (let k in this.imgs) {
- imgs += this.imgs[k].src;
- if (k != this.imgs.length - 1) {
- imgs += ","
- }
- }
- for (let y in this.videos) {
- video += this.videos[y].src;
- if (y != this.videos.length - 1) {
- video += ","
- }
- }
- var dataList = {
- content: this.content,
- yj: this.yj,
- tpurl: imgs,
- spurl: video,
- hdid: this.data.id,
- serid: uni.getStorageSync("ids") || that.$store.state.puserID
- // result: this.content,
- };
- wx.showLoading({
- title: "提交中...",
- mask: true
- })
- // console.log(dataList);
- wx.request({
- url: this.$store.state.piAPI + 'taskfk/save', //仅为示例,并非真实接口地址。
- data: dataList,
- method: 'POST',
- header: {
- // "Content-Type": "application/x-www-form-urlencoded",
- "content-type": "application/json"
- },
- success: (res) => {
- // console.log(res)
- if (res.data.code == 200) {
- wx.showToast({
- title: '提交成功!',
- duration: 1000
- });
- var time = setTimeout(() => {
- clearTimeout(time);
- time = null;
- uni.redirectTo({
- url: './grabOrders?from="feedback"'
- });
- }, 1000)
- }
- wx.showToast({
- title: 'over',
- duration: 1000
- });
- }
- });
- let d = {
- rid: this.data.id,
- serid: this.data.serid,
- type: "stop",
- that: that
- }
- that.$store.commit('useWebScoketApi', d);
- },
- takePhoto() {
- var that = this;
- wx.chooseImage({
- count: 4, //可选择数量,默认9
- sizeType: ['compressed', 'original'], //上传压缩图,原图
- sourceType: ['album', 'camera'], //从相册选择或从使用相机
- success: async (res) => {
- for (var i = 0; i < res.tempFiles.length; i++) {
- if (res.tempFiles[i].size > 10 * 1024 * 1000) { //上传图片大小限制
- uni.showToast({
- title: "照片大小不能10MB",
- icon: "none"
- })
- return
- }
- }
- var tempFilePath = res.tempFilePaths;
- // try {
- wx.showLoading({
- title: "上传中...",
- mask: true
- })
- var that = this;
- // 循环调用uni.uploadFile ,因微信小程序只支持单文件上传
- for (var i = 0; i < tempFilePath.length; i++) {
- wx.uploadFile({
- // url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
- url: that.$store.state.piAPI + '/depl/put-depl',
- filePath: tempFilePath[i],
- name: 'file',
- formData: {
- 'user': 'test' // 上传附带参数
- },
- success: (data) => {
- wx.showToast({
- title: '上传图片成功!',
- duration: 1000
- });
- // 根据接口具体返回格式 赋值具体对应url
- that.imgs.push({
- id: i,
- src: JSON.parse(data.data).data
- })
- }
- });
- }
- }
- });
- },
- delImg(index) {
- this.imgs.splice(index, 1);
- // console.log(this.imgs)
- },
- takeVideo() {
- var that = this;
- wx.chooseVideo({
- sourceType: ['album', 'camera'],
- maxDuration: 60,
- camera: 'back',
- success(res) {
- var tempFilePath = res.tempFilePath;
- // try {
- wx.showLoading({
- title: "上传中...",
- mask: true
- })
- wx.uploadFile({
- // url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
- url: that.$store.state.piAPI + '/depl/put-depl',
- filePath: tempFilePath,
- name: 'file',
- formData: {
- 'user': 'test' // 上传附带参数
- },
- success: (data) => {
- wx.showToast({
- title: '上传视频成功!',
- duration: 1000
- });
- // // 根据接口具体返回格式 赋值具体对应url
- that.videos.push({
- id: that.videos.length,
- src: JSON.parse(data.data).data
- })
- // console.log(JSON.parse(data.data).data)
- }
- });
- }
- })
- },
- delVideo(index) {
- this.videos.splice(index, 1);
- // console.log(this.imgs)
- },
- beforeDestroy() {
- this.$store.commit("changegotuGrabOrders");
- }
- }
- }
-</script>
-
-<style lang="scss">
- page {
- width: 100%;
- height: 100%;
- }
-
- .mapJQtijiao {
- width: 100%;
- height: 100%;
- margin: 0 auto;
-
- // .head {
- // position: relative;
- // top: 0;
- // left: 0;
- // z-index: 1;
- // font-size: 16px;
- // font-weight: 600;
- // text-align: center;
-
- // div {
- // width: 100%;
- // border: 1px solid rgba($color: #000000, $alpha: 0);
- // }
- // }
-
- .mapJQtijiaomain {
- width: 100%;
- height: 100%;
- // border: 1px solid #000000;
- box-sizing: border-box;
- background-color: #F7F7F7;
-
- .title {
- margin-left: 1rem;
- margin-bottom: 0.5rem;
- }
- }
-
- .f {
- background-color: #fff;
- padding: 0.5rem 0 0.5rem 0;
- margin-bottom: 0.5rem;
-
- .main {
- margin: 0.5rem;
- // border: 1px solid rgba($color: #000000, $alpha: 0.5);
- height: 8rem;
- }
- }
-
- .t,
- .s {
- background-color: #fff;
- padding: 0.5rem 0 0.5rem 0;
- // margin-bottom: 0.5rem;
- display: flex;
- align-items: center;
- // border: 1px solid green;
- height: 95px;
- width: 100%;
-
- .main {
- // border: 1px solid red;
-
- image {
- width: 3rem;
- height: 3rem;
- margin-left: 1rem;
- }
- }
-
- .mains {
- // border: 1px solid red;
- width: calc(100% - 3rem);
- height: 75px;
- }
- }
-
- .butb {
- // margin: 1rem auto;
- // width: 6rem;
- height: 3rem;
- // // border: 1px solid rgb(46, 118, 228);
- // border-radius: 1rem;
- // display: flex;
- // font-size: 18px;
- // align-items: cent1er;
- // justify-con1tent: center;
- // color: #fff;
- // background-image: linear-gradient(to right, #4adeff, #55ffff);
- }
- }
-
- // .seeImgs{
- // width: 80%;
- // position:absolute ;
- // top: 13.3rem;
- // right: 0;
- // }
- // .seeImgsVideo{
- // width: 80%;
- // position:absolute ;
- // top: 19.8rem;
- // right: 0;
- // }
- .custom-style {
- background-image: linear-gradient(to right, #08EFF6, #0693FD);
- border-radius: 20px;
- }
-
- .submits {
- margin: 60rpx 90rpx 0;
- border: none;
- width: 572rpx;
- height: 86rpx;
- // line-height: 86rpx;
- box-sizing: border-box;
- border-radius: 15rpx;
- background-color: #103289 !important;
- color: #ffffff;
-
- &::after {
- content: none;
- }
-
- &::before {
- content: none;
- }
-
- &[disabled='true'] {
- background: #e4e4e4;
- font-size: 36rpx;
- font-family: Source Han Sans CN;
- font-weight: 500;
- color: #ffffff;
- }
- }
-
- // .main{
- // border: 1px solid transparent;
- // }
-</style>
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/grabOrders.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/grabOrders.vue"
deleted file mode 100644
index c366cd3..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/grabOrders.vue"
+++ /dev/null
@@ -1,408 +0,0 @@
-<template>
- <view class="grabOrders">
- <u-top-tips ref="uTips"></u-top-tips>
- <view>
- <u-tabs-swiper ref="uTabs" :list="list" :current="current" @change="tabsChange" :is-scroll="false"
- swiperWidth="750"></u-tabs-swiper>
- </view>
- <!-- @animationfinish="animationfinish" -->
- <swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"
- :style="{ height: 'calc(' + useHeight + ' - 40px)', width: '100%' }">
- <swiper-item v-for="(item, index) in list" :key="index" :style="{ height: useHeight, width: '100%' }">
- <view class="swiper-item">
- <scroll-view scroll-y :style="{ height: useHeight, width: '100%' }" @scrolltolower="onreachBottom">
- <page0 :listData="rightdata" :swiperCurrent="1" v-if="item.name == '正在进行'" @openOnce="openOnce"
- @getOrders="getOrders">
- </page0>
- <page1 :listData="leftdata" :swiperCurrent="0" v-if="item.name == '可参与'" @openOnce="openOnce"
- @getOrders="getOrders">
- </page1>
- <page2 :listData="overdata" :swiperCurrent="2" v-if="item.name == '已完成'" @openOnce="openOnce"
- @getOrders="getOrders"></page2>
- <!-- <view class="a" v-if="item.name == '正在进行'">
- {{leftdata}}
- </view>
- <view class="b" v-if="item.name == '可参与'">
- {{rightdata}}
- </view>-->
- </scroll-view>
- </view>
- </swiper-item>
- </swiper>
- <view>
- <u-modal v-model="showPopup" :content="appdetitle" :show-cancel-button="true" @confirm="confirms"></u-modal>
- <!-- <u-button @click="open">
- 打开模态框
- </u-button>-->
- </view>
- </view>
-</template>
-<script>
- import page0 from "./inPage/page0.vue";
- import page1 from "./inPage/page1.vue";
- import page2 from "./inPage/page2.vue";
- export default {
- components: {
- page0,
- page1,
- page2
- },
- data() {
- return {
- list: [{
- name: "可参与",
- }, {
- name: "正在进行",
- },
- {
- name: "已完成",
- },
- ],
- // 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
- current: 0, // tabs组件的current值,表示当前活动的tab选项
- swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
- leftdata: [],
- rightdata: [],
- overdata: [],
- showPopup: false,
- appdetitle: "",
- popupData: {},
- useHeight: "100%",
- };
- },
- onBackPress(e) {
- console.log("监听返回按钮事件2", e);
- uni.redirectTo({
- url: "/pages/grabOrders/grabOrdersMain/business"
- })
- // 此处一定姚要return为true,否则页面不会返回到指定路径
- return true;
- },
- watch: {
- current() {
- console.log(this.current)
- // if (this.current == 0) {
- // console.log(1)
- // this.getGrabOrders(0);
- this.getGrabOrders(this.current);
- // }
- },
- change() {
- this.getGrabOrders(this.current);
- },
-
- },
- mounted() {
- // this.getGrabOrders(this.current);
- let type = uni.getSystemInfoSync().platform;
- if (type == "android") {
- this.useHeight = "calc(100vh - 40px)";
- }
- },
- computed: {
- change() {
- return this.$store.state.gotuGrabOrders;
- },
- },
- onLoad: function(options) {
- // debugger
- // console.log(options)
- if (options.detailData == 0) {
- this.current = 0;
- this.swiperCurrent = 0;
- } else {
- this.current = 1;
- this.swiperCurrent = 1;
- }
- if (options.in) {
- this.current = 0;
- this.swiperCurrent = 0;
- }
- this.getGrabOrders(this.current);
-
- if (options.from == "feedback") {
- that.useWebScoketApi(item.id, item.serid, "stop");
- }
- },
- methods: {
- //实时位置传递
- setNowposition(rid, jd, wd) {
- console.log(uni.getStorageSync("ids") || this.$store.state.puserID, rid, jd, wd);
- },
- // tabs通知swiper切换
- tabsChange(index) {
- this.swiperCurrent = index;
- },
- // swiper-item左右移动,通知tabs的滑块跟随移动
- transition(e) {
- let dx = e.detail.dx;
- this.$refs.uTabs.setDx(dx);
- },
- // 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
- // swiper滑动结束,分别设置tabs和swiper的状态
- animationfinish(e) {
- let current = e.detail.current;
- this.$refs.uTabs.setFinishCurrent(current);
- this.swiperCurrent = current;
- this.current = current;
- },
- // scroll-view到底部加载更多
- onreachBottom() {},
- openOnce(val) {
- //打开地图
- // console.log(this.swiperCurrent)
- val["buttype"] = this.swiperCurrent == 1 ? 0 : 1; //tab标识,0正在进行,1可参与
- val["serid"] = (uni.getStorageSync("ids") || this.$store.state.puserID) + ",";
- val["appenUrl"] = this.$store.state.piAPI;
- //打开地图
-
- // if (val.iscation == 1) {
- if (val.type == 0) {
- //是队长-上传反馈
- val["butCT"] = "beginUp";
- } else if (val.type == 2) {
- //是队长-开始任务
- val["butCT"] = "begin";
- } else {
- //是队长-完成任务任务
- val["butCT"] = "over";
- }
- // } else {
- // if (val.type == 0) {
- // //不是队长-上传反馈
- // val["butCT"] = "over";
- // } else if (val.type == 2) {
- // //不是队长-开始任务
- // val["butCT"] = "over";
- // } else {
- // //不是队长-完成任务任务
- // val["butCT"] = "over";
- // }
- // }
- val["myid"] = uni.getStorageSync("ids") || this.$store.state.puserID;
- val["myName"] = uni.getStorageSync("name") || this.$store.state.puserName;
- console.log(val);
- // return
- uni.navigateTo({
- url: "./map?data=" + JSON.stringify(val),
- });
- },
- getGrabOrders(val = 0) {
- //获取全部的数据
- let that = this,
- d = {
- serid: uni.getStorageSync("ids") || that.$store.state.puserID,
- type: val + "",
- tasktype: '2'
- };
- let isWhere = val == 0 ? "可参与" : val == 1 ? "正在进行" : "已完成";
- if (val == 1) {
- d.jurisdiction = this.$store.state.UserData.jurisdiction;
- d.workjurisdiction = this.$store.state.UserData.workjurisdiction;
- }
- // console.log(that.$store.state.puserID)
- console.log(d)
- uni.request({
- url: this.$store.state.piAPI + "taskqd/selectLi",
- method: "POST",
- data: d,
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- success(res) {
- const data = res.data.data;
- console.log(data);
- if (isWhere == "可参与") {
- that.rightdata = data;
- } else if (isWhere == "正在进行") {
- let no = [],
- ok = [],
- begin = [],
- no1 = [],
- ok1 = [],
- begin1 = [];
- for (var k in data) {
- data[k].type = data[k].rtype;
- if (data[k].iscation == 1) {
- if (data[k].type == 0) {
- //是队长-上传反馈
- no1.push(data[k]);
- } else if (data[k].type == 2) {
- //是队长-开始任务
- begin1.push(data[k]); //是队长-上传反馈
- } else {
- //是队长-完成任务任务
- ok1.push(data[k]);
- }
- } else {
- if (data[k].type == 0) {
- //不是队长-上传反馈
- no.push(data[k]);
- } else if (data[k].type == 2) {
- //不是队长-开始任务
- begin.push(data[k]);
- } else {
- //不是队长-完成任务任务
- ok.push(data[k]);
- }
- }
- }
-
- that.leftdata = [...begin1, ...begin, ...no1, ...no, ...ok1, ...ok];
- // console.log(that.leftdata)
- // for (let k in begin) {
- // let id = begin[k].id;
- // that.isBeginTask[id] = {
- // id: id,
- // // position: that.createPosition(id)
- // }
- // }
- // for (let k in begin1) {
- // let id = begin1[k].id;
- // that.isBeginTask[id] = {
- // id: id,
- // // position: that.createPosition(id)
- // }
- // }
- // for (let k in no1) {
- // let id = no1[k].id;
- // that.$store.commit("addTask", id)
- // }
- // for (let k in no) {
- // let id = no[k].id;
- // that.$store.commit("addTask", id)
- // }
- // that.isOnTask[44].position.continuedTime();
- } else {
- that.overdata = data;
- }
- },
- });
- },
- createPosition(id) {
- return new $getPositions({
- id: id,
- fn: function(res) {
- console.log(res);
- // that.setNowposition(re)
- }
- })
- },
- // tips(type, title) {
- // this.$refs.uTips.show({
- // title: title,
- // type: type,
- // duration: '2300'
- // })
- // this.getGrabOrders(this.current); //重获取数据
- // },
- // useWebScoketApi(rid, serid, type) {
- // let that = this;
- // uni.request({
- // url: this.$store.state.piAPI + "taskqd/startTask?" + `rid=${rid}&serid=${serid}&type=${type}`,
- // method: "GET",
- // success(res) {
- // let type = res.data.data.type;
- // if (type == 'start') { //开启成功
- // that.tips('success', '开启任务成功')
- // return;
- // }
- // if (type == 'stop') { //开启成功
- // that.tips('success', '反馈任务成功')
- // return;
- // }
- // },
- // });
- // },
- getOrders(b) {
- let val = b.val,
- item = b.item,
- that = this;
- console.log(val, item)
-
- if (val == 0) { //正在进行
- if (item.type == "2") { //开始任务按钮
- // that.useWebScoketApi(item.id, item.serid, "start");
- let d = {
- rid: item.id,
- serid: item.serid,
- type: "start",
- // data: JSON.stringify(item),
- that: that,
- fn: () => {
- that.getGrabOrders(that.current); //重获取数据
- // setTimeout(() => {
- // that.openOnce(item);
- // }, 500)
- }
- }
- that.$store.commit('useWebScoketApi', d);
- }
- if (item.type == "0") { //上传反馈
- //反馈
- uni.navigateTo({
- url: "./feedback?data=" + JSON.stringify(item),
- // url: "./feedback"
- });
- }
- } else { //可参与
- //接单
- this.appdetitle = "是否参与任务:" + item.rname;
- this.showPopup = true;
- this.popupData = item;
- }
- },
- confirms() {
- let that = this;
- this.popupData["serid"] = (uni.getStorageSync("ids") || that.$store.state.puserID) + ",";
- this.popupData["captain"] = uni.getStorageSync("name") || that.$store.state.puserName;
- // console.log(item)
- // return;
- uni.request({
- url: this.$store.state.piAPI + "taskqd/Graborder",
- method: "POST",
- // data: {
- // securityId: this.$store.state.puserID,
- // status: tab
- // },
- header: {
- "content-type": "application/json",
- },
- data: this.popupData,
- success(res) {
- const data = res.data.msg;
- // console.log(data);
- if (data == "抢单成功") {
- uni.showToast({
- title: data,
- duration: 2000,
- });
- }
- // that.listData = data;
- // that.getGrabOrders(this.);
- that.current = 0;
- that.swiperCurrent = 0;
- that.$store.commit("changegotuGrabOrders");
-
- },
- });
- },
- },
- };
-</script>
-
-<style scoped lang="scss">
- page,
- .grabOrders {
- height: 100% !important;
- width: 100% !important;
- }
-
- page {
- overflow: hidden !important;
- }
-
- .swiper-item {
- flex: 1;
- }
-</style>
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page0.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page0.vue"
deleted file mode 100644
index aee0871..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page0.vue"
+++ /dev/null
@@ -1,221 +0,0 @@
-<template>
- <view class="onveMain">
- <view class="once" v-for="(item,index) in listData" :key="index" @click="openOnce(item)">
- <view class="onve-left">
- <view class="o-l-img">
- <image :src="item.url" mode=""></image>
- </view>
- <view class="o-l-main">
- <view class="o-l-m-up">
- {{item.rname}}
- </view>
- <!-- <view class="o-l-m-center">
- <u-icon name="account" color="#d0d0d0" size="28"></u-icon>
- 培训讲师:<span>{{item.fname}}</span>
- </view> -->
- <view class="o-l-m-center">
- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon>
- 培训开始时间:
- </view>
- <view class="o-l-m-center" style="padding-left: 13px;">
- <!-- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon> -->
- <!-- 时间: -->
- {{item.time}}
- </view>
- </view>
- </view>
- <view class="onve-right">
- <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini" :disabled="true"
- v-if="item.iscation == 0" @click="getOrders(swiperCurrent,item)">
- <!-- <span class="Cation notCation">队员</span> -->
- {{item.type == 1?"完成反馈":item.type == 0?"正在进行":"还未开始"}}
- </u-button>
- <u-button :class="[item.type == 1?'':item.type == 0?'blues':'greens']" size="mini"
- :disabled="item.type == 1" v-if="item.iscation == 1" @click="getOrders(swiperCurrent,item)">
- <!-- <span class="Cation">队长</span> -->
- {{item.type == 1?"完成反馈":item.type == 0?"上传反馈":"开始任务"}}
- </u-button>
- <view class="o-r-$">
- 积分:{{item.integral}}
- </view>
- </view>
- </view>
- <u-divider>没有更多了</u-divider>
- <view class="">
- {{res}}
- </view>
- <br />
- </view>
-</template>
-
-<script>
- export default {
- props: ["listData", "swiperCurrent"],
- data() {
- return {
- res: ''
- }
- },
- computed: {
- changes() {
- return this.$store.state.changes;
- }
- },
- watch: {
- changes() {
- console.log(this.$store.state.isOnTaskValue)
- this.res = this.$store.state.isOnTaskValue.intlat;
- }
- },
- methods: {
- openOnce(val) {
- this.$emit("openOnce", val);
- },
- getOrders(val, item) {
- let b = {
- val: val,
- item: item
- }
- this.$emit("getOrders", b);
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .onveMain {
- width: 100%;
- height: auto;
- }
-
- .once {
- width: calc(100% - 10px);
- height: 100px;
- border: 1px solid #d0d0d0;
- padding: 8px;
- box-sizing: border-box;
- margin: 5px;
- border-radius: 8px;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .onve-left {
- width: 75%;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .o-l-img {
- width: 80px;
- height: 80px;
- background-color: #d0d0d0;
- margin-right: 5px;
- border-radius: 7px;
-
- image {
- width: 100%;
- height: 100%;
- border-radius: 7px;
- }
- }
-
- .o-l-main {
- width: calc(100% - 85px);
- height: 80px;
- display: flex;
- // align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .o-l-m-up {
- height: 30px;
- font-size: 16px;
- }
- }
- }
-
- .onve-right {
- width: 25%;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- view {
- margin-top: 10px;
- }
- }
-
- .o-l-m-center span {
- display: inline-block;
- padding: 0px 5px 1px;
- margin: 0 5px;
- background-color: #ECF5FF;
- border: 0.5px solid #e4f1ff;
- color: #429FFF;
- border-radius: 8px;
- }
-
- // .onceUp {
- // width: 100%;
- // height: 25%;
- // padding-bottom: 5px !important;
- // border-bottom: 1px solid #d0d0d0;
- // }
-
- // .onceMain {
- // width: 100%;
- // height: 80%;
- // display: flex;
- // align-items: center;
- // justify-content: center;
-
- // .o-m-left {
- // width: 80%;
- // height: 100%;
- // border: 1 solid #d0d0d0;
- // display: flex;
- // // align-items: center;
- // justify-content: center;
- // flex-direction: column;
-
- // view {
- // margin-top: 2.5px;
- // padding-bottom: 2.5px;
- // }
- // }
- // }
-
- }
-
- .orange {
- color: #FF7B15;
- }
-
- .green {
- color: #00e713;
- }
-
- .greens {
- color: #18a655 !important;
- }
-
- .blues {
- color: #2680F0 !important;
- }
-
- .Cation {
- display: inline-block;
- position: absolute;
- left: -35px;
-
- &::after {
- content: "";
- }
- }
-
- .notCation {
- color: #18a655;
- }
-</style>
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page1.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page1.vue"
deleted file mode 100644
index 1efb40b..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page1.vue"
+++ /dev/null
@@ -1,178 +0,0 @@
-<template>
- <view class="onveMain">
-
- <view class="once" v-for="(item,index) in listData" :key="index" @click="openOnce(item)">
- <view class="onve-left">
- <view class="o-l-img">
- <image :src="item.url" mode=""></image>
- </view>
- <!-- <view class="o-l-main">
- <view class="o-l-m-up">
- {{item.rname}}
- </view>
- <view class="o-l-m-center">
- <u-icon name="order" color="#d0d0d0" size="28"></u-icon>
- 人数:{{item.num}}/ {{item.jnum}}
- </view>
- <view class="o-l-m-center">
- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon>
- 时间:{{item.time.slice(0,10)}}
- </view>
- </view> -->
- <view class="o-l-main">
- <view class="o-l-m-up">
- {{item.rname}}
- </view>
- <!-- <view class="o-l-m-center">
- <u-icon name="account" color="#d0d0d0" size="28"></u-icon>
- 培训讲师:<span>{{item.fname}}</span>
- </view> -->
- <view class="o-l-m-center">
- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon>
- 培训开始时间:
- </view>
- <view class="o-l-m-center" style="padding-left: 13px;">
- <!-- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon> -->
- <!-- 时间: -->
- {{item.time}}
- </view>
- </view>
- </view>
- <view class="onve-right">
- <u-button :class="[swiperCurrent == 0?'orange':'green']" size="mini" :disabled="item.num==item.jnum"
- @click="getOrders(swiperCurrent,item)">
- {{item.num==item.jnum?"人数已满":"我要参与"}}
- </u-button>
- <view class="o-r-$">
- 积分:{{item.integral}}
- </view>
- </view>
- </view>
- <u-divider>没有更多了</u-divider>
- <br />
- </view>
-</template>
-
-<script>
- export default {
- props: ["listData", "swiperCurrent"],
- methods: {
- openOnce(val) {
- this.$emit("openOnce", val);
- },
- getOrders(val, item) {
- let b = {
- val: val,
- item: item
- }
- this.$emit("getOrders", b);
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .onveMain {
- width: 100%;
- height: auto;
- }
-
- .once {
- width: calc(100% - 10px);
- height: 100px;
- border: 1px solid #d0d0d0;
- padding: 8px;
- box-sizing: border-box;
- margin: 5px;
- border-radius: 8px;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .onve-left {
- width: 75%;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .o-l-img {
- width: 80px;
- height: 80px;
- background-color: #d0d0d0;
- margin-right: 5px;
- border-radius: 7px;
-
- image {
- width: 100%;
- height: 100%;
- border-radius: 7px;
- }
- }
-
- .o-l-main {
- width: calc(100% - 85px);
- height: 80px;
- display: flex;
- // align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .o-l-m-up {
- height: 30px;
- font-size: 16px;
- }
- }
- }
-
- .onve-right {
- width: 25%;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- view {
- margin-top: 10px;
- }
- }
-
- // .onceUp {
- // width: 100%;
- // height: 25%;
- // padding-bottom: 5px !important;
- // border-bottom: 1px solid #d0d0d0;
- // }
-
- // .onceMain {
- // width: 100%;
- // height: 80%;
- // display: flex;
- // align-items: center;
- // justify-content: center;
-
- // .o-m-left {
- // width: 80%;
- // height: 100%;
- // border: 1 solid #d0d0d0;
- // display: flex;
- // // align-items: center;
- // justify-content: center;
- // flex-direction: column;
-
- // view {
- // margin-top: 2.5px;
- // padding-bottom: 2.5px;
- // }
- // }
- // }
-
- }
-
- .orange {
- color: orange;
- }
-
- .green {
- color: #00ba15;
- }
-</style>
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page2.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page2.vue"
deleted file mode 100644
index 1efb40b..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/inPage/page2.vue"
+++ /dev/null
@@ -1,178 +0,0 @@
-<template>
- <view class="onveMain">
-
- <view class="once" v-for="(item,index) in listData" :key="index" @click="openOnce(item)">
- <view class="onve-left">
- <view class="o-l-img">
- <image :src="item.url" mode=""></image>
- </view>
- <!-- <view class="o-l-main">
- <view class="o-l-m-up">
- {{item.rname}}
- </view>
- <view class="o-l-m-center">
- <u-icon name="order" color="#d0d0d0" size="28"></u-icon>
- 人数:{{item.num}}/ {{item.jnum}}
- </view>
- <view class="o-l-m-center">
- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon>
- 时间:{{item.time.slice(0,10)}}
- </view>
- </view> -->
- <view class="o-l-main">
- <view class="o-l-m-up">
- {{item.rname}}
- </view>
- <!-- <view class="o-l-m-center">
- <u-icon name="account" color="#d0d0d0" size="28"></u-icon>
- 培训讲师:<span>{{item.fname}}</span>
- </view> -->
- <view class="o-l-m-center">
- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon>
- 培训开始时间:
- </view>
- <view class="o-l-m-center" style="padding-left: 13px;">
- <!-- <u-icon name="volume" color="#d0d0d0" size="28"></u-icon> -->
- <!-- 时间: -->
- {{item.time}}
- </view>
- </view>
- </view>
- <view class="onve-right">
- <u-button :class="[swiperCurrent == 0?'orange':'green']" size="mini" :disabled="item.num==item.jnum"
- @click="getOrders(swiperCurrent,item)">
- {{item.num==item.jnum?"人数已满":"我要参与"}}
- </u-button>
- <view class="o-r-$">
- 积分:{{item.integral}}
- </view>
- </view>
- </view>
- <u-divider>没有更多了</u-divider>
- <br />
- </view>
-</template>
-
-<script>
- export default {
- props: ["listData", "swiperCurrent"],
- methods: {
- openOnce(val) {
- this.$emit("openOnce", val);
- },
- getOrders(val, item) {
- let b = {
- val: val,
- item: item
- }
- this.$emit("getOrders", b);
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .onveMain {
- width: 100%;
- height: auto;
- }
-
- .once {
- width: calc(100% - 10px);
- height: 100px;
- border: 1px solid #d0d0d0;
- padding: 8px;
- box-sizing: border-box;
- margin: 5px;
- border-radius: 8px;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .onve-left {
- width: 75%;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .o-l-img {
- width: 80px;
- height: 80px;
- background-color: #d0d0d0;
- margin-right: 5px;
- border-radius: 7px;
-
- image {
- width: 100%;
- height: 100%;
- border-radius: 7px;
- }
- }
-
- .o-l-main {
- width: calc(100% - 85px);
- height: 80px;
- display: flex;
- // align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .o-l-m-up {
- height: 30px;
- font-size: 16px;
- }
- }
- }
-
- .onve-right {
- width: 25%;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- view {
- margin-top: 10px;
- }
- }
-
- // .onceUp {
- // width: 100%;
- // height: 25%;
- // padding-bottom: 5px !important;
- // border-bottom: 1px solid #d0d0d0;
- // }
-
- // .onceMain {
- // width: 100%;
- // height: 80%;
- // display: flex;
- // align-items: center;
- // justify-content: center;
-
- // .o-m-left {
- // width: 80%;
- // height: 100%;
- // border: 1 solid #d0d0d0;
- // display: flex;
- // // align-items: center;
- // justify-content: center;
- // flex-direction: column;
-
- // view {
- // margin-top: 2.5px;
- // padding-bottom: 2.5px;
- // }
- // }
- // }
-
- }
-
- .orange {
- color: orange;
- }
-
- .green {
- color: #00ba15;
- }
-</style>
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map.vue"
deleted file mode 100644
index 477f73a..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map.vue"
+++ /dev/null
@@ -1,1187 +0,0 @@
-<template>
- <view class="content">
- <u-top-tips ref="uTips"></u-top-tips>
- <!-- <u-button type="info" @click="acc">测试</u-button> -->
- <!-- <web-view :src="urls" @message="message"></web-view> -->
- <!-- <map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markersCom"
- :longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylines"
- show-location="true">
- <cover-view class="dingwBut" @click="mapControlsBack">
- <cover-image src="./map/img/dingwei.png" @click="mapControlsBack">
- </cover-image>
- </cover-view>
-
- </map> -->
- <view id="Umain" :style="{ height: activeHeight}" @touchstart="touchstart" @touchend="touchend"
- @touchmove="touchmove">
- <!-- <view :class="['activeTip',activeTip?'isOpens':'notOpens'] " :style="{height:'30px'}"></view> -->
- <!-- <view class="once-b">
- 任务详情
- </view> -->
- <view class="once">
- <span class="once-left">
- 培训标题
- </span>
- <span class="once-right">
- {{ourData.rname}}
- </span>
- </view>
- <view class="once">
- <span class="once-left">
- 培训内容
- </span>
- <span class="once-right">
- {{ourData.content}}
- </span>
- </view>
- <view class="once">
- <span class="once-left">
- 培训讲师
- </span>
- <span class="once-right">
- <span>{{ourData.fname}}</span>
- </span>
- </view>
- <view class="once">
- <span class="once-left">
- 联系方式
- </span>
- <span class="once-right">
- <span>{{ourData.phone}}</span>
- </span>
- </view>
- <view class="once">
- <span class="once-left">
- 培训地点
- </span>
- <span class="once-right">
- {{ourData.gathername}}
- </span>
- </view>
- <view class="once">
- <span class="once-left">
- 开始时间
- </span>
- <span class="once-right">
- {{ourData.time}}
- </span>
- </view>
- <view class="once">
- <span class="once-left">
- 参培队伍
- </span>
- <span class="once-right">
- 保安员队伍
- </span>
- </view>
- <!-- <view class="once">
- <span class="once-left">
- 队长
- </span>
- <span class="once-right">
- <span>{{ourData.captain}}</span>
- </span>
- </view> -->
- <view class="once">
- <span class="once-left">
- 参与者
- </span>
- <span class="once-right">
- <span v-for="(item,index) in ourData.teams">{{item}}</span>
- </span>
- </view>
- <view class="once-c" v-if="ourData.buttype == 0">
- <u-button :type="ourData.butCT == 'beginUp'?'primary':ourData.butCT == 'begin'?'success':'info'"
- @click="openAPP(ourData.buttype)" :disabled="ourData.butCT== 'over' || ourData.iscation == '0'">
- {{ourData.butCT == 'beginUp'?(ourData.iscation == '0'?'正在培训':'上传反馈'):ourData.butCT == 'begin'?(ourData.iscation == '0'?'还未开始':'开始培训'):'培训结束'}}
- </u-button>
- </view>
- <view class="once-c" v-if="ourData.buttype == 1">
- <!-- <u-button :type="ourData.num==ourData.jnum?'info':'success'" @click="openAPP(ourData.buttype)"
- :disabled="(ourData.num==ourData.jnum)&& ourData.buttype==1 ||ourData.type == 1">
- {{ourData.num==ourData.jnum?"人数已满":'我参与'}}
- </u-button> -->
- <u-button type="success" @click="openAPP(ourData.buttype)">
- 我参与
- </u-button>
- </view>
-
- </view>
- <u-popup v-model="showIn" mode="bottom" border-radius="14" z-index='1000001' :mask-close-able="true">
- <view class="Info2">
- <view class="Info4">是否参加活动</view>
- <u-button class="Info5" type="primary" @click="openAPP('oks')">参加</u-button>
- <u-button class="Info5" type="error" @click="openAPP('nos')">取消</u-button>
- <!--<view class="Info3">
- </view> -->
- </view>
- </u-popup>
- </view>
-</template>
-
-<script>
- import $moveUniAppMap from "./map/js/moveUniAppMap.js"
- export default {
- data() {
- return {
- urls: '',
- // dataList: [],
- fn: null,
- rid: '',
- webV: null,
- wv: null,
- mapHeight: 0,
- latitude: 28.687205773173343,
- longitude: 115.8995839881188,
- circles: [], //圆
- markers: [], //标记点
- mypolylines: [{ //指定一系列坐标点,从数组第一项连线至最后一项
- points: [],
- color: "#FE0000", //线的颜色
- width: 10, //线的宽度
- dottedLine: false, //是否虚线
- arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
- },
- { //指定一系列坐标点,从数组第一项连线至最后一项
- points: [],
- color: "#10a4ff", //线的颜色
- width: 10, //线的宽度
- dottedLine: false, //是否虚线
- arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
- },
- ],
- useTime: null,
- useTimeSet: null,
- times: 3000,
- setTimes: 30000,
- ourData: {},
- map: null,
- domMove: null,
- query: null,
- showIn: false,
- customStyle: {
- backgroundColor: "#FFF",
- },
- bye: true,
- types: '', //android?
- moveDom: null, //移动实体类
- activeHeight: "auto ", //活动高度 默认自动
- afterClass: {},
- activeTip: false, //是否展开
-
- mapControls: [{
- id: "1",
- position: 20,
- iconPath: "/static/tabbar/addSelectedIcon.png",
- clickable: true,
- }], //地图控件
- }
- },
- methods: {
- mapControlsBack() {
- // console.log(1111)
- this.getLocationInfo("notSet");
- // this.bye = false;
- // this.timeBegin(1);
- },
- touchstart(e) {
- // console.log(e.changedTouches[0].clientY)
- if (this.moveDom) {
- this.moveDom.ListenerTouchstart(e)
- }
- },
- touchmove(e) {
- // console.log(e.changedTouches[0].clientY)
- if (this.moveDom) {
- this.moveDom.ListenerTouchmove(e)
- }
- },
- touchend(e) {
- // console.log(e.changedTouches[0].clientY)
- if (this.moveDom) {
- this.moveDom.ListenerTouchend(e)
- }
- },
- openAPP(type) {
- let that = this;
- if (type == "oks") {
- let dataAppend = that.ourData;
- dataAppend["serid"] = (uni.getStorageSync("ids") || that.$store.state.puserID) + ",";
- dataAppend["captain"] = uni.getStorageSync("name") || that.$store.state.puserName;
- uni.request({
- url: that.$store.state.piAPI + "taskqd/Graborder",
- method: "POST",
- data: dataAppend,
- header: {
- "content-type": "application/json",
- },
- success(res) {
- if (res.data.msg == "抢单成功") {
- // appenUrl: "http://192.168.0.108:83/",
- // butCT: "beginUp",
- // buttype: 0,
- // captain: "我",
- // city: "南昌市",
- // content: "测试",
- // district: "西湖区",
- // id: 37,
- // integral: "222",
- // iscation: "1",
- // jnum: 3,
- // line: "LINESTRING(115.8995839881188 28.687205773173343,115.89391916267935 28.678966027079593,115.90404718391959 28.673644524394046,115.91211526863638 28.681369286356936)",
- // num: 1,
- // nums: 0,
- // province: "江西省",
- // publisher: "管理",
- // raddress: null,
- // rname: "测试1",
- // rtype: "0",
- // serid: "1123598821738675201,",
- // team: "你,他,它",
- // time: "2022-02-18 14:15:52",
- // type: "2",
- // fname: "管理者",
- // url: "http://2
- // myid:111
- //myName:222
- // that.ourData.rtype = 2;
- // that.ourData.type = 2;
- // that.ourData.buttype = 0;
- // that.ourData.butCT = "begin";
- // if (that.ourData.num == 0) {
- // that.ourData.iscation = "1";
- // that.ourData.serid += that.ourData.myid + ',';
- // that.ourData.captain = that.ourData.myName;
- // } else {
- // that.ourData.iscation = "0";
- // that.ourData.serid += that.ourData.myid + ',';
- // that.ourData.team += ',' + that.ourData.myid;
- // }
- // that.ourData.butCT = "begin";
- uni.showToast({
- title: res.data.msg,
- duration: 2000,
- });
- setTimeout(function() {
- uni.redirectTo({
- url: "/pages/grabOrders/grabOrdersZAFFPX/grabOrders?in=true"
- })
- }, 2200)
- }
- },
- complete() {
- that.showIn = false;
- }
- })
- return
- } else if (type == "nos") {
- this.showIn = false;
- return
- }
- // console.log(type)
- if (type != 1) {
- if (that.ourData.butCT == "beginUp") {
- // 反馈
- // if (that.onPosition) {
- // that.onPosition.overContinued();
- // }
- this.bye = true;
- uni.redirectTo({
- url: '/pages/grabOrders/grabOrdersZAFFPX/feedback?data=' + JSON.stringify(this
- .ourData) +
- '&other="11111"'
- });
- } else if (that.ourData.butCT == "begin") {
- that.bye = true; //点击开始 这个页面就不用了
- // 开始任务
- // that.setUniAppMsg("hBackMsg", {
- // type: "start",
- // ourData: {
- // id: that.ourData.id,
- // serid: that.ourData.serid
- // },
- // fn: function(val) {
- // if (val == "success") {
- // // console.log("成功开启任务")
- // that.ourData.butCT = "beginUp";
- // that.ourData.rtype = '0';
- // that.ourData.type = "0";
- // }
- // }
- // })
- let rid = that.ourData.id,
- serid = that.ourData.serid,
- type = 'start',
- url = that.$store.state.piAPI + "taskqd/startTask?" +
- `rid=${rid}&serid=${serid}&type=${type}`;
- // uni.request({
- // url: url,
- // method: "get",
- // // header: {
- // // "content-type": "application/json",
- // // },
- // success(res) {
- // // that.timeBegin(1);
- // // that.ourData.butCT = "beginUp";
- // // that.ourData.rtype = '0';
- // // that.ourData.type = "0";
- // },
- // complete() {
- // that.showIn = false;
- // }
- // })
- let d = {
- rid: rid,
- serid: serid,
- type: type,
- // data: JSON.stringify(item),
- goto: "grabOrdersZAFFPX",
- that: that,
- fn: () => {
- // that.getGrabOrders(that.current); //重获取数据
- // setTimeout(() => {
- // that.openOnce(item);
- // }, 500)
- }
- }
- that.$store.commit('useWebScoketApi', d);
- // axios.get(url).then((res) => {
- // // console.log(res);
-
- // })
- }
- } else {
- this.showIn = true;
- // this.openAPP('oks')
- // this.$confirm('是否参与活动:' + this.ourData.rname + "?", '提示', {
- // confirmButtonText: '确定',
- // cancelButtonText: '取消',
- // type: 'success',
- // center: true,
- // customClass: "customClass"
- // }).then(() => {
- // let url = that.ourData.appenUrl + "taskqd/Graborder",
- // ourDataAppend = that.ourData;
- // console.log(url, ourDataAppend)
-
- // }).catch(() => {
-
- // });
- }
- },
- // message(event) {
- // let data = event.detail.data;
-
- // console.log(data);
- // },
- // sendRequestData(res, plt = 0) {
- // let param = JSON.stringify(res)
- // console.log(param);
- // if (plt == 1) {
- // this.webV.postMessage({
- // type: 'new',
- // data: param
- // })
- // } else {
- // this.wv.evalJS(`requestData(${param})`);
- // }
- // },
- timeBegin(val) {
- // console.log(this.bye)
- let that = this;
- if (this.bye) {
- console.log("再见")
- if (that.useTime) {
- clearTimeout(that.useTime);
- that.useTime = null;
- }
- if (that.useTimeSet) {
- clearTimeout(that.useTimeSet);
- that.useTimeSet = null;
- }
- return
- }
- if (this.useTime) {
- return
- } else {
- //加入自己的路线基础 索引1
- // this.mypolylines[1] = { //指定一系列坐标点,从数组第一项连线至最后一项
- // points: [],
- // color: "#10a4ff", //线的颜色
- // width: 10, //线的宽度
- // dottedLine: false, //是否虚线
- // arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
- // }
- if (val == 1) {
- that.getLocationInfo();
- }
- this.useTime = setTimeout(() => {
- that.getLocationInfo();
- clearTimeout(this.useTime);
- that.useTime = null;
- that.timeBegin();
- }, that.times)
- }
- },
- timeBeginSet(d) {
- let that = this;
- if (this.useTimeSet) {
- return
- } else {
- that.$store.commit("setMsg", d)
- this.useTimeSet = setTimeout(() => {
- clearTimeout(this.useTimeSet);
- that.useTimeSet = null;
- }, that.setTimes)
- }
- },
- mover(o, a) {
- let that = this;
- uni.createMapContext("myMap", this).moveToLocation({
- longitude: o,
- latitude: a,
- });
- },
- getLocationInfo(val) {
- var that = this;
- uni.getLocation({
- type: 'gcj02',
- isHighAccuracy: true,
- success(res) {
- // console.log(res, "当前位置");
- that.latitude = res.latitude
- that.longitude = res.longitude
- // console.log(that.latitude)
- // console.log(that.longitude)
- that.map.moveToLocation({
- latitude: res.latitude,
- longitude: res.longitude
- });
- // that.mover(res.longitude, res.latitude); //移动
- // that.$store.commit("setMsg",d)
- //标记点
- that.markers = [{
- id: 1,
- latitude: res.latitude,
- longitude: res.longitude,
- iconPath: './map/img/dinw/dinw1.png',
- }]
- that.circles = [{ //在地图上显示圆
- latitude: res.latitude,
- longitude: res.longitude,
- fillColor: "#D9E6EF", //填充颜色
- color: "#A7B6CB", //描边的颜色
- radius: 10, //半径
- strokeWidth: 2 //描边的宽度
- }]
- if (val != "notSet") {
- let d = {
- id: that.ourData.id,
- intlat: [res.longitude, res.latitude]
- }
- that.timeBeginSet(d) //30秒送数据
- //加入绘制路线
- let useDataPosition = {
- latitude: res.latitude,
- longitude: res.longitude
- }
- let lat = useDataPosition.latitude + '';
- let long = useDataPosition.longitude + '';
- let oldLat = that.mypolylines[1].points.length == 0 ? 1 : that.mypolylines[1].points[
- that.mypolylines[1].points.length -
- 1].latitude + '';
- let oldLong = that.mypolylines[1].points.length == 0 ? 1 : that.mypolylines[1].points[
- that.mypolylines[1].points.length -
- 1].longitude + '';
- if (lat != oldLat && long != oldLong) { //判断如果两次位置不一样 那就添加
- that.mypolylines[1].points.push(useDataPosition);
- }
- // console.log(lat != oldLat && long != oldLong, 222222222222);
- // console.log(that.mypolylines[1].points.length)
- }
- }
- });
- },
- getDom(name, fn) {
- this.query.select('#Umain').boundingClientRect(data => {
- if (fn) {
- fn(data);
- }
- }).exec()
- },
- checkDomHeight(data) {
- // 声明定时器
- var timer = null,
- that = this;
- // 检查dom是否执行完成
- function checkDom() {
- let useData;
- that.query.select(data.name).boundingClientRect(data => {
- // console.log('11111111')
- // console.log(data);
- if (data.fn) {
- //回调函数
- data.fn(data);
- return;
- } else {
- return data;
- }
- }).exec()
- return;
-
- }
- // 首次执行
- checkDom();
- },
- showWindow() {
- return
- let sub = uni.getSubNVueById("myMap");
- sub.show('slide-in-left', 200, () => {
- console.log('subNVue 原生子窗体显示成功');
- });
- sub.setStyle({
- "position": "absolute",
- "width": "100%",
- "height": "50%",
- "left": "0px",
- "bottom": "0px",
- "background-color": "#FFF000",
- "border-top-left-radius": "15px",
- "border-top-right-radius": "15px"
- });
- },
- sendMsg(data) {
- uni.$emit('sub', {
- project: data
- });
- },
- hideWindow() {
- let sub = uni.getSubNVueById("sub");
- sub.hide('fade-out', 300)
- },
- },
- computed: {
- isOnTaskValue() {
- if (this.$store.state.changes) {
- return this.$store.state.isOnTaskValue;
- } else {
- return this.$store.state.isOnTaskValue;
- }
- },
- circlesCom() {
- return this.circles.slice(0);
- },
- markersCom() {
- return this.markers.slice(0);
- },
- // mypolylinesCom() {
- // // console.log(this.mypolylines,"333333333333333333333")
- // return this.mypolylines.slice(0);
- // },
- socketValue() {
- return this.$store.state.socketValue;
- }
- },
- watch: {
- socketValue() {
- console.log(this.socketValue)
- if (this.socketValue.type === "stop") {
- // console.log("任务结束vuevueveu")
- // this.$store.commit("stopTask", this.socketValue.rid);
- this.bye = true;
- uni.redirectTo({
- url: "/pages/grabOrders/grabOrders"
- });
- }
- },
- isOnTaskValue: {
- handler(newName, oldName) {
- // console.log("map", this.isOnTaskValue);
- for (let k in this.isOnTaskValue) {
- if (this.isOnTaskValue[k].id == this.rid) {
- if (this.fn) {
- this.fn(this.isOnTaskValue[k].intlat);
- }
- }
- }
- },
- deep: true
- }
- },
- mounted() {},
- onReady() {
- let that = this;
- return
- this.types = uni.getSystemInfoSync();
-
- var animation = uni.createAnimation({
- duration: 1000,
- timingFunction: 'linear',
- })
-
- this.animation = animation;
-
- let activeHeight = 0;
- this.getDom("#Umain", (res) => {
- // console.log(res, 1111111111111111111111111111)
- that.mapHeight = that.types.windowHeight - res.height + 30;
- // that.mapHeight = 30;
- that.activeHeight = res.height;
- activeHeight = res.height;
- let minHeight = 4 * 40 + 30
- let d = {
- activeDom: "#Umain",
- adaptDom: "#myMap",
- uni: uni,
- maxHeight: activeHeight, //在外面获取活动区域的高度,
- //在构造中动态获取会实时改变这个值
- //导致改变固定的最高高度
- useHeight: minHeight, //缩小后的高度、、可设置成保留高度
- critical: (activeHeight - minHeight) / 3, //收缩程度,,可设置成总滑动距离的1/2 (maxHeight - useHeight) / 2
- fn: (res) => {
- // console.log(res)
- if (res.state != 'on') {
- that.mapHeight = that.types.windowHeight - res.height + 30;
- } else {
- if (res.translate) {
- that.activeTip = true;
- }
- if (res.translate) {
- that.activeTip = false;
- }
- }
-
- if (res.translate === true) {
- that.activeTip = true;
- } else if (res.translate === false) {
- that.activeTip = false;
- }
- that.activeHeight = res.height + 'px';
- }
- }
- // that.moveDom = new $moveUniAppMap(d);
- })
- // if (type == "android") {
- // this.useHeight = "calc(100vh - 40px)";
- // }
- // window['hBackMsg'] = (val) => {
- // // console.log(val)
- // let d = {
- // rid: val.data.id,
- // serid: val.data.serid,
- // type: val.type,
- // that: that,
- // fn: () => {
- // // that.getGrabOrders(that.current); //重获取数据
- // if (val.fn) {
- // // console.log(111)
- // val.fn("success");
- // }
- // }
- // }
- // that.$store.commit('useWebScoketApi', d);
- // }
- // window['setIntLat'] = (val) => {
- // // console.log(fn);
- // that.fn = val.fn || '';
- // that.rid = val.rid || '';
- // }
- // window['showTip '] = (val) => {
- // that.$refs.uTips.show({
- // title: val,
- // type: "warning",
- // duration: '2300'
- // })
- // }
- },
- //监听返回
- onBackPress(event) {
- this.bye = true;
- },
- onLoad: function(options) {
- this.map = uni.createMapContext("myMap", this);
- var datas = {},
- data = {},
- that = this;
- if (options.data == undefined) {
- // data = JSON.stringify({
- datas = {
- appenUrl: "http://192.168.0.108:83/",
- butCT: "begin",
- buttype: 0,
- captain: "我",
- city: "南昌市",
- content: "测试培训内容",
- district: "西湖区",
- id: 37,
- integral: "222",
- iscation: "1",
- jnum: 3,
- line: "LINESTRING(115.8995839881188 28.687205773173343,115.89391916267935 28.678966027079593,115.90404718391959 28.673644524394046,115.91211526863638 28.681369286356936)",
- num: 1,
- nums: 0,
- province: "江西省",
- publisher: "管理",
- raddress: null,
- rname: "测试培训",
- rtype: "0",
- serid: "1123598821738675201,",
- team: "你,他,它",
- time: "2022-02-18 14:15:52",
- type: "2",
- fname: "培训老师张",
- myid: 111,
- myName: 222,
- url: "http://223.82.109.183:2081/zhba/upload/20220218/67f0c8bf3e7b5024c64133691f265072.ico",
- // })
- }
- } else {
- datas = options.data;
- }
- // if (typeof data == "string") {
- let i = 0;
- let toStrings = (val) => {
- // console.log(i++)
- // console.log(val)
- let d = {}
- if (typeof val == "string") {
- d = JSON.parse(val)
- } else {
- console.log(typeof val == "string")
- // console.log(val)
- data = val;
- return
- }
- toStrings(d);
- }
- toStrings(datas);
- // console.log(data)
- if (data.team) {
- data["teams"] = data.team.split(",");
- }
- that.ourData = data;
-
- return
- uni.getSystemInfo({ //初始化地图高度
- success(res) {
- that.mapHeight = res.windowHeight;
- }
- });
- // console.log(data);
- // return
- // console.log(options.html)
- // var a = options.html != undefined ? options.html : "xcxMapJQ/xcxmap.html";
- // console.log(a)
- // let a = "grabOrdersMap/xcxmap.html";
- // this.urls = "http://223.82.109.183:2082/" + a + "?data=" + data;
- // let name = 1; //1是本地 2是服务器
- // // let name = 1;
- // let b = this.$store.state.piAPI;
- // if (b == '/api') {
- // name = 1;
- // }
- // // "E:\liumy\qfqk\qfqks\qfqk-android\leafletMapOur\grabOrdersMap\xcxmap.html"
- // let a = name == 1 ? "http://127.0.0.1:8848/qfqk-android/leafletMapOur/" : b.slice(0, b.indexOf('api'));
- // // this.urls = a + "grabOrdersMap/xcxmap.html?data=" + data;
- // // a = a.slice(0, a.indexOf('api'));
- // this.urls = a + "grabOrdersMap/xcxmap.html?data=" + data;
- // this.urls = "http://192.168.0.222:5500/xcxmap.html?data=" + data;
- // // this.urls = "http://localhost:80?data=" + data;
- // // http://127.0.0.1:8848/qfqk-android/grabOrdersMap/xcxmap.html
- // // this.dataList = data;
- // // console.log(this.urls);
- // let type = uni.getSystemInfoSync().platform;
- // if (type == "android") {
- // //webView传值
- // let currentWebview = this.$scope.$getAppWebview();
- // setTimeout(() => {
- // that.wv = currentWebview.children()[0];
- // console.log(that.wv)
- // }, 1000)
- // window.addEventListener('message', e => {
- // console.log(e)
- // that.webV = e.source // window的对象
- // console.log(e.data.data.arg, '接收h5页面发来的消息'); // 接收h5页面发来的消息(11) ====>H5端
- // }, false)
- // setTimeout(() => {
- // that.sendRequestData("给html", 1);
- // that.sendRequestData("给html", 2);
- // }, 10000)
- // }
- that.query = uni.createSelectorQuery();
- const _this = this;
- // uni.getSystemInfo({
- // success: (res) => {
- // // _this.mapHeight = (res.screenHeight - res.statusBarHeight) /2
- // // setTimeout(() => {
- // // that.getDom('#Umain', data => {
- // // console.log(res.statusBarHeight, res.screenHeight, data, 'dat')
- // // console.log(res.screenHeight - data.height + res
- // // .statusBarHeight)
- // // _this.mapHeight = res.screenHeight - res.statusBarHeight - 420
- // that.mapHeight = res.screenHeight - res.statusBarHeight - 466
- // that.mapHeight = that.mapHeight
- // // })
- // // }, 1000)
-
- // // that.query.select('#Umain').boundingClientRect(data => {
- // // console.log('11111111')
- // // console.log(data)
- // // }).exec();
- // // console.log(res)
- // // let info = uni.createSelectorQuery().select("Umain");
- // // info.boundingClientRect(function(data) { //data - 各种参数
- // // console.log(data.width) // 获取元素宽度
- // // }).exec()
- // }
- // })
- // console.log(document.getElementById("Umain"))
- // this.checkDomHeightId({
- // domName: "getElementById",
- // name: "Umain",
- // fn: function(dom) {
- // console.log(dom)
- // let UmainHeights = dom.clientHeight;
- // uni.getSystemInfo({
- // success: (res) => {
- // _this.mapHeight = res.screenHeight - res.statusBarHeight -
- // UmainHeights
- // _this.mapHeight = _this.mapHeight
- // }
- // })
- // }
- // })
- // this.checkDomHeight({
- // domName: "getElementsByClassName",
- // name: "content",
- // fn: function(dom) {
- // // console.log(dom[0])
- // // dom.style.height = h - UmainHeight + "px";
- // // document.getElementsByClassName("dingwei")[0].style.bottom =
- // // UmainHeight + 10 + "px";
- // // that.map.invalidateSize(true);
-
- // let h = dom[0].clientHeight;
- // //因为按钮使用v-if所以在识别高度时候,but还没渲染所以手动添加 56px 不会变
- // // console.log("应用数据")
- // let UmainHeight = document.getElementById("Umain").clientHeight;
- // // if (that.ourData.iscation == "1") {
- // // UmainHeight += 56;
- // // }
- // //计算最小单位
- // let rows = document.getElementsByClassName("once"),
- // rowsHeight = 45;
- // for (let ri = 0; ri < 3; ri++) {
- // rowsHeight += rows[ri].clientHeight;
- // }
- // //适应高度
- // that.domMove = new $moveWindow({
- // id: "Umain",
- // minHeight: rowsHeight,
- // maxHeight: UmainHeight,
- // critical: (UmainHeight - rowsHeight) / 4,
- // openAnimation: false,
- // fn: function(res) {
- // // console.log(that.map.options)
-
- // // document.getElementById("myMap").style.height = h - res.height + "px";
- // // console.log(h, res.height)
- // // uni.getSystemInfo({
- // // success: (res) => {
- // // _this.mapHeight = h - res.height
- // // _this.mapHeight = _this.mapHeight
- // // }
- // // })
- // // that.map.setView([that.map.options.center[0], +that.map.options.center[1] + 0.002], that.map
- // // .options.zoom);
- // // console.log(h - res.height)
- // if (res.state === true || res.state === false) {
- // // that.map.invalidateSize(true);
- // // _this.mapHeight = h - res.height;
- // // _this.map.moveToLocation({
- // // latitude: _this.latitude,
- // // longitude: _this.longitude
- // // });
- // document.getElementById("myMap").style.height = h - res
- // .height + "px";
- // }
- // // document.getElementsByClassName("dingwei")[0].style.bottom = res.height +
- // // 10 + "px";
- // },
- // });
- // that.domMove.init();
- // }
- // })
-
- return
- //画线
- // console.log(data)
- if (data.line) {
- let line = data.line.split("(")[1].split(")")[0].split(",");
- }
- // console.log(line[0].split(" ")[1])
- // console.log(line[0].split(" ")[0])
- this.latitude = line[0].split(" ")[1];
- this.longitude = line[0].split(" ")[0];
- this.map.moveToLocation({
- // latitude: line[0].split(" ")[1],
- // longitude: line[0].split(" ")[0]
- latitude: 40.013305,
- longitude: 118.685713
- });
- let ourline = [];
- for (let k in line) {
- let ins = line[k].split(" ");
- ourline.push({
- latitude: +ins[1],
- longitude: +ins[0]
- })
- }
- // setTimeout(() => {
- // this.mypolylines[0] = { //指定一系列坐标点,从数组第一项连线至最后一项
- // points: ourline,
- // color: "#FE0000", //线的颜色
- // width: 10, //线的宽度
- // dottedLine: false, //是否虚线
- // arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
- // }
- that.mypolylines[0].points = ourline;
- // console.log(this.mypolylines)
- // }, 1000)
- this.showWindow();
- // this.getLocationInfo(data);
- if (data.butCT == "beginUp" && data.buttype == 0) {
- this.bye = false;
- this.timeBegin(1);
- }
- },
- beforeDestroy() {
- this.$store.commit("changegotuGrabOrders");
- }
- }
-</script>
-
-<style lang="scss">
- .content {
- // flex: 1;
- // height: 100%;
- overflow: hidden;
- // position: relative;
- }
-
- #Umain {
- // position: absolute;
- // bottom: 0;
- // left: 0;
- width: 100%;
- // overflow: hidden;
- }
-
- .once {
- width: 100%;
- min-height: 40px;
- background-color: #fff;
- display: flex;
- align-items: center;
- /* margin-bottom: 10px; */
- border-bottom: 1px solid #e8e8e8;
- padding: 0 10px;
- }
-
- .once-left {
- width: 25%;
- text-align: justify;
- text-align-last: justify;
- padding-right: 20px;
- box-sizing: border-box;
- }
-
- .once-left::after {
- content: ":";
- position: absolute;
- }
-
- .once-right {
- width: calc(75% - 20px);
- height: auto;
- /* border: 1px solid red; */
- box-sizing: border-box;
- word-break: break-all;
- }
-
- .once-right span {
- display: inline-block;
- padding: 0px 5px 1px;
- margin: 0 5px;
- background-color: #ECF5FF;
- border: 0.5px solid #e4f1ff;
- color: #429FFF;
- border-radius: 8px;
- }
-
- .once-c {
- width: 100%;
- height: 60px;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 8px 0;
- background-color: #fff;
- }
-
- .once-b {
- width: 100%;
- height: 40px;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #fff;
- border-bottom: 1px solid #e8e8e8;
- /* margin-bottom: 10px; */
- }
-
- .submits {
- margin: 60rpx 90rpx 0;
- border: none;
- width: 572rpx;
- height: 86rpx;
- // line-height: 86rpx;
- box-sizing: border-box;
- border-radius: 15rpx;
- background-color: #103289;
- color: #ffffff;
-
- &::after {
- content: none;
- }
-
- &::before {
- content: none;
- }
-
- &[disabled='true'] {
- background: #e4e4e4;
- font-size: 36rpx;
- font-family: Source Han Sans CN;
- font-weight: 500;
- color: #ffffff;
- }
- }
-
-
- .Info2 {
- width: 100%;
- // height: 100px;
- padding: 0 10px;
-
- .Info3 {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- height: 50px;
- }
-
- .Info4 {
- width: 100%;
- line-height: 50px;
- font-size: 18px;
- text-align: center;
- height: 50px;
- }
-
- .Info5 {
- margin-bottom: 10px !important;
- width: 70%;
- }
- }
-
- .notOpens {
- &::after {
- content: "";
- display: block;
- width: 20px;
- height: 4px;
- background-color: rgba(202, 202, 202, 1);
- position: absolute;
- top: 10px;
- left: calc(50% - 10px);
- border-radius: 5px;
- transition: all 0.5s;
- }
- }
-
- .activeTip {
- background-color: #fff;
- }
-
- .isOpens {
- &::after {
- content: "";
- display: block;
- width: 13px;
- height: 4px;
- background-color: rgba(202, 202, 202, 1);
- position: absolute;
- top: 10px;
- left: calc(50% - 12px);
- border-radius: 5px;
- transform: rotate(30deg);
- transition: all 0.5s;
- }
-
- &::before {
- content: "";
- display: block;
- width: 13px;
- height: 4px;
- background-color: rgba(202, 202, 202, 1);
- position: absolute;
- top: 10px;
- left: calc(50% - 4px);
- border-radius: 5px;
- transform: rotate(-30deg);
- transition: all 0.5s;
- }
- }
-
- .dingwBut {
- width: 80upx;
- height: 80upx;
- background-color: #fff;
- border-radius: 20upx;
- display: flex;
- align-items: center;
- justify-content: center;
- position: absolute;
- bottom: 40upx;
- right: 40upx;
-
- // background-color: red;
- // .dingwButImg {
- // width: 80%;
- // height: 80%;
- // }
- // .icon{
- // }
- // &::after{
- // content: url(map/img/dingwei.png);
- // }
- // .dingwButImg {
- // animation: mymove 5s infinite;
- // animation-timing-function: linear;
- // }
- }
-
-
-
- @keyframes mymove {
- 0% {
- transform: rotate(0deg);
- }
-
- 100% {
- transform: rotate(1turn);
- }
- }
-</style>
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dingwei.png" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dingwei.png"
deleted file mode 100644
index 58a917e..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dingwei.png"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw1.png" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw1.png"
deleted file mode 100644
index 080b720..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw1.png"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw2.png" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw2.png"
deleted file mode 100644
index a51e5d0..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw2.png"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw3.png" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw3.png"
deleted file mode 100644
index 76b6f88..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw3.png"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw4.png" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw4.png"
deleted file mode 100644
index cd5de4d..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw4.png"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw5.png" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw5.png"
deleted file mode 100644
index 79a421a..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw5.png"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw6.png" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw6.png"
deleted file mode 100644
index 772af08..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/dinw6.png"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/location.png" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/location.png"
deleted file mode 100644
index 52d5d19..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/img/dinw/location.png"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/js/move.js" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/js/move.js"
deleted file mode 100644
index 21c94d7..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/js/move.js"
+++ /dev/null
@@ -1,173 +0,0 @@
-class $moveWindow {
- constructor(data) {
- this.id = data.id;
- this.start = 0;
- this.end = 0;
- this.domHeight = 0;
- this.domMove = null;
- this.openValue = false;
- this.useHeight = data.minHeight;
- this.maxHeight = data.maxHeight;
- this.height = data.minHeight;
- this.critical = data.critical;
- this.openAnimation = data.openAnimation;
- let that = this;
- this.fn =
- data.fn ? (function(res) {
- // console.log("回调函数");
- data.fn(res);
- that.changeHeight(res);
- // if (res.state === true) {
- // console.log(that.openValue, res.state)
- // } else if (res.state === false) {
- // console.log(that.openValue, res.state)
- // }
- }) :
- (function(res) {
- console.log("未设置回调函数");
- console.log(res);
- });
-
- this.ListenerTouchmove = function(window) {
- let moseHeight = window.changedTouches[0].clientY;
- // let windowHeight = document.body.clientHeight; //屏幕宽度
- let endOn = moseHeight;
- // console.log(that.domHeight, that.start, endOn)
- let cha = that.domHeight + (+that.start - +endOn);
- if (cha >= that.maxHeight) {
- cha = that.maxHeight;
- } else if (cha <= that.useHeight) {
- cha = that.useHeight;
- }
- let d = {
- state: "on",
- height: cha,
- };
- that.fn(d);
- };
- this.ListenerTouchstart = function(window) {
- let moseHeight = window.changedTouches[0].clientY;
- that.start = moseHeight;
- // that.domHeight = document
- // .getElementById(that.id)
- // .style.cssText.split("px")[0]
- // .split("height:")[1];
- that.domHeight = document
- .getElementById(that.id)
- .clientHeight;
- };
- this.ListenerTouchend = function(window) {
- let moseHeight = window.changedTouches[0].clientY;
- that.end = moseHeight;
- let cha, states;
- if (that.end >= that.start) {
- states = false; //方向
- cha = that.end - that.start;
- } else {
- states = true; //方向
- cha = that.start - that.end;
- }
- if (cha >= that.critical) {
- //高
- that.opens(states, true); //程度
- } else if (cha < that.critical) {
- //低
- that.opens(states, false); //程度
- }
- };
- return this;
- }
- //启动监听事件
- init() {
- // this.domMove = document.getElementById(this.id);
- let that = this;
- this.checkDom(that.id, (dom) => {
- //检测是否有dom
- that.domMove = dom;
- if (that.openAnimation) {
- that.domMove.style.transition = 'all 0.2s';
- }
- that.domMove.addEventListener("touchmove", that.ListenerTouchmove);
- // 结束位置靠滑动距离判断
- that.domMove.addEventListener("touchstart", that.ListenerTouchstart);
- that.domMove.addEventListener("touchend", that.ListenerTouchend);
- });
- }
- //关闭监听事件
- closeInit() {
- this.domMove = document.getElementById(this.id);
- this.domMove.removeEventListener("touchmove", this.ListenerTouchmove);
- // 结束位置靠滑动距离判断
- this.domMove.removeEventListener("touchstart", this.ListenerTouchstart);
- this.domMove.removeEventListener("touchend", this.ListenerTouchend);
- }
- //输出事件
- opens(val, chengdu) {
- if (chengdu) {
- this.openValue = val;
- if (val) {
- this.height = this.maxHeight;
- } else {
- this.height = this.useHeight;
- }
- } else {
- this.height = this.domHeight;
- }
- let d = {
- state: this.openValue,
- height: this.height,
- };
- this.fn(d);
- }
- changeHeight(data) {
- document
- .getElementById(this.id).style.height = data.height + "px";
- }
- checkDom(name, fn) {
- // 声明定时器
- var timer = null;
- // 检查dom是否执行完成
- function checkDom() {
- // let dom = that.$refs[name];
- let dom = document.getElementById(name);
- if (dom) {
- // 执行dom加载完成后的操作
- // 清除定时器
- if (!timer) {
- clearTimeout(timer);
- }
- if (fn) {
- //回调函数
- fn(dom);
- return;
- } else {
- return dom;
- }
- } else {
- // 自我调用
- timer = setTimeout(checkDom, 100);
- }
- }
- // 首次执行
- checkDom();
- }
- // 结束位置是一半判断
- // domMove.addEventListener("touchend", function (window) {
- // let moseHeight = window.changedTouches[0].clientY;
- // let windowHeight = document.body.clientHeight;
- // let cha = windowHeight - moseHeight;
- // console.log(cha, "最后位置");
- // let centerPoint =
- // (windowHeight / 2 - +that.useHeight) / 2 + +that.useHeight;
- // if (cha >= centerPoint) {
- // cha = windowHeight / 2;
- // } else if (cha < centerPoint) {
- // cha = that.useHeight;
- // }
- // that.height = cha;
- // });
-}
-
-export default $moveWindow;
-
-// console.log(moveWindow)
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/js/moveUniAppMap.js" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/js/moveUniAppMap.js"
deleted file mode 100644
index ac1c9c8..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/map/js/moveUniAppMap.js"
+++ /dev/null
@@ -1,128 +0,0 @@
-class $moveUniAppMap {
- constructor(arg) {
- this.activeDom = arg.activeDom; //活动dom
- this.adaptDom = arg.adaptDom; //适应dom
- this.windowSize = arg.uni.getSystemInfoSync(); // 设备参数含屏幕尺寸
- let doms = arg.uni.createSelectorQuery(); //获取dom参数uni工具
- this.getDoms = (name, fn) => { //fn是会回调函数,不用promis
- doms.select(name).boundingClientRect((data) => {
- if (fn) {
- fn(data)
- }
- }).exec()
- }
- // console.log(this.windowSize)
-
- this.start = 0;
- this.end = 0;
- this.domHeight = 0;
- this.openValue = false; //方向
- this.useHeight = arg.useHeight; //使用的低高度
- this.critical = arg.critical; //收缩展开的程度
- // this.getDoms(this.activeDom, (res) => { //获取dom最大高度
- this.maxHeight = arg.maxHeight;
- // })
- this.fn = (res) => {
- if (arg.fn) {
- arg.fn(res)
- } else {
- console.log(res, "未设置输出函数")
- }
- }
-
- return this;
- }
- ListenerTouchstart(dom) { //开始移动,记录开始点和活动dom高度
- this.start = dom.changedTouches[0].clientY;
- this.getDoms(this.activeDom, (res) => { //动态获取当前活动dom高度
- this.domHeight = res.height;
- })
- // let d = {
- // state: "start",
- // height: this.maxHeight,
- // };
- // // console.log(cha, "cha")
- // // console.log(+endOn - +this.start, "cha")
- // this.fn(d);
- // console.log(this.start, "this.start")
- }
- ListenerTouchmove(dom) {
- let endOn = dom.changedTouches[0].clientY;
- // console.log(that.domHeight, that.start, endOn)
- let usecha = +this.start - +endOn;
- let cha = this.domHeight + usecha;
- if (cha >= this.maxHeight) {
- cha = this.maxHeight;
- } else if (cha <= this.useHeight) {
- cha = this.useHeight;
- }
- let translate = false;
- if (usecha >= this.critical) {
- translate = true;
- }
- if (usecha <= -this.critical) {
- translate = true;
- }
- let d = {
- state: "on",
- height: cha,
- translate: translate
- };
- if (usecha >= 0) {
- d.state = "up";
- }
- // console.log(cha, "cha")
- // console.log(usecha, "cha")
- this.fn(d);
- }
- ListenerTouchend(dom) {
- this.end = dom.changedTouches[0].clientY;
- let cha, states;
- if (this.end >= this.start) {
- states = false; //方向向下收缩
- cha = this.end - this.start;
- } else {
- states = true; //方向向上抬起
- cha = this.start - this.end;
- }
- if (cha >= this.critical) {
- //高
- this.judge(states, true); //程度
- } else if (cha < this.critical) {
- //低
- this.judge(states, false); //程度
- }
- // console.log(cha)
- }
- innit() {
-
- }
- //输出事件
- judge(val, chengdu) {
- let translate = '';
- if (chengdu) {
- this.openValue = val;
- if (val) {
- this.height = this.maxHeight; //给到向上的最高高度
- } else {
- this.height = this.useHeight; //给到向下的最低高度
- }
- } else {
- this.height = this.domHeight; //给到当前高度
- }
- if (this.height == this.maxHeight) {
- translate = false;
- } else {
- translate = true;
- }
- let d = {
- state: this.openValue,
- height: this.height,
- translate: translate
- };
- // console.log(d)
- this.fn(d);
- }
-}
-
-export default $moveUniAppMap;
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/once.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/once.vue"
deleted file mode 100644
index c8808b2..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/once.vue"
+++ /dev/null
Binary files differ
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/task - \345\211\257\346\234\254.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/task - \345\211\257\346\234\254.vue"
deleted file mode 100644
index 5818cba..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/task - \345\211\257\346\234\254.vue"
+++ /dev/null
@@ -1,88 +0,0 @@
-<template>
- <view class="grabOrdersTask">
- <once title="任务标题" :input="data.rname"></once>
- <once title="任务内容" :input="data.content"></once>
- <once title="任务地址" :input="data.place"></once>
- </br>
- <once title="开始时间" :input="data.time"></once>
- <once title="结束时间" :input="data.alarmTime"></once>
- </br>
- <once title="活动要求" :input="data.infor">
- </once>
- </br>
- <!-- <once title="结束时间" input="2021-08-10"></once> -->
- <view class="but">
- <u-button class="custom-style" type="primary" @click="inits(1)" v-show="data.current == 1"> 我参与</u-button>
- <u-button class="custom-style" type="primary" @click="inits(2)" v-show="data.current == 0"> 我反馈</u-button>
- </view>
- </view>
-</template>
-
-<script>
- import once from './once.vue'
- export default {
- components: {
- once
- },
- data() {
- return {
- data: ''
- };
- },
- methods: {
- inits(val) {
- //
- if (val == 1) { //接受任务
- //
- } else { //跳转反馈
- //
- uni.navigateTo({
- url: './feedback?data=' + JSON.stringify(val),
- });
- }
- }
- },
- onLoad: function(option) {
- var b;
- if (option.data == undefined) {
- this.data = {
- rname: '无数据',
- content: '无数据',
- district: '无数据',
- place: '无数据',
- time: '无数据',
- num: "无数据",
- ourNum: "无数据",
- inNum: "无数据",
- infor: "无数据"
- }
- return;
- }
- try {
- b = JSON.parse(option.data);
- } catch (e) {
- //TODO handle the exception
- }
- console.log(b);
- this.data = b;
- }
- };
-</script>
-
-<style lang="scss" scoped>
- page {
- width: 100%;
- height: 100%;
- background-color: #F0EFF5;
- }
-
- .but {
- width: 30%;
- margin: 0 auto;
-
- .custom-style {
- background-image: linear-gradient(to right, #08EFF6, #0693FD);
- border-radius: 20px;
- }
- }
-</style>
diff --git "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/task.vue" "b/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/task.vue"
deleted file mode 100644
index 5818cba..0000000
--- "a/pages/grabOrders/grabOrdersZAFFPX - \345\211\257\346\234\254/task.vue"
+++ /dev/null
@@ -1,88 +0,0 @@
-<template>
- <view class="grabOrdersTask">
- <once title="任务标题" :input="data.rname"></once>
- <once title="任务内容" :input="data.content"></once>
- <once title="任务地址" :input="data.place"></once>
- </br>
- <once title="开始时间" :input="data.time"></once>
- <once title="结束时间" :input="data.alarmTime"></once>
- </br>
- <once title="活动要求" :input="data.infor">
- </once>
- </br>
- <!-- <once title="结束时间" input="2021-08-10"></once> -->
- <view class="but">
- <u-button class="custom-style" type="primary" @click="inits(1)" v-show="data.current == 1"> 我参与</u-button>
- <u-button class="custom-style" type="primary" @click="inits(2)" v-show="data.current == 0"> 我反馈</u-button>
- </view>
- </view>
-</template>
-
-<script>
- import once from './once.vue'
- export default {
- components: {
- once
- },
- data() {
- return {
- data: ''
- };
- },
- methods: {
- inits(val) {
- //
- if (val == 1) { //接受任务
- //
- } else { //跳转反馈
- //
- uni.navigateTo({
- url: './feedback?data=' + JSON.stringify(val),
- });
- }
- }
- },
- onLoad: function(option) {
- var b;
- if (option.data == undefined) {
- this.data = {
- rname: '无数据',
- content: '无数据',
- district: '无数据',
- place: '无数据',
- time: '无数据',
- num: "无数据",
- ourNum: "无数据",
- inNum: "无数据",
- infor: "无数据"
- }
- return;
- }
- try {
- b = JSON.parse(option.data);
- } catch (e) {
- //TODO handle the exception
- }
- console.log(b);
- this.data = b;
- }
- };
-</script>
-
-<style lang="scss" scoped>
- page {
- width: 100%;
- height: 100%;
- background-color: #F0EFF5;
- }
-
- .but {
- width: 30%;
- margin: 0 auto;
-
- .custom-style {
- background-image: linear-gradient(to right, #08EFF6, #0693FD);
- border-radius: 20px;
- }
- }
-</style>
diff --git a/pages/grabOrders/grabOrdersZAXC/grabOrders.vue b/pages/grabOrders/grabOrdersZAXC/grabOrders.vue
index f17a68b..825ce48 100644
--- a/pages/grabOrders/grabOrdersZAXC/grabOrders.vue
+++ b/pages/grabOrders/grabOrdersZAXC/grabOrders.vue
@@ -12,7 +12,7 @@
<view class="swiper-item">
<scroll-view scroll-y :style="{ height: useHeight, width: '100%' }" @scrolltolower="onreachBottom">
<page0 :listData="leftdata" :swiperCurrent="0" v-if="item.name == '正在进行'" @openOnce="openOnce"
- @getOrders="getOrders"></page0>
+ @getOrders="getOrders" @outOrders="outOrders"></page0>
<page1 :listData="rightdata" :swiperCurrent="1" v-if="item.name == '可参与'" @openOnce="openOnce"
@getOrders="getOrders"></page1>
<page2 :listData="overdata" :swiperCurrent="2" v-if="item.name == '已完成'" @openOnce="openOnce"
@@ -119,6 +119,29 @@
}
},
methods: {
+ //取消任务
+ outOrders(d) {
+ let that = this;
+ uni.request({
+ url: this.$store.state.piAPI +
+ `taskqd/cancelTask?rid=${d.rid}&serid=${d.serid}&name=${that.$store.state.puserName}`,
+ method: "get",
+ // data: d,
+ header: {
+ "content-type": "application/x-www-form-urlencoded",
+ },
+ success(res) {
+ const data = res.data.msg;
+ if (data == "操作成功") {
+ uni.showToast({
+ title: data,
+ duration: 2000,
+ });
+ }
+ that.$store.commit("changegotuGrabOrders");
+ }
+ })
+ },
//实时位置传递
setNowposition(rid, jd, wd) {
console.log(uni.getStorageSync("ids") || this.$store.state.puserID, rid, jd, wd);
@@ -190,7 +213,7 @@
tasktype: '0'
};
let isWhere = val == 0 ? "可参与" : val == 1 ? "正在进行" : "已完成";
- if (val == 1) {
+ if (val == 0) {
d.jurisdiction = this.$store.state.UserData.jurisdiction;
d.workjurisdiction = this.$store.state.UserData.workjurisdiction;
}
@@ -312,7 +335,6 @@
item = b.item,
that = this;
console.log(val, item)
-
if (val == 0) { //正在进行
if (item.type == "2") { //开始任务按钮
// that.useWebScoketApi(item.id, item.serid, "start");
diff --git a/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue b/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
index 0406897..bf3d75a 100644
--- a/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
+++ b/pages/grabOrders/grabOrdersZAYWXC/grabOrders.vue
@@ -39,10 +39,12 @@
<script>
import page0 from "./inPage/page0.vue";
import page1 from "./inPage/page1.vue";
+ import page2 from "./inPage/page2.vue";
export default {
components: {
page0,
page1,
+ page2
},
data() {
return {
@@ -339,7 +341,6 @@
item = b.item,
that = this;
console.log(val, item)
-
if (val == 0) { //正在进行
if (item.type == "2") { //开始任务按钮
// that.useWebScoketApi(item.id, item.serid, "start");
diff --git a/pages/grabOrders/personnelCount/personnelCount.vue b/pages/grabOrders/personnelCount/personnelCount.vue
index 8183fd0..b7c69a7 100644
--- a/pages/grabOrders/personnelCount/personnelCount.vue
+++ b/pages/grabOrders/personnelCount/personnelCount.vue
@@ -1,6 +1,49 @@
<template>
- <view>
-
+ <view class="advisory-big">
+ <view class="m-top">
+ </view>
+ <view class="bomBut">
+ <view style="width: 400rpx;padding-left: 30rpx;">
+ <u-tabs :list="list" :is-scroll="false"></u-tabs>
+ </view>
+ <u-row gutter="16">
+ <u-col span="7">
+ <view class="bom-text">当前积分</view>
+ <view class="bom-int">{{dqjf}}</view>
+ </u-col>
+ <u-col span="5">
+ <view class="bom-text">累计积分</view>
+ <view class="bom-int">{{ljjf}}</view>
+ </u-col>
+ </u-row>
+ </view>
+
+ <view class="bomList">
+ <view class="">
+ <u-dropdown border-bottom="true">
+ <u-dropdown-item v-model="value1" @change="change" title="收支类型" :options="options1"></u-dropdown-item>
+ </u-dropdown>
+ </view>
+
+ <scroll-view id="articleBox" :style="{ height: swiperHeight + 'px' }" class="article-content" scroll-y
+ style="width: 100%; margin-top: 15rpx;">
+ <view v-for="i in data" class="advisory-model" @click="goDetail(i)">
+ <view class="advisory-left">
+ <view class="advisory-title-top">
+ <view class="advisory-title">{{i.access}}</view>
+ </view>
+ <view class="advisory-title-down">
+ <view class="advisory-title-time">{{i.time}}</view>
+ </view>
+ </view>
+ <view class="advisory-right">
+ <view v-if="i.type =='2'" class="advisory-title-integral">- {{i.integral}}</view>
+ <view v-if="i.type =='1'" class="advisory-title-integraladd">+{{i.integral}}</view>
+ </view>
+ <u-line class="advisory-line" color="#ebebeb" />
+ </view>
+ </scroll-view>
+ </view>
</view>
</template>
@@ -8,15 +51,211 @@
export default {
data() {
return {
-
+ dqjf:"暂无",
+ ljjf:"暂无",
+ list: [{
+ name: '积分明细'
+ }, {
+ name: ''
+ }, {
+ name: '',
+ }],
+ options1: [{
+ label: '全部',
+ value: 1,
+ },
+ {
+ label: '积分获取',
+ value: 2,
+ },
+ {
+ label: '积分支出',
+ value: 3,
+ }
+ ],
+ value1: 1,
+ data: [],
+ swiperHeight: 0
}
},
methods: {
-
+ onLoad() {
+ this.getData(1);
+ },
+ getData(e){
+ var that = this;
+ uni.request({
+ url:that.$store.state.piAPI + '/integral/selectCount?uid='+this.$store.state.puserID+"&type="+e,
+ method:'POST',
+ success(res) {
+ that.dqjf = res.data.data.sjf;
+ that.ljjf = res.data.data.zjf.integral;
+ that.data = res.data.data.list;
+ }
+ });
+ },
+ goDetail() {
+
+ },
+ change(e){
+ this.getData(e);
+ },
+ onReady() {
+ let that = this;
+ uni.getSystemInfo({
+ success(e) {
+ console.log(e);
+ let {
+ windowWidth,
+ windowHeight,
+ safeArea
+ } = e;
+ const query = uni.createSelectorQuery().in(that);
+ query
+ .select('#articleBox')
+ .boundingClientRect(data => {
+ that.swiperHeight = (safeArea.bottom - data.top - 50);
+ })
+ .exec();
+ }
+ });
+ },
}
}
</script>
<style>
+ .advisory-big {
+ width: 100%;
+ height: 100vh;
+ background-color: #f7f7f7;
+ }
+ .bomBut {
+ width: 93%;
+ margin: 0 auto;
+ height: 7.5rem;
+ z-index: 999;
+ border-radius: 10px;
+ margin-top: -2.5rem;
+ background-color: #fff;
+ }
+
+ .bomList {
+ width: 93%;
+ margin: 0 auto;
+ height: 30rem;
+ z-index: 999;
+ border-radius: 10px;
+ margin-top: 1rem;
+ background-color: #fff;
+ }
+
+ .bom-text {
+ font-size: 30rpx;
+ font-family: PingFang SC;
+ color: #585b61;
+ padding-left: 30rpx;
+ }
+
+ .bom-int {
+ font-size: 40rpx;
+ font-family: PingFang SC;
+ color: #ff910a;
+ font-weight: bold;
+ padding-left: 30rpx;
+ padding-top: 10rpx;
+ }
+
+ .m-top {
+ width: 100%;
+ height: 3rem;
+ border-radius: 0px 0px 20px 20px;
+ background-image: linear-gradient(to bottom, #103289, #174cd1);
+ color: #fff;
+ flex-direction: column;
+ }
+
+ .u-row {
+ margin: 10rpx 0;
+ }
+
+ .demo-layout {
+ height: 80rpx;
+ border-radius: 8rpx;
+ }
+
+ .bg-purple {
+ background: #d3dce6;
+ }
+
+ .bg-purple-light {
+ background: #e5e9f2;
+ }
+
+ .bg-purple-dark {
+ background: #99a9bf;
+ }
+
+ .advisory-model {
+ width: 93%;
+ margin: 0 auto;
+ margin-top: 0.5rem;
+ height: 3rem;
+ background-color: #FFF;
+ }
+
+ .advisory-title {
+ font-size: 15px;
+ font-weight: 550;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ }
+
+ .advisory-title-down {
+ /* background-color: #0078A8; */
+ width: 100%;
+ height: 25%;
+ font-size: 12px;
+ font-weight: 350;
+ color: #808080;
+ padding-top: 10rpx;
+ }
+
+ .advisory-title-time {
+ position: relative;
+ }
+
+ .advisory-right {
+ // background-color: #222222;
+ left: 25%;
+ top: 30%;
+ position: relative;
+ }
+
+ .advisory-left {
+ width: 64%;
+ height: 80%;
+ float: left;
+ position: relative;
+ // background-color: #00FFFF;
+ left: 3%;
+ top: 10%;
+ }
+
+ .advisory-line {
+ top: 70%;
+ position: relative;
+ }
+
+ .advisory-title-integraladd{
+ color: #00aaff;
+ }
+
+ .advisory-title-integral{
+ color: #ff0000;
+ }
</style>
diff --git a/store/actions.js b/store/actions.js
index 34509af..3e901a2 100644
--- a/store/actions.js
+++ b/store/actions.js
@@ -6,105 +6,107 @@
const actions = {
- loging (store, data) {
- var user = [{
- name: '1',
- password: '111111'
- },
- {
- name: '2',
- password: '222222'
- },
- {
- name: '3',
- password: '333333'
- },
- ],
- pasw = md5(data.pass),
- url = this.state.piAPI + '/blade-auth/oauth/token?tenantId=000000&username=' + data.name +
- ' &password=' + pasw + '&grant_type=password&scope=all&type=account'
- // url ='http://192.168.0.109:82/blade-auth/oauth/token';
- // url ='http://192.168.0.109:82/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password';
- // url ='http://web.byisf.com/api/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password&scope=all';
- // console.log(url);
- wx.request({ //uniapp 自带axios
- url: url, //仅为示例,并非真实接口地址。
- // data: d,
- // data: {
- // tenantId: '000000',
- // username: data.name,
- // password: pasw,
- // grant_type: 'password',
- // scope: 'all',
- // type: "account"
- // },
- header: {
- // "Content-Type":"",
- "Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
- "Tenant-Id": "000000"
+ loging(store, data) {
+ var user = [{
+ name: '1',
+ password: '111111'
+ },
+ {
+ name: '2',
+ password: '222222'
+ },
+ {
+ name: '3',
+ password: '333333'
+ },
+ ],
+ pasw = md5(data.pass),
+ url = this.state.piAPI + '/blade-auth/oauth/token?tenantId=000000&username=' + data.name +
+ ' &password=' + pasw + '&grant_type=password&scope=all&type=account'
+ // url ='http://192.168.0.109:82/blade-auth/oauth/token';
+ // url ='http://192.168.0.109:82/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password';
+ // url ='http://web.byisf.com/api/blade-auth/oauth/token?tenantId=000000&username=admin&password=93369e86dc5fa854a0eaf75558c4039d&grant_type=password&scope=all';
+ // console.log(url);
+ wx.request({ //uniapp 自带axios
+ url: url, //仅为示例,并非真实接口地址。
+ // data: d,
+ // data: {
+ // tenantId: '000000',
+ // username: data.name,
+ // password: pasw,
+ // grant_type: 'password',
+ // scope: 'all',
+ // type: "account"
+ // },
+ header: {
+ // "Content-Type":"",
+ "Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0",
+ "Tenant-Id": "000000"
- // "Cookie": "JSESSIONID=maOJY05vT2jj4nHwsQGSPgWWVFH1mY-TGWOLYCSh"
- },
- method: "post",
- // // dataType: 'JSON',
- success: (res) => {
- if (res.statusCode == 200) {
- if (res.data.error_code == "400") {
- uni.hideNavigationBarLoading()
- uni.showToast({
- title: '密码错误,请重试',
- icon: 'none',
- duration: 2000
- })
- return
- }
- store.commit('getUserData', res.data)
- // console.log(res.data,123542);
- data.isit = true
- data.userName = res.data.nick_name //警袁姓名
- data.userID = res.data.user_id //警袁id
- data.avatar = res.data.avatar //头像
- data.accounts = data.name
- data.pass = data.pass
- // data.userPhon = res.user_id;
- store.commit('login', data)
+ // "Cookie": "JSESSIONID=maOJY05vT2jj4nHwsQGSPgWWVFH1mY-TGWOLYCSh"
+ },
+ method: "post",
+ // // dataType: 'JSON',
+ success: (res) => {
+ if (res.statusCode == 200) {
+ if (res.data.error_code == "400") {
+ uni.hideNavigationBarLoading()
+ uni.showToast({
+ title: '密码错误,请重试',
+ icon: 'none',
+ duration: 2000
+ })
+ return
+ }
+ store.commit('getUserData', res.data)
+ console.log(res.data, 123542);
+ data.isit = true
+ store.state.roleid = res.data.role_id; //角色id
+ data.userName = res.data.nick_name //警袁姓名
+ data.userID = res.data.user_id //警袁id
+ data.avatar = res.data.avatar //头像
+ data.accounts = data.name
+ data.pass = data.pass
+ // data.userPhon = res.user_id;
+ store.commit('login', data)
- wx.request({
- url: "http://223.82.109.183:2080/api/userVip/getUserVipInfo?idCardNo=" + res
- .data.cardid,
- method: 'get',
- success: (result) => {
- if (JSON.stringify(result.data.data) != '{}') {
- store.state.billFlag = true
- }
- }
- })
+ wx.request({
+ url: "http://223.82.109.183:2080/api/userVip/getUserVipInfo?idCardNo=" +
+ res
+ .data.cardid,
+ method: 'get',
+ success: (result) => {
+ if (JSON.stringify(result.data.data) != '{}') {
+ store.state.billFlag = true
+ }
+ }
+ })
- }
- },
- fail: (res) => {
- console.log('失去连接 请稍等')
- // console.log(res);
- }
- })
- // var time = setTimeout(() => { //模拟请求时间
- // var ud = user,
- // isit = false;
- // for (var key in ud) {
- // if (ud[key].name == data.name && ud[key].password == data.pass) {
- // isit = true;
- // break;
- // } else {
- // isit = false;
- // }
- // }
- // data.isit = isit;
- // store.commit('login', data);
- // }, 2000)
+ }
+ },
+ fail: (res) => {
+ console.log('失去连接 请稍等')
+ // console.log(res);
+ }
+ })
+ // var time = setTimeout(() => { //模拟请求时间
+ // var ud = user,
+ // isit = false;
+ // for (var key in ud) {
+ // if (ud[key].name == data.name && ud[key].password == data.pass) {
+ // isit = true;
+ // break;
+ // } else {
+ // isit = false;
+ // }
+ // }
+ // data.isit = isit;
+ // store.commit('login', data);
+ // }, 2000)
- },
- ...websocket.actions,
- ...positions.actions
+ },
+ ...websocket.actions,
+ ...positions.actions
}
export default actions
diff --git a/store/state.js b/store/state.js
index 8f3ea88..9178149 100644
--- a/store/state.js
+++ b/store/state.js
@@ -11,12 +11,14 @@
message: {
useName: '过客',
},
+ roleid:'',//角色id
logPath: '',
piAPI: apis.api,
// piAPI: 'http://223.82.109.183:2082/api/',
// piAPI: 'http://192.168.0.110:83/',
+ piAPI: 'http://192.168.0.222:83/',
//piAPI: 'http://223.82.109.183:2082/api/',
- BaopiAPI: 'http://223.82.109.183:2080/api/',
+ // BaopiAPI: 'http://223.82.109.183:2080/api/',
puserName: '',
puserID: '',
puserIphone: '',
--
Gitblit v1.9.3