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

评论增加批量审核;技师管理增加虚拟技师数量;

郭鹏飞 преди 8 месеца
родител
ревизия
ada22c5341

+ 9 - 0
src/api/system/comment.js

@@ -51,4 +51,13 @@ export function auditComment(data) {
     method: 'post',
     data: data
   })
+}
+
+// 批量审核评论
+export function batchAuditComment(data) {
+  return request({
+    url: '/tCommentUser/batchAudit',
+    method: 'post',
+    data: data
+  })
 }

+ 22 - 9
src/views/comment/auditModal.vue

@@ -24,7 +24,11 @@
 
 <script>
 import ModalView from '@/components/ZModalView/index.vue';
-import { auditComment } from "@/api/system/comment";
+import { 
+    auditComment, 
+    batchAuditComment
+} from "@/api/system/comment";
+
 export default {
     components: {
         ModalView
@@ -54,12 +58,20 @@ export default {
             this.$refs[formName].validate((valid) => {
                 if (valid) {
                     console.log(this.form);
-                    auditComment({
+                    let api = auditComment, params = { 
                         ...this.form,
                         commentId: this.oForm.id
-                    }).then(res => {
-                        this.$modal.msgSuccess("操作成功");
-                        this.resetForm('uForm');
+                    };
+                    if (Array.isArray(this.oForm.id)) {
+                        api = batchAuditComment;
+                        params = { 
+                            ...this.form,
+                            commentIds: this.oForm.id
+                        };
+                    }
+                    api(params).then(res => {
+                        this.$modal.msgSuccess(res.msg);
+                        this.resetForm('uForm', true);
                     });
                 } else {
                     console.log('error submit!!');
@@ -67,9 +79,9 @@ export default {
                 }
             });
         },
-        resetForm(formName) {
-            this.$refs[formName].resetFields();
-            this.close();
+        resetForm(n, f) {
+            this.$refs[n].resetFields();
+            this.close(f);
         },
         open(e) {
             if (e) {
@@ -79,7 +91,8 @@ export default {
             this.$refs.mv.open(this.title);
         },
         // 关闭弹窗
-        close() {
+        close(f = false) {
+            if (f) this.$emit('close');
             this.$refs.mv.close();
         },
     }

+ 4 - 5
src/views/comment/index.vue

@@ -95,9 +95,9 @@
           icon="el-icon-bell"
           size="mini"
           :disabled="multiple"
-          @click="handleExport"
+          @click="handleAudit({ id: ids })"
           v-hasPermi="['system:comment:export']"
-        >审核</el-button>
+        >批量审核</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -207,7 +207,6 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-
     <!-- 导入对话框 -->
     <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
       <el-upload
@@ -238,7 +237,7 @@
       </div>
     </el-dialog>
     <!-- 审核 -->
-    <AuditModal ref="aModal" />
+    <AuditModal ref="aModal" @close="getList" />
   </div>
 </template>
   
@@ -352,7 +351,7 @@
       },
       // 多选框选中数据
       handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.cId)
+        this.ids = selection.map(item => item.id)
         this.single = selection.length!==1
         this.multiple = !selection.length
       },

+ 5 - 0
src/views/technician/details/details.vue

@@ -162,6 +162,11 @@
               <el-input type="number" v-model="jsInfos.virtualOrderNumber" placeholder="请输入虑拟订单数" />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="虚拟技师数量" prop="virtualTechNumber">
+              <el-input type="number" v-model="jsInfos.virtualTechNumber" placeholder="请输入虚拟技师数量" />
+            </el-form-item>
+          </el-col>
           <el-col :span="8">
             <el-form-item label="服务项目">
               <el-select

+ 13 - 5
src/views/technician/technician/index.vue

@@ -169,7 +169,7 @@
         <el-table-column label="佣金比例" align="center" prop="nBili" />
         <el-table-column label="已服务数量" align="center" prop="nNum" />
         <el-table-column label="虚拟订单数量" align="center" prop="virtualOrderNumber" />
-        <el-table-column label="虚拟位置" align="center" prop="virtualOrderNumber">
+        <el-table-column label="虚拟位置" align="center" prop="address">
           <template slot-scope="scope">
             <el-popover
               width="480"
@@ -188,7 +188,7 @@
             </el-popover>
           </template>
         </el-table-column>
-        <el-table-column label="虚拟技师数量" align="center" prop="virtualNumber" />
+        <el-table-column label="虚拟技师数量" align="center" prop="virtualTechNumber" />
         <el-table-column label="服务状态" align="center" prop="nStatus">
           <template slot-scope="scope">
             <span>{{ selectDictLabel(serviceState, scope.row.nStatus) }}</span>
@@ -377,7 +377,15 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="12">
+            <el-form-item label="虚拟技师数量" prop="virtualTechNumber">
+              <el-input-number v-model="form.virtualTechNumber" controls-position="right" 
+                :min="0" :precision="0" style="width: 100%" 
+                placeholder="请输入虚拟技师数量"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="是否带头像框" prop="nB1">
               <el-radio-group v-model="form.nB1">
                 <el-radio :label="0">否</el-radio>
@@ -385,7 +393,7 @@
               </el-radio-group>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="12">
             <el-form-item label="是否是新技师" prop="nB2">
               <el-radio-group v-model="form.nB2">
                 <el-radio :label="0">否</el-radio>
@@ -393,7 +401,7 @@
               </el-radio-group>
             </el-form-item>
           </el-col>
-          <el-col :span="8">
+          <el-col :span="12">
             <el-form-item label="是否有热度" prop="nB3">
               <el-radio-group v-model="form.nB3">
                 <el-radio :label="0">否</el-radio>