junjun пре 2 година
родитељ
комит
bbdf1a73d8
1 измењених фајлова са 38 додато и 17 уклоњено
  1. 38 17
      src/views/datamanager/platformdata/compoents/query/PlatformTable.vue

+ 38 - 17
src/views/datamanager/platformdata/compoents/query/PlatformTable.vue

@@ -1,27 +1,45 @@
 <template>
     <div class="form">
-        <!-- <div class="form-content">
-            form
-        </div> -->
+
         <el-form ref="ruleFormRef" :model="ruleForm" inline label-width="60px">
-            <el-form-item label="姓名:" prop="nickName" style="margin-top: 15px;">
+            <!-- <el-form-item label="姓名:" prop="nickName" style="margin-top: 15px;">
                 <el-input v-model="ruleForm.nickName" placeholder="请输入姓名!" style="width: 150px;"></el-input>
             </el-form-item>
             <el-form-item label="工号:" prop="staffNo" style="margin-top: 15px;">
                 <el-input v-model="ruleForm.staffNo" placeholder="请输入工号!" style="width: 150px;"></el-input>
-            </el-form-item>
-            <el-form-item label="部门:" prop="dept" style="margin-top: 15px;">
-                <el-select v-model="ruleForm.dept" placeholder="请选择部门" style="width: 200px ;">
-                    <el-option v-for="item in departmentList" :key="item.deptId" :value="item.deptName"
-                        :label="item.deptName"></el-option>
+            </el-form-item> -->
+
+            <el-input
+                v-model="searchValue"
+                style="max-width:251px;margin-right: 50px;"
+                :placeholder="'请输入'+searchLabel"
+                >
+
+                <template #prepend>
+                    <el-select v-model="searchLabel" style="width: 70px">
+                        <el-option value="姓名" />
+                        <el-option value="工号" />
+                    </el-select>
+                </template>
+            </el-input>
+
+            <el-form-item label="部门:" prop="dept" style="margin-bottom: 0;margin-right: 0;">
+                <el-select v-model="ruleForm.dept" placeholder="请选择部门" style="width: 200px;">
+                    <el-option v-for="item in departmentList" 
+                        :key="item.deptId" 
+                        :value="item.deptName"
+                        :label="item.deptName">
+                    </el-option>
                 </el-select>
             </el-form-item>
+
             <el-button type="primary" @click="submitForm(ruleFormRef)"
-                style="width: 110px;position: absolute;margin-top: 15px;right:120px">搜索</el-button>
+                style="width: 65px;height: 32px;position: absolute;right:134px">搜 索</el-button>
             <el-button @click="resetForm(ruleFormRef)"
-                style="position: absolute;right:0;width: 110px;margin-top: 15px">重置</el-button>
+                style="width: 65px; height: 32px;position: absolute;right:57px">重 置</el-button>
         </el-form>
-        <el-table style="width: 100%;margin-top: 20px;" :data="tableData" highlight-current-row
+
+        <el-table style="width: 100%;margin-top: 18px;" :data="tableData" stripe highlight-current-row
             :default-sort="{ prop: 'todayVisits', order: 'descending' }">
             <el-table-column label="姓名" prop="nickName" align="center"></el-table-column>
             <el-table-column label="工号" prop="staffNo" align="center"></el-table-column>
@@ -30,10 +48,11 @@
             <el-table-column label="本月访问次数" prop="monthVisits" sortable align="right"></el-table-column>
             <el-table-column label="累计访问次数" prop="totalVisits" sortable align="right"></el-table-column>
             <el-table-column label="访问次数统计图" align="center">
-                <img style="display: inline-block; margin-right: 33px;" src="@/assets/icons/chart-bar.png" alt="" />
+                <img style="display: inline-block; margin-right: 20px;" src="@/assets/icons/chart-bar.png" alt="" />
                 <img style="display: inline-block;" src="@/assets/icons/chart-line.png" alt="" />
             </el-table-column>
         </el-table>
+
         <!-- <el-pagination v-model="currentPage" v-model:currentPageSize="currentPageSize" :page-sizes="[10, 20, 50, 100, 200]"
             layout="->, total,sizes,prev,pager,next,jumper" :total="total" @size-change="handeSizeChange"
             @current-change="handleCurrentPageChange" /> -->
@@ -52,6 +71,9 @@ import { FormInstance } from 'element-plus';
 import { DepartMentModel } from '@/api/datamanagement/dataplatform';
 // import { DepartMentModel, Records, Visits, VisitsModel, getDeptList } from '@/api/datamanagement/dataplatform';
 
+const searchLabel = ref('姓名');
+const searchValue = ref('');
+
 export interface TableModel {
     deptId: number,
     deptName: string,
@@ -251,12 +273,11 @@ function resetForm(formE1: FormInstance | undefined) {
 <style scoped>
 .form {
     /* width: 1100px; */
-    margin-top: 30px;
-    margin-bottom: 30px;
+    margin-top: 18px;
 }
 
 
-.el-pagination {
+/* .el-pagination {
     margin-top: 30px;
-}
+} */
 </style>