|
@@ -4,7 +4,7 @@
|
|
|
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
<el-card shadow="hover" :style="{ marginTop: '10px', height: '60px' }">
|
|
<el-card shadow="hover" :style="{ marginTop: '10px', height: '60px' }">
|
|
|
- <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="70px">
|
|
|
|
|
|
|
+ <el-form ref="queryFormRef" :model="queryParams" :inline="true" @submit.native.prevent label-width="70px">
|
|
|
<el-form-item label="设备名称" prop="deviceName">
|
|
<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>
|
|
@@ -32,7 +32,7 @@
|
|
|
<el-table-column label="本周" align="center" prop="weekNum" width="80"/>
|
|
<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="center" prop="monthNum" width="80"/>
|
|
|
<el-table-column label="备注" align="left" prop="remark" :show-overflow-tooltip="true"/>
|
|
<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">
|
|
<template #default="scope">
|
|
|
<el-tooltip content="30天人流记录" placement="top">
|
|
<el-tooltip content="30天人流记录" placement="top">
|
|
|
<el-button link type="primary" icon="View" @click="handleMonthInfo(scope.row)"
|
|
<el-button link type="primary" icon="View" @click="handleMonthInfo(scope.row)"
|
|
@@ -42,6 +42,10 @@
|
|
|
<el-button link type="primary" icon="Position" @click="handleInfo(scope.row)"
|
|
<el-button link type="primary" icon="Position" @click="handleInfo(scope.row)"
|
|
|
v-hasPermi="['device:visitorsFlowRate:query']"></el-button>
|
|
v-hasPermi="['device:visitorsFlowRate:query']"></el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
|
+ <el-tooltip content="修改备注" placement="top">
|
|
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
|
|
|
|
+ v-hasPermi="['device:visitorsFlowRate:edit']"></el-button>
|
|
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -59,6 +63,20 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</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>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -68,6 +86,8 @@ import {VisitorsFlowRateVO,VisitorsFlowRateForm,VisitorsFlowRateQuery} from "@/a
|
|
|
import {ref} from "vue";
|
|
import {ref} from "vue";
|
|
|
import {ChatRecordVO} from "@/api/smsb/device/device_chat_record_type";
|
|
import {ChatRecordVO} from "@/api/smsb/device/device_chat_record_type";
|
|
|
import * as echarts from "echarts";
|
|
import * as echarts from "echarts";
|
|
|
|
|
+import {getDevice, updateDevice} from "@/api/smsb/device/device";
|
|
|
|
|
+import {DeviceForm} from "@/api/smsb/device/device_type";
|
|
|
|
|
|
|
|
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
|
@@ -93,23 +113,72 @@ const initFormData: VisitorsFlowRateForm = {
|
|
|
id: undefined,
|
|
id: undefined,
|
|
|
deviceId: undefined,
|
|
deviceId: undefined,
|
|
|
deviceName: undefined,
|
|
deviceName: undefined,
|
|
|
|
|
+ personNum: undefined,
|
|
|
|
|
+ createTime: undefined,
|
|
|
|
|
+ remark: undefined,
|
|
|
}
|
|
}
|
|
|
const data = reactive<PageData<VisitorsFlowRateForm, VisitorsFlowRateQuery>>({
|
|
const data = reactive<PageData<VisitorsFlowRateForm, VisitorsFlowRateQuery>>({
|
|
|
form: {...initFormData},
|
|
form: {...initFormData},
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
- difyId: undefined,
|
|
|
|
|
- name: undefined,
|
|
|
|
|
- deviceId: undefined,
|
|
|
|
|
deviceName: undefined,
|
|
deviceName: undefined,
|
|
|
params: {}
|
|
params: {}
|
|
|
},
|
|
},
|
|
|
- rules: {}
|
|
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ id: [
|
|
|
|
|
+ {required: true, message: "主键ID不能为空", trigger: "blur"}
|
|
|
|
|
+ ],
|
|
|
|
|
+ deviceId: [
|
|
|
|
|
+ {required: false, message: "设备ID不能为空", trigger: "blur"}
|
|
|
|
|
+ ],
|
|
|
|
|
+ deviceName: [
|
|
|
|
|
+ {required: false, message: "设备名称不能为空", trigger: "blur"}
|
|
|
|
|
+ ],
|
|
|
|
|
+ personNum: [
|
|
|
|
|
+ {required: false, message: "人数不能为空", trigger: "blur"}
|
|
|
|
|
+ ],
|
|
|
|
|
+ createTime: [
|
|
|
|
|
+ {required: false, message: "创建时间不能为空", trigger: "blur"}
|
|
|
|
|
+ ],
|
|
|
|
|
+ remark: [
|
|
|
|
|
+ {required: false, message: "备注不能为空", trigger: "blur"}
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+const handleUpdate = async (row?: ChatRecordVO) => {
|
|
|
|
|
+ reset();
|
|
|
|
|
+ const _id = row?.id || ids.value[0]
|
|
|
|
|
+ Object.assign(form.value, row);
|
|
|
|
|
+ remark.visible = true;
|
|
|
|
|
+ remark.title = "修改备注";
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const remark = reactive<DialogOption>({
|
|
|
|
|
+ visible: false,
|
|
|
|
|
+ title: ''
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const {queryParams, form, rules} = toRefs(data);
|
|
const {queryParams, form, rules} = toRefs(data);
|
|
|
|
|
|
|
|
|
|
+/** 提交备注 */
|
|
|
|
|
+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 () => {
|
|
const getList = async () => {
|
|
|
loading.value = true;
|
|
loading.value = true;
|