资本服务与高薪技术配置联动

This commit is contained in:
wangchengming 2024-10-22 20:11:14 +08:00
parent 23b1abaa8d
commit 4e46c4a716
2 changed files with 383 additions and 435 deletions

View File

@ -17,8 +17,8 @@ axios.defaults.headers['Content-Language'] = 'zh_CN'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL: process.env.VUE_APP_BASE_API,
baseURL: process.env.VUE_APP_API_TARGET_URL,
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: process.env.VUE_APP_API_TARGET_URL,
// 超时
timeout: 10000
})

View File

@ -2,16 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="栏目名称" prop="captionName">
<el-cascader
:value="queryParams.captionName ? queryParams.captionName.split('/') : []"
@input="v => $set(queryParams, 'captionName', v.join('/'))"
:options="captionOptions"
placeholder="请选择栏目名称"
:props="{ value: 'label' }"
clearable
style="width: 300px;"
@change="handleQuery"
></el-cascader>
<el-cascader :value="queryParams.captionName ? queryParams.captionName.split('/') : []" @input="v => $set(queryParams, 'captionName', v.join('/'))" :options="captionOptions" placeholder="请选择栏目名称" :props="{ value: 'label' }" clearable style="width: 300px;" @change="handleQuery"></el-cascader>
<!-- <el-input
v-model="queryParams.captionName"
placeholder="请输入栏目名称"
@ -20,28 +11,13 @@
/> -->
</el-form-item>
<el-form-item label="业务名称" prop="businessName">
<el-input
v-model="queryParams.businessName"
placeholder="请输入业务名称"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.businessName" placeholder="请输入业务名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="中文描述" prop="titleChinese">
<el-input
v-model="queryParams.titleChinese"
placeholder="请输入图片标题中文描述"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.titleChinese" placeholder="请输入图片标题中文描述" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="英文描述" prop="titleEnglish">
<el-input
v-model="queryParams.titleEnglish"
placeholder="请输入图片标题英文描述"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.titleEnglish" placeholder="请输入图片标题英文描述" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -51,46 +27,16 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['official:index:add']"
>新增</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['official:index:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['official:index:edit']"
>修改</el-button>
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['official:index:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['official:index:remove']"
>删除</el-button>
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['official:index:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['official:index:export']"
>导出</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['official:index:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -133,61 +79,26 @@
<el-table-column label="排序" align="center" prop="orders" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['official:index:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['official:index:remove']"
>删除</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['official:index:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['official:index:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改首页封面信息对话框 -->
<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="captionName">
<el-cascader
:value="form.captionName ? form.captionName.split('/') : []"
@input="v => $set(form, 'captionName', v.join('/'))"
:options="captionOptions"
placeholder="请选择栏目名称"
:props="{ value: 'label' }"
style="width: 100%;"
></el-cascader>
<!-- :disabled="Boolean(form.id)" -->
<el-cascader :value="form.captionName ? form.captionName.split('/') : []" @input="v => $set(form, 'captionName', v.join('/'))" :options="captionOptions" placeholder="请选择栏目名称" :props="{ value: 'label' }" style="width: 100%;"></el-cascader>
<!-- :disabled="Boolean(form.id)" -->
</el-form-item>
<el-form-item label="业务名称" prop="businessName">
<el-input
type="textarea"
v-model="form.businessName"
placeholder="请输入业务名称"
:autosize="{ minRows: 1, maxRows: 4 }"
/>
<el-input type="textarea" v-model="form.businessName" placeholder="请输入业务名称" :autosize="{ minRows: 1, maxRows: 4 }" />
</el-form-item>
<el-form-item label="副/英文名称" prop="businessNameEnglish">
<el-input
type="textarea"
v-model="form.businessNameEnglish"
placeholder="请输入业务副/英文名称"
:autosize="{ minRows: 1, maxRows: 4 }"
/>
<el-input type="textarea" v-model="form.businessNameEnglish" placeholder="请输入业务副/英文名称" :autosize="{ minRows: 1, maxRows: 4 }" />
</el-form-item>
<!-- <el-form-item label="文件类型" prop="fileType">
<el-radio-group v-model="form.fileType">
@ -203,20 +114,10 @@
<div>{{ form.videoLink }}</div>
</el-form-item>
<el-form-item label="中文描述" prop="titleChinese">
<el-input
type="textarea"
v-model="form.titleChinese"
placeholder="请输入中文描述"
:autosize="{ minRows: 4, maxRows: 10 }"
/>
<el-input type="textarea" v-model="form.titleChinese" placeholder="请输入中文描述" :autosize="{ minRows: 4, maxRows: 10 }" />
</el-form-item>
<el-form-item label="副/英文描述" prop="titleEnglish">
<el-input
type="textarea"
v-model="form.titleEnglish"
placeholder="请输入英文描述"
:autosize="{ minRows: 4, maxRows: 10 }"
/>
<el-input type="textarea" v-model="form.titleEnglish" placeholder="请输入英文描述" :autosize="{ minRows: 4, maxRows: 10 }" />
</el-form-item>
<!-- <el-form-item label="是否置顶" prop="isIndex">
<el-radio-group v-model="form.isIndex">
@ -240,331 +141,378 @@
</template>
<script>
import { listIndex, getIndex, delIndex, addIndex, updateIndex } from "@/api/official/index";
import {
listIndex,
getIndex,
delIndex,
addIndex,
updateIndex
} from '@/api/official/index'
export default {
name: "Index",
data() {
return {
// loading
buttonLoading: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
indexList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
imageurl: undefined,
fileType: undefined,
businessType: undefined,
businessName: undefined,
titleEnglish: undefined,
titleChinese: undefined,
isIndex: undefined,
captionName: undefined,
createUserId: undefined,
updateUserId: undefined,
},
//
form: {
imageurl: '',
videoLink: '',
fileType: '0',
isIndex: '0',
captionName: '',
orders: 0,
},
//
rules: {
captionName: [
{ required: true, message: "栏目名称不能为空", trigger: "blur" }
],
},
captionOptions: [
{
label: '首页',
children: [
{ label: 'banner' },
{ label: 'about' },
{ label: 'businessBanner' }
],
export default {
name: 'Index',
data() {
return {
// loading
buttonLoading: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
indexList: [],
//
title: '',
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
imageurl: undefined,
fileType: undefined,
businessType: undefined,
businessName: undefined,
titleEnglish: undefined,
titleChinese: undefined,
isIndex: undefined,
captionName: undefined,
createUserId: undefined,
updateUserId: undefined
},
{
label: '业务范围',
children: [
{
label: '我们的优势',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '范围介绍' },
{ label: '我们的资产' },
{ label: '资产介绍' },
],
},
{
label: '石油化工业务',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '业务介绍' },
{ label: '主营方向' },
{ label: '产品简介' },
{ label: '石油产品' },
{ label: '石油产品彩色版' },
{ label: '能源简介' },
{ label: '提供能源' },
{ label: '项目案例' },
{ label: 'joinus' },
],
},
{
label: '基建业务',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '项目描述' },
{ label: '项目案例' },
{ label: '技术支持' },
{ label: '重点案例' },
{ label: '重点案例主题' },
{ label: 'joinus' },
],
},
{
label: '铁矿石业务',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '行业示例' },
{ label: '高品质产品' },
{ label: '产品宣言' },
{ label: '提供产品' },
{ label: '发表宣言' },
{ label: '保障行动' },
{ label: '专业团队' },
{ label: 'joinus' },
],
},
{
label: 'LNG&LPG',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '燃气介绍' },
{ label: '供应链' },
{ label: '技术支持' },
{ label: 'joinus' },
],
},
],
//
form: {
imageurl: '',
videoLink: '',
fileType: '0',
isIndex: '0',
captionName: '',
orders: 0
},
{
label: '新闻动态',
children: [
{ label: 'banner' },
{
label: '新闻详情',
children: [{ label: 'banner' }]
},
],
//
rules: {
captionName: [
{ required: true, message: '栏目名称不能为空', trigger: 'blur' }
]
},
{
label: '关于我们',
children: [
{
label: '公司介绍',
children: [
{ label: 'banner' },
{ label: '介绍视频' },
{ label: '我们在行动' },
{ label: '我们的使命' },
{ label: '我们的愿景' },
{ label: '我们的价值观' },
{ label: '推荐' },
]
},
{
label: '社会责任',
children: [{ label: 'banner' }, { label: 'content' }]
},
{
label: '昊坤党建',
children: [
{ label: 'banner' },
{ label: 'content' },
{
label: '党建详情',
children: [{ label: 'banner' }]
},
],
},
{
label: '能源发展委员会',
children: [{ label: 'banner' }, { label: 'content' }]
},
],
},
{
label: '加入我们',
children: [
{
label: '美好昊坤',
children: [
captionOptions: [
{
label: '首页',
children: [
{ label: 'banner' },
{ label: '发展在昊坤' },
{ label: '工作在昊坤' },
{ label: '生活在昊坤' },
{ label: 'joinus' },
{ label: 'about' },
{ label: 'businessBanner' }
]
},
{
label: '业务领域',
children: [
{
label: '资本服务',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '项目描述' },
{ label: '项目案例' },
{ label: '渠道描述' },
{ label: '资本渠道' },
{ label: '技术支持' },
{ label: 'joinus' }
]
},
{
label: '高薪技术',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '项目描述' },
{ label: '项目案例' },
{ label: '技术支持' },
{ label: 'joinus' }
]
}
]
},
{
label: '业务范围',
children: [
{
label: '我们的优势',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '范围介绍' },
{ label: '我们的资产' },
{ label: '资产介绍' }
]
},
{
label: '石油化工业务',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '业务介绍' },
{ label: '主营方向' },
{ label: '产品简介' },
{ label: '石油产品' },
{ label: '石油产品彩色版' },
{ label: '能源简介' },
{ label: '提供能源' },
{ label: '项目案例' },
{ label: 'joinus' }
]
},
{
label: '基建业务',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '项目描述' },
{ label: '项目案例' },
{ label: '技术支持' },
{ label: '重点案例' },
{ label: '重点案例主题' },
{ label: 'joinus' }
]
},
{
label: '铁矿石业务',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '行业示例' },
{ label: '高品质产品' },
{ label: '产品宣言' },
{ label: '提供产品' },
{ label: '发表宣言' },
{ label: '保障行动' },
{ label: '专业团队' },
{ label: 'joinus' }
]
},
{
label: 'LNG&LPG',
children: [
{ label: 'banner' },
{ label: '主要内容' },
{ label: '燃气介绍' },
{ label: '供应链' },
{ label: '技术支持' },
{ label: 'joinus' }
]
}
]
},
{
label: '新闻动态',
children: [
{ label: 'banner' },
{
label: '新闻详情',
children: [{ label: 'banner' }]
}
]
},
{
label: '关于我们',
children: [
{
label: '公司介绍',
children: [
{ label: 'banner' },
{ label: '介绍视频' },
{ label: '我们在行动' },
{ label: '我们的使命' },
{ label: '我们的愿景' },
{ label: '我们的价值观' },
{ label: '推荐' }
]
},
{
label: '社会责任',
children: [{ label: 'banner' }, { label: 'content' }]
},
{
label: '昊坤党建',
children: [
{ label: 'banner' },
{ label: 'content' },
{
label: '党建详情',
children: [{ label: 'banner' }]
}
]
},
{
label: '能源发展委员会',
children: [{ label: 'banner' }, { label: 'content' }]
}
]
},
{
label: '加入我们',
children: [
{
label: '美好昊坤',
children: [
{ label: 'banner' },
{ label: '发展在昊坤' },
{ label: '工作在昊坤' },
{ label: '生活在昊坤' },
{ label: 'joinus' }
]
},
{
label: '社会招聘',
children: [{ label: 'banner' }]
}
]
},
{
label: '社会招聘',
children: [{ label: 'banner' }]
},
],
},
],
};
},
created() {
this.getList();
},
methods: {
/** 查询首页封面信息列表 */
getList() {
this.loading = true;
listIndex(this.queryParams).then(response => {
this.indexList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
imageurl: '',
videoLink: '',
fileType: '0',
businessType: undefined,
businessName: undefined,
titleEnglish: undefined,
titleChinese: undefined,
isIndex: '0',
captionName: '',
createBy: undefined,
createUserId: undefined,
createTime: undefined,
updateBy: undefined,
updateUserId: undefined,
updateTime: undefined,
orders: 0,
twLink: '',
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加图文信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getIndex(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改图文信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateIndex(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
} else {
addIndex(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).finally(() => {
this.buttonLoading = false;
});
}
]
}
},
created() {
this.getList()
},
methods: {
/** 查询首页封面信息列表 */
getList() {
this.loading = true
listIndex(this.queryParams).then(response => {
this.indexList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: undefined,
imageurl: '',
videoLink: '',
fileType: '0',
businessType: undefined,
businessName: undefined,
titleEnglish: undefined,
titleChinese: undefined,
isIndex: '0',
captionName: '',
createBy: undefined,
createUserId: undefined,
createTime: undefined,
updateBy: undefined,
updateUserId: undefined,
updateTime: undefined,
orders: 0,
twLink: ''
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除首页封面信息编号为"' + ids + '"的数据项?').then(() => {
this.loading = true;
return delIndex(ids);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
},
/** 导出按钮操作 */
handleExport() {
this.download('official/index/export', {
...this.queryParams
}, `index_${new Date().getTime()}.xlsx`)
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加图文信息'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true
this.reset()
const id = row.id || this.ids
getIndex(id).then(response => {
this.loading = false
this.form = response.data
this.open = true
this.title = '修改图文信息'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
this.buttonLoading = true
if (this.form.id != null) {
updateIndex(this.form)
.then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
.finally(() => {
this.buttonLoading = false
})
} else {
addIndex(this.form)
.then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
.finally(() => {
this.buttonLoading = false
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal
.confirm('是否确认删除首页封面信息编号为"' + ids + '"的数据项?')
.then(() => {
this.loading = true
return delIndex(ids)
})
.then(() => {
this.loading = false
this.getList()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {})
.finally(() => {
this.loading = false
})
},
/** 导出按钮操作 */
handleExport() {
this.download(
'official/index/export',
{
...this.queryParams
},
`index_${new Date().getTime()}.xlsx`
)
}
}
}
};
</script>