Эх сурвалжийг харах

ehr-绩效:功能开发;

001295 1 жил өмнө
parent
commit
6089f84f86

+ 58 - 0
src/views/business/ehr/pm/performance/btnApproveLog.vue

@@ -0,0 +1,58 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">绩效审批记录</el-button>
+    <el-dialog title="绩效审批记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="时间" align="center" prop="createTime" />
+        <el-table-column label="阶段" align="center" prop="performanceStatus" />
+        <el-table-column label="评估人" align="center" prop="staffName" />
+        <el-table-column label="状态" align="center" prop="status" />
+        <el-table-column label="结果" align="center" prop="result" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+
+<script>
+import { listFlow} from "@/api/business/ehr/pm/flow";
+export default {
+  name: "ApproveLogDialog",
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listFlow(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 87 - 0
src/views/business/ehr/pm/performance/btnCopyItem.vue

@@ -0,0 +1,87 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">复制指标</el-button>
+    <el-dialog title="历史绩效" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      复制操作将覆盖当前绩效指标
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnCopy">
+        <el-table-column label="员工" align="center" prop="staffName" />
+        <el-table-column label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="创建时间" align="center" prop="createTime" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-document-copy"
+                @click="btnCopy(scope.row)"
+              >复制</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPerformance,getPerformance} from "@/api/business/ehr/pm/performance";
+export default {
+  name: "CopyItemDialog",
+  props: [],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        staff: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listPerformance(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //点击了当前按钮
+    click() {
+      this.queryParams.staff = this.$store.state.user.name;
+      this.open = true;
+      this.getList();
+    },
+    //复制
+    async btnCopy(row){
+      let res = await getPerformance(row.id);
+      if(res.code === 200){
+        this.$emit('setItems',res.data.performanceItem);
+        this.$modal.msgSuccess("复制成功");
+        this.open = false;
+      }
+    },
+  },
+  created() {},
+};
+</script>
+