政策页面添加标签
This commit is contained in:
@@ -34,10 +34,8 @@
|
||||
</span>
|
||||
</el-tree>
|
||||
<!-- v-show="vaildData(permission.tenant_wage_payroll_view, false)" -->
|
||||
|
||||
<div class="footer" style="padding-left: 6px">
|
||||
<el-button type="text" icon="el-icon-plus" @click="updateGroups('add')">
|
||||
新建分组</el-button>
|
||||
<el-button type="text" icon="el-icon-plus" @click="updateGroups('add')">新建分组</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@@ -53,8 +51,8 @@
|
||||
<!--搜索栏-->
|
||||
<el-form size="small" label-position="right" :inline="true" style="padding-left: 10px; padding-right: 10px">
|
||||
<el-row :span="24">
|
||||
<el-form-item label="标签名:">
|
||||
<el-input v-model="query.name" placeholder="标签名" clearable></el-input>
|
||||
<el-form-item label="政策名:">
|
||||
<el-input v-model="query.name" placeholder="政策名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务类型:">
|
||||
<el-select v-model="query.stype" placeholder="服务类型" style="width: 100%" filterable clearable>
|
||||
@@ -62,12 +60,6 @@
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="工种:">
|
||||
<el-select v-model="query.worktypes" placeholder="工种" style="width: 100%" filterable clearable>
|
||||
<el-option v-for="(item, key, index) in worktypeData" :key="index" :label="item.name"
|
||||
:value="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<div class="searchBtn">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="searchChange1">搜 索</el-button>
|
||||
@@ -82,9 +74,10 @@
|
||||
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
|
||||
@refresh-change="refreshChange" class="customPage">
|
||||
<!--自定义列-->
|
||||
<template slot="worktypes" slot-scope="{ row }">
|
||||
<el-tooltip effect="dark" :content="row.worktypes" placement="top">
|
||||
<div>{{ row.worktypes | ellipsis }}</div>
|
||||
<template slot="labelName" slot-scope="{ row }">
|
||||
<el-tooltip effect="dark" placement="top">
|
||||
<div slot="content" v-for="(item, index) in row.labelNameArr" :key="index">{{ item }}<br /></div>
|
||||
<div>{{ row.labelName | ellipsis }}</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template slot="resume" slot-scope="{ row }">
|
||||
@@ -95,8 +88,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<!--/自定义列-->
|
||||
<template slot="worktypesForm">
|
||||
<tag-select v-model="selectedWorkTypes" :prop="{ label: 'name', value: 'name' }" :data="worktypeData">
|
||||
<template slot="labelNameForm">
|
||||
<tag-select v-model="selectedWorkTypes" :prop="{ label: 'name', value: 'name' }" :data="arr">
|
||||
</tag-select>
|
||||
</template>
|
||||
<!--自定义按钮-->
|
||||
@@ -111,8 +104,8 @@
|
||||
</template>
|
||||
<template slot="name" slot-scope="{row}">
|
||||
<span>{{ row.name }}</span>
|
||||
<!-- <span v-if="row.status == 1">{{ row.name }}</span> -->
|
||||
<!-- <span v-else>{{ row.name }}(<span style="color: red;">未实名</span>)</span> -->
|
||||
<!-- <span v-if="row.status == 1">{{ row.name }}</span>
|
||||
<span v-else>{{ row.name }}(<span style="color: red;">未实名</span>)</span> -->
|
||||
|
||||
</template>
|
||||
<!--/自定义按钮-->
|
||||
@@ -133,7 +126,6 @@
|
||||
<!--/批量导入-->
|
||||
<!--新建 编辑分组dialog-->
|
||||
<add-groups ref="addGroups" @refresh="refresh" :treeData="treeData"></add-groups>
|
||||
<!--/新建 编辑分组dialog-->
|
||||
<!--转移分组dialog-->
|
||||
<transfer-groups ref="transferGroups" @refresh="refresh" :ids="ids"></transfer-groups>
|
||||
<!--/转移分组dialog-->
|
||||
@@ -155,7 +147,7 @@ import {
|
||||
removeDept,
|
||||
upload,
|
||||
} from "@/api/tenant/policy";
|
||||
import { getWorkTypes } from "@/api/tenant/common";
|
||||
import { getWorkTypes, getLabelList } from "@/api/tenant/common";
|
||||
import { mapGetters } from "vuex";
|
||||
import addGroups from "./Dialog/addGroups";
|
||||
import transferGroups from "./Dialog/transferGroups";
|
||||
@@ -163,8 +155,8 @@ import Resume from "@/components/resume/index";
|
||||
import { check18IdCardNo, isvalidatemobile, isExcel } from "@/util/validate";
|
||||
import { getTemplate } from "@/api/resource/template";
|
||||
import ied from "@/views/util/import-error-dialog";
|
||||
import { excelAccept } from "@/common/accept";
|
||||
import { serviceType } from "@/common/dic";
|
||||
import { excelAccept } from "@/common/accept";
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
@@ -176,7 +168,7 @@ export default {
|
||||
return value;
|
||||
},
|
||||
},
|
||||
name: "tenant_talents",
|
||||
name: "tenant_policy",
|
||||
data() {
|
||||
return {
|
||||
activeNames: "1",
|
||||
@@ -275,11 +267,11 @@ export default {
|
||||
option() {
|
||||
const self = this;
|
||||
const IdCardNo = (rule, value, callback) => {
|
||||
if (check18IdCardNo(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证格式不正确"));
|
||||
}
|
||||
// if (check18IdCardNo(value)) {
|
||||
callback();
|
||||
// } else {
|
||||
// callback(new Error("身份证格式不正确"));
|
||||
// }
|
||||
};
|
||||
const validateTel = (rule, value, callback) => {
|
||||
if (isvalidatemobile(value)[0]) {
|
||||
@@ -298,17 +290,17 @@ export default {
|
||||
columnBtn: false,
|
||||
searchBtn: true,
|
||||
searchShow: true,
|
||||
viewBtn: true,
|
||||
searchMenuSpan: 6,
|
||||
border: true,
|
||||
index: true,
|
||||
viewBtn: true,
|
||||
indexLabel: "序号",
|
||||
selection: true,
|
||||
dialogType: "dialog",
|
||||
dialogType: "drawer",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "标签名",
|
||||
label: "政策名",
|
||||
prop: "name",
|
||||
// search: true,
|
||||
span: 24,
|
||||
@@ -316,23 +308,13 @@ export default {
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入标签名",
|
||||
message: "请输入政策名",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
slot: true
|
||||
},
|
||||
// {
|
||||
// label: "身份证",
|
||||
// prop: "idNumber",
|
||||
// hide: true,
|
||||
// span: 24,
|
||||
// rules: [
|
||||
// { required: true, message: "请输入身份证号", trigger: "blur" },
|
||||
// { trigger: "blur", validator: IdCardNo },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// label: "手机号",
|
||||
// prop: "telphone",
|
||||
// span: 24,
|
||||
@@ -403,20 +385,20 @@ export default {
|
||||
],
|
||||
placeholder: "请选择 服务类型",
|
||||
},
|
||||
// {
|
||||
// label: "工种",
|
||||
// prop: "worktypes",
|
||||
// rules: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请选择工种",
|
||||
// trigger: ["blur"],
|
||||
// },
|
||||
// ],
|
||||
// slot: true,
|
||||
// formslot: true,
|
||||
// span: 24,
|
||||
// },
|
||||
{
|
||||
label: "标签",
|
||||
prop: "labelName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择标签",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
slot: true,
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
// {
|
||||
// label: "简历",
|
||||
// prop: "resume",
|
||||
@@ -438,11 +420,11 @@ export default {
|
||||
},
|
||||
selectedWorkTypes: {
|
||||
get() {
|
||||
if (!this.obj.worktypes) {
|
||||
if (!this.obj.labelName) {
|
||||
return [];
|
||||
}
|
||||
const result = [];
|
||||
const wt = this.obj.worktypes.split(",");
|
||||
const wt = this.obj.labelName ? this.obj.labelName.split(",") : [];
|
||||
wt.forEach((item) => {
|
||||
result.push({ name: item });
|
||||
});
|
||||
@@ -453,7 +435,7 @@ export default {
|
||||
val.forEach((item) => {
|
||||
arr.push(item.name);
|
||||
});
|
||||
this.obj.worktypes = arr.join(",");
|
||||
this.obj.labelName = arr.join(",");
|
||||
},
|
||||
},
|
||||
worktypeData() {
|
||||
@@ -481,6 +463,7 @@ export default {
|
||||
created() {
|
||||
this.initDept();
|
||||
// this.getWorkTypes();
|
||||
this.getLabelList();
|
||||
},
|
||||
methods: {
|
||||
getWorkTypes() {
|
||||
@@ -495,6 +478,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getLabelList() {
|
||||
getLabelList().then(async (res) => {
|
||||
const arr = res.data.data.flatMap(obj => obj.child.map(item => item.concatName));
|
||||
this.arr = arr.map(concatName => {
|
||||
return { name: concatName };
|
||||
});
|
||||
});
|
||||
},
|
||||
/*加载分组*/
|
||||
initDept(groupId) {
|
||||
getDept().then((res) => {
|
||||
@@ -631,7 +622,7 @@ export default {
|
||||
detail(this.obj.id).then(
|
||||
(res) => {
|
||||
this.obj = res.data.data;
|
||||
// this.tempWorkType = this.obj.worktypes.split(",");
|
||||
this.tempWorkType = this.obj.labelName ? this.obj.labelName.split(",") : [];
|
||||
done();
|
||||
},
|
||||
(error) => {
|
||||
@@ -652,9 +643,8 @@ export default {
|
||||
name: row.name,
|
||||
idNumber: row.idNumber,
|
||||
telphone: row.telphone,
|
||||
worktypes: row.worktypes,
|
||||
labelName: row.labelName,
|
||||
remarks: row.remarks,
|
||||
stype: row.stype,
|
||||
}).then(
|
||||
() => {
|
||||
this.$message({
|
||||
@@ -678,7 +668,7 @@ export default {
|
||||
name: row.name,
|
||||
idNumber: row.idNumber,
|
||||
telphone: row.telphone,
|
||||
worktypes: row.worktypes,
|
||||
labelName: row.labelName,
|
||||
remarks: row.remarks,
|
||||
}).then(
|
||||
() => {
|
||||
@@ -898,15 +888,15 @@ export default {
|
||||
/*加载人才列表 */
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
console.log(this.query, '999999999999')
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
|
||||
|
||||
Object.assign(params, this.query),
|
||||
this.tenantId
|
||||
).then((res) => {
|
||||
res.data.data.records.forEach(item => {
|
||||
item.labelNameArr = this.obj.labelName ? this.obj.labelName.split(",") : [];
|
||||
})
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
|
||||
@@ -57,12 +57,6 @@
|
||||
<el-form-item label="身份证:">
|
||||
<el-input v-model="query.idNumber" placeholder="请输入身份证" clearable></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="标签:">
|
||||
<el-select v-model="query.worktypes" placeholder="标签" style="width: 100%" filterable clearable>
|
||||
<el-option v-for="(item, key, index) in worktypeData" :key="index" :label="item.name"
|
||||
:value="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<div class="searchBtn">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="searchChange1">搜 索</el-button>
|
||||
@@ -297,7 +291,7 @@ export default {
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
selection: true,
|
||||
dialogType: "dialog",
|
||||
dialogType: "drawer",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
@@ -487,7 +481,6 @@ export default {
|
||||
});
|
||||
},
|
||||
getLabelList() {
|
||||
|
||||
getLabelList().then(async (res) => {
|
||||
const arr = res.data.data.flatMap(obj => obj.child.map(item => item.concatName));
|
||||
this.arr = arr.map(concatName => {
|
||||
|
||||
Reference in New Issue
Block a user