master
许宏杰 2 years ago
parent 64da919969
commit 30fa68e841

@ -1,6 +1,6 @@
// 应用全局配置
module.exports = {
baseUrl: 'http://39.101.188.84:9014',
baseUrl: 'http://39.101.188.84:9025',
// 应用信息
appInfo: {
// 应用名称
@ -22,4 +22,4 @@ module.exports = {
}
]
}
}
}

@ -1,380 +1,354 @@
<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">{{
<view class="info">
<u-navbar title="工单详情" :autoBack="true" :bgColor="background" titleStyle="color:#fff" leftIconColor="#fff"
:placeholder="true">
<view class="" slot="right" style="color: white" @click="clickForm()" v-show="info.case_state == 1">
</view>
</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="{
</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(Image)"></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()">
<button>导航</button>
</view> -->
<!-- </view> -->
<cover-view
class="submit"
@click="clickForm()"
v-show="info.case_state == 1"
>
<!-- <submit title="提交整改" /> -->
提交
</cover-view>
</view>
}" 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">
<image :src="baseUrl + info.handlephoto" alt="" @click="showIamge(baseUrl + info.handlephoto)"
mode="aspectFit">
</image>
</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">
<cover-view class="map-buttom" @click="getLoaction()"> </cover-view>
</map>
</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],
};
});
}
import {
getCaseInfo
} from "@/api/work/index.js";
import submit from "@/components/subBottom/subBottom.vue";
import iconTitle from "@/utils/iconType.js";
import config from "@/config";
export default {
components: {
submit,
},
data() {
return {
baseUrl: config.baseUrl,
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.baseUrl + 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",
},
];
});
},
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();
},
};
//
getLoaction() {
uni.openLocation({
latitude: Number(this.latitude),
longitude: Number(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;
}
page {
box-sizing: border-box;
}
.info-box {
box-sizing: border-box;
}
.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;
.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-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;
box-sizing: border-box;
padding-right: 20rpx;
}
.cell-value {
flex: 1;
font-size: 36rpx;
font-weight: 400;
color: #8b9097;
}
.state {
display: flex;
align-items: center;
.state {
display: flex;
align-items: center;
image {
width: 50rpx;
height: 50rpx;
display: block;
margin-right: 14rpx;
}
image {
width: 50rpx;
height: 50rpx;
display: block;
margin-right: 14rpx;
}
text {
font-weight: 500;
color: #f98552;
}
}
text {
font-weight: 500;
color: #f98552;
}
}
.type {
color: #3b76ee;
}
.type {
color: #3b76ee;
}
.beizhu {
box-sizing: border-box;
padding: 30rpx 10rpx;
padding-right: 20rpx;
line-height: 60rpx;
min-height: 250rpx;
}
.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;
}
}
.address {
box-sizing: border-box;
padding-right: 10rpx;
}
}
.state2-img {
height: 421rpx;
.state2-img {
height: 421rpx;
image {
height: 100%;
width: 100%;
display: block;
}
}
img {
height: 100%;
width: 100%;
display: block;
}
}
.canvas-box {
// margin: 20rpx 0;
height: 421rpx;
background-color: #fff;
box-sizing: border-box;
position: relative;
.canvas-box {
// margin: 20rpx 0;
height: 421rpx;
background-color: #fff;
box-sizing: border-box;
position: relative;
image {
display: block;
height: 100%;
width: 100%;
}
image {
display: block;
height: 100%;
width: 100%;
}
.redBorder {
width: 10px;
height: 10px;
position: absolute;
border: 2rpx solid red;
.redBorder {
width: 10px;
height: 10px;
position: absolute;
border: 2rpx solid red;
.kexin {
position: relative;
.kexin {
position: relative;
span {
background: black;
color: red;
position: absolute;
top: -40rpx;
right: 0;
}
}
}
}
span {
background: black;
color: red;
position: absolute;
top: -40rpx;
right: 0;
}
}
}
}
.map-box {
position: relative;
overflow: hidden;
.map-box {
position: relative;
overflow: hidden;
// map {
// width: 750rpx !important;
// height: 495rpx !important;
// }
// map {
// width: 750rpx !important;
// height: 495rpx !important;
// }
.map_btn {
position: absolute;
z-index: 999;
width: 140rpx;
height: 68rpx;
top: 40rpx;
right: 40rpx;
.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);
}
}
}
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);
}
}
}
.map-buttom {
position: absolute;
top: 20px;
right: 20px;
font-size: 25rpx;
width: 100rpx;
height: 55rpx;
font-weight: 400;
color: #fff;
border-radius: 17px;
background: #5a9df0;
box-sizing: border-box;
text-align: center;
/* #ifdef APP-PLUS */
line-height: 45rpx;
/* #endif */
.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);
}
/* #ifdef H5 */
display: flex;
align-items: center;
justify-content: center;
/* #endif */
}
.caseState1 {
color: #ff4e77 !important;
}
.caseState1 {
color: #ff4e77 !important;
}
.caseState2 {
color: #57b800 !important;
}
</style>
.caseState2 {
color: #57b800 !important;
}
</style>

@ -1,240 +1,218 @@
<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: false,
globalConfig: getApp().globalData.config,
loginForm: {
username: "admin",
password: "wujiang@2023",
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;
}
</style>
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,301 +1,277 @@
<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" id="diyNav">
</u-navbar>
<u-sticky bgColor="#fff" :offset-top="navigtionHeight">
<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 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: "已处理",
},
],
navigtionHeight: 0,
height: 0,
loading: true,
paramsQuery: {
state: 0, //
pageNum: 1,
pageSize: 5,
},
pageSum: 1,
};
},
onLoad() {
// #ifdef APP-PLUS
const systemInfo = uni.getSystemInfoSync()
this.navigtionHeight = 44 + systemInfo.statusBarHeight //
// #endif
},
onShow() {
(this.loading = true),
(this.paramsQuery = {
begincreatetime: "2022-11-01 00:00:00",
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;
}
}
</style>
&>view:nth-child(n + 2) {
margin-top: 30rpx;
}
}
</style>

@ -110,9 +110,6 @@ export default {
return;
}
updataCase(this.query).then((res) => {
// uni.switchTab({
// url: '/pages/work/index'
// })
uni.navigateBack();
uni.showToast({
title: "提交成功",
@ -135,7 +132,7 @@ export default {
// consl
// this.fileList1[0].status = 'success';
// this.fileList1[0].message = '';
this.query.handlephoto = config.baseUrl + res.imgUrl;
this.query.handlephoto = res.imgUrl;
// console.log('', this.query.photo)
// }
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

Loading…
Cancel
Save