文章类型:新闻/党建,招聘信息
This commit is contained in:
parent
53a50a8505
commit
267d71b797
|
@ -6,6 +6,7 @@ ENV = 'production'
|
|||
|
||||
# 若依管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_API_TARGET_URL = 'http://47.121.27.78:8080/'
|
||||
|
||||
# 应用访问路径 例如使用前缀 /admin/
|
||||
VUE_APP_CONTEXT_PATH = '/'
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"dev:prod": "vue-cli-service serve --mode=production",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
clearable
|
||||
@keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位职责" prop="postStatement">
|
||||
<el-input
|
||||
v-model="qu/>
|
||||
</el-form-item>
|
||||
<el-form-item label="薪资范围" prop="salaryRange">
|
||||
<el-input
|
||||
v-model="queryParams.salaryRange"
|
||||
|
@ -52,10 +48,10 @@
|
|||
placeholder="请选择发布时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否置顶 0:否 1:是" prop="isTop">
|
||||
<el-form-item label="是否置顶" prop="isTop">
|
||||
<el-input
|
||||
v-model="queryParams.isTop"
|
||||
placeholder="请输入是否置顶 0:否 1:是"
|
||||
placeholder="请输入是否置顶"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -76,26 +72,10 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布状态 0:否 1:是" prop="releaseState">
|
||||
<el-form-item label="发布状态" prop="releaseState">
|
||||
<el-input
|
||||
v-model="queryParams.releaseState"
|
||||
placeholder="请输入发布状态 0:否 1:是"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建者id" prop="createUserId">
|
||||
<el-input
|
||||
v-model="queryParams.createUserId"
|
||||
placeholder="请输入创建者id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新者id" prop="updateUserId">
|
||||
<el-input
|
||||
v-model="queryParams.updateUserId"
|
||||
placeholder="请输入更新者id"
|
||||
placeholder="请输入发布状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -150,26 +130,50 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="jobInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="jobInfoList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:cell-style="({ row, columnIndex }) => {
|
||||
return columnIndex === 11 ? {
|
||||
color: ['#ff4949', '#1890ff'][row.releaseState],
|
||||
} : {}
|
||||
}"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键id" align="center" prop="id" v-if="true"/>
|
||||
<el-table-column label="岗位名称" align="center" prop="jobName" />
|
||||
<el-table-column label="岗位职责" align="center" prop="postStatement" />
|
||||
<el-table-column label="职级" align="center" prop="postStatement" />
|
||||
<el-table-column label="薪资范围" align="center" prop="salaryRange" />
|
||||
<el-table-column label="工作地点" align="center" prop="baseSite" />
|
||||
<el-table-column label="学历" align="center" prop="education" />
|
||||
<el-table-column label="年龄范围" align="center" prop="ageRange" />
|
||||
<el-table-column label="发布时间" align="center" prop="releaseTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.releaseTime, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.releaseTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否置顶 0:否 1:是" align="center" prop="isTop" />
|
||||
<el-table-column label="岗位职责" align="center" prop="jobDuties" />
|
||||
<el-table-column label="任职要求" align="center" prop="qualification" />
|
||||
<el-table-column label="发布状态 0:否 1:是" align="center" prop="releaseState" />
|
||||
<el-table-column label="创建者id" align="center" prop="createUserId" />
|
||||
<el-table-column label="更新者id" align="center" prop="updateUserId" />
|
||||
<el-table-column
|
||||
label="是否置顶"
|
||||
align="center"
|
||||
prop="isTop"
|
||||
:formatter="(row, column, cellValue, index) => ['否', '是'][cellValue]"
|
||||
/>
|
||||
<el-table-column label="岗位职责" align="center" prop="jobDuties">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="multiple-line-content-show">{{ row.jobDuties }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任职要求" align="center" prop="qualification">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="multiple-line-content-show">{{ row.qualification }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="发布状态"
|
||||
align="center"
|
||||
prop="releaseState"
|
||||
:formatter="(row, column, cellValue, index) => ['下架', '发布'][cellValue]"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -199,51 +203,109 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改招聘信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="岗位名称" prop="jobName">
|
||||
<el-input v-model="form.jobName" placeholder="请输入岗位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位职责" prop="postStatement">
|
||||
<el-input v-model="form.postStatement" placeholder="请输入岗位职责" />
|
||||
<el-form-item label="职级" prop="postStatement">
|
||||
<el-select
|
||||
:value="form.postStatement ? form.postStatement.split(',') : []"
|
||||
@input="v => $set(form, 'postStatement', v.join(','))"
|
||||
placeholder="请选择职级"
|
||||
multiple
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in ['主管', '专员', '高级经理', '经理']"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="薪资范围" prop="salaryRange">
|
||||
<el-input v-model="form.salaryRange" placeholder="请输入薪资范围" />
|
||||
<el-input :value="form.salaryRange" readonly placeholder="请选择薪资范围" />
|
||||
<el-slider
|
||||
:value="form.salaryRange.replaceAll('k', '').split('-').map(Number)"
|
||||
@input="v => $set(form, 'salaryRange', v.map(n => n + 'k').join('-'))"
|
||||
range
|
||||
:min="0"
|
||||
:max="100"
|
||||
></el-slider>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作地点" prop="baseSite">
|
||||
<el-input v-model="form.baseSite" placeholder="请输入工作地点" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学历" prop="education">
|
||||
<el-input v-model="form.education" placeholder="请输入学历" />
|
||||
<el-cascader
|
||||
:value="selectedLocates"
|
||||
@input="v => $set(form, 'baseSite', v.map(item => item[1]).join(','))"
|
||||
:options="locationOptions"
|
||||
:show-all-levels="false"
|
||||
placeholder="请选择工作地点"
|
||||
:props="{ multiple: true, value: 'label' }"
|
||||
style="width: 100%;"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄范围" prop="ageRange">
|
||||
<el-input v-model="form.ageRange" placeholder="请输入年龄范围" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布时间" prop="releaseTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.releaseTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择发布时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否置顶 0:否 1:是" prop="isTop">
|
||||
<el-input v-model="form.isTop" placeholder="请输入是否置顶 0:否 1:是" />
|
||||
<el-input :value="form.ageRange" readonly placeholder="请选择年龄范围" />
|
||||
<el-slider
|
||||
:value="form.ageRange.replace('岁', '').split('-').map(Number)"
|
||||
@input="v => $set(form, 'ageRange', v.join('-') + '岁')"
|
||||
range
|
||||
:min="18"
|
||||
:max="50"
|
||||
></el-slider>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学历" prop="education">
|
||||
<el-select v-model="form.education" placeholder="请选择学历">
|
||||
<el-option
|
||||
v-for="item in ['博士研究生', '研究生', '统招本科', '专科', '高中']"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否置顶" prop="isTop">
|
||||
<el-radio-group v-model="form.isTop">
|
||||
<el-radio label="0">否</el-radio>
|
||||
<el-radio label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="岗位职责" prop="jobDuties">
|
||||
<el-input v-model="form.jobDuties" placeholder="请输入岗位职责" />
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.jobDuties"
|
||||
placeholder="请输入岗位职责"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任职要求" prop="qualification">
|
||||
<el-input v-model="form.qualification" placeholder="请输入任职要求" />
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.qualification"
|
||||
placeholder="请输入任职要求"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布状态 0:否 1:是" prop="releaseState">
|
||||
<el-input v-model="form.releaseState" placeholder="请输入发布状态 0:否 1:是" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建者id" prop="createUserId">
|
||||
<el-input v-model="form.createUserId" placeholder="请输入创建者id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新者id" prop="updateUserId">
|
||||
<el-input v-model="form.updateUserId" placeholder="请输入更新者id" />
|
||||
<el-form-item label="发布状态" prop="releaseState">
|
||||
<div style="height: 36px; display: flex; align-items: center;">
|
||||
<el-switch
|
||||
style="display: block"
|
||||
v-model="form.releaseState"
|
||||
inactive-color="#ff4949"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
active-text="发布"
|
||||
inactive-text="下架"
|
||||
>
|
||||
</el-switch>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -261,6 +323,7 @@ export default {
|
|||
name: "JobInfo",
|
||||
data() {
|
||||
return {
|
||||
console: window.console,
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
|
@ -300,7 +363,22 @@ export default {
|
|||
updateUserId: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
isTop: '0',
|
||||
salaryRange: '5k-8k',
|
||||
ageRange: '20-30岁',
|
||||
releaseState: '1',
|
||||
},
|
||||
locationOptions: [
|
||||
{
|
||||
label: '国内',
|
||||
children: [{ label: '北京' }, { label: '上海' }],
|
||||
},
|
||||
{
|
||||
label: '国外',
|
||||
children: [{ label: '中东' }],
|
||||
},
|
||||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
|
@ -310,10 +388,9 @@ export default {
|
|||
{ required: true, message: "岗位名称不能为空", trigger: "blur" }
|
||||
],
|
||||
postStatement: [
|
||||
{ required: true, message: "岗位职责不能为空", trigger: "blur" }
|
||||
{ required: true, message: "岗位职级不能为空", trigger: "blur" }
|
||||
],
|
||||
|
||||
salaryRange: [
|
||||
salaryRange: [
|
||||
{ required: true, message: "薪资范围不能为空", trigger: "blur" }
|
||||
],
|
||||
baseSite: [
|
||||
|
@ -349,12 +426,30 @@ salaryRange: [
|
|||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
formatLocations () {
|
||||
const result = [];
|
||||
this.locationOptions.forEach(item => {
|
||||
item.children.forEach(it => {
|
||||
result.push({ parent: item.label, label: it.label });
|
||||
});
|
||||
});
|
||||
return result;
|
||||
},
|
||||
selectedLocates () {
|
||||
if (!this.form.baseSite) return [];
|
||||
const result = this.form.baseSite.split(',').map(site => {
|
||||
const target = this.formatLocations.find(item => item.label === site);
|
||||
return [target.parent, target.label];
|
||||
});
|
||||
return result;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询招聘信息
|
||||
列表 */
|
||||
/** 查询招聘信息 列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listJobInfo(this.queryParams).then(response => {
|
||||
|
@ -374,16 +469,16 @@ salaryRange: [
|
|||
id: undefined,
|
||||
jobName: undefined,
|
||||
postStatement: undefined,
|
||||
salaryRange: undefined,
|
||||
salaryRange: '5k-8k',
|
||||
baseSite: undefined,
|
||||
education: undefined,
|
||||
ageRange: undefined,
|
||||
ageRange: '20-30岁',
|
||||
releaseTime: undefined,
|
||||
isTop: undefined,
|
||||
isTop: '0',
|
||||
jobDuties: undefined,
|
||||
qualification: undefined,
|
||||
createBy: undefined,
|
||||
releaseState: undefined,
|
||||
releaseState: '1',
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
|
@ -475,3 +570,22 @@ salaryRange: [
|
|||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-switch__label {
|
||||
color: #cccccc;
|
||||
}
|
||||
::v-deep .el-switch__label--left.is-active {
|
||||
color: #ff4949;
|
||||
}
|
||||
::v-deep .el-switch__label--right.is-active {
|
||||
color: #1890ff;
|
||||
}
|
||||
.multiple-line-content-show {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -10,6 +10,13 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="queryParams.type" @change="handleQuery">
|
||||
<el-option value="" label="全部"></el-option>
|
||||
<el-option value="1" label="新闻"></el-option>
|
||||
<el-option value="2" label="党建"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布时间" prop="releaseTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.releaseTime"
|
||||
|
@ -96,6 +103,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标题名称" align="center" prop="captionName" />
|
||||
<el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
prop="type"
|
||||
:formatter="(row, column, cellValue, index) => ['党建', '新闻'][cellValue]"
|
||||
/>
|
||||
<el-table-column label="发布时间" align="center" prop="releaseTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.releaseTime, '{y}-{m}-{d}') }}</span>
|
||||
|
@ -108,9 +121,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="摘要" align="center" prop="abstracts" />
|
||||
<el-table-column label="是否置顶" align="center" prop="isTop" :formatter="(row, column, cellValue, index) => ['否', '是'][cellValue || '0']" />
|
||||
<el-table-column label="创建者id" align="center" prop="createUserId" />
|
||||
<el-table-column label="更新者id" align="center" prop="updateUserId" />
|
||||
<el-table-column
|
||||
label="是否置顶"
|
||||
align="center"
|
||||
prop="isTop"
|
||||
:formatter="(row, column, cellValue, index) => ['否', '是'][cellValue || '0']"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -157,10 +173,10 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否置顶" prop="isTop">
|
||||
<el-radio-group v-model="form.isTop">
|
||||
<el-radio label="0">否</el-radio>
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-radio-group v-model="form.type">
|
||||
<el-radio label="1">新闻</el-radio>
|
||||
<el-radio label="0">党建</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -171,9 +187,21 @@
|
|||
<el-form-item label="摘要" prop="abstracts">
|
||||
<el-input v-model="form.abstracts" placeholder="请输入摘要" />
|
||||
</el-form-item>
|
||||
<el-form-item label="封面" prop="cover">
|
||||
<ImageUploadLochost v-model="form.cover" :limit="1" :fileSize="10" />
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="封面" prop="cover">
|
||||
<ImageUploadLochost v-model="form.cover" :limit="1" :fileSize="10" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否置顶" prop="isTop">
|
||||
<el-radio-group v-model="form.isTop">
|
||||
<el-radio label="0">否</el-radio>
|
||||
<el-radio label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="新闻内容" prop="newsContent">
|
||||
<editor v-model="form.newsContent" :min-height="192"/>
|
||||
</el-form-item>
|
||||
|
@ -224,6 +252,7 @@ export default {
|
|||
newsContent: undefined,
|
||||
abstracts: undefined,
|
||||
isTop: undefined,
|
||||
type: '',
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
@ -251,7 +280,10 @@ export default {
|
|||
{ required: true, message: "摘要不能为空", trigger: "blur" }
|
||||
],
|
||||
isTop: [
|
||||
{ required: true, message: "是否置顶 0:否 1:是不能为空", trigger: "blur" }
|
||||
{ required: true, message: "是否置顶不能为空", trigger: "blur" }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: "类型不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
|
@ -286,6 +318,7 @@ export default {
|
|||
newsContent: undefined,
|
||||
abstracts: undefined,
|
||||
isTop: '0',
|
||||
type: '1',
|
||||
createBy: undefined,
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
|
|
|
@ -37,9 +37,9 @@ module.exports = {
|
|||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: process.env.VUE_APP_API_TARGET_URL,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
pathRewrite: process.env.NODE_ENV === 'development' ? {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
}
|
||||
} : {},
|
||||
},
|
||||
},
|
||||
disableHostCheck: true
|
||||
|
|
Loading…
Reference in New Issue
Block a user