فهرست منبع

上传图片修改

qinhouyu 1 سال پیش
والد
کامیت
9f638df2f3

+ 2 - 3
src/components/ObsImageUpload/index.vue

@@ -123,21 +123,20 @@ export default {
   methods: {
     // 删除图片
     handleRemove(file, fileList) {
-      debugger
       const findex = this.fileList.map(f => f.url).indexOf(file.url);
       if(findex > -1) {
         if (file.url!=null){
           picDel({picUrl:file.url}).then(res=>{})
           this.fileList.splice(findex, 1);
         }
-        this.$emit("input", this.listToString(this.fileList));
       }
+      this.$emit("input", this.fileList);
     },
     // 上传成功回调
     handleUploadSuccess(res) {
       if (res.code == 200) {
         this.fileList.push({ name: res.data.fileName, url: res.data.url });
-        this.$emit("input", this.listToString(this.fileList));
+        this.$emit("input", this.fileList);
         this.loading.close();
       } else {
         this.$message.error(res.msg);

+ 2 - 1
src/views/zdsz/openbolt/index.vue

@@ -458,7 +458,6 @@ export default {
         this.loading = false;
         this.form = response.data;
         this.form.picIds = response.data.mapList;
-
         this.open = true;
         this.title = "修改开栓";
       });
@@ -467,6 +466,8 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          this.form.picIds = this.$refs.obsImageUpload.fileList.length>0?this.$refs.obsImageUpload.fileList.map(e=>e.url):[];
+          console.log(this.form.picIds)
           this.buttonLoading = true;
           if (this.form.id != null) {
             updateComprehensive(this.form).then(response => {

+ 2 - 0
src/views/zdsz/opencheck/index.vue

@@ -459,6 +459,8 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          this.form.picIds = this.$refs.obsImageUpload.fileList?this.$refs.obsImageUpload.fileList.map(e=>e.url):[];
+
           this.buttonLoading = true;
           if (this.form.id != null) {
             updateComprehensive(this.form).then(response => {

+ 2 - 0
src/views/zdsz/openrepair/index.vue

@@ -459,6 +459,8 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          this.form.picIds = this.$refs.obsImageUpload.fileList?this.$refs.obsImageUpload.fileList.map(e=>e.url):[];
+
           this.buttonLoading = true;
           if (this.form.id != null) {
             updateComprehensive(this.form).then(response => {