flat: 暂存
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="分组名称" prop="groupName">
|
||||
<el-input v-model="form.groupName" placeholder="请输入 分组名称" size="small" :disabled="loading" maxlength="40" show-word-limit></el-input>
|
||||
<el-input v-model="form.groupName" placeholder="请输入 分组名称" size="small" :disabled="loading" maxlength="40"
|
||||
show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" style="text-align:right">
|
||||
@@ -28,14 +29,16 @@
|
||||
icon="el-icon-check"
|
||||
@click="handleSubmit"
|
||||
:loading="loading"
|
||||
>提交</el-button>
|
||||
>提交
|
||||
</el-button>
|
||||
<el-button size="mini" icon="el-icon-circle-close" @click=" box = false" :loading="loading">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addDept, updateDept } from "@/api/tenant/talents";
|
||||
import {addDept, updateDept} from "@/api/tenant/talents";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -84,54 +87,53 @@ export default {
|
||||
}
|
||||
},
|
||||
handleSubmit() {
|
||||
if(this.form.groupName){
|
||||
this.$refs.groups.validate(valid=>{
|
||||
if(valid){
|
||||
if (this.form.groupName) {
|
||||
this.$refs.groups.validate(valid => {
|
||||
if (valid) {
|
||||
if (this.type === "add") {
|
||||
//提交新建分组接口
|
||||
this.loading = true;
|
||||
addDept({
|
||||
groupName: this.form.groupName,
|
||||
groupType: 9,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.box = false;
|
||||
this.$emit("refresh");
|
||||
this.loading = false;
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
this.loading = false;
|
||||
//提交新建分组接口
|
||||
this.loading = true;
|
||||
addDept({
|
||||
groupName: this.form.groupName,
|
||||
groupType: 9,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.box = false;
|
||||
this.$emit("refresh");
|
||||
this.loading = false;
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
} else if (this.type == "edit") {
|
||||
//提交编辑分组接口
|
||||
this.loading = true;
|
||||
updateDept({
|
||||
id: this.groupId,
|
||||
groupName: this.form.groupName,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.box = false;
|
||||
this.$emit("refresh");
|
||||
this.loading = false;
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
} else if (this.type == "edit") {
|
||||
//提交编辑分组接口
|
||||
this.loading = true;
|
||||
updateDept({
|
||||
id: this.groupId,
|
||||
groupName: this.form.groupName,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.box = false;
|
||||
this.$emit("refresh");
|
||||
this.loading = false;
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
this.$message.error('请输入分组名称');
|
||||
}
|
||||
})
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {transferDept} from "@/api/tenant/talents";
|
||||
import {getDeptMyTree, transferDept} from "@/api/tenant/talents";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -31,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,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) {
|
||||
@@ -77,7 +114,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openDialog() {
|
||||
this.title = "转移分组";
|
||||
this.title = "转移推送";
|
||||
this.box = true;
|
||||
if (this.$refs.groups) {
|
||||
this.$refs.groups.init();
|
||||
@@ -87,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({
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</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)">转移分组
|
||||
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
|
||||
@@ -147,6 +147,7 @@ import {
|
||||
getDept,
|
||||
removeDept,
|
||||
upload,
|
||||
getDeptMyTree
|
||||
} from "@/api/tenant/talents";
|
||||
import {getWorkTypes, getLabelList} from "@/api/tenant/common";
|
||||
import {mapGetters} from "vuex";
|
||||
@@ -195,7 +196,8 @@ export default {
|
||||
tempWorkType: [],
|
||||
worktypeDic: {},
|
||||
arr: [],//////
|
||||
|
||||
depTree: [],
|
||||
deptId: '',
|
||||
excelBox: false,
|
||||
data: [],
|
||||
obj: {},
|
||||
@@ -394,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",
|
||||
@@ -469,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) => {
|
||||
|
||||
Reference in New Issue
Block a user