Browse Source

【pc端 添加网格实体化指标详情】-【页面修改】-(魏凯)-2020/12/09

master
weikai 5 years ago
parent
commit
20557b8c3f
  1. 58
      src/views/modules/kpi/kpisubpositiondetail.vue

58
src/views/modules/kpi/kpisubpositiondetail.vue

@ -28,7 +28,7 @@
:file-list="item1.images"
:limit=6
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-remove="(file,fileList) =>handleRemove(file,fileList, index,0,2)"
:on-success="(res, file,fileList) => handleAvatarSuccess( res, file,fileList, index,index1,2)"
:on-error="handelError"
:before-upload="beforeAvatarUpload"
@ -48,7 +48,7 @@
:before-remove="beforeFileRemove"
:file-list="item1.files"
:before-upload="beforeAvatarFileUpload"
:on-remove="handleFileRemove"
:on-remove="(file,fileList) =>handleFileRemove(file,fileList, index,0,2)"
:on-success="(res, file,fileList) =>handleAvatarFileSuccess( res, file,fileList, index,index1,2)"
:on-error="handelError"
:on-preview="handleFileCardPreview"
@ -78,7 +78,7 @@
:file-list="item.images"
:limit=6
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-remove="(file,fileList) =>handleRemove(file,fileList, index,0,1)"
:on-success="(res, file,fileList) => handleAvatarSuccess( res, file,fileList, index,0,1)"
:on-error="handelError"
:before-upload="beforeAvatarUpload"
@ -98,7 +98,7 @@
:before-remove="beforeFileRemove"
:file-list="item.files"
:before-upload="beforeAvatarFileUpload"
:on-remove="handleFileRemove"
:on-remove="(file,fileList) =>handleFileRemove(file,fileList, index,0,1)"
:on-success="(res, file,fileList) =>handleAvatarFileSuccess( res, file,fileList, index,0,1)"
:on-error="handelError"
:on-preview="handleFileCardPreview"
@ -131,7 +131,7 @@
<el-form>
<el-form-item style="margin-left:35px;">
<el-button type="primary" @click="backToUserRelationList">{{"返回"}}</el-button>
<el-button v-if="this.status === '0'" type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
<el-button v-if="status === '0'" type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
<el-button v-if="status === '1'" type="primary" @click="firstTrial()">初审</el-button>
<el-button v-if="status === '2'" type="primary" @click="acceptance()">验收</el-button>
</el-form-item>
@ -307,14 +307,26 @@ export default {
}
}
},
handleRemove (file, fileList) {
for (var i = 0; i < this.dataForm.images.length; i++) {
let item = this.dataForm.images[i]
if (item.url === file.url) {
this.dataForm.images.splice(i, 1)
handleRemove (file, fileList,index,index1,type) {
if(type ===2){
for (var i = 0; i < this.checkDiction[index].childDiction[index1].images.length; i++) {
let item = this.checkDiction[index].childDiction[index1].images[i]
if (item.url === file.url) {
this.checkDiction[index].childDiction[index1].images.splice(i, 1)
this.hideUpload = this.checkDiction[index].childDiction[index1].images.length >= 6
}
this.hideUpload = this.checkDiction[index].childDiction[index1].images.length >= 6
}
}
this.hideUpload = this.dataForm.images.length >= 6
}else {
for (var i = 0; i < this.checkDiction[index].images.length; i++) {
let item = this.checkDiction[index].images[i]
if (item.url === file.url) {
this.checkDiction[index].images.splice(i, 1)
}
}
this.hideUpload = this.checkDiction[index].images.length >= 6
}
},
handlePictureCardPreview (file) {
this.dialogImageUrl = file.url
@ -344,13 +356,25 @@ export default {
this.checkDiction[index].files.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 2, fileName: res.data.fileName })
}
},
handleFileRemove (file, fileList) {
for (var i = 0; i < this.dataForm.files.length; i++) {
let item = this.dataForm.files[i]
if (item.url === file.url) {
this.dataForm.files.splice(i, 1)
handleFileRemove (file, fileList,index,index1,type) {
if (type == 2){
for (var i = 0; i < this.checkDiction[index].childDiction[index1].files.length; i++) {
let item = this.checkDiction[index].childDiction[index1].files[i]
if (item.url === file.url) {
this.checkDiction[index].childDiction[index1].files.splice(i, 1)
}
this.hideUpload = this.checkDiction[index].childDiction[index1].images.length >= 6
}
}else {
for (var i = 0; i < this.checkDiction[index].files.length; i++) {
let item = this.checkDiction[index].files[i]
if (item.url === file.url) {
this.checkDiction[index].images.splice(i, 1)
}
this.hideUpload = this.checkDiction[index].files.length >= 6
}
}
},
beforeAvatarFileUpload (file) {
this.fileloading = true

Loading…
Cancel
Save