Quellcode durchsuchen

feat: 内容发布选择设备支持设备名称模糊查询

lihao16 vor 4 Monaten
Ursprung
Commit
47635936c6
1 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen
  1. 9 3
      smsb-plus-ui/src/views/smsb/itemPush/index.vue

+ 9 - 3
smsb-plus-ui/src/views/smsb/itemPush/index.vue

@@ -144,10 +144,14 @@
         v-model:limit="queryParams.pageSize" @pagination="getList" />
     </el-card>
     <!-- 添加或修改内容发布对话框 -->
-    <el-dialog :title="dialog.title" v-model="dialog.visible" width="1500px" style="height: 700px" append-to-body>
+    <el-dialog :title="dialog.title" v-model="dialog.visible" width="1500px" style="height: 750px" append-to-body>
       <el-row :gutter="20" style="height: 100%; display: flex">
         <!--设备列表-->
         <el-col :span="6" style="height: 100%; overflow: auto; border-right: 1px solid #eee; padding-right: 10px">
+          <el-row style="margin-bottom: 10px">
+            <el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable style="width: 270px" />
+            <el-button type="primary" @click="getDeviceList" style="margin-left: 10px">查询</el-button>
+          </el-row>
           <el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectDevice" style="height: 520px">
             <el-table-column type="selection" width="55" align="center" />
             <el-table-column label="设备名称" align="left" prop="name" :show-overflow-tooltip="true" />
@@ -210,7 +214,7 @@
         <el-col :span="9" style="height: 100%; overflow: auto; padding-left: 10px">
           <!--轮播组 -->
           <div v-if="form.itemType === 1 || form.itemType === 3">
-            <el-table v-loading="loading" :data="itemList" style="height: 520px">
+            <el-table v-loading="loading" :data="itemList" style="height: 570px">
               <el-table-column label="ID" width="200" align="left" :show-overflow-tooltip="true">
                 <template #default="{ row }">
                   <el-radio v-model="selectedRowId" :label="row.id" @change="handleRadioChange(row)" />
@@ -473,6 +477,7 @@ const getList = async () => {
 
 /** 查询设备列表 */
 const getDeviceList = async () => {
+  dialogQueryParams.value.name = queryParams.value.deviceName;
   const res = await listDevice(dialogQueryParams.value);
   deviceList.value = res.rows;
   deviceTotal.value = res.total;
@@ -636,8 +641,9 @@ const handleRadioChange = (row: ItemVO) => {
 const handleAdd = () => {
   reset();
   dialog.visible = true;
-  dialog.title = '添加内容发布';
+  dialog.title = '内容发布';
   selectedRowId.value = null;
+  queryParams.value.deviceName = null;
   getDeviceList();
 };