浏览代码

Merge branch 'zdsz3.0' of http://192.168.10.18:3000/wangtong/zd_wechatApp into zdsz3.0

menchuang 1 年之前
父节点
当前提交
92821bb5ad
共有 4 个文件被更改,包括 199 次插入3175 次删除
  1. 14 2
      components/mypopup/mypopup.vue
  2. 55 19
      pages/enginproject/enginproject.vue
  3. 13 11
      plugins/index.js
  4. 117 3143
      static/scss/colorui.css

+ 14 - 2
components/mypopup/mypopup.vue

@@ -1,7 +1,14 @@
 <template>
 	<view class="popup" v-show="show">
 		<view class="popup-info">
-			<view class="popup-title"> {{titleText}}</view>
+			<view class="popup-title"> {{titleText}}
+
+
+				<view @click="close()"
+					style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;width: 15px;height: 15px;">
+					<image src="../../static/images/icon_close.png" style=" width: 15px; height: 15px;"></image>
+				</view>
+			</view>
 			<view class="popup-text">{{popupText}}</view>
 			<view class="popup-btn">
 				<view class="btn-left" @click="cancel">{{cancelText}}</view>
@@ -39,9 +46,14 @@
 			}
 		},
 		data() {
-			return {};
+			return {
+				show: this.show,
+			};
 		},
 		methods: {
+			close() {
+				this.$parent.show_loding = false
+			},
 			cancel() {
 				this.$emit('close')
 			},

+ 55 - 19
pages/enginproject/enginproject.vue

@@ -119,6 +119,11 @@
 									{{item.fileName}}
 
 								</view>
+								<view @click="removeFile(index)" v-if="this.$user.state.name==this.createBy"
+									style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+									<image src="../../static/images/icon_close.png" style=" width: 15px; height: 15px;">
+									</image>
+								</view>
 
 							</view>
 						</view>
@@ -166,7 +171,7 @@
 								<view>
 									材质
 								</view>
-								<view class="uni-list-cell-db"  @click="pickerShow('cz',index)">
+								<view class="uni-list-cell-db" @click="pickerShow('cz',index)">
 									<span style="color: black;">{{a.cz.id==''?'请选择材质':a.cz.name}}</span>
 									<image src="../../static/images/icon_right.png"
 										style=" position: absolute; width: 15px;height: 15px;"></image>
@@ -190,8 +195,8 @@
 								<text>数量</text>
 								<input class="uni-input" type="number" v-model="a.sl" placeholder="请填写数量" maxlength="11"
 									style="margin-left: 10px;text-align: right;"></input>
-									<image src="../../static/images/icon_right.png"
-										style=" position: absolute; width: 15px;height: 15px;"></image>
+								<image src="../../static/images/icon_right.png"
+									style=" position: absolute; width: 15px;height: 15px;"></image>
 							</view>
 							<button v-if="index!=0" @click="this.czggslList.splice(index,1)">删除</button>
 						</view>
@@ -217,8 +222,8 @@
 								</view>
 								<view @click="remove(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>
@@ -264,6 +269,7 @@
 			getToken
 		} from '../../utils/auth';
 
+		import storage from '../../utils/storage';
 		export default {
 			components: {
 				SelectPicker,
@@ -275,6 +281,12 @@
 
 
 				return {
+					user: {
+						nickName: "",
+						phonenumber: "",
+						email: "",
+						sex: ""
+					},
 					historyList: {}, //历史数据
 					show_loding: false,
 					popupText: '', //对话框内容
@@ -298,7 +310,7 @@
 						Authorization: "Bearer " + getToken()
 					},
 					time: '', //施工时间
-					
+
 					loading: false,
 					loadingFile: false,
 					projectType: {}, //工程类型
@@ -331,6 +343,7 @@
 					enginId: '', //工程id
 					createTime: '',
 					infonId: '', //info id
+					createBy: '',
 
 				}
 			},
@@ -361,6 +374,13 @@
 			methods: {
 				//判断是否选择
 
+				// getUser() {
+				// 	console.log("aaaa", this.$user.state.name)
+				// 	getUserProfile().then(response => {
+				// 		//this.user = response.data.user
+				// 		console.log("dddd", response.data)
+				// 	})
+				// },
 				isEmpty(str) {
 
 					return (!str || 0 === str.length);
@@ -383,8 +403,9 @@
 					let h = time.getHours();
 					let mm = time.getMinutes();
 					let s = time.getSeconds();
-					return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this.addTimes(
-						mm) + ':' + this.addTimes(s);
+					return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this
+						.addTimes(
+							mm) + ':' + this.addTimes(s);
 
 
 				},
@@ -433,10 +454,11 @@
 						this.open = true;
 						//请求
 						console.log("sss", this.objValue.value)
-						getengineeringNameList(this.projectType.dictValue, "1", this.objValue.value).then(response => {
+						getengineeringNameList(this.projectType.dictValue, "1", this.objValue.value).then(
+							response => {
 
-							this.selectList = response.data;
-						});
+								this.selectList = response.data;
+							});
 
 
 					}
@@ -446,7 +468,7 @@
 				},
 
 
-			
+
 				showPhoto(index) {
 					uni.previewImage({
 						current: index,
@@ -454,7 +476,20 @@
 					})
 
 				},
-				
+				removeFile(index) {
+					uni.showModal({
+						title: '提示',
+						content: '是否删除该文件?',
+						success: (res) => {
+							if (res.confirm) {
+								this.fileArr.splice(index, 1)
+								this.fileNameArr.splice(index, 1)
+								console.log('this.fileArr', this.fileArr)
+
+							}
+						}
+					})
+				},
 				remove(index) {
 					uni.showModal({
 						title: '提示',
@@ -511,7 +546,8 @@
 											_this.$modal.msg(data.msg)
 										} else {
 											if (_this.progress === 100) {
-												console.log('_this.progress', _this.progress)
+												console.log('_this.progress', _this
+													.progress)
 												//console.log('data----', data)data
 												console.log('res--', res)
 												_this.imgArr.push(data.data.url)
@@ -628,6 +664,7 @@
 					this.fileArr = ''
 					this.createTime = '';
 					this.infonId = '';
+					this.createBy = '';
 
 				},
 				changeSelect(item, index) {
@@ -658,6 +695,7 @@
 							uni.hideLoading();
 							console.log("res", response)
 							//	this.enginList = response.data
+							this.createBy = response.data.createBy;
 							this.jlPhoneValue = response.data.supervisionPhone; //监理电话
 							this.jlfzrValue = response.data.supervisionHead; //监理负责人
 							this.jldwValue = response.data.supervisionUnit; //监理单位
@@ -670,7 +708,8 @@
 							this.enginId = response.data.id; //工程id
 							this.fileArr = response.data.pics
 							this.createTime = response.data.createTime;
-							this.infonId = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0].id
+							this.infonId = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
+								.id
 						});
 					}
 				},
@@ -810,7 +849,7 @@
 						this.$modal.msg('请选择工程名称')
 						return
 					}
-					
+
 
 					try {
 						//console.log("刚开始", this.czggslList);
@@ -962,7 +1001,4 @@
 			min-height: 100upx;
 			line-height: 20px;
 		}
-
-	
-		
 	</style>

+ 13 - 11
plugins/index.js

@@ -2,16 +2,18 @@ import tab from './tab'
 import auth from './auth'
 import modal from './modal'
 import validation from '@/utils/test.js';
+import user from '../store/modules/user.js'
 
 export default {
-  install(Vue) {
-    // 页签操作
-    Vue.prototype.$tab = tab
-    // 认证对象
-    Vue.prototype.$auth = auth
-    // 模态框对象
-    Vue.prototype.$modal = modal
-	//校验
-	Vue.prototype.$validation=validation
-  }
-}
+	install(Vue) {
+		// 页签操作
+		Vue.prototype.$tab = tab
+		// 认证对象
+		Vue.prototype.$auth = auth
+		// 模态框对象
+		Vue.prototype.$modal = modal
+		//校验
+		Vue.prototype.$validation = validation
+		Vue.prototype.$user = user
+	}
+}

文件差异内容过多而无法显示
+ 117 - 3143
static/scss/colorui.css