menchuang 1 éve
szülő
commit
29ebf127c5

+ 28 - 18
pages/dangerous/dangerous.vue

@@ -325,22 +325,28 @@
 			<view class="uni-list">
 				<view class="align-items" style="margin-bottom: 20px;">
 					<view class="container" style="color: gainsboro;">*请上传文件</view>
-					<view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
+					<view>
+						<!-- style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;" -->
 						<image src="/static/images/chooseimg.png" mode=""
 							style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="chooseFile()"></image>
 						<view v-for="(item,index) in fileArr" :key="index" style="position: relative;">
 							<view style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
 								{{item.fileName}}
-								<image :src="item.picUrl" mode=""
+								<image
+									v-if="item.picUrl.substring(item.picUrl.length - 3) == 'png' || item.picUrl.substring(item.picUrl.length - 3) == 'jpg' || item.picUrl.substring(item.picUrl.length - 4) == 'jpeg' "
+									:src="item.picUrl" @click="this.showPhoto(index,fileArr)" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
+								</image>
+								<video v-else-if="item.picUrl.substring(item.picUrl.length - 3) == 'mp4'" :src="item.picUrl"
+									style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
+								</video>
+								<image v-else :src="item.picUrl"
 									style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
 								</image>
-
 							</view>
-
 							<view v-if="isShowRemoveFile(item)" @click="removeFile(index)"
 								style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
-								<image src="../../static/images/icon_close.png"
-									style=" width: 15px; height: 15px;"></image>
+								<image src="../../static/images/icon_close.png" style=" width: 15px; height: 15px;">
+								</image>
 							</view>
 						</view>
 					</view>
@@ -401,6 +407,14 @@
 			isEmpty(str) {
 				return (!str || 0 === str.length);
 			},
+			showPhoto(index, list) {
+				console.log("index:"+index+"_list:"+list)
+				uni.previewImage({
+					current: index,
+					urls: list,
+				})
+
+			},
 			pickerShow(e) {
 				if (e == 'name') {
 					this.open = true;
@@ -429,10 +443,10 @@
 					this.isNeedSupport = this.projectObj.needSupport == "1";
 					if (this.isNeedSupport) {
 						this.needSupportText = "是";
-						this.projectObj.needSupport="1";
+						this.projectObj.needSupport = "1";
 					} else {
 						this.needSupportText = "否";
-						this.projectObj.needSupport="0";
+						this.projectObj.needSupport = "0";
 					}
 
 					this.isBushing = this.projectObj.casingPresent == "1";
@@ -475,7 +489,7 @@
 				uni.chooseMessageFile({
 					// sizeType: ['album', 'camera'],
 					type: 'all',
-					extension: ['dwg', 'dwt', 'doc', 'docx', 'xls', 'xlsx', 'jpg', 'png', 'jpeg', 'mp4'],
+					// extension: ['dwg', 'dwt', 'doc', 'docx', 'xls', 'xlsx', 'jpg', 'png', 'jpeg', 'mp4'],
 					success(resp) {
 						resp.tempFiles.forEach((item, index) => {
 							const task = uni.uploadFile({
@@ -536,14 +550,10 @@
 					},
 				})
 			},
-			isShowRemoveFile(item){
-				var isShow=item.createBy==this.$user.name;
-				console.log("isShow:"+isShow)
-				if(isShow){
-					return true;
-				}else{
-					return false;
-				}
+			isShowRemoveFile(item) {
+				var isShow = item.createBy == this.$user.state.name;
+				console.log("isShow:" + isShow + "_name:" + this.$user.state.name + "_createBy:" + item.createBy)
+				return isShow;
 			},
 			removeFile(index) {
 				uni.showModal({
@@ -681,7 +691,7 @@
 				}
 				this.projectObj.enginTime = this.projectTime;
 				this.projectObj.pics = this.fileArr;
-				
+
 				updateDangerousWorkProject(this.projectObj).then(res => {
 					this.$modal.msg(res.msg);
 					uni.navigateBack();

+ 0 - 1
pages/enginproject/enginproject.vue

@@ -355,7 +355,6 @@
 
 			onLoad(options) {
 				if ('params' in options) {
-					debugger
 					this.objValue = JSON.parse(decodeURIComponent(options.params));
 					// if (this.objValue.enginType == `old_renovation`) {
 					// 	this.title = '旧改工程-庭院'

+ 6 - 6
pages/statistics/statistics.vue

@@ -225,11 +225,11 @@
 					<image class="block-iv" src="../../static/images/ic_legend.png"></image>
 					<text style="margin-right: 20px;margin-left: 5px;">图例: </text>
 					<div class="block-iv" style="background-color: #80d9ae;"></div>
-					<text style="margin-right: 20px;margin-left: 5px;">工</text>
+					<text style="margin-right: 20px;margin-left: 5px;">工</text>
 					<div class="block-iv" style="background-color: #5bd3ff;"></div>
-					<text style="margin-right: 20px;margin-left: 5px;">未完工</text>
+					<text style="margin-right: 20px;margin-left: 5px;">施工中</text>
 					<div class="block-iv" style="background-color: #ffc881;"></div>
-					<text style="margin-right: 20px;margin-left: 5px;">未工</text>
+					<text style="margin-right: 20px;margin-left: 5px;">未工</text>
 				</view>
 
 			</view>
@@ -540,11 +540,11 @@
 				if (this.isEmpty(status)) {
 					return "#fff";
 				}
-				if (status == '未完工') {
+				if (status == '施工中') {
 					return "#5bd3ff";
-				} else if (status == '未工') {
+				} else if (status == '未工') {
 					return "#ffc881";
-				} else if (status == '工') {
+				} else if (status == '工') {
 					return "#80d9ae";
 				}
 			}

+ 1 - 0
plugins/index.js

@@ -15,5 +15,6 @@ export default {
 		//校验
 		Vue.prototype.$validation = validation
 		Vue.prototype.$user = user
+		console.log(111)
 	}
 }

+ 0 - 1
store/modules/user.js

@@ -69,7 +69,6 @@ const user = {
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
-		  debugger
           commit('SET_NAME', username)
           commit('SET_AVATAR', avatar)
           resolve(res)