|
@@ -10,41 +10,15 @@
|
|
v-show="showSearch"
|
|
v-show="showSearch"
|
|
@submit.native.prevent
|
|
@submit.native.prevent
|
|
>
|
|
>
|
|
- <el-form-item label="职位名称">
|
|
|
|
|
|
+ <el-form-item label="标题">
|
|
<el-input
|
|
<el-input
|
|
- v-model="queryParams.jobName"
|
|
|
|
- placeholder="请输入职位名称"
|
|
|
|
|
|
+ v-model="queryParams.title"
|
|
|
|
+ placeholder="请输入标题"
|
|
clearable
|
|
clearable
|
|
style="width: 240px"
|
|
style="width: 240px"
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <!-- <el-form-item label="状态" prop="status">
|
|
|
|
- <el-select
|
|
|
|
- v-model="queryParams.status"
|
|
|
|
- placeholder="角色状态"
|
|
|
|
- clearable
|
|
|
|
- style="width: 240px"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in dict.type.sys_normal_disable"
|
|
|
|
- :key="dict.value"
|
|
|
|
- :label="dict.label"
|
|
|
|
- :value="dict.value"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item> -->
|
|
|
|
- <!-- <el-form-item label="创建时间">
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="dateRange"
|
|
|
|
- style="width: 240px"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- type="daterange"
|
|
|
|
- range-separator="-"
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
- ></el-date-picker>
|
|
|
|
- </el-form-item> -->
|
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
@@ -70,53 +44,40 @@
|
|
>新增</el-button
|
|
>新增</el-button
|
|
>
|
|
>
|
|
</el-col>
|
|
</el-col>
|
|
- <!-- <el-col :span="1.5">
|
|
|
|
- <el-button
|
|
|
|
- type="success"
|
|
|
|
- plain
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- size="mini"
|
|
|
|
- :disabled="selectRows.length !== 1"
|
|
|
|
- @click="handleUpdate"
|
|
|
|
- >编辑</el-button
|
|
|
|
- >
|
|
|
|
- </el-col> -->
|
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
|
- <el-button
|
|
|
|
- type="danger"
|
|
|
|
- plain
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
- size="mini"
|
|
|
|
- :disabled="!selectRows.length"
|
|
|
|
- @click="handleDelete"
|
|
|
|
- >删除</el-button
|
|
|
|
- >
|
|
|
|
- </el-col> -->
|
|
|
|
<right-toolbar
|
|
<right-toolbar
|
|
:showSearch.sync="showSearch"
|
|
:showSearch.sync="showSearch"
|
|
@queryTable="getList"
|
|
@queryTable="getList"
|
|
></right-toolbar>
|
|
></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <!-- @selection-change="handleSelectionChange" -->
|
|
|
|
<el-table v-loading="loading" :data="tableData">
|
|
<el-table v-loading="loading" :data="tableData">
|
|
- <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
|
- <el-table-column label="职位编号" prop="hireInfoId" width="120" />
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="职位名称"
|
|
|
|
- prop="jobName"
|
|
|
|
|
|
+ label="编号"
|
|
|
|
+ prop="officialAccountId"
|
|
|
|
+ width="120"
|
|
|
|
+ align="center"
|
|
|
|
+ />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="标题"
|
|
|
|
+ prop="title"
|
|
|
|
+ align="center"
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
width="150"
|
|
width="150"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="工作地点"
|
|
|
|
- prop="jobLocation"
|
|
|
|
|
|
+ label="作者"
|
|
|
|
+ prop="author"
|
|
|
|
+ align="center"
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
width="150"
|
|
width="150"
|
|
/>
|
|
/>
|
|
- <el-table-column label="薪资" prop="salary" />
|
|
|
|
- <el-table-column label="资历" prop="seniority" />
|
|
|
|
- <el-table-column label="福利" prop="benefit" />
|
|
|
|
|
|
+ <el-table-column label="跳转地址" prop="url" align="center" />
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="类别"
|
|
|
|
+ prop="publishType"
|
|
|
|
+ align="center"
|
|
|
|
+ :formatter="typeFormatter"
|
|
|
|
+ />
|
|
|
|
|
|
<el-table-column label="状态" align="center">
|
|
<el-table-column label="状态" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -132,9 +93,9 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="创建时间"
|
|
|
|
|
|
+ label="发布时间"
|
|
align="center"
|
|
align="center"
|
|
- prop="createTime"
|
|
|
|
|
|
+ prop="publishTime"
|
|
width="180"
|
|
width="180"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -175,12 +136,12 @@
|
|
|
|
|
|
<!-- 新增编辑弹窗 width="500px"-->
|
|
<!-- 新增编辑弹窗 width="500px"-->
|
|
<el-dialog :title="title" :visible.sync="dlgVisible" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="dlgVisible" append-to-body>
|
|
- <addJob
|
|
|
|
|
|
+ <addNewsDlg
|
|
:loading="dlgLoading"
|
|
:loading="dlgLoading"
|
|
:infoData="infoData"
|
|
:infoData="infoData"
|
|
@save="handleSave"
|
|
@save="handleSave"
|
|
@cancel="handleCancel"
|
|
@cancel="handleCancel"
|
|
- ></addJob>
|
|
|
|
|
|
+ ></addNewsDlg>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -189,17 +150,17 @@
|
|
import {
|
|
import {
|
|
getList,
|
|
getList,
|
|
getDetail,
|
|
getDetail,
|
|
- addHireInfo,
|
|
|
|
- editHireInfo,
|
|
|
|
- editHireInfoStatus,
|
|
|
|
- delHireInfo,
|
|
|
|
-} from "@/api/recruitInfoManage";
|
|
|
|
|
|
+ addNews,
|
|
|
|
+ editNews,
|
|
|
|
+ editNewsStatus,
|
|
|
|
+ delNews,
|
|
|
|
+} from "@/api/newsManage";
|
|
|
|
|
|
-import addJob from "./components/addJob.vue";
|
|
|
|
|
|
+import addNewsDlg from "./components/addNews.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "RecruitInfoManage",
|
|
name: "RecruitInfoManage",
|
|
- components: { addJob },
|
|
|
|
|
|
+ components: { addNewsDlg },
|
|
dicts: [],
|
|
dicts: [],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -211,7 +172,7 @@ export default {
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- jobName: "",
|
|
|
|
|
|
+ title: "",
|
|
},
|
|
},
|
|
// 数据量
|
|
// 数据量
|
|
total: 0,
|
|
total: 0,
|
|
@@ -228,12 +189,22 @@ export default {
|
|
title: "",
|
|
title: "",
|
|
infoData: {},
|
|
infoData: {},
|
|
dlgLoading: false,
|
|
dlgLoading: false,
|
|
|
|
+ // 类别
|
|
|
|
+ typeOptions: [
|
|
|
|
+ { value: "1", label: "公司喜讯" },
|
|
|
|
+ { value: "2", label: "公司动态" },
|
|
|
|
+ { value: "3", label: "行业动态" },
|
|
|
|
+ ],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ typeFormatter(row) {
|
|
|
|
+ let obj = this.typeOptions.find((dict) => dict.value === row.publishType);
|
|
|
|
+ return obj.label;
|
|
|
|
+ },
|
|
// 搜索
|
|
// 搜索
|
|
handleQuery() {
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1;
|
|
this.queryParams.pageNum = 1;
|
|
@@ -244,7 +215,7 @@ export default {
|
|
this.queryParams = {
|
|
this.queryParams = {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- jobName: "",
|
|
|
|
|
|
+ title: "",
|
|
};
|
|
};
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
@@ -269,11 +240,8 @@ export default {
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.dlgVisible = true;
|
|
this.dlgVisible = true;
|
|
this.title = "编辑";
|
|
this.title = "编辑";
|
|
- const hireInfoId = row.hireInfoId
|
|
|
|
- ? row.hireInfoId
|
|
|
|
- : this.selectRows[0].hireInfoId;
|
|
|
|
this.dlgLoading = true;
|
|
this.dlgLoading = true;
|
|
- getDetail(hireInfoId)
|
|
|
|
|
|
+ getDetail(row.officialAccountId)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
console.log(res);
|
|
console.log(res);
|
|
this.infoData = res.data;
|
|
this.infoData = res.data;
|
|
@@ -283,8 +251,8 @@ export default {
|
|
// 确认新增/修改
|
|
// 确认新增/修改
|
|
handleSave(data) {
|
|
handleSave(data) {
|
|
this.dlgLoading = true;
|
|
this.dlgLoading = true;
|
|
- if (data.hireInfoId) {
|
|
|
|
- editHireInfo(data)
|
|
|
|
|
|
+ if (data.officialAccountId) {
|
|
|
|
+ editNews(data)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.$message.success(res.msg);
|
|
this.$message.success(res.msg);
|
|
this.handleCancel();
|
|
this.handleCancel();
|
|
@@ -292,7 +260,7 @@ export default {
|
|
})
|
|
})
|
|
.finally(() => (this.dlgLoading = false));
|
|
.finally(() => (this.dlgLoading = false));
|
|
} else {
|
|
} else {
|
|
- addHireInfo(data)
|
|
|
|
|
|
+ addNews(data)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.$message.success(res.msg);
|
|
this.$message.success(res.msg);
|
|
this.handleCancel();
|
|
this.handleCancel();
|
|
@@ -307,12 +275,10 @@ export default {
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
- const ids = this.selectRows.map((item) => item.hireInfoId).join();
|
|
|
|
- const hireInfoIds = row.hireInfoId || ids;
|
|
|
|
this.$modal
|
|
this.$modal
|
|
.confirm("是否确认删除数据")
|
|
.confirm("是否确认删除数据")
|
|
.then(function () {
|
|
.then(function () {
|
|
- return delHireInfo(hireInfoIds);
|
|
|
|
|
|
+ return delNews(row.officialAccountId);
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.getList();
|
|
this.getList();
|
|
@@ -326,14 +292,14 @@ export default {
|
|
// 修改招聘信息状态
|
|
// 修改招聘信息状态
|
|
changeStatus(row) {
|
|
changeStatus(row) {
|
|
let params = {
|
|
let params = {
|
|
- hireInfoIds: row.hireInfoId,
|
|
|
|
|
|
+ officialAccountIds: row.officialAccountId,
|
|
status: row.status,
|
|
status: row.status,
|
|
};
|
|
};
|
|
// console.log(params, 1211);
|
|
// console.log(params, 1211);
|
|
this.$modal
|
|
this.$modal
|
|
.confirm("是否确认修改状态")
|
|
.confirm("是否确认修改状态")
|
|
.then(function () {
|
|
.then(function () {
|
|
- return editHireInfoStatus(params);
|
|
|
|
|
|
+ return editNewsStatus(params);
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.getList();
|
|
this.getList();
|