master
许宏杰 3 years ago
parent bfcce1b670
commit a345bf1d92

@ -0,0 +1,39 @@
import request from '@/utils/request'
import upload from '@/utils/upload'
export function CaseList(params) {
return request({
url: "/zjgyyingji/case/list",
method: "get",
params: params,
});
}
export function getCaseInfo(id) {
return request({
url: `/zjgyyingji/case/${id}`,
method: "get",
});
}
export function caseUpdata(data) {
return request({
url: '/zjgyyingji/case',
method: "get",
data: data
});
}
export function uploadtypeIocn(data) {
return upload({
url: '/wujiangtaishi/totalData/avatar',
name: data.name,
filePath: data.filePath
})
}
export function updataCase(data) {
return request({
url: '/zjgyyingji/case',
method: "put",
data: data
});
}

@ -72,7 +72,7 @@
},
methods: {
back() {
console.log('点击头部返回')
// console.log('')
uni.navigateBack();
}
}

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

@ -1,9 +1,9 @@
{
"name" : "吴江态势",
"appid" : "__UNI__25A9D80",
"name" : "智慧管家",
"appid" : "__UNI__447503A",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionCode" : 100,
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
@ -14,29 +14,45 @@
"autoclose" : true,
"delay" : 0
},
"modules" : {},
"modules" : {
"Maps" : {}
},
"distribute" : {
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios" : {},
"sdkConfigs" : {}
"ios" : {
"dSYMs" : false
},
"sdkConfigs" : {
"ad" : {},
"maps" : {
"amap" : {
"appkey_ios" : "9fbef4ad095c00e5a925426a521c7b55",
"appkey_android" : "d6eefa4b41179783962fbf824dc75908"
}
}
}
}
},
"quickapp" : {},
@ -55,14 +71,14 @@
},
"vueVersion" : "2",
"h5" : {
"template" : "static/index.html",
"template" : "",
"devServer" : {
"port" : 9090,
"port" : 9014,
"https" : false
},
"title" : "吴江态势",
"router" : {
"mode" : "hash",
"mode" : "history",
"base" : "./"
},
"sdkConfigs" : {

@ -0,0 +1,5 @@
{
"dependencies": {
"fabric": "^5.2.4"
}
}

@ -2,7 +2,8 @@
"pages": [{
"path": "pages/login",
"style": {
"navigationStyle": "custom"
"navigationStyle": "custom",
"navigationBarTitleText": ""
}
}, {
"path": "pages/index",
@ -13,6 +14,8 @@
}, {
"path": "pages/work/index",
"style": {
"enablePullDownRefresh": true,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"navigationBarTitleText": "工作台"
}
@ -103,7 +106,6 @@
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "RuoYi",
"navigationBarBackgroundColor": "#FFFFFF"
}
}

@ -1,60 +1,91 @@
<template>
<view class="info">
<NavbarBox title="工作台" :color="color" :backShow="backShow" :background="background" @getHeight="getHeight()" />
<view class="info-box" :style="{paddingTop:height + 'px'}">
<view class="item-cell">
<view class="cell-lable">工单状态</view>
<view class="cell-value state">
<image src="http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/icon_dsh@2x.png"
mode="widthFix"></image>
<text>待处理</text>
</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规类型</view>
<view class="cell-value type">违章乱贴小广告</view>
</view>
<view class="item-cell">
<view class="cell-lable">所属单位</view>
<view class="cell-value">待处理</view>
</view>
<view class="canvas-box">
<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 class="cell-value beizhu">
在城市建筑物设施以及树木 上涂写刻画或者未经批准张 张贴宣传品
</view>
<view class="cell-lable">处理图片:</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规时间</view>
<view class="cell-value">
2022-08-28 09:53:47
</view>
<view class="state2-img">
<img :src="info.handlephoto" alt="" @click="showIamge(info.handlephoto)">
</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 class="cell-value">
{{info.detail}}
</view>
<view class="map-box">
<map id="map" subkey="TYBBZ-A2AKV-MLZPW-UFNQI-HKNVE-BEFZH"></map>
<view class="map_btn">
<button>导航</button>
</view>
</view>
<view class="item-cell">
<view class="cell-lable">违规时间:</view>
<view class="cell-value">
{{info.create_time}}
</view>
<view class="submit" @click="clickForm()">
<submit title="提交整改" />
</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>
</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
@ -63,25 +94,89 @@
return {
color: '#ffffff',
backShow: true,
background: 'url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png);background-size:100% 100%',
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: {
getHeight(e) {
this.height = e
//
showIamge(url) {
let list = []
list[0] = url;
uni.previewImage({
current: 0,
urls: list,
})
},
clickForm() {
uni.navigateTo({
url: '/pages/workForm/workForm'
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() {
onLoad(query) {
this.infoId = query.id
},
onShow() {
this.imglabel = []
this.getInfo()
},
}
@ -91,6 +186,7 @@
page {
box-sizing: border-box;
padding-bottom: 120rpx;
}
.info-box {
@ -110,7 +206,7 @@
font-size: 36rpx;
font-weight: 400;
color: #303234;
width: 150rpx;
width: 160rpx;
margin-right: 50rpx;
}
@ -151,31 +247,73 @@
.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: 442rpx;
// margin: 20rpx 0;
height: 421rpx;
background-color: #fff;
box-sizing: border-box;
background: url('http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/wx.jpg');
background-size: 100% 100%;
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 {
height: 495rpx;
background-color: #fff;
position: relative;
overflow: hidden;
#map {
height: 495rpx;
width: 750rpx;
}
// map {
// width: 750rpx !important;
// height: 495rpx !important;
// }
.map_btn {
position: absolute;
z-index: 999;
width: 140rpx;
height: 68rpx;
top: 40rpx;
@ -198,9 +336,18 @@
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>

@ -118,13 +118,13 @@
page {
// background-color: #ffffff;
// border: 1px solid red;
background-image: url("http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img_bg @2x.png");
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%;

@ -2,25 +2,37 @@
<view class="container">
<view class="page-body uni-content-info">
<view class='cropper-content'>
<view v-if="isShowImg" class="uni-corpper" :style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'">
<view class="uni-corpper-content" :style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'">
<view v-if="isShowImg" class="uni-corpper"
:style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'">
<view class="uni-corpper-content"
:style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'">
<image :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image>
<view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove" @touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd"
:style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'">
<view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove"
@touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd"
:style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'">
<view class="uni-cropper-view-box">
<view class="uni-cropper-dashed-h"></view>
<view class="uni-cropper-dashed-v"></view>
<view class="uni-cropper-line-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-t" data-drag="top" @touchstart.stop="dragStart"
@touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-r" data-drag="right" @touchstart.stop="dragStart"
@touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-b" data-drag="bottom" @touchstart.stop="dragStart"
@touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-l" data-drag="left" @touchstart.stop="dragStart"
@touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-t" data-drag="top" @touchstart.stop="dragStart"
@touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-tr" data-drag="topTight"></view>
<view class="uni-cropper-point point-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-rb" data-drag="rightBottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove" @touchend.stop="dragEnd"></view>
<view class="uni-cropper-point point-r" data-drag="right" @touchstart.stop="dragStart"
@touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-rb" data-drag="rightBottom"
@touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-b" data-drag="bottom" @touchstart.stop="dragStart"
@touchmove.stop="dragMove" @touchend.stop="dragEnd"></view>
<view class="uni-cropper-point point-bl" data-drag="bottomLeft"></view>
<view class="uni-cropper-point point-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-l" data-drag="left" @touchstart.stop="dragStart"
@touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-lt" data-drag="leftTop"></view>
</view>
</view>
@ -31,17 +43,20 @@
<button type="primary reverse" @click="getImage" style='margin-top: 30rpx;'> 选择头像 </button>
<button type="warn" @click="getImageInfo" style='margin-top: 30rpx;'> 提交 </button>
</view>
<canvas canvas-id="myCanvas" :style="'position:absolute;border: 1px solid red; width:'+imageW+'px;height:'+imageH+'px;top:-9999px;left:-9999px;'"></canvas>
<canvas canvas-id="myCanvas"
:style="'position:absolute;border: 1px solid red; width:'+imageW+'px;height:'+imageH+'px;top:-9999px;left:-9999px;'"></canvas>
</view>
</view>
</template>
<script>
import config from '@/config'
import store from "@/store"
import { uploadAvatar } from "@/api/system/user"
const baseUrl = config.baseUrl
import config from '@/config'
import store from "@/store"
import {
uploadAvatar
} from "@/api/system/user"
const baseUrl = config.baseUrl
let sysInfo = uni.getSystemInfoSync()
let SCREEN_WIDTH = sysInfo.screenWidth
let PAGE_X, // x
@ -100,20 +115,20 @@
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
this.loadImage()
},
methods: {
setData: function (obj) {
setData: function(obj) {
let that = this
Object.keys(obj).forEach(function (key) {
Object.keys(obj).forEach(function(key) {
that.$set(that.$data, key, obj[key])
})
},
getImage: function () {
getImage: function() {
var _this = this
uni.chooseImage({
success: function (res) {
success: function(res) {
_this.setData({
imageSrc: res.tempFilePaths[0],
})
@ -121,7 +136,7 @@
},
})
},
loadImage: function () {
loadImage: function() {
var _this = this
uni.getImageInfo({
@ -139,7 +154,8 @@
INIT_DRAG_POSITION = minRange > INIT_DRAG_POSITION ? INIT_DRAG_POSITION : minRange
//
if (IMG_RATIO >= 1) {
let cutT = Math.ceil((SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO - INIT_DRAG_POSITION)) / 2)
let cutT = Math.ceil((SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO -
INIT_DRAG_POSITION)) / 2)
let cutB = cutT
let cutL = Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH + INIT_DRAG_POSITION) / 2)
let cutR = cutL
@ -161,7 +177,8 @@
innerAspectRadio: IMG_RATIO
})
} else {
let cutL = Math.ceil((SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO)) / 2)
let cutL = Math.ceil((SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO)) /
2)
let cutR = cutL
let cutT = Math.ceil((SCREEN_WIDTH - INIT_DRAG_POSITION) / 2)
let cutB = cutT
@ -253,12 +270,19 @@
destHeight: canvasH,
quality: 0.5,
canvasId: 'myCanvas',
success: function (res) {
success: function(res) {
console.log(res)
uni.hideLoading()
let data = {name: 'avatarfile', filePath: res.tempFilePath}
let data = {
name: 'avatarfile',
filePath: res.tempFilePath
}
uploadAvatar(data).then(response => {
store.commit('SET_AVATAR', baseUrl + response.imgUrl)
uni.showToast({ title: "修改成功", icon: 'success' })
uni.showToast({
title: "修改成功",
icon: 'success'
})
uni.navigateBack()
})
}
@ -290,7 +314,8 @@
case 'left':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_L - dragLength < 0) dragLength = CUT_L
if ((CUT_L - dragLength) > (this.cropperW - this.cutR)) dragLength = CUT_L - (this.cropperW - this.cutR)
if ((CUT_L - dragLength) > (this.cropperW - this.cutR)) dragLength = CUT_L - (this.cropperW - this
.cutR)
this.setData({
cutL: CUT_L - dragLength
})
@ -298,7 +323,8 @@
case 'top':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_T - dragLength < 0) dragLength = CUT_T
if ((CUT_T - dragLength) > (this.cropperH - this.cutB)) dragLength = CUT_T - (this.cropperH - this.cutB)
if ((CUT_T - dragLength) > (this.cropperH - this.cutB)) dragLength = CUT_T - (this.cropperH - this
.cutB)
this.setData({
cutT: CUT_T - dragLength
})
@ -382,6 +408,7 @@
image-orientation: 0deg !important;
margin: 0 auto;
}
/* 移动图片效果 */
.uni-cropper-drag-box {
@ -394,6 +421,7 @@
background: rgba(0, 0, 0, 0.6);
z-index: 1;
}
/* 内部的信息 */
.uni-corpper-crop-box {
@ -411,6 +439,7 @@
outline: 1rpx solid #69f;
outline-color: rgba(102, 153, 255, .75)
}
/* 横向虚线 */
.uni-cropper-dashed-h {
@ -422,6 +451,7 @@
border-top: 1rpx dashed rgba(255, 255, 255, 0.5);
border-bottom: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 纵向虚线 */
.uni-cropper-dashed-v {
@ -433,6 +463,7 @@
border-left: 1rpx dashed rgba(255, 255, 255, 0.5);
border-right: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 四个方向的线 为了之后的拖动事件*/
.uni-cropper-line-t {
@ -615,6 +646,7 @@
margin-top: -3rpx;
cursor: n-resize;
}
/* 裁剪框预览内容 */
.uni-cropper-viewer {

@ -1,95 +1,160 @@
<template>
<view class="work-container">
<NavbarBox title="工作台" :color="color" :backShow="backShow" :background="background" @getHeight="getHeight()" />
<view class="list-box" :style="{paddingTop:height + 'px' }">
<u-sticky bgColor="#fff" :offset-top="height">
<u-tabs :list="tabList" @click="clickTab" itemStyle="height:50px;width:50%" lineWidth="150">
</u-tabs>
</u-sticky>
<view class="list">
<view class="list-item" v-for="(item,index) in list" :key="index" @click="clickInfo()">
<view class="item-title">
{{item.name}}
</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">
江苏省苏州市吴江区盛泽镇
<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="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 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="item-timer">
2022-08-27 08:23:57
<view class="data-value">
盛泽
</view>
<view class="item-state" v-if="state==0"></view>
<view class="item-state1" v-if="state==1"></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>
</template>
<script>
import {
CaseList
} from '@/api/work/index.js';
import iconTitle from '@/utils/iconType.js'
export default {
data() {
return {
color: '#ffffff',
backShow: false,
background: 'url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png);background-size:100% 100%',
background: 'url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png)',
state: 0,
list: [{
name: '违章论贴小广告'
},
{
name: '非机动车违章停车'
},
{
name: '垃圾桶满溢'
},
{
name: '市政井盖缺失'
}
],
current: 0,
list: [],
iconTitle: iconTitle,
tabList: [{
name: '待处理',
}, {
name: '已处理',
}, ],
height: null,
// 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: {
getHeight(e) {
this.height = e
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.state = item.index
this.list = [];
this.pageSum = 1
this.current = item.index
this.paramsQuery = {
state: item.index,
pageNum: 1,
pageSize: 5,
}
this.getList()
},
//
clickInfo() {
clickInfo(id) {
uni.navigateTo({
url: '/pages/listInfo/listInfo'
url: `/pages/listInfo/listInfo?id=${id}`
})
},
}
}
</script>
@ -97,6 +162,12 @@
<style lang="scss" scoped>
.work-container {
box-sizing: border-box;
.c-sticky {
position: fixed;
width: 100%;
z-index: 99;
}
}
.list-box {
@ -107,6 +178,12 @@
width: 50%;
}
.tab-box {
height: 80rpx;
background: red;
position: sticky;
}
.container-work {
width: 100%;
}

@ -1,18 +1,19 @@
<template>
<view class="work">
<NavbarBox title="工单整改" :color="color" :backShow="backShow" :background="background" @getHeight="getHeight()" />
<view class="from-box" :style="{paddingTop:height + 'px'}">
<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="value">
</u--input>
</view>
<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 class="item">
</view>
<!-- <view class="item">
<view class="item-lable">
<view class="lable-icon"> </view>
<view class="lable-text">整改时间</view>
@ -21,18 +22,18 @@
<u--input color="#95999D" placeholder="请输入内容" readonly fontSize="15" border="none" v-model="value2">
</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">
<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" multiple
:maxCount="10"></u-upload>
</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>
@ -40,7 +41,15 @@
</template>
<script>
import submit from '@/components/subBottom/subBottom.vue'
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
@ -49,29 +58,82 @@
return {
color: '#ffffff',
backShow: true,
background: 'url(http://www.jichuanglanhai.com/demo/wujiangtaishi-app-file/img/img@2x.png);background-size:100% 100%',
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: {
getHeight(e) {
this.height = e
},
afterRead(event) {
let lists = [].concat(event.file);
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
//
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: '提交成功'
})
})
console.log(fileListLen)
},
//
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)
},

@ -1,90 +1,89 @@
@font-face {
font-family: "iconfont";
src: url('/static/font/iconfont.ttf') format('truetype');
font-family: "iconfont";
src: url('@/static/font/iconfont.ttf') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
display: inline-block;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: "iconfont" !important;
font-size: 16px;
display: inline-block;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-user:before {
content: "\e7ae";
content: "\e7ae";
}
.icon-password:before {
content: "\e8b2";
content: "\e8b2";
}
.icon-code:before {
content: "\e699";
content: "\e699";
}
.icon-setting:before {
content: "\e6cc";
content: "\e6cc";
}
.icon-share:before {
content: "\e739";
content: "\e739";
}
.icon-edit:before {
content: "\e60c";
content: "\e60c";
}
.icon-version:before {
content: "\e63f";
content: "\e63f";
}
.icon-service:before {
content: "\e6ff";
content: "\e6ff";
}
.icon-friendfill:before {
content: "\e726";
content: "\e726";
}
.icon-community:before {
content: "\e741";
content: "\e741";
}
.icon-people:before {
content: "\e736";
content: "\e736";
}
.icon-dianzan:before {
content: "\ec7f";
content: "\ec7f";
}
.icon-right:before {
content: "\e7eb";
content: "\e7eb";
}
.icon-logout:before {
content: "\e61d";
content: "\e61d";
}
.icon-help:before {
content: "\e616";
content: "\e616";
}
.icon-github:before {
content: "\e628";
content: "\e628";
}
.icon-aixin:before {
content: "\e601";
content: "\e601";
}
.icon-clean:before {
content: "\e607";
content: "\e607";
}
.icon-refresh:before {
content: "\e604";
content: "\e604";
}

@ -1,70 +1,31 @@
<template>
<view class="u-navbar">
<view
class="u-navbar__placeholder"
v-if="fixed && placeholder"
:style="{
<view class="u-navbar__placeholder" v-if="fixed && placeholder" :style="{
height: $u.addUnit($u.getPx(height) + $u.sys().statusBarHeight,'px'),
}"
></view>
<view :class="[fixed && 'u-navbar--fixed']">
<u-status-bar
v-if="safeAreaInsetTop"
:bgColor="bgColor"
></u-status-bar>
<view
class="u-navbar__content"
:class="[border && 'u-border-bottom']"
:style="{
}"></view>
<view :class="[fixed && 'u-navbar--fixed']" :style="{background: bgColor}">
<u-status-bar v-if="safeAreaInsetTop"></u-status-bar>
<view class="u-navbar__content" :class="[border && 'u-border-bottom']" :style="{
height: $u.addUnit(height),
backgroundColor: bgColor,
}"
>
<view
class="u-navbar__content__left"
hover-class="u-navbar__content__left--hover"
hover-start-time="150"
@tap="leftClick"
>
}">
<view class="u-navbar__content__left" hover-class="u-navbar__content__left--hover"
hover-start-time="150" @tap="leftClick">
<slot name="left">
<u-icon
v-if="leftIcon"
:name="leftIcon"
:size="leftIconSize"
:color="leftIconColor"
></u-icon>
<text
v-if="leftText"
:style="{
<u-icon v-if="leftIcon" :name="leftIcon" :size="leftIconSize" :color="leftIconColor"></u-icon>
<text v-if="leftText" :style="{
color: leftIconColor
}"
class="u-navbar__content__left__text"
>{{ leftText }}</text>
}" class="u-navbar__content__left__text">{{ leftText }}</text>
</slot>
</view>
<slot name="center">
<text
class="u-line-1 u-navbar__content__title"
:style="[{
<text class="u-line-1 u-navbar__content__title" :style="[{
width: $u.addUnit(titleWidth),
}, $u.addStyle(titleStyle)]"
>{{ title }}</text>
}, $u.addStyle(titleStyle)]">{{ title }}</text>
</slot>
<view
class="u-navbar__content__right"
v-if="$slots.right || rightIcon || rightText"
@tap="rightClick"
>
<view class="u-navbar__content__right" v-if="$slots.right || rightIcon || rightText" @tap="rightClick">
<slot name="right">
<u-icon
v-if="rightIcon"
:name="rightIcon"
size="20"
></u-icon>
<text
v-if="rightText"
class="u-navbar__content__right__text"
>{{ rightText }}</text>
<u-icon v-if="rightIcon" :name="rightIcon" size="20"></u-icon>
<text v-if="rightText" class="u-navbar__content__right__text">{{ rightText }}</text>
</slot>
</view>
</view>
@ -111,7 +72,7 @@
leftClick() {
// autoBack
this.$emit('leftClick')
if(this.autoBack) {
if (this.autoBack) {
uni.navigateBack()
}
},
@ -134,13 +95,14 @@
right: 0;
top: 0;
z-index: 11;
background-size: 100% 100% !important;
}
&__content {
@include flex(row);
align-items: center;
height: 44px;
background-color: #9acafc;
// background-color: #9acafc;
position: relative;
justify-content: center;
@ -156,7 +118,7 @@
&__left {
left: 0;
&--hover {
opacity: 0.7;
}

@ -1,8 +1,5 @@
<template>
<view
:style="[style]"
class="u-status-bar"
>
<view :style="[style]" class="u-status-bar">
<slot />
</view>
</template>
@ -21,15 +18,14 @@
name: 'u-status-bar',
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
data() {
return {
}
return {}
},
computed: {
style() {
const style = {}
// css使js
style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, 'px')
style.backgroundColor = this.bgColor
style.background = this.bgColor
return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))
}
},

@ -0,0 +1,13 @@
const iconTitle = {
wzltxgg: "违章乱贴小广告",
fjdcwt: "非机动车违章停车",
hwbllj: "环卫暴露垃圾",
ljtmy: "垃圾桶满溢",
yjls: "沿街晾晒",
mqzdjy: "门前占道经营",
ldtf: "流动摊贩",
jzlji: "建筑垃圾",
szjgqs: "市政井盖缺失",
dlkw: "道路开挖",
}
export default iconTitle
Loading…
Cancel
Save