flat: 增加 所属机构
This commit is contained in:
@@ -92,11 +92,11 @@ export const removeDept =
|
||||
|
||||
/*转移分组*/
|
||||
export const transferDept =
|
||||
(groupIds, ids) => {
|
||||
(groupIds, ids, deptId) => {
|
||||
return request({
|
||||
url: '/api/jobslink-api/tenant/talents/updateAllGroup',
|
||||
method: 'post',
|
||||
params: {groupIds, ids}
|
||||
params: {groupIds, ids, deptId}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -104,3 +104,11 @@ export const transferDept =
|
||||
export const upload = () => {
|
||||
return `/api/jobslink-api/tenant/talents/tenant/import-talents?isCovered=1`
|
||||
}
|
||||
|
||||
export const getDeptMyTree = (params) => {
|
||||
return request({
|
||||
url: '/api/jobslink-api/system/dept/my-tree',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ Vue.use(VueRouter);
|
||||
export const createRouter = () =>
|
||||
new VueRouter({
|
||||
// mode: 'history',
|
||||
// base: 'manage',
|
||||
// https://router.vquejs.org/zh/guide/advanced/scroll-behavior.html#%E5%BC%82%E6%AD%A5%E6%BB%9A%E5%8A%A8
|
||||
// 这个方法 是控制滚动条
|
||||
// 如果 retuen falsy || {} ,则不发生滚动
|
||||
|
||||
@@ -31,13 +31,15 @@
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="searchChange1"
|
||||
>搜 索</el-button
|
||||
>搜 索
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
@click="searchReset1"
|
||||
>清 空</el-button
|
||||
>清 空
|
||||
</el-button
|
||||
>
|
||||
</div>
|
||||
<!-- </el-col> -->
|
||||
@@ -72,7 +74,8 @@
|
||||
v-if="permission.user_role"
|
||||
icon="el-icon-user"
|
||||
@click="handleGrant"
|
||||
>角色配置</el-button
|
||||
>角色配置
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
@@ -80,7 +83,8 @@
|
||||
v-if="permission.user_reset"
|
||||
icon="el-icon-refresh"
|
||||
@click="handleReset"
|
||||
>密码重置</el-button
|
||||
>密码重置
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="companyName">
|
||||
@@ -456,7 +460,7 @@ export default {
|
||||
"excelForm.isCovered"() {
|
||||
if (this.excelForm.isCovered !== "") {
|
||||
const column = this.findObject(this.excelOption.column, "excelFile");
|
||||
column.action = `/api/jobslink-api/system/tuser//import-user?isCovered=${this.excelForm.isCovered}`;
|
||||
column.action = `/api/jobslink-api/system/tuser/import-user?isCovered=${this.excelForm.isCovered}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -722,6 +726,7 @@ export default {
|
||||
margin-bottom: 18px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
display: inline-block;
|
||||
margin-bottom: 18px;
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { transferDept } from "@/api/tenant/talents";
|
||||
import {getDeptMyTree, transferDept} from "@/api/tenant/talents";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
ids: String,
|
||||
@@ -30,12 +31,32 @@ export default {
|
||||
groupId: "",
|
||||
box: false,
|
||||
form: {},
|
||||
option: {
|
||||
deptId: '',
|
||||
depTree: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
option() {
|
||||
return {
|
||||
menuPosition: "right",
|
||||
menuBtn: true,
|
||||
submitBtn: true,
|
||||
emptyBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: "所属机构",
|
||||
prop: "deptId",
|
||||
type: "tree",
|
||||
multiple: false,
|
||||
dicData: this.depTree,
|
||||
props: {
|
||||
label: "title",
|
||||
},
|
||||
checkStrictly: true,
|
||||
slot: true,
|
||||
span: 24,
|
||||
change: this.deptChange
|
||||
},
|
||||
{
|
||||
label: "所属分组",
|
||||
prop: "groupId",
|
||||
@@ -62,11 +83,28 @@ export default {
|
||||
placeholder: "请选择分组",
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
created() {
|
||||
this.getDept()
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
deptChange({value, column}) {
|
||||
this.deptId = value
|
||||
console.log(value)
|
||||
},
|
||||
async getDept() {
|
||||
let params = {
|
||||
tenantId: '000000'
|
||||
}
|
||||
let resData = await getDeptMyTree(params)
|
||||
if (resData.data.code === 200) {
|
||||
this.depTree = resData.data.data
|
||||
console.log(this.depTree)
|
||||
|
||||
}
|
||||
},
|
||||
closed() {
|
||||
this.form = {};
|
||||
if (this.$refs.groups) {
|
||||
@@ -76,7 +114,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openDialog() {
|
||||
this.title = "转移分组";
|
||||
this.title = "转移推送";
|
||||
this.box = true;
|
||||
if (this.$refs.groups) {
|
||||
this.$refs.groups.init();
|
||||
@@ -86,7 +124,7 @@ export default {
|
||||
},
|
||||
handleSubmit(form, done) {
|
||||
//提交转移分组接口
|
||||
transferDept(this.form.groupId, this.ids).then(
|
||||
transferDept(this.form.groupId, this.ids, this.deptId).then(
|
||||
() => {
|
||||
this.box = false;
|
||||
this.$message({
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
<div class="footer" style="padding-left: 6px">
|
||||
<el-button type="text" icon="el-icon-plus"
|
||||
v-if="vaildData(permission.tenant_main_talents_certain_index_groupadd, false)"
|
||||
@click="updateGroups('add')">新建分组</el-button>
|
||||
@click="updateGroups('add')">新建分组
|
||||
</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@@ -77,7 +78,8 @@
|
||||
<template slot="resume" slot-scope="{ row }">
|
||||
<div>
|
||||
<el-button type="text" size="mini" @click="$refs.resume.openDialog(row)"
|
||||
v-if="row.userId && row.userId !== '0'">查看简历</el-button>
|
||||
v-if="row.userId && row.userId !== '0'">查看简历
|
||||
</el-button>
|
||||
<div v-else>暂无简历</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -89,12 +91,17 @@
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<el-button type="success" size="small" plain icon="el-icon-plus" @click="handleImport"
|
||||
v-show="vaildData(permission.tenant_main_talents_certain_index_add, false)">批量导入</el-button>
|
||||
v-show="vaildData(permission.tenant_main_talents_certain_index_add, false)">批量导入
|
||||
</el-button>
|
||||
<el-button type="warning" size="small" plain :disabled="!selectionList.length" icon="el-icon-sort"
|
||||
@click="handleTransfer" v-show="vaildData(permission.tenant_main_talents_certain_index_transfergroup, false)">转移分组</el-button>
|
||||
@click="handleTransfer"
|
||||
v-show="vaildData(permission.tenant_main_talents_certain_index_transfergroup, false)">转移推送
|
||||
</el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" @click="handleDelete"
|
||||
:disabled="!selectionList.length" plain v-show="vaildData(permission.tenant_main_talents_certain_index_transfergroup, false)">
|
||||
删除</el-button>
|
||||
:disabled="!selectionList.length" plain
|
||||
v-show="vaildData(permission.tenant_main_talents_certain_index_transfergroup, false)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="name" slot-scope="{row}">
|
||||
<span>{{ row.name }}</span>
|
||||
@@ -139,7 +146,7 @@ import {
|
||||
detail,
|
||||
getDept,
|
||||
removeDept,
|
||||
upload,
|
||||
upload, getDeptMyTree,
|
||||
} from "@/api/tenant/talents";
|
||||
import {getWorkTypes, getLabelList} from "@/api/tenant/common";
|
||||
import {mapGetters} from "vuex";
|
||||
@@ -151,6 +158,7 @@ import { getTemplate } from "@/api/resource/template";
|
||||
import ied from "@/views/util/import-error-dialog";
|
||||
import {excelAccept} from "@/common/accept";
|
||||
import TextTooltip from '@/components/text-tooltip'
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
ellipsis(value) {
|
||||
@@ -187,10 +195,11 @@ export default {
|
||||
tempWorkType: [],
|
||||
worktypeDic: {},
|
||||
arr: [],//////
|
||||
|
||||
deptId: '',
|
||||
excelBox: false,
|
||||
data: [],
|
||||
obj: {},
|
||||
depTree: [],
|
||||
excelForm: {isCovered: 1},
|
||||
};
|
||||
},
|
||||
@@ -203,7 +212,8 @@ export default {
|
||||
addBtn: this.vaildData(this.permission.tenant_main_talents_certain_index_add, false),
|
||||
viewBtn: true,
|
||||
delBtn: this.vaildData(this.permission.tenant_main_talents_certain_index_delete, false),
|
||||
editBtn: this.vaildData( this.permission.tenant_main_talents_certain_index_edit,false)};
|
||||
editBtn: this.vaildData(this.permission.tenant_main_talents_certain_index_edit, false)
|
||||
};
|
||||
},
|
||||
ids() {
|
||||
let ids = [];
|
||||
@@ -385,11 +395,26 @@ export default {
|
||||
};
|
||||
},
|
||||
excelOption() {
|
||||
const url = this.tenantId ? `${upload()}&id=${this.tenantId}` : upload()
|
||||
const baseUrl = upload() + `&deptId=${this.deptId}`
|
||||
const url = this.tenantId ? `${baseUrl}&id=${this.tenantId}` : baseUrl
|
||||
return {
|
||||
submitBtn: false,
|
||||
emptyBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: "所属机构",
|
||||
prop: "deptId",
|
||||
type: "tree",
|
||||
multiple: false,
|
||||
dicData: this.depTree,
|
||||
props: {
|
||||
label: "title",
|
||||
},
|
||||
checkStrictly: true,
|
||||
slot: true,
|
||||
span: 20,
|
||||
change: this.deptChange
|
||||
},
|
||||
{
|
||||
label: "文件上传",
|
||||
prop: "excelFile",
|
||||
@@ -460,8 +485,24 @@ export default {
|
||||
this.initDept();
|
||||
// this.getWorkTypes();
|
||||
this.getLabelList();
|
||||
this.getDept()
|
||||
},
|
||||
methods: {
|
||||
deptChange({value, column}) {
|
||||
this.deptId = value
|
||||
console.log(value)
|
||||
},
|
||||
async getDept() {
|
||||
let params = {
|
||||
tenantId: '000000'
|
||||
}
|
||||
let resData = await getDeptMyTree(params)
|
||||
if (resData.data.code === 200) {
|
||||
this.depTree = resData.data.data
|
||||
console.log(this.depTree)
|
||||
|
||||
}
|
||||
},
|
||||
getWorkTypes() {
|
||||
|
||||
getWorkTypes().then((res) => {
|
||||
@@ -641,6 +682,7 @@ export default {
|
||||
telphone: row.telphone,
|
||||
labelsBase: row.labelsBase,
|
||||
remarks: row.remarks,
|
||||
groupType: 1,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { transferDept } from "@/api/tenant/talents";
|
||||
import {getDeptMyTree, transferDept} from "@/api/tenant/talents";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
ids: String,
|
||||
@@ -30,12 +31,32 @@ export default {
|
||||
groupId: "",
|
||||
box: false,
|
||||
form: {},
|
||||
option: {
|
||||
deptId: '',
|
||||
depTree: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
option() {
|
||||
return {
|
||||
menuPosition: "right",
|
||||
menuBtn: true,
|
||||
submitBtn: true,
|
||||
emptyBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: "所属机构",
|
||||
prop: "deptId",
|
||||
type: "tree",
|
||||
multiple: false,
|
||||
dicData: this.depTree,
|
||||
props: {
|
||||
label: "title",
|
||||
},
|
||||
checkStrictly: true,
|
||||
slot: true,
|
||||
span: 24,
|
||||
change: this.deptChange
|
||||
},
|
||||
{
|
||||
label: "所属分组",
|
||||
prop: "groupId",
|
||||
@@ -61,12 +82,29 @@ export default {
|
||||
],
|
||||
placeholder: "请选择分组",
|
||||
},
|
||||
],
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
created() {
|
||||
this.getDept()
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
deptChange({value, column}) {
|
||||
this.deptId = value
|
||||
console.log(value)
|
||||
},
|
||||
async getDept() {
|
||||
let params = {
|
||||
tenantId: '000000'
|
||||
}
|
||||
let resData = await getDeptMyTree(params)
|
||||
if (resData.data.code === 200) {
|
||||
this.depTree = resData.data.data
|
||||
console.log(this.depTree)
|
||||
|
||||
}
|
||||
},
|
||||
closed() {
|
||||
this.form = {};
|
||||
if (this.$refs.groups) {
|
||||
@@ -76,7 +114,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openDialog() {
|
||||
this.title = "转移分组";
|
||||
this.title = "转移推送";
|
||||
this.box = true;
|
||||
if (this.$refs.groups) {
|
||||
this.$refs.groups.init();
|
||||
@@ -86,7 +124,7 @@ export default {
|
||||
},
|
||||
handleSubmit(form, done) {
|
||||
//提交转移分组接口
|
||||
transferDept(this.form.groupId, this.ids).then(
|
||||
transferDept(this.form.groupId, this.ids, this.deptId).then(
|
||||
() => {
|
||||
this.box = false;
|
||||
this.$message({
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
<div class="footer" style="padding-left: 6px">
|
||||
<el-button type="text" icon="el-icon-plus"
|
||||
v-if="vaildData(permission.tenant_main_talents_latent_index_groupadd, false)"
|
||||
@click="updateGroups('add')">新建分组</el-button>
|
||||
@click="updateGroups('add')">新建分组
|
||||
</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@@ -77,7 +78,8 @@
|
||||
<template slot="resume" slot-scope="{ row }">
|
||||
<div>
|
||||
<el-button type="text" size="mini" @click="$refs.resume.openDialog(row)"
|
||||
v-if="row.userId && row.userId !== '0'">查看简历</el-button>
|
||||
v-if="row.userId && row.userId !== '0'">查看简历
|
||||
</el-button>
|
||||
<div v-else>暂无简历</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -89,12 +91,17 @@
|
||||
<!--自定义按钮-->
|
||||
<template slot="menuLeft">
|
||||
<el-button type="success" size="small" plain icon="el-icon-plus" @click="handleImport"
|
||||
v-show="vaildData(permission.tenant_main_talents_latent_index_add, false)">批量导入</el-button>
|
||||
v-show="vaildData(permission.tenant_main_talents_latent_index_add, false)">批量导入
|
||||
</el-button>
|
||||
<el-button type="warning" size="small" plain :disabled="!selectionList.length" icon="el-icon-sort"
|
||||
@click="handleTransfer" v-show="vaildData(permission.tenant_main_talents_latent_index_tansfergroup, false)">转移分组</el-button>
|
||||
@click="handleTransfer"
|
||||
v-show="vaildData(permission.tenant_main_talents_latent_index_tansfergroup, false)">转移推送
|
||||
</el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" @click="handleDelete"
|
||||
:disabled="!selectionList.length" plain v-show="vaildData(permission.tenant_main_talents_latent_index_tansfergroup, false)">
|
||||
删除</el-button>
|
||||
:disabled="!selectionList.length" plain
|
||||
v-show="vaildData(permission.tenant_main_talents_latent_index_tansfergroup, false)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="name" slot-scope="{row}">
|
||||
<span>{{ row.name }}</span>
|
||||
@@ -140,6 +147,7 @@ import {
|
||||
getDept,
|
||||
removeDept,
|
||||
upload,
|
||||
getDeptMyTree
|
||||
} from "@/api/tenant/talents";
|
||||
import {getWorkTypes, getLabelList} from "@/api/tenant/common";
|
||||
import {mapGetters} from "vuex";
|
||||
@@ -188,7 +196,8 @@ export default {
|
||||
tempWorkType: [],
|
||||
worktypeDic: {},
|
||||
arr: [],//////
|
||||
|
||||
depTree: [],
|
||||
deptId: '',
|
||||
excelBox: false,
|
||||
data: [],
|
||||
obj: {},
|
||||
@@ -387,11 +396,27 @@ export default {
|
||||
};
|
||||
},
|
||||
excelOption() {
|
||||
const url = this.tenantId ? `${upload()}&id=${this.tenantId}` : upload()
|
||||
const baseUrl = upload() + `&deptId=${this.deptId}`
|
||||
const url = this.tenantId ? `${baseUrl}&id=${this.tenantId}` : baseUrl
|
||||
|
||||
return {
|
||||
submitBtn: false,
|
||||
emptyBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: "所属机构",
|
||||
prop: "deptId",
|
||||
type: "tree",
|
||||
multiple: false,
|
||||
dicData: this.depTree,
|
||||
props: {
|
||||
label: "title",
|
||||
},
|
||||
checkStrictly: true,
|
||||
slot: true,
|
||||
span: 20,
|
||||
change: this.deptChange
|
||||
},
|
||||
{
|
||||
label: "文件上传",
|
||||
prop: "excelFile",
|
||||
@@ -462,8 +487,24 @@ export default {
|
||||
this.initDept();
|
||||
// this.getWorkTypes();
|
||||
this.getLabelList();
|
||||
this.getDept()
|
||||
},
|
||||
methods: {
|
||||
deptChange({value, column}) {
|
||||
this.deptId = value
|
||||
console.log(value)
|
||||
},
|
||||
async getDept() {
|
||||
let params = {
|
||||
tenantId: '000000'
|
||||
}
|
||||
let resData = await getDeptMyTree(params)
|
||||
if (resData.data.code === 200) {
|
||||
this.depTree = resData.data.data
|
||||
console.log(this.depTree)
|
||||
|
||||
}
|
||||
},
|
||||
getWorkTypes() {
|
||||
|
||||
getWorkTypes().then((res) => {
|
||||
@@ -643,6 +684,7 @@ export default {
|
||||
telphone: row.telphone,
|
||||
labelsBase: row.labelsBase,
|
||||
remarks: row.remarks,
|
||||
groupType: 0,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
//路径前缀
|
||||
publicPath: "/manage/",
|
||||
publicPath: "manage",
|
||||
outputDir: "manage",
|
||||
lintOnSave: true,
|
||||
productionSourceMap: false,
|
||||
@@ -23,7 +23,7 @@ module.exports = {
|
||||
port: 1888,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: 'http://10.165.0.173:8000',
|
||||
target: 'http://192.168.1.106:8000',
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
||||
Reference in New Issue
Block a user