Quellcode durchsuchen

加提交方法

qinhouyu vor 1 Jahr
Ursprung
Commit
c6fedbefe1
2 geänderte Dateien mit 26 neuen und 4 gelöschten Zeilen
  1. 24 2
      src/components/EngineePipe/index.vue
  2. 2 2
      src/components/ObsImageUpload/indexFile.vue

+ 24 - 2
src/components/EngineePipe/index.vue

@@ -103,6 +103,7 @@
           </el-row>
         </el-form>
         <div slot="footer" class="dialog-footer">
+          <el-button  type="primary" @click="submitData">提交</el-button>
           <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">{{keyWork}}</el-button>
           <el-button @click="cancel">取 消</el-button>
         </div>
@@ -121,9 +122,10 @@ import {getComprehensive, delComprehensive} from "@/api/zdsz/comprehensive";
 import {
   getEngineeList,                            // 查询工程列表
   addEnginee,                                // 新增工程
-  getDictList,
+  getDictList, putEngineeringPipeJacking,
 } from "@/api/zdsz/enginee"
-import EngineeNode from '@/components/EngineeNode/index'  // 节点信息
+import EngineeNode from '@/components/EngineeNode/index'
+// 节点信息
 
 export default {
   name: "EngineePipe",
@@ -284,6 +286,26 @@ export default {
     nodeCancel() {
       this.nodeDetailVisible = false
     },
+    submitData(){
+
+      this.queryParams.files = this.$refs.obsFileUpload.fileList;
+      if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
+        this.$message.warning('必须上传文件!')
+        return
+      }
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.queryParams.id != null) {
+            putEngineeringPipeJacking(this.queryParams).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            }).finally(() => {
+
+            });
+          }
+        }})
+    },
     toNodeDetail() {
       if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
         this.$message.warning('必须上传文件!')

+ 2 - 2
src/components/ObsImageUpload/indexFile.vue

@@ -122,6 +122,7 @@ export default {
     },
     // 删除文件
     handleDelete(index) {
+
       const obj = this.fileList[index];
       if(obj!=null) {
           this.fileList.splice(index, 1);
@@ -134,8 +135,7 @@ export default {
       if(findex > -1) {
           this.fileList.splice(findex, 1);
       }
-      console.log('000000000')
-      console.log(this.fileList)
+
       this.$emit("removeFile", this.fileList);
     },
     // 上传成功回调