Browse Source

修改系统消息查询

YY 2 năm trước cách đây
mục cha
commit
e9d355f243

+ 7 - 3
src/views/center/other/message/index.vue

@@ -33,8 +33,10 @@
     <component :is="CDialog" :dialog="dialog" @handleClose="handleClose">
       <template v-slot:info>
         <el-col :span="24" class="dialog_one" v-if="dialog.type == '1'">
-          <el-input placeholder="请输入内容" v-model="search_name" class="input-with-select" size="small">
-            <el-button icon="el-icon-search" @click="toSubmit"></el-button>
+          <el-input placeholder="请输入内容" v-model="search_name" class="input-with-select">
+            <template #append>
+              <el-button :icon="Search" @click="toSubmit" />
+            </template>
           </el-input>
           <el-col :span="24" class="list">
             <span v-for="(item, index) in userList" :key="index" class="direction">
@@ -52,6 +54,7 @@ import partsSearch from '@/components/c-search.vue';
 import CTable from '@/components/c-table.vue';
 import btn from '@/components/btn-1.vue';
 import CDialog from '@/components/c-dialog.vue';
+import { Search } from '@element-plus/icons-vue';
 // #endregion
 import type { Ref } from 'vue';
 import { ref, onMounted, getCurrentInstance } from 'vue';
@@ -129,7 +132,7 @@ const toAdd = () => {
 // 搜索用户
 const toSubmit = () => {
   if (search_name.value) {
-    let info = users.value.filter((f) => f.name.includes(search_name));
+    let info = users.value.filter((f) => f.name.includes(search_name.value));
     userList.value = info;
   } else userList = users;
 };
@@ -154,6 +157,7 @@ const toDel = async (data: { _id: string }) => {
 };
 // 关闭弹窗
 const handleClose = () => {
+  search_name.value = '';
   search({ skip, limit });
   dialog.value = { title: '信息管理', show: false, type: '' };
 };

+ 1 - 1
src/views/center/studio/info/export.vue

@@ -5,7 +5,7 @@
         <el-col :span="24" class="one">
           <component :is="partsSearch" :is_back="true" @toBack="toBack()">
             <template v-slot:custombtn>
-              <el-button type="success" size="small" @click="toExport()">导出</el-button>
+              <el-button type="success" @click="toExport()">导出</el-button>
             </template>
           </component>
         </el-col>

+ 2 - 2
src/views/center/studio/info/index.vue

@@ -148,7 +148,7 @@ const toExport = async (data: { _id: string; company_id: string; scientistinfo_i
 };
 // 审核保存
 const toSave = async (data: { _id: string; status: string }) => {
-  let obj = { id: data._id, status: data.status };
+  let obj = { _id: data._id, status: data.status };
   let res: IQueryResult = await studio.update(obj);
   if (res.errcode == 0) {
     ElMessage({ type: 'success', message: '维护信息成功' });
@@ -157,7 +157,7 @@ const toSave = async (data: { _id: string; status: string }) => {
 };
 // // 发送系统消息
 const createMess = async (data) => {
-  let res = await unitStudioApply.fetch(data.unit_id);
+  let res = await unitStudioApply.fetch(data.user_id);
   let p1: any = res.data as {};
   let status = statusList.value.find((r) => r.dict_value == data.status);
   if (res.errcode == 0) {