员工档案/其他档案按钮修复

main
cyl 1 year ago
parent 0da67b0f19
commit 604389120d

@ -687,6 +687,7 @@ export default {
Authorization: "Bearer " + getAccessToken(), Authorization: "Bearer " + getAccessToken(),
"tenant-id": getTenantId(), "tenant-id": getTenantId(),
}, // }, //
optType: undefined,
fileList: [], // fileList: [], //
// //
deptOptions: undefined, deptOptions: undefined,
@ -986,24 +987,24 @@ export default {
/** 查看按钮操作 */ /** 查看按钮操作 */
handleView(row) { handleView(row) {
this.reset(); this.reset();
this.optType = "view";
const id = row.id; const id = row.id;
getElectronicEmployee(id).then((response) => { getElectronicEmployee(id).then((response) => {
this.form = response.data; this.form = response.data;
this.dateArray(this.form.birthdate); this.dateArray(this.form.birthdate);
this.open = true; this.open = true;
this.optType = "view";
this.title = "查看员工档案"; this.title = "查看员工档案";
}); });
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.optType = "edit";
const id = row.id; const id = row.id;
getElectronicEmployee(id).then((response) => { getElectronicEmployee(id).then((response) => {
this.form = response.data; this.form = response.data;
this.dateArray(this.form.birthdate); this.dateArray(this.form.birthdate);
this.open = true; this.open = true;
this.optType = "edit";
this.title = "修改员工档案"; this.title = "修改员工档案";
}); });
}, },

@ -339,7 +339,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm" v-if="optType != 'view'"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -368,6 +368,7 @@ export default {
components: { Treeselect }, components: { Treeselect },
data() { data() {
return { return {
optType:undefined,
// //
deptOptions: undefined, deptOptions: undefined,
// //
@ -597,15 +598,18 @@ export default {
this.reset(); this.reset();
this.fileList = []; this.fileList = [];
this.open = true; this.open = true;
this.optType = "add";
this.title = "添加其他档案"; this.title = "添加其他档案";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id; const id = row.id;
getElectronicOther(id).then((response) => { getElectronicOther(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.optType = "edit";
this.title = "修改其他档案"; this.title = "修改其他档案";
}); });
}, },

Loading…
Cancel
Save