Pārlūkot izejas kodu

市政工程|工业工程 样式更改

刘浩男 1 gadu atpakaļ
vecāks
revīzija
a3719aecc9

+ 3 - 4
src/components/ObsImageUpload/indexFile.vue

@@ -130,14 +130,13 @@ export default {
     },
     // 删除图片
     handleRemove(file, fileList) {
-      debugger
       const findex = this.fileList.map(f => f.url).indexOf(file.url);
       if(findex > -1) {
-        if (file.url!=null){
           this.fileList.splice(findex, 1);
-        }
       }
-      this.$emit("input", this.fileList);
+      console.log('000000000')
+      console.log(this.fileList)
+      this.$emit("removeFile", this.fileList);
     },
     // 上传成功回调
     handleUploadSuccess(res) {

+ 7 - 9
src/views/zdsz/engineeringIndustry/index.vue

@@ -185,7 +185,7 @@
             <el-form-item label="附件" prop="files" v-if="currentType==='put'" style="width: 100%">
               <ObsFileUpload ref="obsFileUpload" :file-size="100"
                              :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"
-                             :value="form.pics"
+                             :value="form.pics" @removeFile="removeFile"
               ></ObsFileUpload>
             </el-form-item>
             <el-form-item label="附件" prop="files" v-if="currentType==='add'" style="width: 100%">
@@ -613,13 +613,10 @@ export default {
     },
     nodeCancel() {
       this.nodeDetailVisible = false
-      // 反向赋值 - 为了让附件回显
-      this.$refs.obsFileUpload.fileList = this.form.files
     },
     // 填写施工信息
     toNodeDetail() {
       // 根据材质id查询对应规格回显
-
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.nodeDetailVisible = true
@@ -688,6 +685,11 @@ export default {
       this.currentType = 'add'
       this.open = true;
     },
+    removeFile(val){
+      console.log(val)
+      console.log("我是文件")
+      this.form.files = val
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.loading = true;
@@ -712,9 +714,8 @@ export default {
         return
       }
       this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
-      console.log(this.form.zEngineeringNodeBo)
       this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
-      this.$refs["nodeForm"].validate(valid => {
+      this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id == null) {
             addEngineeEngineeIndustry(this.form).then(res => {
@@ -812,9 +813,6 @@ export default {
     display: inline-block;
   }
 
-  .el-form-item:nth-child(2n+2) {
-    margin-left: 5%;
-  }
 
   .el-form-item:not(:nth-child(1):nth-child(2)) {
     margin-top: 0.5%;