|
@@ -6,35 +6,35 @@
|
|
<el-form-item label="部门" prop="units">
|
|
<el-form-item label="部门" prop="units">
|
|
<el-select v-model="units" placeholder="请选择部门" clearable multiple size="small">
|
|
<el-select v-model="units" placeholder="请选择部门" clearable multiple size="small">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in unitOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
|
+ v-for="dict in dict.type.staff_unit"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="班组" prop="teams">
|
|
<el-form-item label="班组" prop="teams">
|
|
<el-select v-model="teams" placeholder="请选择班组" clearable multiple size="small">
|
|
<el-select v-model="teams" placeholder="请选择班组" clearable multiple size="small">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in teamOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
|
+ v-for="dict in dict.type.team_divide"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="岗位" label-width="200" prop="actualposts">
|
|
<el-form-item label="岗位" label-width="200" prop="actualposts">
|
|
<el-select v-model="actualposts" placeholder="请选择岗位" clearable multiple size="small">
|
|
<el-select v-model="actualposts" placeholder="请选择岗位" clearable multiple size="small">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in actualpostOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
|
+ v-for="dict in dict.type.actualpost"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button icon="el-icon-search" size="mini" type="cyan" @click="handleQuery"> 搜索 </el-button>
|
|
|
|
|
|
+ <el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery"> 搜索 </el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"> 重置 </el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"> 重置 </el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -71,22 +71,22 @@
|
|
title="详情">
|
|
title="详情">
|
|
<div style="margin: 0px 10px">
|
|
<div style="margin: 0px 10px">
|
|
<el-descriptions :column="1" border size="normal">
|
|
<el-descriptions :column="1" border size="normal">
|
|
- <el-descriptions-item label="部门"></el-descriptions-item>
|
|
|
|
|
|
+ <el-descriptions-item label="部门">{{unitFormat(staffData.unit)}}</el-descriptions-item>
|
|
<el-descriptions-item label="员工编号">{{ staffData.staffid }}</el-descriptions-item>
|
|
<el-descriptions-item label="员工编号">{{ staffData.staffid }}</el-descriptions-item>
|
|
<el-descriptions-item label="员工姓名">{{ staffData.name }}</el-descriptions-item>
|
|
<el-descriptions-item label="员工姓名">{{ staffData.name }}</el-descriptions-item>
|
|
- <el-descriptions-item label="性别"></el-descriptions-item>
|
|
|
|
|
|
+ <el-descriptions-item label="性别">{{sexFormat(staffData.sex)}}</el-descriptions-item>
|
|
<el-descriptions-item v-hasPermi="['plant:staffmgr:detail']" label="身份证号">{{ staffData.idCard }}
|
|
<el-descriptions-item v-hasPermi="['plant:staffmgr:detail']" label="身份证号">{{ staffData.idCard }}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="联系方式">{{ staffData.contact }}</el-descriptions-item>
|
|
<el-descriptions-item label="联系方式">{{ staffData.contact }}</el-descriptions-item>
|
|
- <el-descriptions-item label="岗位"></el-descriptions-item>
|
|
|
|
|
|
+ <el-descriptions-item label="岗位">{{postFormat(staffData.actualpost)}}</el-descriptions-item>
|
|
<el-descriptions-item label="邮箱">{{ staffData.email }}</el-descriptions-item>
|
|
<el-descriptions-item label="邮箱">{{ staffData.email }}</el-descriptions-item>
|
|
- <el-descriptions-item label="班组"></el-descriptions-item>
|
|
|
|
|
|
+ <el-descriptions-item label="班组">{{teamFormat(staffData.team)}}</el-descriptions-item>
|
|
<el-descriptions-item v-hasPermi="['plant:staffmgr:detail']" label="住址">{{ staffData.address }}
|
|
<el-descriptions-item v-hasPermi="['plant:staffmgr:detail']" label="住址">{{ staffData.address }}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
- <el-descriptions-item label="学历"></el-descriptions-item>
|
|
|
|
|
|
+ <el-descriptions-item label="学历">{{eduFormat(staffData.education)}}</el-descriptions-item>
|
|
<el-descriptions-item v-hasPermi="['plant:staffmgr:detail']" label="专业">{{ staffData.speciality }}
|
|
<el-descriptions-item v-hasPermi="['plant:staffmgr:detail']" label="专业">{{ staffData.speciality }}
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
- <el-descriptions-item label="特殊职能"></el-descriptions-item>
|
|
|
|
|
|
+ <el-descriptions-item label="特殊职能">{{dutyFormat(staffData.specialDuty)}}</el-descriptions-item>
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
</div>
|
|
</div>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
@@ -101,6 +101,7 @@ import {getToken} from "@/utils/auth";
|
|
import html2canvas from 'html2canvas'
|
|
import html2canvas from 'html2canvas'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
+ dicts:['actualpost','staff_unit','team_divide','sys_user_sex','education','special_duty'],
|
|
components: {Branch, VueDraggableResizable},
|
|
components: {Branch, VueDraggableResizable},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -175,24 +176,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getDicts("actualpost").then(response => {
|
|
|
|
- this.actualpostOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("staff_unit").then(response => {
|
|
|
|
- this.unitOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("team_divide").then(response => {
|
|
|
|
- this.teamOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("sys_user_sex").then(response => {
|
|
|
|
- this.sexOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("education").then(response => {
|
|
|
|
- this.educationOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("special_duty").then(response => {
|
|
|
|
- this.specialDutyOptions = response.data;
|
|
|
|
- });
|
|
|
|
this.getChartData()
|
|
this.getChartData()
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -207,22 +190,22 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
postFormat(post) {
|
|
postFormat(post) {
|
|
- return this.selectDictLabel(this.actualpostOptions, post);
|
|
|
|
|
|
+ return this.selectDictLabel(this.dict.type.actualpost, post)
|
|
},
|
|
},
|
|
- sexFormat(sex) {
|
|
|
|
- return this.selectDictLabel(this.sexOptions, sex);
|
|
|
|
|
|
+ sexFormat(val) {
|
|
|
|
+ return this.selectDictLabel(this.dict.type.sys_user_sex, val)
|
|
},
|
|
},
|
|
- unitFormat(unit) {
|
|
|
|
- return this.selectDictLabel(this.unitOptions, unit);
|
|
|
|
|
|
+ unitFormat(val) {
|
|
|
|
+ return this.selectDictLabel(this.dict.type.staff_unit, val)
|
|
},
|
|
},
|
|
teamFormat(val) {
|
|
teamFormat(val) {
|
|
- return this.selectDictLabel(this.teamOptions, val);
|
|
|
|
|
|
+ return this.selectDictLabel(this.dict.type.team_divide, val)
|
|
},
|
|
},
|
|
eduFormat(val) {
|
|
eduFormat(val) {
|
|
- return this.selectDictLabel(this.educationOptions, val);
|
|
|
|
|
|
+ return this.selectDictLabel(this.dict.type.education, val)
|
|
},
|
|
},
|
|
dutyFormat(val) {
|
|
dutyFormat(val) {
|
|
- return this.selectDictLabels(this.specialDutyOptions, val);
|
|
|
|
|
|
+ return this.selectDictLabels(this.dict.type.special_duty, val)
|
|
},
|
|
},
|
|
handleTableWheel(event) {
|
|
handleTableWheel(event) {
|
|
let obj = this.$refs['branch']
|
|
let obj = this.$refs['branch']
|
|
@@ -262,7 +245,7 @@ export default {
|
|
this.list2 = []
|
|
this.list2 = []
|
|
|
|
|
|
for (let i = 0; i < this.staffmgrList.length; i++) {
|
|
for (let i = 0; i < this.staffmgrList.length; i++) {
|
|
- let post = this.selectDictLabel(this.actualpostOptions, this.staffmgrList[i].actualpost)
|
|
|
|
|
|
+ let post = this.selectDictLabel(this.dict.type.actualpost, this.staffmgrList[i].actualpost)
|
|
if (this.staffmgrList[i].pId == 0) {
|
|
if (this.staffmgrList[i].pId == 0) {
|
|
let nodeData = {
|
|
let nodeData = {
|
|
id: this.staffmgrList[i].id,
|
|
id: this.staffmgrList[i].id,
|