Commit d5568cf9 authored by 姬鋆屾's avatar 姬鋆屾

推修改请假记录选择部门后展示部门对应人员,并支持人员输入搜索;修改每日打卡记录中异常信息展示为红色

parent a224f2e0
......@@ -18,6 +18,15 @@
:maxLength="10"
:disabled="pageInfo.type == 'view'"
/> -->
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
type="select"
placeholder="请选择所属部门"
:enumData="dict.deptId"
@change="changeDept(form.deptId)"
/>
<Field
label="请假人"
prop="leavePerson"
......@@ -26,21 +35,12 @@
remote
v-model="form.leavePerson"
placeholder="请输入请假人"
@change="changeStaff(form.leavePerson)"
:remote-method="remoteMethod"
:maxLength="10"
:enumData="dict.staffList"
:disabled="pageInfo.type == 'view'"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
type="select"
placeholder="请选择所属部门"
:enumData="dict.deptId"
:disabled="true"
/>
<!-- <Field label="所属部门" prop="deptName" v-model="form.deptName" type="textarea" placeholder="请输入所属部门"/> -->
<Field
label="电话号码"
......@@ -259,7 +259,19 @@ export default {
this.remoteMethod();
},
methods: {
changeDept(val) {
console.log(val);
this.form.leavePerson = "";
let arr = this.staffList.filter((v) => v.deptId == val);
let obj = {};
for (let key in arr) {
obj[arr[key].id] = arr[key].name;
}
this.dict.staffList = obj;
console.log(this.staffList);
},
changeStaff(val) {
console.log(val);
let person = this.staffList.filter((v) => v.id == val);
console.log(person);
console.log(this.form);
......
......@@ -325,7 +325,13 @@ export default {
property === "offWorkResult"
) {
let val = arr[index][property];
return this.tableData.dict.goWorkResult[val];
return val == 1 ? (
this.tableData.dict.goWorkResult[val]
) : (
<el-tag type={"danger"} size="mini">
{this.tableData.dict.goWorkResult[val]}
</el-tag>
);
}
} else {
return "-";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment