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

退单、动态管理联调

lishanshan преди 7 месеца
родител
ревизия
bfafa9344e
променени са 6 файла, в които са добавени 214 реда и са изтрити 252 реда
  1. 27 0
      src/api/system/dynamic.js
  2. 4 3
      src/utils/dict/LocalDicts.js
  3. 38 107
      src/views/cancelOrder/cancelOrderAudit.vue
  4. 7 17
      src/views/cancelOrder/index.vue
  5. 85 65
      src/views/dynamic/dynamicAudit.vue
  6. 53 60
      src/views/dynamic/index.vue

+ 27 - 0
src/api/system/dynamic.js

@@ -0,0 +1,27 @@
+import request from '@/utils/request'
+
+// 查询动态列表
+export function getDynamicList(data) {
+  return request({
+    url: '/api/moment/v1/manage/list',
+    method: 'get',
+    params: data
+  })
+}
+
+// 查询动态详情
+export function getDynamicDetail(id) {
+  return request({
+    url: `/api/moment/v1/simple/detail/${id}`,
+    method: 'get'
+  })
+}
+
+// 审核动态
+export function auditDynamic(data) {
+  return request({
+    url: '/api/moment/v1/manage/audit',
+    method: 'post',
+    data
+  })
+}

+ 4 - 3
src/utils/dict/LocalDicts.js

@@ -46,9 +46,9 @@ export default {
     // 动态审核状态
     // 动态审核状态
     local_dynamic_audit: {
     local_dynamic_audit: {
         values: [
         values: [
-            { label: "待审核", value: '0' },
-            { label: "审核通过", value: '1' },
-            { label: "审核驳回", value: '2' },
+            { label: "待审核", value: 1 },
+            { label: "审核通过", value: 2 },
+            { label: "审核驳回", value: 3 },
         ],
         ],
     },
     },
     // 退款审核状态
     // 退款审核状态
@@ -56,6 +56,7 @@ export default {
         values: [
         values: [
             { label: "待审核", value: '0' },
             { label: "待审核", value: '0' },
             { label: "已审核", value: '1' },
             { label: "已审核", value: '1' },
+            { label: "已取消", value: '2' },
         ],
         ],
     },
     },
 
 

+ 38 - 107
src/views/cancelOrder/cancelOrderAudit.vue

@@ -18,10 +18,7 @@
         label-width="90px"
         label-width="90px"
       >
       >
         <el-form-item label="订单号">
         <el-form-item label="订单号">
-          <el-input
-            v-model="form.orderNo"
-            disabled
-          />
+          <el-input v-model="form.orderNo" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="下单时间">
         <el-form-item label="下单时间">
           <el-input v-model="form.dtCreateTime" disabled />
           <el-input v-model="form.dtCreateTime" disabled />
@@ -30,46 +27,25 @@
           <el-input v-model="form.statusName" disabled />
           <el-input v-model="form.statusName" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="用户姓名">
         <el-form-item label="用户姓名">
-          <el-input
-            v-model="form.cName"
-            disabled
-          />
+          <el-input v-model="form.cName" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="用户电话">
         <el-form-item label="用户电话">
-          <el-input
-            v-model="form.cPhone"
-            disabled
-          />
+          <el-input v-model="form.cPhone" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="技师姓名">
         <el-form-item label="技师姓名">
-          <el-input
-            v-model="form.jsName"
-            disabled
-          />
+          <el-input v-model="form.jsName" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="技师昵称">
         <el-form-item label="技师昵称">
-          <el-input
-            v-model="form.cNickName"
-            disabled
-          />
+          <el-input v-model="form.cNickName" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="技师电话">
         <el-form-item label="技师电话">
-          <el-input
-            v-model="form.jsPhone"
-            disabled
-          />
+          <el-input v-model="form.jsPhone" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="总金额">
         <el-form-item label="总金额">
-          <el-input
-            v-model="form.totalPrice"
-            disabled
-          />
+          <el-input v-model="form.totalPrice" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="项目金额">
         <el-form-item label="项目金额">
-          <el-input
-            v-model="form.dPrice"
-            disabled
-          />
+          <el-input v-model="form.projectPrice" disabled />
         </el-form-item>
         </el-form-item>
         <el-form-item label="车费">
         <el-form-item label="车费">
           <el-input v-model="form.fare" disabled />
           <el-input v-model="form.fare" disabled />
@@ -116,7 +92,6 @@
           <el-input
           <el-input
             v-model="form.cancelReason"
             v-model="form.cancelReason"
             type="textarea"
             type="textarea"
-            placeholder="申请退款,务必退款"
             :rows="3"
             :rows="3"
             disabled
             disabled
           />
           />
@@ -124,18 +99,12 @@
         <el-row>
         <el-row>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="项目名称">
             <el-form-item label="项目名称">
-              <el-input
-                v-model="form.cTitle"
-                disabled
-              />
+              <el-input v-model="form.projectName" disabled />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="项目时长">
             <el-form-item label="项目时长">
-              <el-input
-                v-model="form.nMinute"
-                disabled
-              />
+              <el-input v-model="form.projectDuration" disabled />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -147,7 +116,7 @@
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="项目金额">
             <el-form-item label="项目金额">
-              <el-input v-model="form.dPrice" disabled />
+              <el-input v-model="form.projectPrice" disabled />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -159,28 +128,19 @@
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="优惠金额">
             <el-form-item label="优惠金额">
-              <el-input
-                v-model="form.preferential"
-                disabled
-              />
+              <el-input v-model="form.preferential" disabled />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
         <el-row>
         <el-row>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="服务状态">
             <el-form-item label="服务状态">
-              <el-input
-                v-model="form.nStatus"
-                disabled
-              />
+              <el-input v-model="form.statusName" disabled />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="12">
           <el-col :span="12">
             <el-form-item label="服务时长">
             <el-form-item label="服务时长">
-              <el-input
-                v-model="form.serviceDuration"
-                disabled
-              />
+              <el-input v-model="form.serviceDuration" disabled />
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -228,7 +188,7 @@
             <el-button type="primary" plain @click="nextStep = !nextStep">{{
             <el-button type="primary" plain @click="nextStep = !nextStep">{{
               nextText
               nextText
             }}</el-button>
             }}</el-button>
-            <el-button type="primary" @click="reviewForm">确 认</el-button>
+            <el-button type="primary" @click="submit">确 认</el-button>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -260,42 +220,15 @@ export default {
       isDisabled: false,
       isDisabled: false,
       nextStep: false,
       nextStep: false,
       id: '', // 主键id
       id: '', // 主键id
-      // 表单参数
-      form: {
-        js: {
-          cName: '',
-          cPhone: '',
-          cNickName: '',
-        },
-        oldJs: {
-          cName: '',
-          cPhone: '',
-        },
-        cGoods: [],
-      },
+      form: {},
       arrival: '',
       arrival: '',
       depart: '',
       depart: '',
     }
     }
   },
   },
   methods: {
   methods: {
     open(e) {
     open(e) {
-      debugger
-      console.log(3);
-
-
       this.id = e.id
       this.id = e.id
-      this.form = {
-        js: {
-          cName: '',
-          cPhone: '',
-          cNickName: '',
-        },
-        oldJs: {
-          cName: '',
-          cPhone: '',
-        },
-        cGoods: [],
-      }
+      this.form = {}
       this.arrival = ''
       this.arrival = ''
       this.depart = ''
       this.depart = ''
       this.$refs.mv.open(this.title)
       this.$refs.mv.open(this.title)
@@ -320,28 +253,7 @@ export default {
         }
         }
       })
       })
     },
     },
-    /**解析经纬度 */
-    async fetchLocation(title, location) {
-      const key = '5457092e6c62b83c1b2e45dbe973d858'
-      const url = `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${location}&key=${key}&radius=500&extensions=all`
-      try {
-        const response = await fetch(url)
-        const data = await response.json()
-        if (title == 'arrival') {
-          data.regeocode.formatted_address.length > 0
-            ? (this.arrival = data.regeocode.formatted_address)
-            : ''
-        } else if (title == 'depart') {
-          // this.depart = data.regeocode.formatted_address;
-          data.regeocode.formatted_address.length > 0
-            ? (this.depart = data.regeocode.formatted_address)
-            : (this.depart = '')
-        }
-      } catch (error) {
-        console.error('请求失败:', error)
-      }
-    },
-    reviewForm() {
+    submit() {
       if (!this.form.refundAmount) {
       if (!this.form.refundAmount) {
         this.$message.error('请输入退款金额')
         this.$message.error('请输入退款金额')
         return
         return
@@ -361,12 +273,31 @@ export default {
         }
         }
       })
       })
     },
     },
-    // 关闭对话框
     close() {
     close() {
       this.nextStep = false
       this.nextStep = false
       this.$refs.mv.close()
       this.$refs.mv.close()
       this.$emit('close')
       this.$emit('close')
     },
     },
+    /**解析经纬度 */
+    async fetchLocation(title, location) {
+      const key = '5457092e6c62b83c1b2e45dbe973d858'
+      const url = `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${location}&key=${key}&radius=500&extensions=all`
+      try {
+        const response = await fetch(url)
+        const data = await response.json()
+        if (title == 'arrival') {
+          data.regeocode.formatted_address.length > 0
+            ? (this.arrival = data.regeocode.formatted_address)
+            : ''
+        } else if (title == 'depart') {
+          data.regeocode.formatted_address.length > 0
+            ? (this.depart = data.regeocode.formatted_address)
+            : (this.depart = '')
+        }
+      } catch (error) {
+        console.error('请求失败:', error)
+      }
+    },
   },
   },
 }
 }
 </script>
 </script>

+ 7 - 17
src/views/cancelOrder/index.vue

@@ -89,7 +89,7 @@
     </el-form>
     </el-form>
 
 
     <el-row :gutter="10" class="mb8">
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
         <el-button
           type="warning"
           type="warning"
           plain
           plain
@@ -99,7 +99,7 @@
           v-hasPermi="['system:order:export']"
           v-hasPermi="['system:order:export']"
           >导出</el-button
           >导出</el-button
         >
         >
-      </el-col>
+      </el-col> -->
       <right-toolbar
       <right-toolbar
         :showSearch.sync="showSearch"
         :showSearch.sync="showSearch"
         @queryTable="getList"
         @queryTable="getList"
@@ -135,7 +135,7 @@
         <el-table-column label="退款金额" align="center" prop="refundAmount" />
         <el-table-column label="退款金额" align="center" prop="refundAmount" />
         <el-table-column label="审核状态" align="center" prop="auditStatus">
         <el-table-column label="审核状态" align="center" prop="auditStatus">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <span>{{ selectDictLabel('local_refund_audit', scope.row.auditStatus) }}</span>
+            <span>{{ selectDictLabel(dict.type.local_refund_audit, scope.row.auditStatus) }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column
@@ -167,7 +167,7 @@
               "
               "
               @click="handleReview(scope.row)"
               @click="handleReview(scope.row)"
               >{{
               >{{
-                scope.row.auditStatus == '1' ? '查看详情' : '审核'
+                scope.row.auditStatus == '1' ? '详情' : '审核'
               }}</el-button
               }}</el-button
             >
             >
           </template>
           </template>
@@ -198,18 +198,10 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      // 遮罩层
       loading: true,
       loading: true,
-      // 显示搜索条件
       showSearch: true,
       showSearch: true,
-      // 总条数
       total: 0,
       total: 0,
-      // 认领表格数据
       orderList: [],
       orderList: [],
-      // 弹出层标题
-      title: '',
-      // 是否显示弹出层
-      open: false,
       // 查询参数
       // 查询参数
       queryParams: {
       queryParams: {
         current: 1,
         current: 1,
@@ -228,7 +220,6 @@ export default {
     this.getList()
     this.getList()
   },
   },
   methods: {
   methods: {
-    // 退款订单列表
     getList() {
     getList() {
       this.loading = true
       this.loading = true
       // 处理日期区间
       // 处理日期区间
@@ -237,7 +228,7 @@ export default {
         params.startTime = params.dateRange[0]
         params.startTime = params.dateRange[0]
         params.endTime = params.dateRange[1]
         params.endTime = params.dateRange[1]
       }
       }
-      delete params.dateRange // 删除前端使用的 dateRange 参数
+      delete params.dateRange
 
 
       refundOrderList(params)
       refundOrderList(params)
         .then(res => {
         .then(res => {
@@ -261,14 +252,13 @@ export default {
         auditStatus: null,
         auditStatus: null,
         dateRange: null,
         dateRange: null,
       }
       }
-      // this.resetForm("form");
     },
     },
-    /** 搜索按钮操作 */
+    // 查询
     handleQuery() {
     handleQuery() {
       this.queryParams.current = 1
       this.queryParams.current = 1
       this.getList()
       this.getList()
     },
     },
-    /** 重置按钮操作 */
+    // 重置
     resetQuery() {
     resetQuery() {
       this.reset()
       this.reset()
       this.handleQuery()
       this.handleQuery()

+ 85 - 65
src/views/dynamic/dynamicAudit.vue

@@ -2,28 +2,33 @@
   <ModalView
   <ModalView
     ref="mv"
     ref="mv"
     cname="ElDialog"
     cname="ElDialog"
+    :title="title"
     :viewProps="{
     :viewProps="{
-      width: '50%',
+      width: '45%',
       customClass: 'auditModal',
       customClass: 'auditModal',
     }"
     }"
+    @close="close"
   >
   >
-    <!-- 动态信息展示区域 -->
     <div class="dynamic-info">
     <div class="dynamic-info">
-      <div class="dynamic-title">{{ oForm.projectName }}</div>
+      <div class="dynamic-title">{{ auditForm.title }}</div>
       <div class="dynamic-content">
       <div class="dynamic-content">
-        {{ oForm.projectContent || '暂无内容' }}
+        {{ auditForm.content }}
       </div>
       </div>
-      <!-- 图片展示区域 -->
-      <div class="media-section" v-if="oForm.cImgList">
-        <ImageUpload v-model="oForm.cImgList" :limit="9" :readonly="true" />
+      <!-- 图片 -->
+      <div class="media-section" v-if="auditForm.mediaType === 1">
+        <ImageUpload
+          v-model="auditForm.mediaUrls"
+          :limit="9"
+          :readonly="true"
+        />
       </div>
       </div>
-      <!-- 视频展示区域 -->
-      <div class="media-section" v-if="oForm.cVideoUrl">
+      <!-- 视频 -->
+      <div class="media-section" v-if="auditForm.mediaType === 2">
         <div class="video-container">
         <div class="video-container">
           <video
           <video
             class="video-preview"
             class="video-preview"
-            v-if="oForm.cVideoUrl"
-            :src="getVideoUrl(oForm.cVideoUrl)"
+            v-if="auditForm.videoUrl"
+            :src="getVideoUrl(auditForm.videoUrl)"
             controls
             controls
           ></video>
           ></video>
         </div>
         </div>
@@ -33,32 +38,41 @@
     <!-- 审核表单 -->
     <!-- 审核表单 -->
     <el-form ref="uForm" :model="form" :rules="rules" label-width="80px">
     <el-form ref="uForm" :model="form" :rules="rules" label-width="80px">
       <el-form-item label="审核状态" prop="auditStatus">
       <el-form-item label="审核状态" prop="auditStatus">
-        <el-radio-group v-model="form.auditStatus">
-          <el-radio :label="1">通过</el-radio>
-          <el-radio :label="2">拒绝</el-radio>
+        <el-radio-group
+          v-model="form.auditStatus"
+          :disabled="params.status !== 1"
+        >
+          <el-radio :label="2">通过</el-radio>
+          <el-radio :label="3">拒绝</el-radio>
         </el-radio-group>
         </el-radio-group>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="审核备注" prop="auditReason">
+      <el-form-item label="审核备注" prop="rejectReason">
         <el-input
         <el-input
           type="textarea"
           type="textarea"
           placeholder="请输入审核备注/拒绝理由,审核拒绝时必填"
           placeholder="请输入审核备注/拒绝理由,审核拒绝时必填"
-          v-model="form.auditReason"
+          v-model="form.rejectReason"
           maxlength="50"
           maxlength="50"
           show-word-limit
           show-word-limit
+          :disabled="params.status !== 1"
         >
         >
         </el-input>
         </el-input>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
     <div slot="footer" class="dialog-footer">
     <div slot="footer" class="dialog-footer">
-      <el-button type="primary" @click="submitForm('uForm')">确 定</el-button>
-      <el-button @click="resetForm('uForm')">取 消</el-button>
+      <el-button
+        v-if="params.status === 1"
+        type="primary"
+        @click="submitForm('uForm')"
+        >确 定</el-button
+      >
+      <el-button @click="close">取 消</el-button>
     </div>
     </div>
   </ModalView>
   </ModalView>
 </template>
 </template>
 
 
 <script>
 <script>
 import ModalView from '@/components/ZModalView/index.vue'
 import ModalView from '@/components/ZModalView/index.vue'
-import { auditComment, batchAuditComment } from '@/api/system/comment'
+import { getDynamicDetail, auditDynamic } from '@/api/system/dynamic'
 
 
 export default {
 export default {
   components: {
   components: {
@@ -68,22 +82,16 @@ export default {
     return {
     return {
       title: '审核动态',
       title: '审核动态',
       form: {},
       form: {},
-      oForm: {
-        id: 2323,
-        projectName: '测试项目',
-        projectContent: '这是一个测试项目',
-        cImgList: [
-          '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
-          '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
-          '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
-          '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
-          '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
-          '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
-        ],
-        cVideoUrl:
-          'https://test.baoxianzhanggui.com/nightFragrance/profile/upload/2025/05/23/WeChat_20250523101737_20250523151440A001.mp4',
+      params: {},
+      auditForm: {
+        title: '',
+        content: '',
+        mediaType: 1,
+        mediaUrls: [],
+        videoUrl: '',
+        auditStatus: 0,
+        rejectReason: '',
       },
       },
-      loading: false,
     }
     }
   },
   },
   computed: {
   computed: {
@@ -92,9 +100,9 @@ export default {
         auditStatus: [
         auditStatus: [
           { required: true, message: '请选择审核状态', trigger: 'change' },
           { required: true, message: '请选择审核状态', trigger: 'change' },
         ],
         ],
-        auditReason: [
+        rejectReason: [
           {
           {
-            required: this.form.auditStatus === 2,
+            required: this.form.auditStatus === 3,
             message: '请输入拒绝理由',
             message: '请输入拒绝理由',
             trigger: 'change',
             trigger: 'change',
           },
           },
@@ -103,31 +111,36 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
-    /** 辅助函数:处理视频URL回显(如果是相对路径则加上base_api) */
-    getVideoUrl(url) {
-      if (!url) return ''
-      if (url.indexOf('http') === 0) return url
-      return process.env.VUE_APP_BASE_API + url
+    getDetails(id) {
+      getDynamicDetail(id).then(res => {
+        if (res.code === 200) {
+          this.auditForm = res.data
+          // 回显审核状态和原因(1待审核)
+          if (res.data.auditStatus !== 1) {
+            this.form.auditStatus = res.data.auditStatus
+            this.form.rejectReason = res.data.rejectReason
+          }
+          this.$nextTick(() => {
+            if (this.$refs.uForm) {
+              this.$refs.uForm.clearValidate()
+            }
+          })
+        }
+      })
     },
     },
     submitForm(formName) {
     submitForm(formName) {
       this.$refs[formName].validate(valid => {
       this.$refs[formName].validate(valid => {
         if (valid) {
         if (valid) {
-          console.log(this.form)
-          let api = auditComment,
-            params = {
-              ...this.form,
-              commentId: this.oForm.id,
-            }
-          if (Array.isArray(this.oForm.id)) {
-            api = batchAuditComment
-            params = {
-              ...this.form,
-              commentIds: this.oForm.id,
-            }
+          const params = {
+            ...this.form,
+            momentId: this.params.momentId,
           }
           }
-          api(params).then(res => {
-            this.$modal.msgSuccess(res.msg)
-            this.resetForm('uForm', true)
+          auditDynamic(params).then(res => {
+            if (res.code === 200) {
+              this.$modal.msgSuccess(res.msg)
+              this.$emit('refreshList')
+              this.close()
+            }
           })
           })
         } else {
         } else {
           console.log('error submit!!')
           console.log('error submit!!')
@@ -140,16 +153,21 @@ export default {
       this.close(f)
       this.close(f)
     },
     },
     open(e) {
     open(e) {
-      // if (e) {
-      //   this.oForm = e
-      // }
-      this.$refs.mv.open(this.title)
+      if (e) this.params = { ...e }
+      this.form = {}
+      this.getDetails(e.momentId)
+      this.$refs.mv.open(this.params.status === 1 ? '审核动态' : '查看详情')
     },
     },
-    // 关闭弹窗
-    close(f = false) {
-      if (f) this.$emit('close')
+    close() {
+      this.form = {}
       this.$refs.mv.close()
       this.$refs.mv.close()
     },
     },
+    /** 辅助函数:处理视频URL回显(如果是相对路径则加上base_api) */
+    getVideoUrl(url) {
+      if (!url) return ''
+      if (url.indexOf('http') === 0) return url
+      return process.env.VUE_APP_BASE_API + url
+    },
   },
   },
 }
 }
 </script>
 </script>
@@ -167,14 +185,16 @@ export default {
   border-bottom: 1px solid #e5e5e5;
   border-bottom: 1px solid #e5e5e5;
 
 
   .dynamic-title {
   .dynamic-title {
-    font-size: 18px;
+    font-size: 22px;
     font-weight: bold;
     font-weight: bold;
     margin-bottom: 10px;
     margin-bottom: 10px;
+    padding-bottom: 5px;
     color: #333;
     color: #333;
+    border-bottom: 1px solid #e5e5e5;
   }
   }
 
 
   .dynamic-content {
   .dynamic-content {
-    font-size: 14px;
+    font-size: 16px;
     line-height: 1.5;
     line-height: 1.5;
     color: #666;
     color: #666;
     margin-bottom: 20px;
     margin-bottom: 20px;

+ 53 - 60
src/views/dynamic/index.vue

@@ -8,15 +8,15 @@
       v-show="showSearch"
       v-show="showSearch"
       label-width="100px"
       label-width="100px"
     >
     >
-      <el-form-item label="技师姓名" prop="cName">
+      <el-form-item label="技师姓名">
         <el-input
         <el-input
-          v-model="queryParams.cName"
+          v-model="queryParams.technicianName"
           placeholder="请输入技师姓名"
           placeholder="请输入技师姓名"
           clearable
           clearable
           @keyup.enter.native="handleQuery"
           @keyup.enter.native="handleQuery"
         />
         />
       </el-form-item>
       </el-form-item>
-      <el-form-item label="发布时间" prop="dtCreateTime">
+      <el-form-item label="发布时间">
         <el-date-picker
         <el-date-picker
           v-model="queryParams.dateRange"
           v-model="queryParams.dateRange"
           type="daterange"
           type="daterange"
@@ -27,7 +27,7 @@
           clearable
           clearable
         ></el-date-picker>
         ></el-date-picker>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="审核状态" prop="auditStatus">
+      <el-form-item label="审核状态">
         <el-select
         <el-select
           v-model="queryParams.auditStatus"
           v-model="queryParams.auditStatus"
           placeholder="请选择"
           placeholder="请选择"
@@ -66,46 +66,60 @@
     <div style="flex: 1">
     <div style="flex: 1">
       <el-table
       <el-table
         v-loading="loading"
         v-loading="loading"
-        :data="orderList"
+        :data="dynamicList"
         height="calc(100% - 68px)"
         height="calc(100% - 68px)"
       >
       >
-        <el-table-column label="序号" type="index" align="center">
+        <el-table-column label="序号" type="index" align="center" fixed="left">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span>{{
             <span>{{
               (queryParams.current - 1) * queryParams.size + scope.$index + 1
               (queryParams.current - 1) * queryParams.size + scope.$index + 1
             }}</span>
             }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column label="姓名" align="center" prop="userName" />
-        <el-table-column label="昵称" align="center" prop="cNickName" />
+        <el-table-column label="姓名" align="center" prop="technicianName" />
+        <el-table-column
+          label="昵称"
+          align="center"
+          prop="technicianNickname"
+        />
         <el-table-column label="缩略图" align="center" width="60px">
         <el-table-column label="缩略图" align="center" width="60px">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-image
             <el-image
               fit="contain"
               fit="contain"
-              :src="scope.row.cPortrait"
+              :src="scope.row.coverUrl"
               lazy
               lazy
-              :preview-src-list="scope.row.cPortrait"
-              style="width: 50px; height: 50px;"
+              :preview-src-list="[scope.row.coverUrl]"
+              style="width: 50px; height: 50px"
             ></el-image>
             ></el-image>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column label="动态标题" align="center" prop="cPhone" />
-        <el-table-column label="动态内容" align="center"  width="400" prop="projectName" />
+        <el-table-column label="动态标题" align="center" prop="title" />
+        <el-table-column
+          label="动态内容"
+          align="center"
+          width="400"
+          prop="content"
+        />
         <el-table-column
         <el-table-column
           label="发布时间"
           label="发布时间"
           align="center"
           align="center"
-          prop="applicationTime"
+          prop="publishTime"
           width="180"
           width="180"
         >
         >
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span>{{
             <span>{{
-              parseTime(scope.row.applicationTime, '{y}-{m}-{d} {h}:{i}')
+              parseTime(scope.row.publishTime, '{y}-{m}-{d} {h}:{i}')
             }}</span>
             }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column label="审核状态" align="center" prop="auditStatus">
         <el-table-column label="审核状态" align="center" prop="auditStatus">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <span>{{ selectDictLabel('local_dynamic_audit', scope.row.auditStatus) }}</span>
+            <span>{{
+              selectDictLabel(
+                dict.type.local_dynamic_audit,
+                scope.row.auditStatus
+              )
+            }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column label="操作" align="center" width="200" fixed="right">
         <el-table-column label="操作" align="center" width="200" fixed="right">
@@ -114,14 +128,10 @@
               size="mini"
               size="mini"
               type="text"
               type="text"
               :icon="
               :icon="
-                scope.row.auditStatus == '1'
-                  ? 'el-icon-document'
-                  : 'el-icon-bell'
+                scope.row.auditStatus == 1 ? 'el-icon-bell' : 'el-icon-document'
               "
               "
               @click="handleAudit(scope.row)"
               @click="handleAudit(scope.row)"
-              >{{
-                scope.row.auditStatus == '1' ? '查看详情' : '审核'
-              }}</el-button
+              >{{ scope.row.auditStatus == 1 ? '审核' : '详情' }}</el-button
             >
             >
           </template>
           </template>
         </el-table-column>
         </el-table-column>
@@ -140,7 +150,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { refundOrderList } from '@/api/system/order'
+import { getDynamicList } from '@/api/system/dynamic'
 import DynamicAudit from './dynamicAudit.vue'
 import DynamicAudit from './dynamicAudit.vue'
 
 
 export default {
 export default {
@@ -151,27 +161,15 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      // 遮罩层
       loading: true,
       loading: true,
-      // 显示搜索条件
       showSearch: true,
       showSearch: true,
-      // 总条数
       total: 0,
       total: 0,
-      // 认领表格数据
-      orderList: [],
-      // 弹出层标题
-      title: '',
-      // 是否显示弹出层
-      open: false,
+      dynamicList: [],
       // 查询参数
       // 查询参数
       queryParams: {
       queryParams: {
         current: 1,
         current: 1,
         size: 10,
         size: 10,
-        orderNo: null,
-        cName: null,
-        cPhone: null,
-        cNickName: null,
-        userPhone: null,
+        technicianName: null,
         auditStatus: null,
         auditStatus: null,
         dateRange: null,
         dateRange: null,
       },
       },
@@ -181,10 +179,8 @@ export default {
     this.getList()
     this.getList()
   },
   },
   methods: {
   methods: {
-    // 退款订单列表
+    // 动态列表
     getList() {
     getList() {
-      this.orderList = [{id:2323}]
-
       this.loading = true
       this.loading = true
       // 处理日期区间
       // 处理日期区间
       const params = { ...this.queryParams }
       const params = { ...this.queryParams }
@@ -192,45 +188,42 @@ export default {
         params.startTime = params.dateRange[0]
         params.startTime = params.dateRange[0]
         params.endTime = params.dateRange[1]
         params.endTime = params.dateRange[1]
       }
       }
-      delete params.dateRange // 删除前端使用的 dateRange 参数
+      delete params.dateRange
 
 
-      refundOrderList(params)
+      getDynamicList(params)
         .then(res => {
         .then(res => {
-          this.orderList = res.data.records
+          this.dynamicList = res.data.records
           this.total = res.data.total
           this.total = res.data.total
         })
         })
         .finally(() => {
         .finally(() => {
           this.loading = false
           this.loading = false
         })
         })
     },
     },
-    // 表单重置
+    //  搜索
+    handleQuery() {
+      this.queryParams.current = 1
+      this.getList()
+    },
+    // 重置查询
+    resetQuery() {
+      this.reset()
+      this.handleQuery()
+    },
+    // 重置
     reset() {
     reset() {
       this.queryParams = {
       this.queryParams = {
         current: 1,
         current: 1,
         size: 10,
         size: 10,
-        orderNo: null,
-        cName: null,
-        cPhone: null,
-        cNickName: null,
-        userPhone: null,
+        technicianName: null,
         auditStatus: null,
         auditStatus: null,
         dateRange: null,
         dateRange: null,
       }
       }
       // this.resetForm("form");
       // this.resetForm("form");
     },
     },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.current = 1
-      this.getList()
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.reset()
-      this.handleQuery()
-    },
     // 审核
     // 审核
     handleAudit(row) {
     handleAudit(row) {
-      this.$refs.dModal.open(row)
+      console.log('33333333')
+      this.$refs.dModal.open({ momentId: row.id, status: row.auditStatus })
     },
     },
   },
   },
 }
 }