Sfoglia il codice sorgente

点检任务保存

lilei 4 anni fa
parent
commit
2ba09fc493

+ 19 - 5
hybrid/html/ddvideo.html

@@ -98,15 +98,15 @@
 								</div>
 								<div>
 									<!-- 不适用 -->
-									<a-icon @click="selZbResult(0,zb)" type="minus-circle" :class="zb.result=='NOT_WORK'?'choose-bsy':''" />
+									<a-icon @click="selZbResult(0,zb,zbIndex)" type="minus-circle" :class="zb.result=='NOT_WORK'?'choose-bsy':''" />
 								</div>
 								<div>
 									<!-- 不合格 -->
-									<a-icon @click="selZbResult(1,zb)" type="close-circle" :class="zb.result=='NOT_PASS'?'choose-bhg':''" />
+									<a-icon @click="selZbResult(1,zb,zbIndex)" type="close-circle" :class="zb.result=='NOT_PASS'?'choose-bhg':''" />
 								</div>
 								<div>
 									<!-- 合格 -->
-									<a-icon @click="selZbResult(2,zb)" type="check-circle" :class="zb.result=='PASS'?'choose-hg':''" />
+									<a-icon @click="selZbResult(2,zb,zbIndex)" type="check-circle" :class="zb.result=='PASS'?'choose-hg':''" />
 								</div>
 							</div>
 						</div>
@@ -140,7 +140,7 @@
 						</div>
 					</div>
 					<!-- 提交 -->
-					<div class="f-btns">
+					<div class="f-btns" v-if="allPf.length==zbItem.length">
 						<a-button size="large" @click="saveZbPlImgs" type="primary" block> 提交 </a-button>
 					</div>
 				</div>
@@ -179,6 +179,18 @@
 					let _this = this
 					moment.locale('zh-cn');
 				},
+				computed: {
+					// 判断是否全部评分
+					finishPc() {
+						let allPf = []
+						this.zbItem.map(item=>{
+							if(item.result&&item.result!=''){
+								allPf.push(true)
+							}
+						})
+						return allPf
+					}
+				},
 				methods: {
 					// 重置页面
 					resetPage() {
@@ -206,6 +218,7 @@
 					// 设置任务项列表
 					getTaskDetail(data) {
 						this.zbItem = JSON.parse(data)
+						this.showLoading = false
 					},
 					// 选择机位
 					onVideoListClick({
@@ -415,9 +428,10 @@
 						photoList[this.activeZbPhoto].photoPath = path
 					},
 					// 评分,0 不适用,1 不合格,2 合格
-					selZbResult(type, zb) {
+					selZbResult(type, zb, zbIndex) {
 						let result = ['NOT_WORK', 'NOT_PASS', 'PASS']
 						zb.result = result[type]
+						this.zbItem.splice(zbIndex, 1, zb)
 					},
 					// 保存指标评论及图片
 					saveZbPlImgs() {

+ 6 - 2
pages/spotCheck/spotCheck.vue

@@ -138,13 +138,17 @@
 			// 提交本次任务
 			submitTask(data){
 				const _this = this;
-				console.log(data,'savePointTask')
+				const params = {
+					id: this.taskId,
+					taskTargetDTOList: data
+				}
+				console.log(params,'savePointTask')
 				clzConfirm({
 					title: '提示',
 					content: '确定提交本次点检任务?',
 					success: function(res) {
 						if (res.confirm || res.index == 0) {
-							savePointTask(data).then(ret=>{
+							savePointTask(params).then(ret=>{
 								console.log(ret)
 								if(ret.status == 200){
 									_this.isClose = true

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff suppressed because it is too large
+ 9 - 9
unpackage/dist/dev/app-plus/app-view.js


Some files were not shown because too many files changed in this diff