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

新增:新增问答记录和统计记录日期筛选和导出功能
优化:问答记录备注连通数据库

范志成 преди 3 месеца
родител
ревизия
34ad56f302
променени са 18 файла, в които са добавени 305 реда и са изтрити 35 реда
  1. 11 0
      smsb-modules/smsb-device/src/main/java/com/inspur/device/controller/SmsbDeviceChatRecordController.java
  2. 5 0
      smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/SmsbDeviceChatRecord.java
  3. 80 0
      smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/bo/SmsbDeviceChatRecordBo.java
  4. 2 0
      smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/vo/SmsbDeviceChatCountVo.java
  5. 11 5
      smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/vo/SmsbDeviceChatDetailVo.java
  6. 17 13
      smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/vo/SmsbDeviceChatRecordVo.java
  7. 10 4
      smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/vo/SmsbVisitorsFlowRateVo.java
  8. 4 0
      smsb-modules/smsb-device/src/main/java/com/inspur/device/mapper/SmsbDeviceChatDetailMapper.java
  9. 2 0
      smsb-modules/smsb-device/src/main/java/com/inspur/device/service/ISmsbDeviceChatRecordService.java
  10. 8 0
      smsb-modules/smsb-device/src/main/java/com/inspur/device/service/impl/SmsbDeviceChatRecordServiceImpl.java
  11. 3 0
      smsb-modules/smsb-device/src/main/java/com/inspur/device/service/impl/SmsbVisitorsFlowRateServiceImpl.java
  12. 18 0
      smsb-modules/smsb-device/src/main/resources/mapper/device/SmsbDeviceChatDetailMapper.xml
  13. 1 0
      smsb-modules/smsb-device/src/main/resources/mapper/device/SmsbDeviceChatRecordMapper.xml
  14. 10 0
      smsb-plus-ui/src/api/smsb/device/device_chat_record_type.ts
  15. 85 3
      smsb-plus-ui/src/views/smsb/deviceChatRecord/chatCount.vue
  16. 19 4
      smsb-plus-ui/src/views/smsb/deviceChatRecord/index.vue
  17. 3 3
      smsb-plus-ui/src/views/smsb/museum/imageUpload/index.vue
  18. 16 3
      smsb-plus-ui/src/views/smsb/visitorsFlowRate/index.vue

+ 11 - 0
smsb-modules/smsb-device/src/main/java/com/inspur/device/controller/SmsbDeviceChatRecordController.java

@@ -67,6 +67,17 @@ public class SmsbDeviceChatRecordController extends BaseController {
         return R.ok(smsbDeviceChatRecordService.listDetail(conversationId));
     }
 
+    /**
+     * 导出问答详细记录
+     */
+    @SaCheckPermission("device:chatRecord:export")
+    @Log(title = "问答记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/exportDetail")
+    public void exportDetail(SmsbDeviceChatRecordBo bo, HttpServletResponse response) {
+        List<SmsbDeviceChatDetailVo> list = smsbDeviceChatRecordService.exportDetailList(bo);
+        ExcelUtil.exportExcel(list, "问答记录", SmsbDeviceChatDetailVo.class, response);
+    }
+
     /**
      * 查询问答记录列表
      */

+ 5 - 0
smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/SmsbDeviceChatRecord.java

@@ -56,6 +56,11 @@ public class SmsbDeviceChatRecord {
      */
     private String deviceName;
 
+    /**
+     * 备注
+     */
+    private String remark;
+
     /**
      * 租户编号
      */

+ 80 - 0
smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/bo/SmsbDeviceChatRecordBo.java

@@ -4,6 +4,9 @@ import com.inspur.device.domain.SmsbDeviceChatRecord;
 import io.github.linpeilie.annotations.AutoMapper;
 import lombok.Data;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * 问答记录业务对象 smsb_device_chat_record
  *
@@ -49,5 +52,82 @@ public class SmsbDeviceChatRecordBo {
      */
     private String deviceName;
 
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private Map<String, Object> params = new HashMap<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDifyId() {
+        return difyId;
+    }
+
+    public void setDifyId(String difyId) {
+        this.difyId = difyId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Long getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(Long createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public Long getUpdatedAt() {
+        return updatedAt;
+    }
+
+    public void setUpdatedAt(Long updatedAt) {
+        this.updatedAt = updatedAt;
+    }
+
+    public Long getDeviceId() {
+        return deviceId;
+    }
+
+    public void setDeviceId(Long deviceId) {
+        this.deviceId = deviceId;
+    }
+
+    public String getDeviceName() {
+        return deviceName;
+    }
+
+    public void setDeviceName(String deviceName) {
+        this.deviceName = deviceName;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Map<String, Object> getParams() {
+        return params;
+    }
 
+    public void setParams(Map<String, Object> params) {
+        this.params = params;
+    }
 }

+ 2 - 0
smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/vo/SmsbDeviceChatCountVo.java

@@ -17,6 +17,8 @@ public class SmsbDeviceChatCountVo {
 
     private String deviceMac;
 
+    private String remark;
+
     private Integer todayNum;
 
     private Integer yesterdayNum;

+ 11 - 5
smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/vo/SmsbDeviceChatDetailVo.java

@@ -28,19 +28,25 @@ public class SmsbDeviceChatDetailVo implements Serializable {
     /**
      * 主键ID
      */
-    @ExcelProperty(value = "主键ID")
+//    @ExcelProperty(value = "主键ID")
     private Long id;
 
+    /**
+     * 设备名称
+     */
+    @ExcelProperty(value = "设备名称")
+    private String deviceName;
+
     /**
      * dify对话记录ID
      */
-    @ExcelProperty(value = "dify对话记录ID")
+//    @ExcelProperty(value = "dify对话记录ID")
     private String conversationId;
 
     /**
      * dify平台ID
      */
-    @ExcelProperty(value = "dify平台ID")
+//    @ExcelProperty(value = "dify平台ID")
     private String difyId;
 
     /**
@@ -58,13 +64,13 @@ public class SmsbDeviceChatDetailVo implements Serializable {
     /**
      * dify created_at
      */
-    @ExcelProperty(value = "dify created_at")
+//    @ExcelProperty(value = "dify created_at")
     private Long createdAt;
 
     /**
      * 创建时间
      */
-    @ExcelProperty(value = "创建时间")
+    @ExcelProperty(value = "对话时间")
     private Date createTime;
 
 

+ 17 - 13
smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/vo/SmsbDeviceChatRecordVo.java

@@ -28,13 +28,19 @@ public class SmsbDeviceChatRecordVo implements Serializable {
     /**
      * 主键ID
      */
-    @ExcelProperty(value = "主键ID")
+//    @ExcelProperty(value = "主键ID")
     private Long id;
 
+    /**
+     * 设备名称
+     */
+    @ExcelProperty(value = "设备名称")
+    private String deviceName;
+
     /**
      * dify平台ID
      */
-    @ExcelProperty(value = "dify平台ID")
+//    @ExcelProperty(value = "dify平台ID")
     private String difyId;
 
     /**
@@ -46,32 +52,30 @@ public class SmsbDeviceChatRecordVo implements Serializable {
     /**
      * dify created_at
      */
-    @ExcelProperty(value = "dify created_at")
+//    @ExcelProperty(value = "dify created_at")
     private Long createdAt;
 
     /**
      * dify update_at
      */
-    @ExcelProperty(value = "dify update_at")
+//    @ExcelProperty(value = "dify update_at")
     private Long updatedAt;
 
     /**
      * 设备ID
      */
-    @ExcelProperty(value = "设备ID")
+//    @ExcelProperty(value = "设备ID")
     private Long deviceId;
 
-    /**
-     * 设备名称
-     */
-    @ExcelProperty(value = "设备名称")
-    private String deviceName;
-
     /**
      * 创建时间
      */
-    @ExcelProperty(value = "创建时间")
+    @ExcelProperty(value = "对话时间")
     private Date createTime;
 
-
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
 }

+ 10 - 4
smsb-modules/smsb-device/src/main/java/com/inspur/device/domain/vo/SmsbVisitorsFlowRateVo.java

@@ -28,13 +28,13 @@ public class SmsbVisitorsFlowRateVo implements Serializable {
     /**
      * 主键ID
      */
-    @ExcelProperty(value = "主键ID")
+//    @ExcelProperty(value = "主键ID")
     private Long id;
 
     /**
      * 设备ID
      */
-    @ExcelProperty(value = "设备ID")
+//    @ExcelProperty(value = "设备ID")
     private Long deviceId;
 
     /**
@@ -46,14 +46,20 @@ public class SmsbVisitorsFlowRateVo implements Serializable {
     /**
      * 人数
      */
-    @ExcelProperty(value = "人数")
+    @ExcelProperty(value = "识别人数")
     private Long personNum;
 
     /**
      * 创建时间
      */
-    @ExcelProperty(value = "创建时间")
+    @ExcelProperty(value = "识别时间")
     private Date createTime;
 
+    /**
+     * 创建时间
+     */
+//    @ExcelProperty(value = "备注")
+    private String remark;
+
 
 }

+ 4 - 0
smsb-modules/smsb-device/src/main/java/com/inspur/device/mapper/SmsbDeviceChatDetailMapper.java

@@ -1,9 +1,12 @@
 package com.inspur.device.mapper;
 
 import com.inspur.device.domain.SmsbDeviceChatDetail;
+import com.inspur.device.domain.bo.SmsbDeviceChatRecordBo;
 import com.inspur.device.domain.vo.SmsbDeviceChatDetailVo;
 import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
 
+import java.util.List;
+
 /**
  * 设备AI对话详情Mapper接口
  *
@@ -12,4 +15,5 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
  */
 public interface SmsbDeviceChatDetailMapper extends BaseMapperPlus<SmsbDeviceChatDetail, SmsbDeviceChatDetailVo> {
 
+    List<SmsbDeviceChatDetailVo> exportDetailList(SmsbDeviceChatRecordBo bo);
 }

+ 2 - 0
smsb-modules/smsb-device/src/main/java/com/inspur/device/service/ISmsbDeviceChatRecordService.java

@@ -91,4 +91,6 @@ public interface ISmsbDeviceChatRecordService {
     TableDataInfo<SmsbDeviceChatCountVo> chatCountList(SmsbDeviceChatRecordBo bo, PageQuery pageQuery);
 
     Map<String, Object> listMonthly(String deviceId);
+
+    List<SmsbDeviceChatDetailVo> exportDetailList(SmsbDeviceChatRecordBo bo);
 }

+ 8 - 0
smsb-modules/smsb-device/src/main/java/com/inspur/device/service/impl/SmsbDeviceChatRecordServiceImpl.java

@@ -86,7 +86,10 @@ public class SmsbDeviceChatRecordServiceImpl implements ISmsbDeviceChatRecordSer
     }
 
     private LambdaQueryWrapper<SmsbDeviceChatRecord> buildQueryWrapper(SmsbDeviceChatRecordBo bo) {
+        Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<SmsbDeviceChatRecord> lqw = Wrappers.lambdaQuery();
+        lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
+            SmsbDeviceChatRecord::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
         lqw.eq(StringUtils.isNotBlank(bo.getDifyId()), SmsbDeviceChatRecord::getDifyId, bo.getDifyId());
         lqw.like(StringUtils.isNotBlank(bo.getName()), SmsbDeviceChatRecord::getName, bo.getName());
         lqw.eq(bo.getDeviceId() != null, SmsbDeviceChatRecord::getDeviceId, bo.getDeviceId());
@@ -216,6 +219,11 @@ public class SmsbDeviceChatRecordServiceImpl implements ISmsbDeviceChatRecordSer
             .orderByDesc(SmsbDeviceChatDetail::getId));
     }
 
+    @Override
+    public List<SmsbDeviceChatDetailVo> exportDetailList(SmsbDeviceChatRecordBo bo) {
+        return smsbDeviceChatDetailMapper.exportDetailList(bo);
+    }
+
     @Override
     public TableDataInfo<SmsbDeviceChatCountVo> chatCountList(SmsbDeviceChatRecordBo bo, PageQuery pageQuery) {
         Page<SmsbDeviceChatCountVo> result = baseMapper.selectChatCountList(pageQuery.build(), bo);

+ 3 - 0
smsb-modules/smsb-device/src/main/java/com/inspur/device/service/impl/SmsbVisitorsFlowRateServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.inspur.device.domain.SmsbDevice;
+import com.inspur.device.domain.SmsbDeviceChatRecord;
 import com.inspur.device.domain.SmsbVisitorsFlowRate;
 import com.inspur.device.domain.bo.SmsbVisitorsFlowRateBo;
 import com.inspur.device.domain.vo.DateAndCountVO;
@@ -83,6 +84,8 @@ public class SmsbVisitorsFlowRateServiceImpl implements ISmsbVisitorsFlowRateSer
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<SmsbVisitorsFlowRate> lqw = Wrappers.lambdaQuery();
         lqw.like(StringUtils.isNotBlank(bo.getDeviceName()), SmsbVisitorsFlowRate::getDeviceName, bo.getDeviceName());
+        lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
+            SmsbVisitorsFlowRate::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
         lqw.orderByDesc(SmsbVisitorsFlowRate::getId);
         return lqw;
     }

+ 18 - 0
smsb-modules/smsb-device/src/main/resources/mapper/device/SmsbDeviceChatDetailMapper.xml

@@ -4,4 +4,22 @@
     "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.inspur.device.mapper.SmsbDeviceChatDetailMapper">
 
+    <select id="exportDetailList" resultType="com.inspur.device.domain.vo.SmsbDeviceChatDetailVo">
+        SELECT
+            record.device_name AS deviceName,
+            detail.*
+        FROM
+            smsb_device_chat_record record
+                LEFT JOIN smsb_device_chat_detail detail ON detail.conversation_id = record.dify_id
+        WHERE
+            1 = 1
+        <if test="deviceName != '' and deviceName != null">
+            AND record.device_name = #{bo.deviceName}
+        </if>
+        <if test="params.beginCreateTime != '' and params.beginCreateTime != null
+                  and params.endCreateTime != '' and params.endCreateTime != null">
+            AND record.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
+        </if>
+    </select>
+
 </mapper>

+ 1 - 0
smsb-modules/smsb-device/src/main/resources/mapper/device/SmsbDeviceChatRecordMapper.xml

@@ -10,6 +10,7 @@
             sd.mac AS deviceMac,
             sd.id AS deviceId,
             sd.`name` AS deviceName,
+            sd.remark AS remark,
             IFNULL(chat.totalNum,0) AS totalNum,
             IFNULL(chat.todayNum,0) AS todayNum,
             IFNULL(chat.yesterdayNum,0) AS yesterdayNum,

+ 10 - 0
smsb-plus-ui/src/api/smsb/device/device_chat_record_type.ts

@@ -52,6 +52,11 @@ export interface ChatRecordVO {
    */
   createTime: string;
 
+  /**
+   * 备注
+   */
+  remark: string;
+
 }
 
 export interface ChatRecordForm extends BaseEntity {
@@ -90,6 +95,11 @@ export interface ChatRecordForm extends BaseEntity {
    */
   deviceName?: string;
 
+  /**
+   * 备注
+   */
+  remark?: string;
+
 }
 
 export interface ChatRecordQuery extends PageQuery {

+ 85 - 3
smsb-plus-ui/src/views/smsb/deviceChatRecord/chatCount.vue

@@ -33,7 +33,7 @@
           <el-table-column label="本周" align="center" prop="weekNum" width="80"/>
           <el-table-column label="本月" align="center" prop="monthNum" width="80"/>
           <el-table-column label="备注" align="left" prop="remark" :show-overflow-tooltip="true"/>
-          <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
+          <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
             <template #default="scope">
               <el-tooltip content="30天问答记录" placement="top">
                 <el-button link type="primary" icon="View" @click="handleMonthInfo(scope.row)"
@@ -43,6 +43,10 @@
                 <el-button link type="primary" icon="Position" @click="handleInfo(scope.row)"
                            v-hasPermi="['device:chatRecord:query']"></el-button>
               </el-tooltip>
+              <el-tooltip content="修改备注" placement="top">
+                <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
+                           v-hasPermi="['device:chatRecord:edit']"></el-button>
+              </el-tooltip>
             </template>
           </el-table-column>
         </el-table>
@@ -60,11 +64,30 @@
         </div>
       </template>
     </el-dialog>
+
+    <el-dialog :title="remark.title" v-model="remark.visible" width="800px" append-to-body>
+      <el-form ref="chatRecordFormRef" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" :rows="3" placeholder="请输入备注"/>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button :loading="buttonLoading" type="primary" @click="submitFormRemark">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
 <script setup name="ChatRecord" lang="ts">
-import {getChatRecord, getChatRecordMonthInfo, listChatRecordCount,} from '@/api/smsb/device/device_chat_record';
+import {
+  getChatRecord,
+  getChatRecordMonthInfo,
+  listChatRecordCount,
+  updateChatRecord,
+} from '@/api/smsb/device/device_chat_record';
 import {
   ChatMonthRecordVO,
   ChatRecordForm,
@@ -73,6 +96,8 @@ import {
 } from '@/api/smsb/device/device_chat_record_type';
 import * as echarts from 'echarts';
 import {ref} from "vue";
+import {getDevice, updateDevice} from "@/api/smsb/device/device";
+import {DeviceForm} from "@/api/smsb/device/device_type";
 
 const {proxy} = getCurrentInstance() as ComponentInternalInstance;
 
@@ -102,6 +127,7 @@ const initFormData: ChatRecordForm = {
   updatedAt: undefined,
   deviceId: undefined,
   deviceName: undefined,
+  remark: undefined,
 }
 const data = reactive<PageData<ChatRecordForm, ChatRecordQuery>>({
   form: {...initFormData},
@@ -114,11 +140,67 @@ const data = reactive<PageData<ChatRecordForm, ChatRecordQuery>>({
     deviceName: undefined,
     params: {}
   },
-  rules: {}
+  rules: {
+    id: [
+      {required: true, message: "主键ID不能为空", trigger: "blur"}
+    ],
+    difyId: [
+      {required: false, message: "difyId不能为空", trigger: "blur"}
+    ],
+    name: [
+      {required: false, message: "name不能为空", trigger: "blur"}
+    ],
+    createdAt: [
+      {required: false, message: "createdAt不能为空", trigger: "blur"}
+    ],
+    updatedAt: [
+      {required: false, message: "updatedAt不能为空", trigger: "blur"}
+    ],
+    deviceId: [
+      {required: false, message: "deviceId不能为空", trigger: "blur"}
+    ],
+    deviceName: [
+      {required: false, message: "deviceName不能为空", trigger: "blur"}
+    ],
+    remark: [
+      {required: false, message: "备注不能为空", trigger: "blur"}
+    ]
+  }
+});
+
+const remark = reactive<DialogOption>({
+  visible: false,
+  title: ''
 });
 
 const {queryParams, form, rules} = toRefs(data);
 
+const handleUpdate = async (row?: ChatRecordVO) => {
+  reset();
+  const _id = row?.id || ids.value[0]
+  Object.assign(form.value, row);
+  remark.visible = true;
+  remark.title = "修改备注";
+}
+
+/** 提交备注 */
+const submitFormRemark = () => {
+  chatRecordFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      let res = await getDevice(form.value.deviceId);
+      let deviceForm: DeviceForm = {}
+      Object.assign(deviceForm, res.data);
+      deviceForm.remark = form.value.remark;
+      await updateDevice(deviceForm).finally(() => buttonLoading.value = false);
+      proxy?.$modal.msgSuccess("操作成功");
+      remark.visible = false;
+      await getList();
+    }
+  });
+}
+
+
 /** 查询问答记录列表 */
 const getList = async () => {
   loading.value = true;

+ 19 - 4
smsb-plus-ui/src/views/smsb/deviceChatRecord/index.vue

@@ -6,12 +6,25 @@
         <el-card shadow="hover" :style="{ marginTop: '10px', height: '60px' }">
           <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="70px">
             <el-form-item label="设备名称" prop="deviceName">
-              <el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery"/>
+              <el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable
+                        @keyup.enter="handleQuery"/>
+            </el-form-item>
+            <el-form-item label="日期范围" prop="params">
+              <el-date-picker
+                v-model="dateRange"
+                type="daterange"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                :default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]"
+              />
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
               <el-button icon="Refresh" @click="resetQuery">重置</el-button>
               <el-button icon="Refresh" type="warning" @click="handleSync">同步</el-button>
+              <el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
             </el-form-item>
           </el-form>
         </el-card>
@@ -87,6 +100,8 @@ const ids = ref<Array<string | number>>([]);
 const single = ref(true);
 const multiple = ref(true);
 const total = ref(0);
+// 日期范围
+const dateRange = ref([]);
 
 const queryFormRef = ref<ElFormInstance>();
 const chatRecordFormRef = ref<ElFormInstance>();
@@ -124,7 +139,7 @@ const {queryParams, form, rules} = toRefs(data);
 /** 查询问答记录列表 */
 const getList = async () => {
   loading.value = true;
-  const res = await listChatRecord(queryParams.value);
+  const res = await listChatRecord(proxy?.addDateRange(queryParams.value, dateRange.value, 'CreateTime'));
   chatRecordList.value = res.rows;
   total.value = res.total;
   loading.value = false;
@@ -224,8 +239,8 @@ const handleDelete = async (row?: ChatRecordVO) => {
 
 /** 导出按钮操作 */
 const handleExport = () => {
-  proxy?.download('device/chatRecord/export', {
-    ...queryParams.value
+  proxy?.download('device/chatRecord/exportDetail', {
+    ...proxy?.addDateRange(queryParams.value, dateRange.value, 'CreateTime')
   }, `chatRecord_${new Date().getTime()}.xlsx`)
 }
 

+ 3 - 3
smsb-plus-ui/src/views/smsb/museum/imageUpload/index.vue

@@ -42,7 +42,7 @@
           <el-table-column label="备注" align="left" prop="remark"/>
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
             <template #default="scope">
-              <el-tooltip content="修改" placement="top">
+              <el-tooltip content="修改备注" placement="top">
                 <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
                            v-hasPermi="['museum:imageUpload:edit']"></el-button>
               </el-tooltip>
@@ -72,10 +72,10 @@
       </template>
     </el-dialog>
 
-    <el-dialog :title="remark.title" v-model="remark.visible" width="500px" append-to-body>
+    <el-dialog :title="remark.title" v-model="remark.visible" width="800px" append-to-body>
       <el-form ref="imageUploadFormRef" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" placeholder="请输入备注"/>
+          <el-input v-model="form.remark" type="textarea" :rows="3" placeholder="请输入备注"/>
         </el-form-item>
       </el-form>
       <template #footer>

+ 16 - 3
smsb-plus-ui/src/views/smsb/visitorsFlowRate/index.vue

@@ -8,9 +8,21 @@
             <el-form-item label="设备名称" prop="deviceName">
               <el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery"/>
             </el-form-item>
+            <el-form-item label="日期范围" prop="params">
+              <el-date-picker
+                v-model="dateRange"
+                type="daterange"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                :default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]"
+              />
+            </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
               <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+              <el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
             </el-form-item>
           </el-form>
         </el-card>
@@ -96,7 +108,8 @@ const ids = ref<Array<string | number>>([]);
 const single = ref(true);
 const multiple = ref(true);
 const total = ref(0);
-
+// 日期范围
+const dateRange = ref([]);
 const queryFormRef = ref<ElFormInstance>();
 const visitorsFlowRateFormRef = ref<ElFormInstance>();
 
@@ -128,7 +141,7 @@ const {queryParams, form, rules} = toRefs(data);
 /** 查询人流记录列表 */
 const getList = async () => {
   loading.value = true;
-  const res = await listVisitorsFlowRate(queryParams.value);
+  const res = await listVisitorsFlowRate(proxy?.addDateRange(queryParams.value, dateRange.value, 'CreateTime'));
   visitorsFlowRateList.value = res.rows;
   total.value = res.total;
   loading.value = false;
@@ -211,7 +224,7 @@ const handleDelete = async (row?: VisitorsFlowRateVO) => {
 /** 导出按钮操作 */
 const handleExport = () => {
   proxy?.download('device/visitorsFlowRate/export', {
-    ...queryParams.value
+    ...proxy?.addDateRange(queryParams.value, dateRange.value, 'CreateTime')
   }, `visitorsFlowRate_${new Date().getTime()}.xlsx`)
 }
 const route = useRoute();