menchuang 1 năm trước cách đây
mục cha
commit
2d14379445

+ 14 - 5
pages/dangerous/dangerous.vue

@@ -178,13 +178,13 @@
 
 					<text>危险作业坑大小(长,宽,深)</text>
 					<input class="uni-input" type="digit" v-model="projectObj.hazardousWorkPitsLong" placeholder="请输入长"
-						maxlength="100" style="margin-left: 10px;text-align: right;"></input>
+						maxlength="9" style="margin-left: 10px;text-align: right;"></input>
 
 					<input class="uni-input" type="digit" v-model="projectObj.hazardousWorkPitsWide" placeholder="请输入宽"
-						maxlength="100" style="margin-left: 10px;text-align: right;"></input>
+						maxlength="9" style="margin-left: 10px;text-align: right;"></input>
 
 					<input class="uni-input" type="digit" v-model="projectObj.hazardousWorkPitsDeep" placeholder="请输入深"
-						maxlength="100" style="margin-left: 10px;text-align: right;"></input>
+						maxlength="9" style="margin-left: 10px;text-align: right;"></input>
 				</view>
 			</view>
 
@@ -325,7 +325,7 @@
 			<view class="uni-list">
 				<view class="align-items" style="margin-bottom: 20px;">
 					<view class="container" style="color: gainsboro;">*请上传文件</view>
-					<view class="" 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;">
@@ -337,7 +337,7 @@
 
 							</view>
 
-							<view @click="removeFile(index)"
+							<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>
@@ -536,6 +536,15 @@
 					},
 				})
 			},
+			isShowRemoveFile(item){
+				var isShow=item.createBy==this.$user.name;
+				console.log("isShow:"+isShow)
+				if(isShow){
+					return true;
+				}else{
+					return false;
+				}
+			},
 			removeFile(index) {
 				uni.showModal({
 					title: '提示',

+ 1 - 0
pages/enginproject/enginproject.vue

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

+ 1 - 0
store/modules/user.js

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