刘洋 1 year ago
parent
commit
8a24112ad0

+ 1 - 1
src/layout/left-menu.vue

@@ -13,7 +13,7 @@
     >
       <template #logo>
         <div class="logo-box flex justify-center items-center">
-          <img src="../assets/logo.svg" />
+          LOGO!!!
         </div>
       </template>
       <children-menu v-model="userStore.moduleMenus" />

+ 1 - 1
src/router/modules/myWorkbenches.js

@@ -15,7 +15,7 @@ export default {
       meta: {
         title: '工作台',
         sort: 1,
-        icon: 'user-talk',
+        icon: 'app',
       },
       children: [
         {

+ 2 - 2
src/router/modules/resourceGuard.js

@@ -15,7 +15,7 @@ export default {
       meta: {
         title: '人资保障',
         sort: 1,
-        icon: 'user-talk',
+        icon: 'usergroup',
       },
       children: [
         {
@@ -51,7 +51,7 @@ export default {
       meta: {
         title: '设备保障',
         sort: 2,
-        icon: 'user-talk',
+        icon: 'print',
       },
       children: [
         {

+ 1 - 1
src/router/routes.js

@@ -4,7 +4,7 @@ const routes = [
     name: 'Layout',
     path: '/',
     component: () => import('@/layout/index.vue'),
-    redirect: '/service-unit-manage',
+    redirect: '/my-workbenches',
     children: [],
     meta: {
       title: '',

+ 33 - 0
src/views/resource-guard/person-guard/person-files/add-person-file-dialog.vue

@@ -0,0 +1,33 @@
+<template>
+  <my-dialog
+    :visible="visible"
+    @close="emit('update:visible', false)"
+    :header="title"
+    :width="750"
+    :closeOnOverlayClick="false"
+  >
+    <t-form ref="formRef" :model="formData" layout="inline" labelWidth="120px">
+    </t-form>
+    <template #foot>
+      <t-button theme="default" @click="emit('update:visible', false)"
+        >取消</t-button
+      >
+      <t-button theme="primary" @click="handleSave">保存</t-button>
+    </template>
+  </my-dialog>
+</template>
+<script setup name="AddPersonFileDialog">
+import { ref } from 'vue';
+const emit = defineEmits(['update:visible']);
+const formRef = ref(null);
+
+const props = defineProps({
+  visible: Boolean,
+  title: String,
+  handleSave: Function,
+  formData: Object,
+});
+defineExpose({
+  formRef,
+});
+</script>

+ 219 - 2
src/views/resource-guard/person-guard/person-files/index.vue

@@ -1,7 +1,224 @@
 <template>
-  <div>人员档案管理</div>
+  <div class="person-files flex flex-col">
+    <SearchForm :fields="fields" :params="params"></SearchForm>
+    <div class="flex-1 page-wrap">
+      <div class="btn-group">
+        <t-button theme="success" @click="handleAdd">新增</t-button>
+        <t-button theme="success">批量导入</t-button>
+        <t-button theme="success">批量导出</t-button>
+        <t-button theme="success">作废</t-button>
+      </div>
+      <t-table
+        size="small"
+        row-key="id"
+        :columns="columns"
+        :data="tableData"
+        bordered
+        :pagination="{
+          defaultCurrent: 1,
+          defaultPageSize: 10,
+          onChange,
+          total: pagination.total,
+        }"
+        :selected-row-keys="selectedRowKeys"
+        select-on-row-click
+        @select-change="selectChange"
+      >
+      </t-table>
+    </div>
+
+    <AddPersonFileDialog
+      v-model:visible="showAddPersonFileDialog"
+      :title="title"
+      :type="type"
+      :handleSave="handleSave"
+      :formData="formData"
+      ref="formDialogRef"
+    ></AddPersonFileDialog>
+  </div>
 </template>
 
-<script setup name="PersonFiles"></script>
+<script setup lang="jsx" name="PersonFiles">
+import { ref, reactive } from 'vue';
+import { getTableData } from '@/api/test';
+import useFetchTable from '@/hooks/useFetchTable';
+import useTableCrud from '@/hooks/useTableCrud';
+import AddPersonFileDialog from './add-person-file-dialog';
+const formDialogRef = ref(null);
+const selectedRowKeys = ref([]);
+const selectChange = (value, { selectedRowData }) => {
+  selectedRowKeys.value = value;
+};
+const columns = [
+  {
+    colKey: 'row-select',
+    type: 'multiple',
+    width: 50,
+    fixed: 'left',
+  },
+  { colKey: 'a', title: '档案流水号' },
+  { colKey: 'b', title: '姓名' },
+  { colKey: 'c', title: '省份' },
+  { colKey: 'd', title: '城市' },
+  { colKey: 'e', title: '区县' },
+  { colKey: 'f', title: '性别' },
+  { colKey: 'g', title: '年龄' },
+  { colKey: 'h', title: '身份证号' },
+  { colKey: 'i', title: '学历' },
+  { colKey: 'j', title: '手机号' },
+  { colKey: 'k', title: '电子邮箱' },
+  { colKey: 'l', title: '底照' },
+  { colKey: 'm', title: '供应商' },
+  { colKey: 'n', title: '入档时间' },
+  { colKey: 'o', title: '认证项目角色', width: 110 },
+  { colKey: 'p', title: '认证分数' },
+  { colKey: 'q', title: '认证有效期' },
+  { colKey: 'r', title: '剩余有效天数', width: 110 },
+  { colKey: 's', title: '认证状态' },
+  { colKey: 't', title: '备注' },
+  {
+    title: '操作',
+    colKey: 'operate',
+    fixed: 'right',
+    width: 150,
+    cell: (h, { row }) => {
+      return (
+        <div class="table-operations">
+          <t-link
+            theme="primary"
+            hover="color"
+            onClick={(e) => {
+              e.stopPropagation();
+              handleEdit(row);
+            }}
+          >
+            修改
+          </t-link>
+        </div>
+      );
+    },
+  },
+];
+const {
+  loading: tableLoading,
+  pagination,
+  tableData,
+  fetchData,
+  onChange,
+} = useFetchTable(getTableData);
+const add = async () => {
+  await 1;
+  alert(1);
+};
+const update = async () => {};
+const refresh = async () => {};
+
+const {
+  visible: showAddPersonFileDialog,
+  type,
+  title,
+  loading: dialogLoading,
+  handleAdd,
+  handleEdit,
+  handleSave,
+  formData,
+  formRef,
+} = useTableCrud(
+  {
+    name: '人员档案',
+    doCreate: add,
+    doUpdate: update,
+    refresh: refresh,
+    initForm: {
+      a: '',
+      b: '',
+      c: '',
+      d: '',
+      e: '',
+      f: '',
+      g: '',
+      h: '',
+      i: '',
+      j: '',
+      k: '',
+      l: '',
+      m: '',
+      n: '',
+      o: '',
+    },
+  },
+  formDialogRef
+);
+
+const fields = ref([
+  {
+    prop: 'a',
+    label: '区域',
+    labelWidth: 100,
+    type: 'select',
+    colSpan: 5,
+  },
+  {
+    prop: 'b',
+    label: '供应商',
+    labelWidth: 100,
+    type: 'select',
+    colSpan: 5,
+  },
+  {
+    prop: 'c',
+    label: '姓名',
+    labelWidth: 100,
+    colSpan: 5,
+  },
+  {
+    prop: 'd',
+    label: '认证角色',
+    labelWidth: 140,
+    type: 'select',
+    colSpan: 6,
+  },
+  {
+    type: 'buttons',
+    colSpan: 2,
+    labelWidth: '0px',
+    children: [
+      {
+        type: 'button',
+        text: '查询',
+      },
+    ],
+  },
+  {
+    prop: 'e',
+    label: '认证状态',
+    labelWidth: 100,
+    type: 'select',
+    colSpan: 5,
+  },
+  {
+    prop: 'f',
+    label: '入档时间',
+    labelWidth: 100,
+    type: 'daterange',
+    colSpan: 10,
+  },
+  {
+    prop: 'g',
+    label: '剩余有效天数:≥',
+    labelWidth: 140,
+    colSpan: 6,
+  },
+]);
+const params = reactive({
+  a: '',
+  b: '',
+  c: '',
+  d: '',
+  e: '',
+  f: [],
+  g: '',
+});
+</script>
 
 <style></style>

+ 1 - 1
src/views/service-unit-manage/service-unit/regional-planning/index.vue

@@ -142,7 +142,7 @@ const fields = ref([
   },
   {
     type: 'buttons',
-    colSpan: 2,
+    colSpan: 3,
     children: [
       {
         type: 'button',

+ 0 - 1
src/views/sop/sop-manage/project-change-report/index.vue

@@ -4,7 +4,6 @@
 
     <div class="flex-1 page-wrap">
       <div class="btn-group">
-        <t-button theme="success">新增</t-button>
         <t-button theme="success">作废</t-button>
       </div>
       <t-table