Преглед на файлове

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy преди 2 години
родител
ревизия
80292c1aee

+ 6 - 5
src/HDrpManagement/ProductMag/index.vue

@@ -37,9 +37,10 @@
         <p :style="scope.data.column.data.isonsale === 1?'color:#52c41a':'color:red'" v-if="scope.data.column.columnname === 'isonsale'">
 <!--          {{scope.data.column.data.isonsale === 1?'上架中':'已下架'}}-->
           <el-switch
-              :active-value='scope.data.column.data.isonsale === 1'
-              :inactive-value='scope.data.column.data.isonsale === 0'
-              @change="isOnSaleChange(scope.data.column.data)">
+            v-model="scope.data.column.data.isonsale"
+            :active-value='1'
+            :inactive-value='0'
+            @change="isOnSaleChange(scope.data.column.data)">
           </el-switch>
         </p>
         <p v-else-if="scope.data.column.columnname === 'cover'">
@@ -103,13 +104,13 @@ export default {
   },
   methods:{
     async isOnSaleChange(val){
-      console.log("更改状态")
+      console.log("更改状态",val.isonsale)
       console.log(val)
       const res = await this.$api.requested({
         "id": 20220923154802,
         "content": {
           "itemids": [val.itemid],
-          "isonsale": val.isonsale === 1? 0 : 1 //0:下架,1:上架
+          "isonsale": val.isonsale//0:下架,1:上架
         },
       })
       this.tool.showMessage(res,()=>{

+ 3 - 6
src/HDrpManagement/ProductMag/modules/edit.vue

@@ -249,7 +249,7 @@ export default {
         },
       })
       this.form = Object.assign({},this.form,res.data)
-      fn()
+      fn?fn():''
     },
     async unitlist () {
       const res = await this.$api.requested({
@@ -303,11 +303,8 @@ export default {
       }
     },
     uploadSuccess(res){
-      console.log(res)
-      this.form.attinfos = JSON.parse(res.attinfos).data
-      console.log(this.form.attinfos)
-      this.$refs['upload'].dialogUploadVisible = false
-      this.showImage()
+      console.log(res,'----')
+      this.queryMain()
     },
     clearCover () {
       this.queryMain()

+ 7 - 1
src/components/normal-basic-layout/drawerDetail/index.vue

@@ -34,7 +34,13 @@ export default {
   },
   methods:{
     onShow () {
-      let query = {id:this.data[this.idName],rowindex:this.data.rowindex}
+      let key = ''
+      if (this.idName instanceof Array) {
+        key = this.idName[1]
+      } else {
+        key = this.idName
+      }
+      let query = {id:this.data[key],rowindex:this.data.rowindex}
       this.$router.push({path:this.detailPath.path,query:Object.assign({},query,this.detailPath.param)})
     },
     closeDrawer () {

+ 0 - 1
src/components/normal-basic-layout/index.vue

@@ -47,7 +47,6 @@
               <slot :data="scope" name="tbOpreation"></slot>
             </template>
           </tableTemp>
-          {{hidePagination}}
           <div v-if="!hidePagination" class="container normal-panel" style="text-align:right">
             <el-pagination
               background

+ 10 - 8
src/components/upload/test_upload.vue

@@ -52,8 +52,10 @@ export default {
       }
     },
     handleRemove (file, fileList) {
-     
       this.fileList = this.fileList.filter(e=>{
+        if (e.uid === file.uid) {
+          console.log(e)
+        }
         return e.uid !== file.uid
       })
       this.fileLinkList = this.fileLinkList.filter(e=>{
@@ -62,13 +64,13 @@ export default {
     },
     toUpload () {
       console.log(this.fileList)
-      this.fileList.forEach(file=>{
-        let index = file.raw.name.lastIndexOf(".");
-        let ext = file.name.substr(index + 1);
-        this.params.content.filename = file.raw.name
-        this.params.content.filetype = ext
-        this.getUploadUrl(file, ext)
-      })
+      // this.fileList.forEach(file=>{
+      //   let index = file.raw.name.lastIndexOf(".");
+      //   let ext = file.name.substr(index + 1);
+      //   this.params.content.filename = file.raw.name
+      //   this.params.content.filetype = ext
+      //   this.getUploadUrl(file, ext)
+      // })
      
     },