Explorar el Código

Merge remote-tracking branch 'origin/master'

ZaiZai hace 2 años
padre
commit
49edfa5299

+ 7 - 1
src/router/modules/base.js

@@ -308,7 +308,13 @@ export default [
                 path: '/people/archive',
                 name: 'people-archive',
                 meta: {title: '员工档案'},
-                component: () => import('~src/views/people/archive.vue')
+                component: () => import('~src/views/people/archive/index.vue')
+            },
+            {
+                path: '/people/archive-info',
+                name: 'people-archive-info',
+                meta: {title: '员工档案信息'},
+                component: () => import('~src/views/people/archive/info.vue')
             },
             {
                 path: '/people/contract',

+ 1 - 0
src/router/modules/token.js

@@ -37,6 +37,7 @@ export default [
     'people',
     'people-company-rule',
     'people-archive',
+    'people-archive-info',
     'people-contract',
     'people-salary',
     'people-entry',

+ 107 - 0
src/views/people/archive/index.vue

@@ -0,0 +1,107 @@
+
+<template>
+  <HcCard>
+    <template #header>
+      <div class="w-36 ml-2">
+                <el-select v-model="searchForm.peoplename" block clearable placeholder="员工姓名" size="large">
+                    <el-option v-for="item in peopleoption" :label="item.name" :value="item.key"/>
+                </el-select>
+      </div>
+      <div class="ml-4">
+                <el-button type="primary" @click="searchClick" size="large">
+                    <HcIcon name="search-2"/>
+                    <span>搜索</span>
+                </el-button>
+       </div>
+      <div class="ml-2">
+                <el-button size="large" @click="resetClick">
+                    <HcIcon name="close-circle"/>
+                    <span>重置</span>
+                </el-button>
+        </div>
+    </template>
+    <HcTable :column="tableColumn" :datas="tableData" >
+            <template #name="{row}">
+                        <div class="text-link text-blue">{{row?.name}}</div>
+            </template>
+            <template #action="{row, index}">
+       
+                  <el-button hc-btn type="primary" size="small"  @click="editRowClick(row)">编辑</el-button>
+                  <el-button hc-btn type="primary" size="small">删除</el-button>
+           
+            </template>
+      </HcTable>
+      <template #action>
+            <HcPages :pages="searchForm" @change="pageChange"></HcPages>
+      </template>
+  </HcCard>
+</template>
+
+<script setup>
+import {ref, watch} from  'vue'
+
+import {useRouter} from 'vue-router'
+
+const router = useRouter()
+
+
+const tableColumn = [
+    {key: 'name', name: '姓名'},
+    {key: 'email', name: '邮箱'},
+    {key: 'department', name: '部门'},
+    {key: 'key4', name: '直属主管'},
+    {key: 'key5', name: '职位'},
+    {key: 'key6', name: '手机号'},
+    {key: 'key7', name: '入职时间'},
+    {key: 'key8', name: '司龄'},
+    {key: 'action', name: '操作'}
+
+]
+const tableData = ref([
+    {name: '名称1',id:1},
+    {name: '名称2', },
+    {name: '名称3', }
+])
+const searchForm = ref({
+    name: '',
+    current: 1, size: 20, total: 0
+})
+const peopleoption=ref([
+    {name: '张三', key: '1'},
+    {name: '李四', key: '2'},
+])
+//分页被点击
+const pageChange = ({current, size}) => {
+    searchForm.value.current = current
+    searchForm.value.size = size
+    getTableData()
+}
+
+const getTableData = () => {
+
+}
+
+//搜索
+const searchClick = () => {
+    searchForm.value.current = 1;
+    getTableData()
+}
+
+//重置搜索表单
+const resetClick = () => {
+    searchForm.value = {current: 1, size: 20, total: 0}
+}
+//编辑档案信息
+const editRowClick = (row) => {
+    router.push({
+        name: 'people-archive-info',
+        query: {
+            id: row.id,
+            type: 'edit'
+        }
+    })
+}
+
+</script>
+<style lang='scss' scoped>
+</style>

+ 1 - 1
src/views/people/archive.vue → src/views/people/archive/info.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div >222</div>
+   <HcCard></HcCard>
 </template>
 
 <script setup>

+ 77 - 2
src/views/people/company-rule.vue

@@ -1,10 +1,85 @@
-<!--  -->
+
 <template>
-  <div >333</div>
+  <HcCard>
+    <template #extra>
+            <HcUploadFile
+            :options="UploadFileOptions"
+            @progress="HcUploadFileProgress"
+            @success="HcUploadFileSuccess"
+            @change="HcUploadFileChange"
+        >
+            <el-button hc-btn type="primary">上传新制度</el-button>
+        </HcUploadFile>
+    </template>
+    <HcTable :column="tableColumn" :datas="tableData" >
+            <template #name="{row}">
+                        <div class="text-link text-blue"  @click="viewPdf(row)">{{row?.name}}</div>
+            </template>
+            <template #action="{row, index}">
+                <HcUploadFile
+                  :options="UploadFileOptions"
+                  @progress="HcUploadFileProgress"
+                  @success="HcUploadFileSuccess"
+                  @change="HcUploadFileChange"
+              >
+                  <el-button hc-btn type="primary" size="small">重新上传</el-button>
+              </HcUploadFile>
+            </template>
+      </HcTable>
+      <template #action>
+            <HcPages :pages="searchForm" @change="pageChange"></HcPages>
+      </template>
+  </HcCard>
 </template>
 
 <script setup>
 import {ref, watch} from  'vue'
+import {getTokenHeader} from "~src/api/request/header";
+
+const tableColumn = [
+    {key: 'name', name: '制度名称'},
+    {key: 'action', name: '操作', width: 120}
+
+]
+const tableData = ref([
+    {name: '名称1',},
+    {name: '名称2', },
+    {name: '名称3', }
+])
+const searchForm = ref({
+    name: '',
+    current: 1, size: 20, total: 0
+})
+//分页被点击
+const pageChange = ({current, size}) => {
+    searchForm.value.current = current
+    searchForm.value.size = size
+}
+
+
+//上传配置
+const UploadFileOptions = {
+    // 此处设置header
+    headers: getTokenHeader(),
+}
+
+// 文件上传进度
+const HcUploadFileProgress = (res) => {
+    console.log('文件上传进度', res)
+}
+// 文件上传成功的回调
+const HcUploadFileSuccess = (res) => {
+    console.log('文件上传成功', res)
+}
+
+// 文件全部上传成功
+const HcUploadFileChange = () => {
+    console.log('文件全部上传成功')
+}
+//查看pdf
+ const viewPdf=()=>{
+    window.open('http://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20230606/c339aec388bab8c36d3272fe93bae350.pdf', '_blank')
+ }
 </script>
 <style lang='scss' scoped>
 </style>