Browse Source

添加反馈列表的删除

JXDS18FUJT 1 year ago
parent
commit
50d3dbebec
2 changed files with 16 additions and 5 deletions
  1. 8 0
      src/api/advise.js
  2. 8 5
      src/views/mobile/advise/index.vue

+ 8 - 0
src/api/advise.js

@@ -8,6 +8,14 @@ export function getList(params) {
     params
   });
 }
+//删除意见列表
+export function delList(ids) {
+  return request({
+    url: "/feed/back/"+ids,
+    method:'DELETE',
+    
+  });
+}
 
 // 订单退款
 // export function refundOrder(params) {

+ 8 - 5
src/views/mobile/advise/index.vue

@@ -65,7 +65,7 @@
           v-model="queryParams.content"
           placeholder="请输入名称"
           clearable
-          size="small"
+          size="small"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
@@ -205,9 +205,12 @@
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
-          <el-button @click="getAdviseImgFile(scope.row)" type="primary"
+          <el-button :disabled="scope.row.imgIds==null" @click="getAdviseImgFile(scope.row)" type="primary"
             >图片</el-button
           >
+           <el-button  @click="handleDelete(scope.row)" type="danger"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -253,7 +256,7 @@ import {
   getList,
   getError,
   refundOrder,
-  delError,
+  delList,
   addError,
   updateError,
   exportError,
@@ -450,13 +453,13 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$confirm('是否确认删除错题编号为"' + ids + '"的数据项?', "警告", {
+      this.$confirm('是否确认删除id为"' + ids + '"的数据项?', "警告", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
       })
         .then(function () {
-          return delError(ids);
+          return delList(ids);
         })
         .then(() => {
           this.getList();