|
@@ -52,29 +52,35 @@
|
|
|
:checkbox-config="{}">
|
|
|
<vxe-column type="seq" width="60" title="序号"></vxe-column>
|
|
|
<vxe-column type="checkbox" width="40px"></vxe-column>
|
|
|
- <vxe-column title="姓名" field="name">
|
|
|
+ <vxe-column title="姓名" field="name" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-link type="primary" :underline="false" v-if="hasPermission('roster:base:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
|
|
|
+ <el-link type="primary" :underline="false" v-if="hasPermission('roster:base:view')" @click="view(scope.row)">{{scope.row.name}}</el-link>
|
|
|
<span v-else>{{scope.row.name}}</span>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column width="200px" title="证件号" field="idCard" > </vxe-column>
|
|
|
- <vxe-column width="200px" title="员工类型" field="workerType" >
|
|
|
+ <vxe-column min-width="150px" title="电话号码" field="mobile" align="center"> </vxe-column>
|
|
|
+ <vxe-column min-width="150px" title="证件号" field="idCard" align="center"> </vxe-column>
|
|
|
+ <vxe-column min-width="150px" title="人员类型" field="personType" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span> {{$dictUtils.getDictLabel("roster_person_type", scope.row.personType)}} </span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column min-width="150px" title="员工类型" field="workerType" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span> {{$dictUtils.getDictLabel("worker_type", scope.row.workerType)}} </span>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column width="200px" title="入职日期" field="onboardingDate" >
|
|
|
+ <vxe-column min-width="150px" title="入职日期" field="onboardingDate" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ moment(scope.row.onboardingDate).format('YYYY-MM-DD')}}
|
|
|
+ {{ commonJS.isEmpty(scope.row.onboardingDate) ? '' : moment(scope.row.onboardingDate).format('YYYY-MM-DD')}}
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
|
|
|
- <vxe-column title="操作" width="200px" fixed="right" align="center">
|
|
|
+ <vxe-column title="操作" width="120px" fixed="right" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="hasPermission('roster:base:view')" type="text" icon="el-icon-view" size="small" @click="view(scope.row.id)">查看</el-button>
|
|
|
- <el-button v-if="hasPermission('roster:base:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
|
|
|
- <el-button v-if="hasPermission('roster:base:del')" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
+<!-- <el-button v-if="hasPermission('roster:base:view')" type="text" icon="el-icon-view" size="small" @click="view(scope.row)">查看</el-button>-->
|
|
|
+ <el-button v-if="hasPermission('roster:base:edit')" type="text" size="small" @click="edit(scope.row)">修改</el-button>
|
|
|
+ <el-button v-if="hasPermission('roster:base:del')" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
@@ -165,22 +171,22 @@
|
|
|
this.$refs.rosterForm.init('add', '')
|
|
|
},
|
|
|
// 修改
|
|
|
- edit (id) {
|
|
|
- id = id || this.$refs.rosterTable.getCheckboxRecords().map(item => {
|
|
|
+ edit (row) {
|
|
|
+ row.id = row.id || this.$refs.rosterTable.getCheckboxRecords().map(item => {
|
|
|
return item.id
|
|
|
})[0]
|
|
|
- this.$refs.rosterForm.init('edit', id)
|
|
|
+ this.$refs.rosterForm.init('edit', row.id, row.personType)
|
|
|
},
|
|
|
// 查看
|
|
|
- view (id) {
|
|
|
- this.$refs.rosterForm.init('view', id)
|
|
|
+ view (row) {
|
|
|
+ this.$refs.rosterForm.init('view', row.id, row.personType)
|
|
|
},
|
|
|
// 删除
|
|
|
del (id) {
|
|
|
let ids = id || this.$refs.rosterTable.getCheckboxRecords().map(item => {
|
|
|
return item.id
|
|
|
}).join(',')
|
|
|
- this.$confirm(`确定删除所选项吗?`, '提示', {
|
|
|
+ this.$confirm(`删除花名册数据时会将关联的用户数据同时删除,确定删除所选项吗?`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
@@ -212,6 +218,7 @@
|
|
|
this.$dictUtils.getDictList('worker_type').forEach(item => {
|
|
|
this.workerTypeList.push(item)
|
|
|
})
|
|
|
+ this.workerTypeList.push({'label': '游客', 'value': '7'})
|
|
|
},
|
|
|
showTabs () {
|
|
|
this.addTabs()
|