Browse Source

清楚锁定

qin_24
herenshan112 3 months ago
parent
commit
fc78fe876c
  1. 10
      src/api/hr/org/index.ts
  2. 99
      src/views/hr/archives/index.vue
  3. 1
      src/views/hr/company/companyduty.vue

10
src/api/hr/org/index.ts

@ -295,3 +295,13 @@ export function getpositioncont(data: getContId){
data: data
});
}
/**
*
*/
export function jiechuUserLock(data: getContId){
return request({
url: '/hrapi/staff/jiechuUserLock',
method: 'post',
data: data
});
}

99
src/views/hr/archives/index.vue

@ -14,6 +14,7 @@ import {
editUserTemplateInfo,
gainTempleateOrgList,
teamcontlist,
jiechuUserLock,
} from "@/api/hr/org/index";
import { archivesCont, searchCriteriaForPeople } from "@/api/hr/people/type";
import { emptypeOptions } from "@/api/hr/people/datacont";
@ -690,6 +691,52 @@ const gainTimeList = () => {
tiemList.value = data.data.list;
});
};
//
const unLockUSer = (val: any) => {
console.log("解说-jiechuUserLock--》", val);
jiechuUserLock({ userId: val.number }).then((res: any) => {
getArchivesPage();
});
};
const ruleFormRefLock = ref(null);
const ubLockPage = ref(false);
const unLockForm = reactive({
numText: "",
});
const closeLock = () => {
ubLockPage.value = false;
};
const openUnlico = () => {
ubLockPage.value = true;
};
const resetForm = () => {
closeLock();
ruleFormRefLock.value.resetFields();
};
const editTitleRules = reactive({
numText: [
{ required: true, message: "请输入工号;以英文逗号隔开(,)", trigger: "blur" },
],
});
var butLoad = ref(false);
//
const picksubus = () => {
butLoad.value = true;
ruleFormRefLock.value.validate((isValid: boolean) => {
if (isValid) {
jiechuUserLock({ userId: unLockForm.numText })
.then((res: any) => {
butLoad.value = false;
getArchivesPage();
})
.finally(() => {
butLoad.value = false;
});
} else {
butLoad.value = false;
}
});
};
</script>
<template>
<div class="app-container">
@ -837,10 +884,15 @@ const gainTimeList = () => {
</el-button></el-link
>
<el-button type="warning" @click="setupClick">
<el-button type="success" @click="setupClick">
<el-icon><Setting /></el-icon>
设置
</el-button>
<el-button type="warning" @click="openUnlico">
<el-icon><Unlock /></el-icon>
批量解锁
</el-button>
</el-space>
</div>
<el-table
@ -904,8 +956,19 @@ const gainTimeList = () => {
/>
<el-table-column fixed label="联系方式" prop="mobilephone" width="120" />
<el-table-column fixed label="居住地" prop="currentresidence" />
<el-table-column fixed="right" align="center" label="操作" width="100">
<el-table-column fixed="right" align="center" label="操作" width="120">
<template #default="scope">
<el-button
v-hasPerm="['275256219474604032']"
type="primary"
link
size="small"
v-if="scope.row.isShowTrue == 1"
@click.stop="unLockUSer(scope.row)"
>
<!-- <i-ep-view /> -->
清除信息锁定
</el-button>
<el-button
v-hasPerm="['275256219474604032']"
type="primary"
@ -1307,6 +1370,38 @@ const gainTimeList = () => {
@close-xige-page="closeXigePage"
/>
</el-container>
<el-dialog
v-model="ubLockPage"
title="清楚锁定人员信息锁"
width="500"
:before-close="closeLock"
>
<el-form
ref="ruleFormRefLock"
:model="unLockForm"
:rules="editTitleRules"
label-width="80"
style="width: 100%"
>
<el-form-item label="工号" prop="numText">
<el-text>请输入工号以英文逗号隔开(,)</el-text>
<el-input
v-model="unLockForm.numText"
type="textarea"
placeholder="请输入工号;以英文逗号隔开(,)"
clearable
:autosize="{ minRows: 4, maxRows: 10 }"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" v-loading="butLoad" @click="picksubus">
确定
</el-button>
<el-button @click="resetForm(ruleFormRef)">取消</el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<style lang="scss" scoped>

1
src/views/hr/company/companyduty.vue

@ -163,7 +163,6 @@ const isShowOrg = (item: any) => {
<template #header>
<div class="card_header">
<div>
{{ initConter.orgLevel }}
<el-select
v-if="initConter.orgLevel == 5"
v-model="initConter.currentOrg"

Loading…
Cancel
Save