master
许宏杰 2 years ago
parent a345bf1d92
commit 64da919969

@ -1,38 +1,36 @@
<script>
import config from './config'
import store from '@/store'
import {
getToken
} from '@/utils/auth'
import config from "./config";
import store from "@/store";
import { getToken } from "@/utils/auth";
export default {
onLaunch: function() {
this.initApp()
},
methods: {
//
initApp() {
//
this.initConfig()
//
//#ifdef H5
this.checkLogin()
//#endif
},
initConfig() {
this.globalData.config = config
},
checkLogin() {
if (!getToken()) {
this.$tab.reLaunch('/pages/login')
}
}
}
}
export default {
onLaunch: function () {
this.initApp();
},
methods: {
//
initApp() {
//
this.initConfig();
//
//#ifdef H5
this.checkLogin();
//#endif
},
initConfig() {
this.globalData.config = config;
},
checkLogin() {
if (!getToken()) {
this.$tab.reLaunch("/pages/login");
}
},
},
};
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
@import '@/static/scss/index.scss'
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
@import "@/static/scss/index.scss";
</style>

@ -1,353 +1,380 @@
<template>
<view class="info">
<u-navbar title="工单详情" :autoBack="true" :bgColor="background" titleStyle="color:#fff" leftIconColor="#fff"
:placeholder="true">
</u-navbar>
<view class="item-cell">
<view class="cell-lable">工单状态:</view>
<view class="cell-value state">
<image v-if="info.case_state == 1 "
src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_wtg@2x.png" mode="widthFix">
</image>
<image v-if="info.case_state == 2 "
src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_ytg@2x.png" mode="widthFix">
</image>
<text :class="'caseState'+info.case_state">{{info.case_state == 1 ? '待处理' : '已处理' }}</text>
</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规类型:</view>
<view class="cell-value type">{{iconTitle[info.eventname]}}</view>
</view>
<view class="item-cell">
<view class="cell-lable">所属单位:</view>
<view class="cell-value">盛泽</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规图片:</view>
</view>
<view class="canvas-box">
<image :src="Image" mode="aspectFit" @click="showIamge(info.photo)"></image>
<div class="redBorder" v-show="imglabel.length>0"
:style="{height:item.heightBox +'rpx',width:item.widthBox+'rpx',left:item.left+'rpx',top:item.top+'rpx'}"
v-for="(item,i) in imglabel" :key="i">
<div class="kexin">
<span>{{item.kexin}}</span>
</div>
</div>
</view>
<view v-show="info.case_state == 2">
<view class="item-cell">
<view class="cell-lable">处理图片:</view>
</view>
<view class="state2-img">
<img :src="info.handlephoto" alt="" @click="showIamge(info.handlephoto)">
</view>
</view>
<view class="item-cell">
<view class="cell-lable">备注:</view>
<view class="cell-value">
{{info.detail}}
</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规时间:</view>
<view class="cell-value">
{{info.create_time}}
</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规地点:</view>
<view class="cell-value address">
{{info.address}}
</view>
</view>
<!-- <view class="map-box"> -->
<map id="map" style="width: 750rpx; height: 260px;" :latitude="latitude" :longitude="longitude"
subkey="TYBBZ-A2AKV-MLZPW-UFNQI-HKNVE-BEFZH" :markers="markers"></map>
<!-- <cover-view>
<view class="info">
<u-navbar
title="工单详情"
:autoBack="true"
:bgColor="background"
titleStyle="color:#fff"
leftIconColor="#fff"
:placeholder="true"
>
</u-navbar>
<view class="item-cell">
<view class="cell-lable">工单状态:</view>
<view class="cell-value state">
<image
v-if="info.case_state == 1"
src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_wtg@2x.png"
mode="widthFix"
>
</image>
<image
v-if="info.case_state == 2"
src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_ytg@2x.png"
mode="widthFix"
>
</image>
<text :class="'caseState' + info.case_state">{{
info.case_state == 1 ? "待处理" : "已处理"
}}</text>
</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规类型:</view>
<view class="cell-value type">{{ iconTitle[info.eventname] }}</view>
</view>
<view class="item-cell">
<view class="cell-lable">所属单位:</view>
<view class="cell-value">盛泽</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规图片:</view>
</view>
<view class="canvas-box">
<image
:src="Image"
mode="aspectFit"
@click="showIamge(info.photo)"
></image>
<div
class="redBorder"
v-show="imglabel.length > 0"
:style="{
height: item.heightBox + 'rpx',
width: item.widthBox + 'rpx',
left: item.left + 'rpx',
top: item.top + 'rpx',
}"
v-for="(item, i) in imglabel"
:key="i"
>
<div class="kexin">
<span>{{ item.kexin }}</span>
</div>
</div>
</view>
<view v-show="info.case_state == 2">
<view class="item-cell">
<view class="cell-lable">处理图片:</view>
</view>
<view class="state2-img">
<img
:src="info.handlephoto"
alt=""
@click="showIamge(info.handlephoto)"
/>
</view>
</view>
<view class="item-cell">
<view class="cell-lable">备注:</view>
<view class="cell-value">
{{ info.detail }}
</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规时间:</view>
<view class="cell-value">
{{ info.create_time }}
</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规地点:</view>
<view class="cell-value address">
{{ info.address }}
</view>
</view>
<!-- <view class="map-box"> -->
<map
id="map"
style="width: 750rpx; height: 260px"
:latitude="latitude"
:longitude="longitude"
subkey="TYBBZ-A2AKV-MLZPW-UFNQI-HKNVE-BEFZH"
:markers="markers"
></map>
<!-- <cover-view>
导航
</cover-view> -->
<!-- <view class="map_btn" @click="getLoaction()">
<!-- <view class="map_btn" @click="getLoaction()">
<button>导航</button>
</view> -->
<!-- </view> -->
<cover-view class="submit" @click="clickForm()" v-show="info.case_state == 1 ">
<!-- <submit title="提交整改" /> -->
提交
</cover-view>
</view>
<!-- </view> -->
<cover-view
class="submit"
@click="clickForm()"
v-show="info.case_state == 1"
>
<!-- <submit title="提交整改" /> -->
提交
</cover-view>
</view>
</template>
<script>
import {
getCaseInfo
} from '@/api/work/index.js'
import submit from '@/components/subBottom/subBottom.vue'
import iconTitle from '@/utils/iconType.js'
export default {
components: {
submit
},
data() {
return {
color: '#ffffff',
backShow: true,
background: 'url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png)',
latitude: undefined,
longitude: undefined,
scale: 7,
height: null,
infoId: null,
iconTitle: iconTitle,
info: {},
markers: [],
Image: '',
imglabel: [],
};
},
methods: {
//
showIamge(url) {
let list = []
list[0] = url;
uni.previewImage({
current: 0,
urls: list,
})
},
clickForm() {
uni.navigateTo({
url: `/pages/workForm/workForm?id=${this.info.id}`
})
},
//
getInfo() {
getCaseInfo(this.infoId).then(res => {
this.info = res.data
// console.log('', this.info)
this.latitude = this.info.lat,
this.longitude = this.info.lng,
this.Image = this.info.photo
if (this.info.zb) {
let zb = JSON.parse(this.info.zb)
zb.forEach((item, index) => {
this.imglabel[index] = {
widthBox: (item[2] - item[0]) / 2.56,
heightBox: (item[3] - item[1]) / 2.56,
left: item[0] / 2.56,
top: item[1] / 2.56,
kexin: item[4]
}
})
}
this.markers = [{
id: this.info.id,
latitude: this.info.lat,
longitude: this.info.lng,
width: 25,
height: 30,
iconPath: 'http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/map_location@2x.png'
}]
})
},
//
getLoaction() {
uni.openLocation({
latitude: parseInt(this.latitude),
longitude: parseInt(this.longitude),
name: this.info.address,
address: this.info.address
})
}
},
mounted() {
},
onLoad(query) {
this.infoId = query.id
},
onShow() {
this.imglabel = []
this.getInfo()
},
}
import { getCaseInfo } from "@/api/work/index.js";
import submit from "@/components/subBottom/subBottom.vue";
import iconTitle from "@/utils/iconType.js";
export default {
components: {
submit,
},
data() {
return {
color: "#ffffff",
backShow: true,
background:
"url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png)",
latitude: undefined,
longitude: undefined,
scale: 7,
height: null,
infoId: null,
iconTitle: iconTitle,
info: {},
markers: [],
Image: "",
imglabel: [],
};
},
methods: {
//
showIamge(url) {
let list = [];
list[0] = url;
uni.previewImage({
current: 0,
urls: list,
});
},
clickForm() {
uni.navigateTo({
url: `/pages/workForm/workForm?id=${this.info.id}`,
});
},
//
getInfo() {
getCaseInfo(this.infoId).then((res) => {
this.info = res.data;
// console.log('', this.info)
(this.latitude = this.info.lat),
(this.longitude = this.info.lng),
(this.Image = this.info.photo);
if (this.info.zb) {
let zb = JSON.parse(this.info.zb);
zb.forEach((item, index) => {
this.imglabel[index] = {
widthBox: (item[2] - item[0]) / 2.56,
heightBox: (item[3] - item[1]) / 2.56,
left: item[0] / 2.56,
top: item[1] / 2.56,
kexin: item[4],
};
});
}
this.markers = [
{
id: this.info.id,
latitude: this.info.lat,
longitude: this.info.lng,
width: 25,
height: 30,
iconPath:
"http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/map_location@2x.png",
},
];
});
},
//
getLoaction() {
uni.openLocation({
latitude: parseInt(this.latitude),
longitude: parseInt(this.longitude),
name: this.info.address,
address: this.info.address,
});
},
},
mounted() {},
onLoad(query) {
this.infoId = query.id;
},
onShow() {
this.imglabel = [];
this.getInfo();
},
};
</script>
<style lang="scss">
page {
box-sizing: border-box;
padding-bottom: 120rpx;
}
.info-box {
box-sizing: border-box;
}
.item-cell {
min-height: 134rpx;
background-color: #FFFFFF;
border-bottom: 1rpx solid #ECECEC;
display: flex;
align-items: center;
box-sizing: border-box;
padding-left: 37rpx;
.cell-lable {
font-size: 36rpx;
font-weight: 400;
color: #303234;
width: 160rpx;
margin-right: 50rpx;
}
.cell-value {
flex: 1;
font-size: 36rpx;
font-weight: 400;
color: #8B9097;
}
.state {
display: flex;
align-items: center;
image {
width: 50rpx;
height: 50rpx;
display: block;
margin-right: 14rpx;
}
text {
font-weight: 500;
color: #F98552;
}
}
.type {
color: #3B76EE;
}
.beizhu {
box-sizing: border-box;
padding: 30rpx 10rpx;
padding-right: 20rpx;
line-height: 60rpx;
min-height: 250rpx;
}
.address {
box-sizing: border-box;
padding-right: 10rpx;
}
}
.state2-img {
height: 421rpx;
img {
height: 100%;
width: 100%;
display: block
}
}
.canvas-box {
// margin: 20rpx 0;
height: 421rpx;
background-color: #fff;
box-sizing: border-box;
position: relative;
image {
display: block;
height: 100%;
width: 100%;
}
.redBorder {
width: 10px;
height: 10px;
position: absolute;
border: 2rpx solid red;
.kexin {
position: relative;
span {
background: black;
color: red;
position: absolute;
top: -40rpx;
right: 0;
}
}
}
}
.map-box {
position: relative;
overflow: hidden;
// map {
// width: 750rpx !important;
// height: 495rpx !important;
// }
.map_btn {
position: absolute;
z-index: 999;
width: 140rpx;
height: 68rpx;
top: 40rpx;
right: 40rpx;
button {
font-size: 34rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 70rpx;
width: 100%;
height: 100%;
border-radius: 34rpx;
background: linear-gradient(90deg, #36B751, #36B77F);
}
}
}
.submit {
position: fixed;
width: 100%;
bottom: 0%;
z-index: 1000;
border-top: 1rpx solid #ECECEC;
background-color: #fff;
box-sizing: border-box;
padding-bottom: env(safe-area-inset-bottom);
}
.caseState1 {
color: #FF4E77 !important;
}
.caseState2 {
color: #57B800 !important;
}
page {
box-sizing: border-box;
padding-bottom: 120rpx;
}
.info-box {
box-sizing: border-box;
}
.item-cell {
min-height: 134rpx;
background-color: #ffffff;
border-bottom: 1rpx solid #ececec;
display: flex;
align-items: center;
box-sizing: border-box;
padding-left: 37rpx;
.cell-lable {
font-size: 36rpx;
font-weight: 400;
color: #303234;
width: 160rpx;
margin-right: 50rpx;
}
.cell-value {
flex: 1;
font-size: 36rpx;
font-weight: 400;
color: #8b9097;
}
.state {
display: flex;
align-items: center;
image {
width: 50rpx;
height: 50rpx;
display: block;
margin-right: 14rpx;
}
text {
font-weight: 500;
color: #f98552;
}
}
.type {
color: #3b76ee;
}
.beizhu {
box-sizing: border-box;
padding: 30rpx 10rpx;
padding-right: 20rpx;
line-height: 60rpx;
min-height: 250rpx;
}
.address {
box-sizing: border-box;
padding-right: 10rpx;
}
}
.state2-img {
height: 421rpx;
img {
height: 100%;
width: 100%;
display: block;
}
}
.canvas-box {
// margin: 20rpx 0;
height: 421rpx;
background-color: #fff;
box-sizing: border-box;
position: relative;
image {
display: block;
height: 100%;
width: 100%;
}
.redBorder {
width: 10px;
height: 10px;
position: absolute;
border: 2rpx solid red;
.kexin {
position: relative;
span {
background: black;
color: red;
position: absolute;
top: -40rpx;
right: 0;
}
}
}
}
.map-box {
position: relative;
overflow: hidden;
// map {
// width: 750rpx !important;
// height: 495rpx !important;
// }
.map_btn {
position: absolute;
z-index: 999;
width: 140rpx;
height: 68rpx;
top: 40rpx;
right: 40rpx;
button {
font-size: 34rpx;
font-weight: 400;
color: #ffffff;
line-height: 70rpx;
width: 100%;
height: 100%;
border-radius: 34rpx;
background: linear-gradient(90deg, #36b751, #36b77f);
}
}
}
.submit {
position: fixed;
width: 100%;
bottom: 0%;
z-index: 1000;
border-top: 1rpx solid #ececec;
background-color: #fff;
box-sizing: border-box;
padding-bottom: env(safe-area-inset-bottom);
}
.caseState1 {
color: #ff4e77 !important;
}
.caseState2 {
color: #57b800 !important;
}
</style>

@ -1,210 +1,240 @@
<template>
<view class="normal-login-container">
<view class="logo-content align-center justify-center flex">
<!-- <image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
<view class="normal-login-container">
<view class="logo-content align-center justify-center flex">
<!-- <image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
</image> -->
<!-- <text class="title">若依移动端登录</text> -->
<view class="title">
<image src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img_title@2x.png"
mode="widthFix"></image>
</view>
</view>
<view class="login-form-content">
<view class="input-item flex align-center">
<view class="iconfont icon-user icon"></view>
<input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" />
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-password icon"></view>
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
</view>
<view class="input-item flex align-center" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view>
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view>
<view class="action-btn">
<button @click="handleLogin" class="login-btn cu-btn block lg color-btn-log ">登录</button>
</view>
</view>
<!-- <view class="xieyi text-center">
<!-- <text class="title">若依移动端登录</text> -->
<view class="title">
<image
src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img_title@2x.png"
mode="widthFix"
></image>
</view>
</view>
<view class="login-form-content">
<view class="input-item flex align-center">
<view class="iconfont icon-user icon"></view>
<input
v-model="loginForm.username"
class="input"
type="text"
placeholder="请输入账号"
maxlength="30"
/>
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-password icon"></view>
<input
v-model="loginForm.password"
type="password"
class="input"
placeholder="请输入密码"
maxlength="20"
/>
</view>
<view class="input-item flex align-center" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view>
<input
v-model="loginForm.code"
type="number"
class="input"
placeholder="请输入验证码"
maxlength="4"
/>
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view>
<view class="action-btn">
<button
@click="handleLogin"
class="login-btn cu-btn block lg color-btn-log"
>
登录
</button>
</view>
</view>
<!-- <view class="xieyi text-center">
<text class="text-grey1">登录即代表同意</text>
<text @click="handleUserAgrement" class="text-blue">用户协议</text>
<text @click="handlePrivacy" class="text-blue">隐私协议</text>
</view> -->
</view>
</view>
</template>
<script>
import {
getCodeImg
} from '@/api/login'
export default {
data() {
return {
codeUrl: "",
captchaEnabled: true,
globalConfig: getApp().globalData.config,
loginForm: {
username: "admin",
password: "admin123",
code: "",
uuid: ''
}
}
},
created() {
this.getCode()
},
methods: {
//
handlePrivacy() {
let site = this.globalConfig.appInfo.agreements[0]
this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
},
//
handleUserAgrement() {
let site = this.globalConfig.appInfo.agreements[1]
this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
},
//
getCode() {
getCodeImg().then(res => {
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
if (this.captchaEnabled) {
this.codeUrl = 'data:image/gif;base64,' + res.img
this.loginForm.uuid = res.uuid
}
})
},
//
async handleLogin() {
if (this.loginForm.username === "") {
this.$modal.msgError("请输入您的账号")
} else if (this.loginForm.password === "") {
this.$modal.msgError("请输入您的密码")
} else if (this.loginForm.code === "" && this.captchaEnabled) {
this.$modal.msgError("请输入验证码")
} else {
this.$modal.loading("登录中,请耐心等待...")
this.pwdLogin()
}
},
//
async pwdLogin() {
this.$store.dispatch('Login', this.loginForm).then(() => {
this.$modal.closeLoading()
this.loginSuccess()
}).catch(() => {
if (this.captchaEnabled) {
this.getCode()
}
})
},
//
loginSuccess(result) {
//
this.$store.dispatch('GetInfo').then(res => {
this.$tab.reLaunch('/pages/work/index')
})
}
}
}
import { getCodeImg } from "@/api/login";
export default {
data() {
return {
codeUrl: "",
captchaEnabled: true,
globalConfig: getApp().globalData.config,
loginForm: {
username: "admin",
password: "admin123",
code: "",
uuid: "",
},
};
},
created() {
this.getCode();
},
methods: {
//
handlePrivacy() {
let site = this.globalConfig.appInfo.agreements[0];
this.$tab.navigateTo(
`/pages/common/webview/index?title=${site.title}&url=${site.url}`
);
},
//
handleUserAgrement() {
let site = this.globalConfig.appInfo.agreements[1];
this.$tab.navigateTo(
`/pages/common/webview/index?title=${site.title}&url=${site.url}`
);
},
//
getCode() {
getCodeImg().then((res) => {
this.captchaEnabled =
res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
}
});
},
//
async handleLogin() {
if (this.loginForm.username === "") {
this.$modal.msgError("请输入您的账号");
} else if (this.loginForm.password === "") {
this.$modal.msgError("请输入您的密码");
} else if (this.loginForm.code === "" && this.captchaEnabled) {
this.$modal.msgError("请输入验证码");
} else {
this.$modal.loading("登录中,请耐心等待...");
this.pwdLogin();
}
},
//
async pwdLogin() {
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
this.$modal.closeLoading();
this.loginSuccess();
})
.catch(() => {
if (this.captchaEnabled) {
this.getCode();
}
});
},
//
loginSuccess(result) {
//
this.$store.dispatch("GetInfo").then((res) => {
this.$tab.reLaunch("/pages/work/index");
});
},
},
};
</script>
<style lang="scss">
page {
// background-color: #ffffff;
// border: 1px solid red;
background: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img_bg @2x.png") no-repeat;
background-size: 100% 100%;
}
.normal-login-container {
width: 100%;
height: 100vh;
.logo-content {
width: 100%;
font-size: 21px;
text-align: center;
padding-top: 25%;
// image {
// border-radius: 4px;
// }
// .title {
// margin-left: 10px;
// }
.title {
width: 602rpx;
height: 206rpx;
image {
height: 100%;
width: 100%;
display: block;
}
}
}
.login-form-content {
text-align: center;
margin: 20px auto;
margin-top: 15%;
width: 80%;
.input-item {
margin: 30rpx auto;
background-color: #f5f6f7;
height: 98rpx;
border-radius: 10rpx;
.icon {
font-size: 36rpx;
margin-left: 19rpx;
color: #999;
}
.input {
width: 100%;
font-size: 30rpx;
line-height: 40rpx;
text-align: left;
padding-left: 30rpx;
}
}
.login-btn {
margin-top: 80rpx;
height: 100rpx;
}
.xieyi {
color: #333;
margin-top: 20px;
}
}
.easyinput {
width: 100%;
}
}
.color-btn-log {
background: linear-gradient(0deg, #FFC936, #FFA071);
font-size: 40rpx;
font-weight: 600;
color: #713300;
}
.login-code-img {
height: 95rpx;
border-radius: 0 10rpx 10rpx 0;
}
page {
// background-color: #ffffff;
// border: 1px solid red;
background: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img_bg @2x.png")
no-repeat;
background-size: 100% 100%;
}
.normal-login-container {
width: 100%;
height: 100vh;
.logo-content {
width: 100%;
font-size: 21px;
text-align: center;
padding-top: 25%;
// image {
// border-radius: 4px;
// }
// .title {
// margin-left: 10px;
// }
.title {
width: 602rpx;
height: 206rpx;
image {
height: 100%;
width: 100%;
display: block;
}
}
}
.login-form-content {
text-align: center;
margin: 20px auto;
margin-top: 15%;
width: 80%;
.input-item {
margin: 30rpx auto;
background-color: #f5f6f7;
height: 98rpx;
border-radius: 10rpx;
.icon {
font-size: 36rpx;
margin-left: 19rpx;
color: #999;
}
.input {
width: 100%;
font-size: 30rpx;
line-height: 40rpx;
text-align: left;
padding-left: 30rpx;
}
}
.login-btn {
margin-top: 80rpx;
height: 100rpx;
}
.xieyi {
color: #333;
margin-top: 20px;
}
}
.easyinput {
width: 100%;
}
}
.color-btn-log {
background: linear-gradient(0deg, #ffc936, #ffa071);
font-size: 40rpx;
font-weight: 600;
color: #713300;
}
.login-code-img {
height: 95rpx;
border-radius: 0 10rpx 10rpx 0;
}
</style>

@ -1,237 +1,237 @@
<template>
<view class="mine">
<view class="logo-bg">
<view class="user-box">
<view class="user-icon">
<image v-if="avatar" @click="handleToAvatar" :src="avatar" mode="widthFix">
</image>
</view>
<view class="user-work">
<view class="user-data">
<view class="user-name">
{{ name }}
</view>
<view class="user-zhiwu">网格员</view>
</view>
<view class="address">
<view class="add-icon"></view>
<view class="add-text">江苏省苏州市吴江区盛泽镇</view>
</view>
</view>
<!-- <view class="info"></view> -->
</view>
</view>
<view class="cell">
<view class="cell-item" @click="handleToEditInfo">
<view class="icon-left"></view>
<view class="cell-title">修改密码</view>
<view class="icon-r"></view>
</view>
<view class="cell-item">
<view class="icon-left shouce"></view>
<view class="cell-title">操作手册</view>
<view class="icon-r"></view>
</view>
<view class="cell-item">
<view class="icon-left systemicon"></view>
<view class="cell-title">关于系统</view>
<view class="icon-r"></view>
</view>
</view>
<view class="outlogo" @click="handleLogout">
退出登录
</view>
</view>
<view class="mine">
<view class="logo-bg">
<view class="user-box">
<view class="user-icon">
<image
v-if="avatar"
@click="handleToAvatar"
:src="avatar"
mode="widthFix"
>
</image>
</view>
<view class="user-work">
<view class="user-data">
<view class="user-name">
{{ name }}
</view>
<view class="user-zhiwu">网格员</view>
</view>
<view class="address">
<view class="add-icon"></view>
<view class="add-text">江苏省苏州市吴江区盛泽镇</view>
</view>
</view>
<!-- <view class="info"></view> -->
</view>
</view>
<view class="cell">
<view class="cell-item" @click="handleToEditInfo">
<view class="icon-left"></view>
<view class="cell-title">修改密码</view>
<view class="icon-r"></view>
</view>
<view class="cell-item">
<view class="icon-left shouce"></view>
<view class="cell-title">操作手册</view>
<view class="icon-r"></view>
</view>
<view class="cell-item">
<view class="icon-left systemicon"></view>
<view class="cell-title">关于系统</view>
<view class="icon-r"></view>
</view>
</view>
<view class="outlogo" @click="handleLogout"> 退 </view>
</view>
</template>
<script>
import storage from '@/utils/storage'
export default {
data() {
return {
name: this.$store.state.user.name,
version: getApp().globalData.config.appInfo.version
}
},
computed: {
avatar() {
return this.$store.state.user.avatar
},
windowHeight() {
return uni.getSystemInfoSync().windowHeight - 50
}
},
methods: {
handleToAvatar() {
this.$tab.navigateTo('/pages/mine/avatar/index')
},
handleToEditInfo() {
this.$tab.navigateTo('/pages/mine/info/edit')
},
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$store.dispatch('LogOut').then(() => {
this.$tab.reLaunch('/pages/index')
})
})
},
}
}
import storage from "@/utils/storage";
export default {
data() {
return {
name: this.$store.state.user.name,
version: getApp().globalData.config.appInfo.version,
};
},
computed: {
avatar() {
return this.$store.state.user.avatar;
},
windowHeight() {
return uni.getSystemInfoSync().windowHeight - 50;
},
},
methods: {
handleToAvatar() {
this.$tab.navigateTo("/pages/mine/avatar/index");
},
handleToEditInfo() {
this.$tab.navigateTo("/pages/mine/info/edit");
},
handleLogout() {
this.$modal.confirm("确定注销并退出系统吗?").then(() => {
this.$store.dispatch("LogOut").then(() => {
this.$tab.reLaunch("/pages/index");
});
});
},
},
};
</script>
<style lang="scss" scoped>
.logo-bg {
height: 600rpx;
width: 100%;
background-image: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img_pic@2x.png");
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
.user-box {
display: flex;
align-items: center;
.user-icon {
width: 146rpx;
height: 146rpx;
background-color: #fff;
border-radius: 50%;
box-sizing: border-box;
padding: 6rpx;
overflow: hidden;
image {
border-radius: 50%;
height: 100%;
width: 100%;
display: block;
}
}
.user-work {
box-sizing: border-box;
padding-left: 48rpx;
.user-data {
display: flex;
align-items: center;
}
.address {
margin-top: 30rpx;
display: flex;
align-items: center;
.add-icon {
height: 32rpx;
width: 32rpx;
background: url('http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_location@2x.png');
background-size: 100% 100%;
}
.add-text {
width: 344rpx;
margin-left: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #B7E0FF;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.user-name {
font-size: 44rpx;
font-weight: 500;
color: #FFFFFF;
}
.user-zhiwu {
margin-left: 18rpx;
width: 110rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
background: rgba(5, 37, 78, 0.6);
border: 1rpx solid #51D7EB;
border-radius: 4rpx;
font-size: 28rpx;
font-weight: 400;
color: #BDD3F0;
}
}
}
.info {
height: 20rpx;
border: 1px solid red;
}
}
.cell {
margin-top: 20rpx;
background-color: #fff;
.cell-item {
height: 124rpx;
border-bottom: 1rpx solid #ECECEC;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0 46rpx;
.icon-left {
height: 40rpx;
width: 40rpx;
background: url('http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/cell1.png');
background-size: 100% 100%;
}
.shouce {
background: url('http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_2@2x.png');
background-size: 100% 100%;
}
.systemicon {
background: url('http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_3@2x.png');
background-size: 100% 100%;
}
.cell-title {
flex: 1;
font-size: 35rpx;
font-weight: 400;
color: #303234;
box-sizing: border-box;
padding-left: 25rpx;
}
.icon-r {
width: 20rpx;
height: 33rpx;
background: url('http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/right.png');
background-size: 100% 100%;
}
}
}
.outlogo {
width: 100%;
height: 100rpx;
background-color: #fff;
margin-top: 30rpx;
text-align: center;
line-height: 100rpx;
font-size: 38rpx;
font-weight: 400;
color: #DA3135;
}
.logo-bg {
height: 600rpx;
width: 100%;
background-image: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img_pic@2x.png");
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
.user-box {
display: flex;
align-items: center;
.user-icon {
width: 146rpx;
height: 146rpx;
background-color: #fff;
border-radius: 50%;
box-sizing: border-box;
padding: 6rpx;
overflow: hidden;
image {
border-radius: 50%;
height: 100%;
width: 100%;
display: block;
}
}
.user-work {
box-sizing: border-box;
padding-left: 48rpx;
.user-data {
display: flex;
align-items: center;
}
.address {
margin-top: 30rpx;
display: flex;
align-items: center;
.add-icon {
height: 32rpx;
width: 32rpx;
background: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_location@2x.png");
background-size: 100% 100%;
}
.add-text {
width: 344rpx;
margin-left: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #b7e0ff;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.user-name {
font-size: 44rpx;
font-weight: 500;
color: #ffffff;
}
.user-zhiwu {
margin-left: 18rpx;
width: 110rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
background: rgba(5, 37, 78, 0.6);
border: 1rpx solid #51d7eb;
border-radius: 4rpx;
font-size: 28rpx;
font-weight: 400;
color: #bdd3f0;
}
}
}
.info {
height: 20rpx;
border: 1px solid red;
}
}
.cell {
margin-top: 20rpx;
background-color: #fff;
.cell-item {
height: 124rpx;
border-bottom: 1rpx solid #ececec;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0 46rpx;
.icon-left {
height: 40rpx;
width: 40rpx;
background: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/cell1.png");
background-size: 100% 100%;
}
.shouce {
background: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_2@2x.png");
background-size: 100% 100%;
}
.systemicon {
background: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_3@2x.png");
background-size: 100% 100%;
}
.cell-title {
flex: 1;
font-size: 35rpx;
font-weight: 400;
color: #303234;
box-sizing: border-box;
padding-left: 25rpx;
}
.icon-r {
width: 20rpx;
height: 33rpx;
background: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/right.png");
background-size: 100% 100%;
}
}
}
.outlogo {
width: 100%;
height: 100rpx;
background-color: #fff;
margin-top: 30rpx;
text-align: center;
line-height: 100rpx;
font-size: 38rpx;
font-weight: 400;
color: #da3135;
}
</style>

@ -1,291 +1,301 @@
<template>
<view class="work-container">
<u-navbar title="工作台" :autoBack="false" leftIconSize="0" :bgColor="background" titleStyle="color:#fff"
leftIconColor="#fff" :placeholder="true">
</u-navbar>
<u-sticky bgColor="#fff">
<u-tabs :list=" tabList" @click="clickTab" itemStyle="height:50px;width:50%" lineWidth="150"
:current="current">
</u-tabs>
</u-sticky>
<view class="work-container">
<u-navbar
title="工作台"
:autoBack="false"
leftIconSize="0"
:bgColor="background"
titleStyle="color:#fff"
leftIconColor="#fff"
:placeholder="true"
>
</u-navbar>
<u-sticky bgColor="#fff">
<u-tabs
:list="tabList"
@click="clickTab"
itemStyle="height:50px;width:50%"
lineWidth="150"
:current="current"
>
</u-tabs>
</u-sticky>
<view class="list">
<view class="list-item" v-for="(item,index) in list" :key="index" @click="clickInfo(item.id)"
v-show="list.length>0">
<view class="item-title">
{{iconTitle[item.eventname]}}
</view>
<view class="item-data">
<view class="data-icon">
<image src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_1@2x.png"
mode="widthFix"></image>
<view class="icon-lable">
违规地点
</view>
</view>
<view class="data-value">
{{item.address}}
</view>
</view>
<view class="item-data data2">
<view class="data-icon">
<image src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/fangzi.png"
mode="widthFix"></image>
<view class="icon-lable">
所属单位
</view>
</view>
<view class="data-value">
盛泽
</view>
</view>
<view class="item-timer">
{{item.caseNo.slice(2)}}
</view>
<view class="item-state" v-if="paramsQuery.state==0"></view>
<view class="item-state1" v-if="paramsQuery.state==1"></view>
</view>
</view>
</view>
</view>
<view class="list">
<view
class="list-item"
v-for="(item, index) in list"
:key="index"
@click="clickInfo(item.id)"
v-show="list.length > 0"
>
<view class="item-title">
{{ iconTitle[item.eventname] }}
</view>
<view class="item-data">
<view class="data-icon">
<image
src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_1@2x.png"
mode="widthFix"
></image>
<view class="icon-lable"> 违规地点 </view>
</view>
<view class="data-value">
{{ item.address }}
</view>
</view>
<view class="item-data data2">
<view class="data-icon">
<image
src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/fangzi.png"
mode="widthFix"
></image>
<view class="icon-lable"> 所属单位 </view>
</view>
<view class="data-value"> 盛泽 </view>
</view>
<view class="item-timer">
{{ item.caseNo.slice(2) }}
</view>
<view class="item-state" v-if="paramsQuery.state == 0"></view>
<view class="item-state1" v-if="paramsQuery.state == 1"></view>
</view>
</view>
</view>
</template>
<script>
import {
CaseList
} from '@/api/work/index.js';
import iconTitle from '@/utils/iconType.js'
export default {
data() {
return {
background: 'url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png)',
state: 0,
current: 0,
list: [],
iconTitle: iconTitle,
tabList: [{
name: '待处理',
}, {
name: '已处理',
}, ],
// listTop: 0,
height: 0,
loading: true,
paramsQuery: {
state: 0, //
pageNum: 1,
pageSize: 5,
},
pageSum: 1,
}
},
onLoad() {
// let _this = this
// this.$nextTick(() => {
// const query = uni.createSelectorQuery().in(_this)
// query
// .select('#cSticky')
// .boundingClientRect(data => {
// this.listTop = data.height
// // console.log(data.height)
// })
// .exec();
// })
},
onShow() {
this.loading = true,
this.paramsQuery = {
state: 0, //
pageNum: 1,
pageSize: 5,
},
this.current = 0
this.pageSum = 1,
this.list = [],
this.getList()
},
onReachBottom() {
if (this.paramsQuery.pageNum < this.pageSum) {
this.paramsQuery.pageNum = this.paramsQuery.pageNum + 1
this.getList()
} else {
uni.showToast({
title: '没有更多了',
icon: "error"
})
}
},
methods: {
getList() {
uni.showLoading({
title: '加载中'
})
CaseList(this.paramsQuery).then(res => {
if (res.rows.length > 0) {
this.list = [...this.list, ...res.rows]
this.pageSum = Math.ceil(res.total / this.paramsQuery.pageSize) || 1;
} else {
uni.showToast({
title: '没有更多了',
icon: "error"
})
}
uni.hideLoading()
})
},
//tab
clickTab(item) {
this.list = [];
this.pageSum = 1
this.current = item.index
this.paramsQuery = {
state: item.index,
pageNum: 1,
pageSize: 5,
}
this.getList()
},
//
clickInfo(id) {
uni.navigateTo({
url: `/pages/listInfo/listInfo?id=${id}`
})
},
}
}
import { CaseList } from "@/api/work/index.js";
import iconTitle from "@/utils/iconType.js";
export default {
data() {
return {
background:
"url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png)",
state: 0,
current: 0,
list: [],
iconTitle: iconTitle,
tabList: [
{
name: "待处理",
},
{
name: "已处理",
},
],
// listTop: 0,
height: 0,
loading: true,
paramsQuery: {
state: 0, //
pageNum: 1,
pageSize: 5,
},
pageSum: 1,
};
},
onLoad() {
// let _this = this
// this.$nextTick(() => {
// const query = uni.createSelectorQuery().in(_this)
// query
// .select('#cSticky')
// .boundingClientRect(data => {
// this.listTop = data.height
// // console.log(data.height)
// })
// .exec();
// })
},
onShow() {
(this.loading = true),
(this.paramsQuery = {
state: 0, //
pageNum: 1,
pageSize: 5,
}),
(this.current = 0);
(this.pageSum = 1), (this.list = []), this.getList();
},
onReachBottom() {
if (this.paramsQuery.pageNum < this.pageSum) {
this.paramsQuery.pageNum = this.paramsQuery.pageNum + 1;
this.getList();
} else {
uni.showToast({
title: "没有更多了",
icon: "error",
});
}
},
methods: {
getList() {
uni.showLoading({
title: "加载中",
});
CaseList(this.paramsQuery).then((res) => {
if (res.rows.length > 0) {
this.list = [...this.list, ...res.rows];
this.pageSum = Math.ceil(res.total / this.paramsQuery.pageSize) || 1;
} else {
uni.showToast({
title: "没有更多了",
icon: "error",
});
}
uni.hideLoading();
});
},
//tab
clickTab(item) {
this.list = [];
this.pageSum = 1;
this.current = item.index;
this.paramsQuery = {
state: item.index,
pageNum: 1,
pageSize: 5,
};
this.getList();
},
//
clickInfo(id) {
uni.navigateTo({
url: `/pages/listInfo/listInfo?id=${id}`,
});
},
},
};
</script>
<style lang="scss" scoped>
.work-container {
box-sizing: border-box;
.work-container {
box-sizing: border-box;
.c-sticky {
position: fixed;
width: 100%;
z-index: 99;
}
}
.c-sticky {
position: fixed;
width: 100%;
z-index: 99;
}
}
.list-box {
box-sizing: border-box;
}
.list-box {
box-sizing: border-box;
}
.tabItem {
width: 50%;
}
.tabItem {
width: 50%;
}
.tab-box {
height: 80rpx;
background: red;
position: sticky;
}
.tab-box {
height: 80rpx;
background: red;
position: sticky;
}
.container-work {
width: 100%;
}
.container-work {
width: 100%;
}
.list {
box-sizing: border-box;
padding: 33rpx 33rpx;
.list {
box-sizing: border-box;
padding: 33rpx 33rpx;
.list-item {
height: 322rpx;
background: #FFFFFF;
box-shadow: 0px 10rpx 20rpx 0px rgba(138, 152, 191, 0.08);
border-radius: 20rpx;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-around;
overflow: hidden;
.list-item {
height: 322rpx;
background: #ffffff;
box-shadow: 0px 10rpx 20rpx 0px rgba(138, 152, 191, 0.08);
border-radius: 20rpx;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-around;
overflow: hidden;
.item-title {
font-size: 40rpx;
font-weight: 600;
color: #303234;
box-sizing: border-box;
padding: 36rpx;
padding-bottom: 20rpx;
}
.item-title {
font-size: 40rpx;
font-weight: 600;
color: #303234;
box-sizing: border-box;
padding: 36rpx;
padding-bottom: 20rpx;
}
.item-data {
box-sizing: border-box;
padding: 0 36rpx;
display: flex;
align-items: center;
.item-data {
box-sizing: border-box;
padding: 0 36rpx;
display: flex;
align-items: center;
.data-icon {
display: flex;
align-items: center;
.data-icon {
display: flex;
align-items: center;
image {
display: block;
margin-right: 10rpx;
width: 32rpx;
height: 32rpx;
}
image {
display: block;
margin-right: 10rpx;
width: 32rpx;
height: 32rpx;
}
.icon-lable {
font-size: 28rpx;
font-weight: 400;
color: #8B9097;
}
}
.icon-lable {
font-size: 28rpx;
font-weight: 400;
color: #8b9097;
}
}
.data-value {
font-size: 28rpx;
font-weight: 400;
color: #8B9097;
flex: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.data-value {
font-size: 28rpx;
font-weight: 400;
color: #8b9097;
flex: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.data2 {
margin-top: 10rpx;
}
.data2 {
margin-top: 10rpx;
}
.item-timer {
margin-top: 10rpx;
border-top: 1px solid #F2F3F6;
box-sizing: border-box;
height: 60rpx;
line-height: 60rpx;
padding-left: 36rpx;
font-size: 30rpx;
font-weight: bold;
color: #ADB0BD;
}
.item-timer {
margin-top: 10rpx;
border-top: 1px solid #f2f3f6;
box-sizing: border-box;
height: 60rpx;
line-height: 60rpx;
padding-left: 36rpx;
font-size: 30rpx;
font-weight: bold;
color: #adb0bd;
}
.item-state {
position: absolute;
top: 0%;
right: 0;
width: 124rpx;
height: 124rpx;
background-image: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/tip_zcq@2x.png");
background-size: 100% 100%;
}
.item-state {
position: absolute;
top: 0%;
right: 0;
width: 124rpx;
height: 124rpx;
background-image: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/tip_zcq@2x.png");
background-size: 100% 100%;
}
.item-state1 {
position: absolute;
top: 0%;
right: 0;
width: 124rpx;
height: 124rpx;
background-image: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/tip_zcl@2x.png");
background-size: 100% 100%;
}
}
.item-state1 {
position: absolute;
top: 0%;
right: 0;
width: 124rpx;
height: 124rpx;
background-image: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/tip_zcl@2x.png");
background-size: 100% 100%;
}
}
&>view:nth-child(n+2) {
margin-top: 30rpx;
}
}
& > view:nth-child(n + 2) {
margin-top: 30rpx;
}
}
</style>

@ -1,19 +1,31 @@
<template>
<view class="work">
<u-navbar title="提交整改" :autoBack="true" :bgColor="background" titleStyle="color:#fff" leftIconColor="#fff"
:placeholder="true">
</u-navbar>
<view class="item">
<view class="item-lable">
<view class="lable-icon">* </view>
<view class="lable-text">整改情况</view>
</view>
<view class="item-input">
<u--input placeholder="请输入内容" color="#95999D" fontSize="15" border="none" v-model="query.detail">
</u--input>
</view>
</view>
<!-- <view class="item">
<view class="work">
<u-navbar
title="提交整改"
:autoBack="true"
:bgColor="background"
titleStyle="color:#fff"
leftIconColor="#fff"
:placeholder="true"
>
</u-navbar>
<view class="item">
<view class="item-lable">
<view class="lable-icon">* </view>
<view class="lable-text">整改情况</view>
</view>
<view class="item-input">
<u--input
placeholder="请输入内容"
color="#95999D"
fontSize="15"
border="none"
v-model="query.detail"
>
</u--input>
</view>
</view>
<!-- <view class="item">
<view class="item-lable">
<view class="lable-icon"> </view>
<view class="lable-text">整改时间</view>
@ -23,172 +35,171 @@
</u--input>
</view>
</view> -->
<view class="item">
<view class="item-lable">
<view class="lable-icon">* </view>
<view class="lable-text">整改图片</view>
</view>
<view class="item-input unloadIamge">
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" :maxCount="1">
</u-upload>
</view>
</view>
<view class="submit" @click="clickForm()">
<submit title="提交" />
</view>
</view>
<view class="item">
<view class="item-lable">
<view class="lable-icon">* </view>
<view class="lable-text">整改图片</view>
</view>
<view class="item-input unloadIamge">
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
:maxCount="1"
>
</u-upload>
</view>
</view>
<view class="submit" @click="clickForm()">
<submit title="提交" />
</view>
</view>
</template>
<script>
import {
uploadtypeIocn,
updataCase
} from '@/api/work/index.js'
import submit from '@/components/subBottom/subBottom.vue';
import config from '@/config'
import {
caseUpdata
} from '@/api/work/index.js'
export default {
components: {
submit
},
data() {
return {
color: '#ffffff',
backShow: true,
background: 'url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png)',
value: '',
value2: '2022-08-29 12:35:47',
fileList1: [],
height: null,
query: {
id: null,
case_state: 2,
state: 1,
detail: '',
person: this.$store.state.user.name,
handlephoto: ''
},
fileList1: [],
};
},
onLoad(query) {
this.query.id = query.id
},
methods: {
//
clickForm() {
if (this.query.detail == '') {
uni.showToast({
title: '请填写处理事由',
icon: 'error'
})
return
}
if (this.query.handlephoto == '') {
uni.showToast({
title: '请上传处理照片',
icon: 'error'
})
console.log('提交参数', this.query.handlephoto)
return
}
updataCase(this.query).then(res => {
// uni.switchTab({
// url: '/pages/work/index'
// })
uni.navigateBack()
uni.showToast({
title: '提交成功'
})
})
},
//
afterRead(e) {
console.log(e)
this.fileList1.push({
...e.file,
})
let data = {
name: 'avatarfile',
filePath: e.file.thumb
}
uploadtypeIocn(data).then(res => {
// if (res.code === 200) {
// consl
// this.fileList1[0].status = 'success';
// this.fileList1[0].message = '';
this.query.handlephoto = config.baseUrl + res.imgUrl
// console.log('', this.query.photo)
// }
})
},
getHeight(e) {
this.height = e
},
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
}
}
import { uploadtypeIocn, updataCase } from "@/api/work/index.js";
import submit from "@/components/subBottom/subBottom.vue";
import config from "@/config";
import { caseUpdata } from "@/api/work/index.js";
export default {
components: {
submit,
},
data() {
return {
color: "#ffffff",
backShow: true,
background:
"url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png)",
value: "",
value2: "2022-08-29 12:35:47",
fileList1: [],
height: null,
query: {
id: null,
case_state: 2,
state: 1,
detail: "",
person: this.$store.state.user.name,
handlephoto: "",
},
fileList1: [],
};
},
onLoad(query) {
this.query.id = query.id;
},
methods: {
//
clickForm() {
if (this.query.detail == "") {
uni.showToast({
title: "请填写处理事由",
icon: "error",
});
return;
}
if (this.query.handlephoto == "") {
uni.showToast({
title: "请上传处理照片",
icon: "error",
});
console.log("提交参数", this.query.handlephoto);
return;
}
updataCase(this.query).then((res) => {
// uni.switchTab({
// url: '/pages/work/index'
// })
uni.navigateBack();
uni.showToast({
title: "提交成功",
});
});
},
//
afterRead(e) {
console.log(e);
this.fileList1.push({
...e.file,
});
let data = {
name: "avatarfile",
filePath: e.file.thumb,
};
uploadtypeIocn(data).then((res) => {
// if (res.code === 200) {
// consl
// this.fileList1[0].status = 'success';
// this.fileList1[0].message = '';
this.query.handlephoto = config.baseUrl + res.imgUrl;
// console.log('', this.query.photo)
// }
});
},
getHeight(e) {
this.height = e;
},
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1);
},
},
};
</script>
<style lang="scss">
.from-box {
box-sizing: border-box;
}
.item {
min-height: 160rpx;
background-color: #fff;
margin: 30rpx 0;
display: flex;
flex-direction: column;
justify-content: space-around;
box-sizing: border-box;
padding: 27rpx 33rpx;
.item-lable {
display: flex;
.lable-icon {
font-size: 50rpx;
color: #EB7573;
width: 50rpx;
}
.lable-text {
font-size: 40rpx;
font-weight: 400;
color: #35373B;
}
}
.item-input {
box-sizing: border-box;
padding-left: 50rpx;
}
.unloadIamge {
margin-top: 20rpx;
}
}
.submit {
position: fixed;
width: 100%;
bottom: 0%;
border-top: 1rpx solid #ECECEC;
background-color: #fff;
box-sizing: border-box;
padding-bottom: env(safe-area-inset-bottom);
}
.from-box {
box-sizing: border-box;
}
.item {
min-height: 160rpx;
background-color: #fff;
margin: 30rpx 0;
display: flex;
flex-direction: column;
justify-content: space-around;
box-sizing: border-box;
padding: 27rpx 33rpx;
.item-lable {
display: flex;
.lable-icon {
font-size: 50rpx;
color: #eb7573;
width: 50rpx;
}
.lable-text {
font-size: 40rpx;
font-weight: 400;
color: #35373b;
}
}
.item-input {
box-sizing: border-box;
padding-left: 50rpx;
}
.unloadIamge {
margin-top: 20rpx;
}
}
.submit {
position: fixed;
width: 100%;
bottom: 0%;
border-top: 1rpx solid #ececec;
background-color: #fff;
box-sizing: border-box;
padding-bottom: env(safe-area-inset-bottom);
}
</style>

@ -0,0 +1,37 @@
import Vue from "vue";
import {
CaseList
} from '@/api/work/index.js';
const mgsData = {
state: {
total: 0,
},
mutations: {
//修改list列表总数
changeTotal(state, data) {
state.total = data
},
sumTotal(state, data) {
if (data > state.total) {
uni.showModal({
title: '消息',
content: '您有新的工单需要处理',
showCancel: false,
confirmText: '我知道了',
success: (res) => {
if (res.confirm) {
uni.switchTab({
url: '/pages/work/index'
})
}
}
})
}
},
},
}
export default mgsData

@ -0,0 +1,165 @@
/*
* @Description:
* @Author: Fugang
* @Date: 2019-08-21 14:49:30
* @LastEditors: Fugang
* @LastEditTime: 2019-08-21 14:59:10
*/
/* eslint-disable */
//定义一些常量
var x_PI = (3.14159265358979324 * 3000.0) / 180.0;
var PI = 3.1415926535897932384626;
var a = 6378245.0;
var ee = 0.00669342162296594323;
/**
* 百度坐标系 (BD-09) 火星坐标系 (GCJ-02)的转换
* 百度 谷歌高德
* @param bd_lon
* @param bd_lat
* @returns {*[]}
*/
var bd09togcj02 = function bd09togcj02(bd_lon, bd_lat) {
var bd_lon = +bd_lon;
var bd_lat = +bd_lat;
var x = bd_lon - 0.0065;
var y = bd_lat - 0.006;
var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_PI);
var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_PI);
var gg_lng = z * Math.cos(theta);
var gg_lat = z * Math.sin(theta);
return [gg_lng, gg_lat];
};
/**
* 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换
* 即谷歌高德 百度
* @param lng
* @param lat
* @returns {*[]}
*/
var gcj02tobd09 = function gcj02tobd09(lng, lat) {
var lat = +lat;
var lng = +lng;
var z = Math.sqrt(lng * lng + lat * lat) + 0.00002 * Math.sin(lat * x_PI);
var theta = Math.atan2(lat, lng) + 0.000003 * Math.cos(lng * x_PI);
var bd_lng = z * Math.cos(theta) + 0.0065;
var bd_lat = z * Math.sin(theta) + 0.006;
return [bd_lng, bd_lat];
};
/**
* WGS84转GCj02
* @param lng
* @param lat
* @returns {*[]}
*/
var wgs84togcj02 = function wgs84togcj02(lng, lat) {
var lat = +lat;
var lng = +lng;
if (out_of_china(lng, lat)) {
return [lng, lat];
} else {
var dlat = transformlat(lng - 105.0, lat - 35.0);
var dlng = transformlng(lng - 105.0, lat - 35.0);
var radlat = (lat / 180.0) * PI;
var magic = Math.sin(radlat);
magic = 1 - ee * magic * magic;
var sqrtmagic = Math.sqrt(magic);
dlat = (dlat * 180.0) / (((a * (1 - ee)) / (magic * sqrtmagic)) * PI);
dlng = (dlng * 180.0) / ((a / sqrtmagic) * Math.cos(radlat) * PI);
var mglat = lat + dlat;
var mglng = lng + dlng;
return [mglng, mglat];
}
};
/**
* GCJ02 转换为 WGS84
* @param lng
* @param lat
* @returns {*[]}
*/
var gcj02towgs84 = function gcj02towgs84(lng, lat) {
var lat = +lat;
var lng = +lng;
if (out_of_china(lng, lat)) {
return [lng, lat];
} else {
var dlat = transformlat(lng - 105.0, lat - 35.0);
var dlng = transformlng(lng - 105.0, lat - 35.0);
var radlat = (lat / 180.0) * PI;
var magic = Math.sin(radlat);
magic = 1 - ee * magic * magic;
var sqrtmagic = Math.sqrt(magic);
dlat = (dlat * 180.0) / (((a * (1 - ee)) / (magic * sqrtmagic)) * PI);
dlng = (dlng * 180.0) / ((a / sqrtmagic) * Math.cos(radlat) * PI);
var mglat = lat + dlat;
var mglng = lng + dlng;
return [lng * 2 - mglng, lat * 2 - mglat];
}
};
var transformlat = function transformlat(lng, lat) {
var lat = +lat;
var lng = +lng;
var ret =
-100.0 +
2.0 * lng +
3.0 * lat +
0.2 * lat * lat +
0.1 * lng * lat +
0.2 * Math.sqrt(Math.abs(lng));
ret +=
((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) *
2.0) /
3.0;
ret +=
((20.0 * Math.sin(lat * PI) + 40.0 * Math.sin((lat / 3.0) * PI)) * 2.0) /
3.0;
ret +=
((160.0 * Math.sin((lat / 12.0) * PI) + 320 * Math.sin((lat * PI) / 30.0)) *
2.0) /
3.0;
return ret;
};
var transformlng = function transformlng(lng, lat) {
var lat = +lat;
var lng = +lng;
var ret =
300.0 +
lng +
2.0 * lat +
0.1 * lng * lng +
0.1 * lng * lat +
0.1 * Math.sqrt(Math.abs(lng));
ret +=
((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) *
2.0) /
3.0;
ret +=
((20.0 * Math.sin(lng * PI) + 40.0 * Math.sin((lng / 3.0) * PI)) * 2.0) /
3.0;
ret +=
((150.0 * Math.sin((lng / 12.0) * PI) +
300.0 * Math.sin((lng / 30.0) * PI)) *
2.0) /
3.0;
return ret;
};
/**
* 判断是否在国内不在国内则不做偏移
* @param lng
* @param lat
* @returns {boolean}
*/
var out_of_china = function out_of_china(lng, lat) {
var lat = +lat;
var lng = +lng;
// 纬度3.86~53.55,经度73.66~135.05
return !(lng > 73.66 && lng < 135.05 && lat > 3.86 && lat < 53.55);
};
export { bd09togcj02, gcj02tobd09, wgs84togcj02, gcj02towgs84 };
Loading…
Cancel
Save