flat: 暂存

This commit is contained in:
Apcallover
2024-04-17 17:37:24 +08:00
parent 458c0a6bbf
commit 7a85b657b6
3 changed files with 133 additions and 60 deletions

View File

@@ -18,7 +18,8 @@
label-width="100px" label-width="100px"
> >
<el-form-item label="分组名称" prop="groupName"> <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-item>
</el-form> </el-form>
<div slot="footer" style="text-align:right"> <div slot="footer" style="text-align:right">
@@ -28,14 +29,16 @@
icon="el-icon-check" icon="el-icon-check"
@click="handleSubmit" @click="handleSubmit"
:loading="loading" :loading="loading"
>提交</el-button> >提交
</el-button>
<el-button size="mini" icon="el-icon-circle-close" @click=" box = false" :loading="loading">取消</el-button> <el-button size="mini" icon="el-icon-circle-close" @click=" box = false" :loading="loading">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { addDept, updateDept } from "@/api/tenant/talents"; import {addDept, updateDept} from "@/api/tenant/talents";
export default { export default {
data() { data() {
return { return {
@@ -84,9 +87,9 @@ export default {
} }
}, },
handleSubmit() { handleSubmit() {
if(this.form.groupName){ if (this.form.groupName) {
this.$refs.groups.validate(valid=>{ this.$refs.groups.validate(valid => {
if(valid){ if (valid) {
if (this.type === "add") { if (this.type === "add") {
//提交新建分组接口 //提交新建分组接口
this.loading = true; this.loading = true;
@@ -130,8 +133,7 @@ export default {
} }
); );
} }
} } else {
else{
this.$message.error('请输入分组名称'); this.$message.error('请输入分组名称');
} }
}) })

View File

@@ -19,7 +19,7 @@
</template> </template>
<script> <script>
import {transferDept} from "@/api/tenant/talents"; import {getDeptMyTree, transferDept} from "@/api/tenant/talents";
export default { export default {
props: { props: {
@@ -31,12 +31,32 @@ export default {
groupId: "", groupId: "",
box: false, box: false,
form: {}, form: {},
option: { deptId: '',
depTree: []
};
},
computed: {
option() {
return {
menuPosition: "right", menuPosition: "right",
menuBtn: true, menuBtn: true,
submitBtn: true, submitBtn: true,
emptyBtn: false, emptyBtn: false,
column: [ column: [
{
label: "所属机构",
prop: "deptId",
type: "tree",
multiple: false,
dicData: this.depTree,
props: {
label: "title",
},
checkStrictly: true,
slot: true,
span: 24,
change: this.deptChange
},
{ {
label: "所属分组", label: "所属分组",
prop: "groupId", prop: "groupId",
@@ -62,12 +82,29 @@ export default {
], ],
placeholder: "请选择分组", placeholder: "请选择分组",
}, },
], ]
}
}
}, },
}; created() {
this.getDept()
}, },
computed: {},
methods: { 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() { closed() {
this.form = {}; this.form = {};
if (this.$refs.groups) { if (this.$refs.groups) {
@@ -77,7 +114,7 @@ export default {
} }
}, },
openDialog() { openDialog() {
this.title = "转移分组"; this.title = "转移推送";
this.box = true; this.box = true;
if (this.$refs.groups) { if (this.$refs.groups) {
this.$refs.groups.init(); this.$refs.groups.init();
@@ -87,7 +124,7 @@ export default {
}, },
handleSubmit(form, done) { handleSubmit(form, done) {
//提交转移分组接口 //提交转移分组接口
transferDept(this.form.groupId, this.ids).then( transferDept(this.form.groupId, this.ids, this.deptId).then(
() => { () => {
this.box = false; this.box = false;
this.$message({ this.$message({

View File

@@ -95,7 +95,7 @@
</el-button> </el-button>
<el-button type="warning" size="small" plain :disabled="!selectionList.length" icon="el-icon-sort" <el-button type="warning" size="small" plain :disabled="!selectionList.length" icon="el-icon-sort"
@click="handleTransfer" @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>
<el-button type="danger" size="small" icon="el-icon-delete" @click="handleDelete" <el-button type="danger" size="small" icon="el-icon-delete" @click="handleDelete"
:disabled="!selectionList.length" plain :disabled="!selectionList.length" plain
@@ -147,6 +147,7 @@ import {
getDept, getDept,
removeDept, removeDept,
upload, upload,
getDeptMyTree
} from "@/api/tenant/talents"; } from "@/api/tenant/talents";
import {getWorkTypes, getLabelList} from "@/api/tenant/common"; import {getWorkTypes, getLabelList} from "@/api/tenant/common";
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
@@ -195,7 +196,8 @@ export default {
tempWorkType: [], tempWorkType: [],
worktypeDic: {}, worktypeDic: {},
arr: [],////// arr: [],//////
depTree: [],
deptId: '',
excelBox: false, excelBox: false,
data: [], data: [],
obj: {}, obj: {},
@@ -394,11 +396,27 @@ export default {
}; };
}, },
excelOption() { 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 { return {
submitBtn: false, submitBtn: false,
emptyBtn: false, emptyBtn: false,
column: [ column: [
{
label: "所属机构",
prop: "deptId",
type: "tree",
multiple: false,
dicData: this.depTree,
props: {
label: "title",
},
checkStrictly: true,
slot: true,
span: 20,
change: this.deptChange
},
{ {
label: "文件上传", label: "文件上传",
prop: "excelFile", prop: "excelFile",
@@ -469,8 +487,24 @@ export default {
this.initDept(); this.initDept();
// this.getWorkTypes(); // this.getWorkTypes();
this.getLabelList(); this.getLabelList();
this.getDept()
}, },
methods: { 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() {
getWorkTypes().then((res) => { getWorkTypes().then((res) => {