Browse Source

feat: 考核评估

ystl_myq 1 month ago
parent
commit
1e10937d39

+ 68 - 0
src/router/modules/evaluate.ts

@@ -0,0 +1,68 @@
+// evaluateIndex;
+// 最简代码,也就是这些字段必须有
+export default {
+  path: "/evaluate",
+  meta: {
+    title: "考核评估",
+    icon: "ri:information-line",
+    rank: 4
+  },
+  children: [
+    {
+      path: "/evaluate/children/change",
+      name: "evaluateChange",
+      meta: {
+        title: "考核管理"
+      },
+      children: [
+        {
+          path: "/evaluate/children/components/newAdd",
+          name: "evaluateNewAdd",
+          component: () =>
+            import("@/views/evaluate/children/change/components/newAdd.vue"),
+          meta: {
+            title: "新建模板",
+            showLink: false,
+            showParent: true
+          }
+        },
+        {
+          path: "/evaluate/children/change/index",
+          name: "evaluateChangeIndex",
+          component: () => import("@/views/evaluate/children/change/index.vue"),
+          meta: {
+            title: "考核模板",
+            showParent: true
+          }
+        }
+        // {
+        //   path: "/evaluate/children/components/newAdd",
+        //   name: "evaluateNewAdd",
+        //   component: () =>
+        //     import("@/views/evaluate/children/change/components/newAdd.vue"),
+        //   meta: {
+        //     title: "新建模板"
+        //   }
+        // }
+      ]
+    },
+    {
+      path: "/evaluate/children/exam",
+      name: "evaluateExam",
+      meta: {
+        title: "我的考核"
+      },
+      children: [
+        {
+          path: "/evaluate/children/exam/index",
+          name: "evaluateExamIndex",
+          component: () => import("@/views/evaluate/children/exam/index.vue"),
+          meta: {
+            title: "代办事项",
+            showParent: true
+          }
+        }
+      ]
+    }
+  ]
+};

+ 1 - 0
src/router/modules/home.ts

@@ -9,6 +9,7 @@ export default {
   meta: {
     icon: "ep:home-filled",
     title: "首页",
+    showLink: false,
     rank: 0
   },
   children: [

+ 89 - 0
src/views/evaluate/children/change/components/newAdd.vue

@@ -0,0 +1,89 @@
+<script setup lang="ts">
+defineOptions({
+  name: "evaluateNewAdd"
+});
+import { ref, reactive } from "vue";
+import { useRouter } from "vue-router";
+const router = useRouter();
+const handleSelect = () => {};
+const tepName = ref();
+const tepNameForm = reactive({
+  name: "张三"
+});
+const backChange = () => {
+  router.back();
+};
+</script>
+
+<template>
+  <div class="w-[100%]">
+    <div class="w-[100%] flex justify-evenly">
+      <div class="left-box">
+        <el-text class="cursor-pointer" @click="backChange"
+          ><el-icon><ArrowLeft /></el-icon>返回</el-text
+        >
+      </div>
+      <div class="center-box">
+        <el-menu
+          default-active="1"
+          class="el-menu-demo flex justify-evenly"
+          mode="horizontal"
+          @select="handleSelect"
+        >
+          <el-menu-item index="1">基础信息</el-menu-item>
+          <el-menu-item index="2">考核指标</el-menu-item>
+          <el-menu-item index="3">考核流程</el-menu-item>
+        </el-menu>
+      </div>
+      <div class="right-box">
+        <el-button type="primary" class="mr-2">保存</el-button>
+      </div>
+    </div>
+    <div class="mt-2">
+      <div class="w-[40%] m-auto mt-10">
+        <el-form
+          :model="tepNameForm"
+          label-width="auto"
+          style="max-width: 600px"
+        >
+          <el-form-item
+            label="模板名称"
+            prop="name"
+            :rules="[
+              {
+                required: true,
+                message: '请输入模板名称',
+                trigger: 'blur'
+              }
+            ]"
+          >
+            <el-input v-model="tepName" placeholder="最多输入100字" />
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style lang="scss" scoped>
+.left-box {
+  display: flex;
+  flex: 0 0 5%;
+  align-items: center;
+  margin: auto;
+  text-align: center;
+  // justify-content: center;
+}
+
+.center-box {
+  flex: 0 0 70%;
+}
+
+.right-box {
+  display: flex;
+  flex: 0 0 5%;
+  align-items: center;
+  justify-content: center;
+  margin: auto;
+}
+</style>

+ 100 - 0
src/views/evaluate/children/change/index.vue

@@ -0,0 +1,100 @@
+<script setup lang="ts">
+defineOptions({
+  name: "evaluateChangeIndex"
+});
+import { useRouter } from "vue-router";
+const router = useRouter();
+const tableData = [
+  {
+    date: "2016-05-03",
+    name: "Tom",
+    address: "No. 189, Grove St, Los Angeles",
+    show: false
+  },
+  {
+    date: "2016-05-02",
+    name: "Tom",
+    address: "No. 189, Grove St, Los Angeles",
+    show: false
+  },
+  {
+    date: "2016-05-04",
+    name: "Tom",
+    address: "No. 189, Grove St, Los Angeles",
+    show: false
+  },
+  {
+    date: "2016-05-01",
+    name: "Tom",
+    address: "No. 189, Grove St, Los Angeles",
+    show: false
+  }
+];
+const newAdd = () => {
+  router.push("/evaluate/children/components/newAdd");
+};
+</script>
+
+<template>
+  <div class="w-[100%]">
+    <div class="mb-2 flex gap-2 justify-between flex-wrap">
+      <div class="flex mt-2">
+        <div class="flex mr-2">
+          <el-input style="width: 500px" placeholder="搜索考核模板" />
+        </div>
+      </div>
+      <div class="flex pt-2 mr-6">
+        <el-button type="primary" class="mr-2" @click="newAdd"
+          >新建考核模板</el-button
+        >
+      </div>
+    </div>
+    <div class="mt-8">
+      <el-table :data="tableData" style="width: 100%">
+        <el-table-column prop="address" label="考核模板" />
+        <el-table-column prop="date" label="更新时间" width="150" />
+        <el-table-column prop="name" label="创建人" width="150" />
+        <el-table-column label="操作" width="200">
+          <template #default="{ row }">
+            <!-- <el-button link :icon="Edit" /> -->
+            <el-dropdown trigger="click">
+              <span class="el-dropdown-link navbar-bg-hover select-none">
+                <el-icon @click="setEdit(row)"><Edit /></el-icon>
+              </span>
+            </el-dropdown>
+            <el-dropdown class="ml-2" trigger="click">
+              <span class="el-dropdown-link navbar-bg-hover select-none">
+                <el-icon><More /></el-icon>
+              </span>
+              <template #dropdown>
+                <el-dropdown-menu class="setting">
+                  <el-dropdown-item @click="setDelete(row)">
+                    删除
+                  </el-dropdown-item>
+                  <el-dropdown-item> 发布 </el-dropdown-item>
+                  <el-dropdown-item> 下架 </el-dropdown-item>
+                  <el-dropdown-item> 日志 </el-dropdown-item>
+                  <el-dropdown-item> 数据 </el-dropdown-item>
+                  <el-dropdown-item @click="setDetails(row)">
+                    详情
+                  </el-dropdown-item>
+                </el-dropdown-menu>
+              </template>
+            </el-dropdown>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="float-right mt-8 mr-8">
+      <!-- <el-pagination
+        v-model:current-page="currentPage"
+        v-model:page-size="pageSize"
+        :page-sizes="[10, 15, 20, 30]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="400"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      /> -->
+    </div>
+  </div>
+</template>

+ 9 - 0
src/views/evaluate/children/exam/index.vue

@@ -0,0 +1,9 @@
+<script setup lang="ts">
+defineOptions({
+  name: "evaluateExamIndex"
+});
+</script>
+
+<template>
+  <div>考核</div>
+</template>

+ 9 - 0
src/views/evaluate/index.vue

@@ -0,0 +1,9 @@
+<script setup lang="ts">
+defineOptions({
+  name: "evaluateIndex"
+});
+</script>
+
+<template>
+  <div>考核评估</div>
+</template>