Переглянути джерело

人资管理,员工合同

ZaiZai 2 роки тому
батько
коміт
5947471ca3
1 змінених файлів з 9 додано та 11 видалено
  1. 9 11
      src/views/people/contract/index.vue

+ 9 - 11
src/views/people/contract/index.vue

@@ -20,15 +20,15 @@
             </div>
         </template>
         <template #extra>
-            <el-button type="primary" @click="editRowClick" size="large">
+            <el-button type="primary" @click="addRowClick" size="large">
                 <HcIcon name="add"/>
                 <span>新增合同信息</span>
             </el-button>
         </template>
         <HcTable :loading="tableLoading" :column="tableColumn" :datas="tableData">
             <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>
+                <el-button type="primary" size="small" @click="editRowClick(row)">编辑</el-button>
+                <el-button type="danger" size="small">删除</el-button>
             </template>
         </HcTable>
         <template #action>
@@ -103,18 +103,16 @@ const getTableData = async () => {
     tableLoading.value = false
 }
 
+//新增
+const addRowClick = () => {
+    router.push({name: 'people-contract-info'})
+}
 
-//编辑档案信息
+//编辑
 const editRowClick = (row) => {
     router.push({
         name: 'people-contract-info',
-        query: {
-            id: row.id,
-            type: 'edit'
-        }
+        query: {id: row.id}
     })
 }
-
 </script>
-<style lang='scss' scoped>
-</style>