Commit 5285e457 by 史敦盼

Merge branch 'sdp-v1'

2 parents 5976e3ac 56b26a72
......@@ -780,6 +780,14 @@ export function getPrjInfoDetail(params) {
export function getSystemInfoDetail(params) {
return post(EADC_ARRCHITECTURE + '/app-info/dApp', params)
}
// 专家人才库管理-新增人才
export function addKlPerson(params) {
return post(EADC_KNOWLEDGE_POOL + '/kl-talent-pool/adKlPerson', params)
}
// 专家人才库管理-更新人才
export function updKlPerson(params) {
return post(EADC_KNOWLEDGE_POOL + '/kl-talent-pool/upKlPerson', params)
}
export function postRequest(url, params) {
return post(EADC_ARRCHITECTURE + url, params)
}
import { EADC_ARRCHITECTURE } from '@/config/micromodule'
import { EADC_ARRCHITECTURE, EADC_KNOWLEDGE_POOL } from '@/config/micromodule'
// 列表接口url
// 批量计划管理分页查询
export const batchPlanManagement = EADC_ARRCHITECTURE + '/bat-plan-info/'
......@@ -37,3 +37,8 @@ export const queryConceptualBaseOrg = EADC_ARRCHITECTURE + '/org-info/'
// 架构遵从检查列表
export const queryArchitectureFollowExamine =
EADC_ARRCHITECTURE + '/architectureFollows/'
// 专家人才库管理-查询人才
export const queryqKLPerson = EADC_KNOWLEDGE_POOL + '/kl-talent-pool/qKLPerson/'
export const queryExpert = EADC_KNOWLEDGE_POOL + '/kl-talent-pool/'
......@@ -4,11 +4,8 @@
* @Autor: pan
* @Date: 2024-03-12 14:55:59
* @LastEditors: pan
* @LastEditTime: 2024-03-27 09:47:20
* @LastEditTime: 2024-04-01 15:56:14
-->
<!-- /**
* 搜索栏公共组件
*/ -->
<template>
<div class="form-box">
<el-form
......
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-12 14:01:57
* @LastEditors: pan
* @LastEditTime: 2024-04-01 10:35:02
* @LastEditTime: 2024-04-01 11:52:46
-->
<template>
<div class="list-page">
......@@ -55,5 +55,8 @@ export default {
.formWrap {
border-bottom: 1px solid #e2e2e2;
}
/deep/ .el-tabs__header {
margin: 0;
}
}
</style>
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-12 14:55:59
* @LastEditors: pan
* @LastEditTime: 2024-03-28 17:01:26
* @LastEditTime: 2024-04-01 11:54:48
-->
<!-- /**
* 搜索栏公共组件
......@@ -173,7 +173,8 @@ export default {
<style lang="scss" scoped>
.search-form-box {
display: flex;
margin-top: 10px;
margin-top: 25px;
margin-bottom: 15px;
.btn-box {
// padding-top: 5px;
display: flex;
......
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-12 15:11:47
* @LastEditors: pan
* @LastEditTime: 2024-03-26 15:30:38
* @LastEditTime: 2024-04-01 17:08:42
-->
<template>
<div class="form-item">
......@@ -148,7 +148,11 @@ export default {
// 双向绑定数据值
currentVal: {
get() {
return this.value
if (this.isSelect) {
return this.value && this.value + ''
} else {
return this.value
}
},
set(val) {
this.$emit('input', val)
......
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-11 14:53:40
* @LastEditors: pan
* @LastEditTime: 2024-04-01 10:28:05
* @LastEditTime: 2024-04-01 15:17:03
-->
<!-- 示例
columns: [{ label: '头像', prop: 'avatar', align: 'center', __slotName: 'avatar',callback: (row, title) => {
......@@ -64,7 +64,7 @@
v-if="item.type === 'index'"
v-bind="item"
align="center"
:key="item"
:key="item.type"
:index="indexMethod"
>
</el-table-column>
......
......@@ -349,7 +349,7 @@ const routes = [
component: () => import('@/views/collectDataConfiguration/index.vue'),
},
{
path: '/main/supervisionDatacollection', // 架构督查 - 督查资料收集
path: '/main/supervisionDataCollection', // 架构督查 - 督查资料收集
name: 'supervisionDataCollection',
component: () => import('@/views/supervisionDataCollection/index.vue'),
},
......
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-21 20:58:31
* @LastEditors: pan
* @LastEditTime: 2024-03-27 11:25:47
* @LastEditTime: 2024-04-01 11:33:12
-->
<template>
<div class="searchTable">
......@@ -71,7 +71,7 @@ import SearchForm from '@/components/SearchForm.vue'
import TableConfig from '@/components/TableConfig.vue'
import { queryQyNeedReviewCount, queryArcAstSys } from '@/api/interface'
import { systemArchiSaveFactor } from '@/api/index'
import { systemArchiSaveFactor, archiIntelligenceSearchTree } from '@/api/index'
export default {
name: 'conceptualRelated',
data() {
......@@ -207,16 +207,24 @@ export default {
return arr
},
},
created() {
this.getElementTreeData()
},
methods: {
// 同步更新
fnOperation(row) {
// const extend = []
// extend.push({
// archiType: item.archiType,
// assetIdList: item.checkedCities
// })
let extend = []
this.elementTree.forEach((item) => {
if (item.checkedCities.length > 0) {
extend.push({
archiType: item.archiType,
assetIdList: item.checkedCities,
})
}
})
const params = {
// extend,
// ...row,
extend,
isExtend: 0,
}
systemArchiSaveFactor(params).then((res) => {
......@@ -227,6 +235,19 @@ export default {
}
})
},
getElementTreeData(type) {
//查询选择遵从总体架构资产类型数据
archiIntelligenceSearchTree({}).then((res) => {
if (res.code == 200) {
res.data.map((item) => {
item['isIndeterminate'] = false
item['checkAll'] = false
item['checkedCities'] = []
})
this.elementTree = res.data
}
})
},
handlePercent(scope) {
const item = scope.row
if (item.reviewPassCount && item.needCount) {
......
<!--
* @Description: 新增专家弹窗
* @Version: 2.0
* @Autor: pan
* @Date: 2024-04-01 14:39:48
* @LastEditors: pan
* @LastEditTime: 2024-04-01 17:48:32
-->
<template>
<el-dialog
:title="title"
:visible.sync="showDialog"
:close-on-click-modal="false"
width="60%"
@close="handleClose()"
@open="handleOpen()"
>
<div>
<Form ref="addForm" :form-options="formOptions" label-width="120px">
</Form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()" size="mini">取 消</el-button>
<el-button type="primary" @click="handleSubmit" size="mini"
>确 定</el-button
>
</span></el-dialog
>
</template>
<script>
import Form from '@/components/Form.vue'
import {
getETPManagePoolName,
getETPManageAdd,
getETPManageUpdate,
} from '@/api'
export default {
props: {
title: {
type: String,
default: '',
},
visible: {
type: Boolean,
default: false,
},
rowData: {
type: Object,
default: () => {},
},
},
data() {
return {
talentPoolNameOptions: [],
}
},
components: {
Form,
},
computed: {
formOptions() {
return [
{
label: '单位', // label文字
prop: 'deptId', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
dictType: 'sys_org',
filterable: true,
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '所属专家库', // label文字
prop: 'talentPoolName', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
options: this.talentPoolNameOptions,
filterable: true,
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '专家姓名', // label文字
prop: 'talentName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '性别', // label文字
prop: 'sex', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
dictType: 'sys_sex',
},
{
label: '出生年月', // label文字
prop: 'createMan', // 字段名
type: 'date',
valueFormat: 'yyyy-MM-dd',
element: 'el-date-picker', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
},
{
label: '学历', // label文字
prop: 'education', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
dictType: 'sys_education',
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '联系方式', // label文字
prop: 'telephone', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
},
{
label: '邮箱', // label文字
prop: 'email', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
},
{
label: '专家领域', // label文字
prop: 'professionalField', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
dictType: 'sys_professional_field',
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '专家级别', // label文字
prop: 'level', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
dictType: 'talent_level',
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '成果简介', // label文字
prop: 'remark', // 字段名
type: 'textarea',
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
span: 24,
},
]
},
showDialog: {
get() {
return this.visible
},
set(value) {
this.$emit('update:visible', value)
},
},
isEdit() {
if (this.title === '修改专家信息') {
return true
} else {
return false
}
},
},
methods: {
handleSubmit() {
this.$refs['addForm'].onValidate(() => {
const loading = this.$loading({
lock: true,
text: '保存中',
spinner: 'el-icon-loading',
})
const typeApi = this.isEdit ? getETPManageUpdate : getETPManageAdd
const formInfo = this.$refs['addForm'].getData()
const params = {
...this.rowData,
...formInfo,
}
typeApi(params).then((res) => {
loading.close()
if (res.code === 200) {
this.$message.success('保存成功')
this.showDialog = false
this.handleClose()
this.$emit('querySearch')
} else {
this.$message.error(res.msg)
}
})
})
},
handleClose() {
this.showDialog = false
this.formOptions.forEach((v) => {
v.initValue = ''
})
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
},
async handleOpen() {
getETPManagePoolName().then((res) => {
if (res.code == 200) {
this.talentPoolNameOptions = res.data.map((v) => {
return {
label: v.talentPoolName,
value: v.talentPoolName,
}
})
}
})
if (Object.keys(this.rowData).length) {
this.formOptions.forEach((v) => {
v.initValue = this.rowData[v.prop]
})
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
})
} else {
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
})
}
},
},
}
</script>
<style scoped lang="scss">
@import '@/styles/elementui.scss';
</style>
<!--
* @Description: 新增人才弹窗
* @Version: 2.0
* @Autor: pan
* @Date: 2024-04-01 14:38:41
* @LastEditors: pan
* @LastEditTime: 2024-04-01 17:00:27
-->
<template>
<el-dialog
:title="title"
:visible.sync="showDialog"
:close-on-click-modal="false"
width="60%"
@close="handleClose()"
@open="handleOpen()"
>
<div>
<Form ref="addForm" :form-options="formOptions" label-width="120px">
</Form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose()" size="mini">取 消</el-button>
<el-button type="primary" @click="handleSubmit" size="mini"
>确 定</el-button
>
</span></el-dialog
>
</template>
<script>
import Form from '@/components/Form.vue'
import { addKlPerson, updKlPerson } from '@/api'
export default {
props: {
title: {
type: String,
default: '',
},
visible: {
type: Boolean,
default: false,
},
rowData: {
type: Object,
default: () => {},
},
},
data() {
return {}
},
components: {
Form,
},
computed: {
formOptions() {
return [
{
label: '单位', // label文字
prop: 'deptId', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
dictType: 'sys_org',
filterable: true,
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '姓名', // label文字
prop: 'talentName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '性别', // label文字
prop: 'sex', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
dictType: 'sys_sex',
},
{
label: '出生年月', // label文字
prop: 'birthday', // 字段名
type: 'date',
valueFormat: 'yyyy-MM-dd',
element: 'el-date-picker', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
},
{
label: '学历', // label文字
prop: 'education', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
dictType: 'sys_education',
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '联系方式', // label文字
prop: 'telephone', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
},
{
label: '邮箱', // label文字
prop: 'email', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
},
{
label: '专业领域', // label文字
prop: 'professionalField', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
dictType: 'sys_professional_field',
rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label: '成果简介', // label文字
prop: 'remark', // 字段名
type: 'textarea',
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
span: 24,
},
]
},
showDialog: {
get() {
return this.visible
},
set(value) {
this.$emit('update:visible', value)
},
},
isEdit() {
if (this.title === '修改人才信息') {
return true
} else {
return false
}
},
},
methods: {
handleSubmit() {
this.$refs['addForm'].onValidate(() => {
const loading = this.$loading({
lock: true,
text: '保存中',
spinner: 'el-icon-loading',
})
const typeApi = this.isEdit ? updKlPerson : addKlPerson
const formInfo = this.$refs['addForm'].getData()
const params = {
...this.rowData,
...formInfo,
type: 1,
}
typeApi(params).then((res) => {
loading.close()
if (res.code === 200) {
this.$message.success('保存成功')
this.showDialog = false
this.handleClose()
this.$emit('querySearch')
} else {
this.$message.error(res.msg)
}
})
})
},
handleClose() {
this.showDialog = false
this.formOptions.forEach((v) => {
v.initValue = ''
})
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
},
async handleOpen() {
if (Object.keys(this.rowData).length) {
this.formOptions.forEach((v) => {
v.initValue = this.rowData[v.prop]
})
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
})
} else {
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
})
}
},
},
}
</script>
<style scoped lang="scss">
@import '@/styles/elementui.scss';
</style>
<!--
* @Description: 专家人才库管理
* @Version: 2.0
* @Autor: pan
* @Date: 2024-04-01 14:05:50
* @LastEditors: pan
* @LastEditTime: 2024-04-01 17:57:39
-->
<template>
<div class="etpManage">
<div class="table_container">
<div class="search_menu">
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">专家库名称</span>
<el-input
v-model="searchParams.talentPoolName"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">专家标签</span>
<el-select
v-model="searchParams.tagId"
placeholder="请选择"
clearable
class="search_item"
>
<el-option
v-for="(item, idnex) in selectData3"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="search_menu_item">
<span class="search_title">专家状态</span>
<el-select
v-model="searchParams.state"
placeholder="请选择"
clearable
class="search_item"
>
<el-option
v-for="(item, idnex) in selectData4"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table">
<img
class="btn_icon"
src="@/assets/archi-ele-list/search.png"
alt=""
/>
<p>查询</p>
</div>
<div class="reset_btn" @click="reset">
<img
class="btn_icon"
src="@/assets/archi-ele-list/reset.png"
alt=""
/>
<p>重置</p>
</div>
</div>
</div>
<div class="search_btn">
<div class="searchTable">
<list-page>
<template #tabWrap>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
:label="item.label"
:name="item.name"
v-for="item in tabOptions"
:key="item.name"
>
</el-tab-pane>
</el-tabs>
</template>
<!-- 查询表单插槽 -->
<template #formWrap>
<SearchForm @onSearch="querySearch" :form-options="formOptions" />
</template>
<!-- 中部操作按钮 -->
<template #operationWrap>
<el-button
type="primary"
size="medium"
icon="el-icon-document-add"
@click="operate('add')"
>新建</el-button
>
<el-button
type="primary"
size="medium"
icon="el-icon-delete"
@click="operate('delMultiple')"
>删除</el-button
plain
@click="fnAdd()"
>新建</el-button
>
<!-- <el-button type="primary" size="medium" icon="el-icon-plus" @click="exportFile">导出</el-button> -->
</div>
<el-table
:height="tableHeight"
:data="tableData"
stripe
border
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column> -->
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
:index="indexMethod"
align="center"
></el-table-column>
<el-table-column
prop="talentPoolName"
label="专家库名称"
align="center"
></el-table-column>
<el-table-column
prop="deptName"
label="单位"
width="150"
align="center"
></el-table-column>
<el-table-column
prop="talentName"
label="专家名称"
align="center"
></el-table-column>
<el-table-column prop="" width="250" label="专家标签" align="center">
<template slot-scope="scope">
<div class="tagName">
<el-tag v-for="item in scope.row.tagIdlist" :key="item.tagId">
{{ item.name }}
</el-tag>
</div>
</template>
</el-table-column>
<el-table-column
prop="level_"
label="专家级别"
align="center"
></el-table-column>
<el-table-column
prop="comments"
label="专家评价"
align="center"
></el-table-column>
<el-table-column
prop="state_"
label="专家状态"
width="150"
align="center"
></el-table-column>
<el-table-column
prop="remark"
label="备注"
align="center"
></el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<el-button
type="primary"
icon="el-icon-edit"
size="mini"
@click="operate('edit', scope.row)"
>编辑</el-button
>
<el-button
class="delBtn"
type="primary"
icon="el-icon-delete"
size="mini"
@click="operate('del', scope.row)"
>删除</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="pager.sizes"
:page-size="pager.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager.total"
>
</el-pagination>
</div>
<el-dialog
:title="title"
:visible.sync="add_dialog"
:center="false"
width="55%"
>
<div class="add_dialog_content">
<div class="dialog_content_1">
<div class="dialog_form_item">
<div class="dialog_form_item_title">单位</div>
<el-input
v-model="formData.deptName"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家库名称</div>
<el-select
v-model="formData.talentPoolName"
placeholder="请选择"
clearable
class="search_item"
>
<el-input placeholder="请输入内容" v-model="add_select1_value">
<div slot="append" @click="add_select1">新增</div>
</el-input>
<el-option
v-for="(item, idnex) in selectData1"
:key="idnex"
:label="item.talentPoolName"
:value="item.talentPoolName"
></el-option>
</el-select>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家名称</div>
<el-input
v-model="formData.talentName"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
</div>
<div class="dialog_content_1">
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家标签</div>
<el-select
v-model="formData.taglist"
placeholder="请选择"
clearable
class="search_item"
:multiple="true"
>
<el-option
v-for="(item, idnex) in selectData3"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家级别</div>
<el-select
v-model="formData.level"
placeholder="请选择"
clearable
class="search_item"
>
<el-option
v-for="(item, idnex) in selectData2"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家评价</div>
<el-input
v-model="formData.comments"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
</div>
<div class="dialog_content_1">
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家状态</div>
<el-select
v-model="formData.state"
placeholder="请选择"
clearable
class="search_item"
>
<el-option
v-for="(item, idnex) in selectData4"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">备注</div>
<el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
class="dialog_form_item_content"
v-model="formData.remark"
></el-input>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="operate('create')"
>保存</el-button
</template>
<!-- 表格插槽 -->
<template #tableWrap>
<table-config
ref="searchTable"
@selection-change="selectionChange"
:query="query"
:columns="columns"
:key="activeName"
>
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
</table-config>
</template>
</list-page>
<!-- 新增/编辑专家弹窗 -->
<AddExpert
@querySearch="querySearch"
:visible.sync="expertVisible"
:row-data="rowData"
:title="dialogTitle"
></AddExpert>
<!-- 新增/编辑人才弹窗 -->
<AddTalent
@querySearch="querySearch"
:visible.sync="talentVisible"
:row-data="rowData"
:title="dialogTitle"
></AddTalent>
</div>
</template>
<script>
import {
getETPManageList,
getETPManageAdd,
getETPManageUpdate,
getETPManageDel,
getETPManageDelBatch,
getDianXingAnLiSelectData,
getETPManagePoolName,
getETPManagePoolNameAdd,
} from '@/api/index.js'
import $ from 'jquery'
import { MessageBox, Message } from 'element-ui'
import ListPage from '@/components/ListPage.vue'
import SearchForm from '@/components/SearchForm.vue'
import TableConfig from '@/components/TableConfig.vue'
import AddExpert from './AddExpert.vue'
import AddTalent from './AddTalent.vue'
import { queryqKLPerson, queryExpert } from '@/api/interface'
import { getETPManageUpdate } from '@/api'
import { getDictTypeOptions } from '@/utils'
export default {
name: 'etpManage',
components: {},
data() {
return {
tableData: [],
selectList: [],
add_dialog: false,
add_dialog3: false,
title: '',
openType: '',
formData: {
deptName: '',
talentPoolName: '',
talentName: '',
taglist: [],
level: '',
comments: '',
state: '',
remark: '',
talentId: null,
},
searchParams: {
talentPoolName: '',
tagId: '',
state: '',
query: {
url: queryExpert,
method: 'post',
queryParam: {},
},
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 0, //总条数
},
selectData1: [],
selectData2: [],
selectData3: [],
selectData4: [],
eleList: [],
radioName: '',
search_select1: [],
tableHeight: null,
add_select1_value: '',
activeName: '1',
tabOptions: [
{ label: '专家库', name: '1' },
{ label: '人才库', name: '2' },
],
selectRows: {},
expertVisible: false,
talentVisible: false,
rowData: {},
dialogTitle: '',
talentStatusOptions: [],
sexOptions: [],
educationOptions: [],
professionalFieldOptions: [],
sysOrgOptions: [],
}
},
mounted() {
window.addEventListener('resize', () => {
this.set_table_height()
})
this.set_table_height()
components: {
ListPage,
SearchForm,
TableConfig,
AddExpert,
AddTalent,
},
computed: {
formOptions() {
let arr = []
if (this.activeName === '1') {
arr = [
{
label: '专家库', // label文字
prop: 'talentPoolName', // 字段名
element: 'el-input', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
},
// 获取元素列表
this.getSelect1()
this.getSelect2().then((res) => {
this.selectData2 = res
})
this.getSelect3().then((res) => {
this.selectData3 = res
})
this.getSelect4().then((res) => {
this.selectData4 = res
})
{
label: '专家状态', // label文字
prop: 'state', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '请输入内容', // elementui组件属性
dictType: 'talent_status',
},
]
}
arr = [
...arr,
{
label: '专业领域', // label文字
prop: 'professionalField', // 字段名
initValue: '',
element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性
dictType: 'sys_professional_field',
},
]
return arr
},
columns() {
let arr = [
// { type: 'selection', width: '55px' },
{ label: '序号', type: 'index', width: '80px' },
]
if (this.activeName === '1') {
arr = [
...arr,
{
label: '单位',
width: '160px',
prop: 'deptId',
collectionType: true,
options: this.sysOrgOptions,
},
{ label: '所属专家库', width: '120px', prop: 'talentPoolName' },
{
label: '专家姓名',
prop: 'talentName',
},
{
label: '性别',
prop: 'sex',
options: this.sexOptions,
collectionType: true,
},
{ label: '出生年月', prop: 'birthday' },
{
label: '学历',
prop: 'education',
options: this.educationOptions,
collectionType: true,
},
{ label: '联系方式', prop: 'telephone' },
{ label: '邮箱', prop: 'email' },
{
label: '专业领域',
prop: 'professionalField',
options: this.professionalFieldOptions,
collectionType: true,
},
{ label: '专家级别', prop: 'level' },
{ label: '成果简介', prop: 'remark' },
{
label: '专家状态',
prop: 'state_',
options: this.talentStatusOptions,
collectionType: true,
},
{
label: '操作',
type: 'operation',
width: '340px',
actionButtons: [
{
title: '编辑',
type: 'primary',
size: 'mini',
plain: true,
icon: 'el-icon-edit',
},
{
title: '入库',
type: 'primary',
size: 'mini',
plain: true,
},
{
title: '出库',
type: 'primary',
size: 'mini',
plain: true,
},
{
title: '删除',
type: 'danger',
size: 'mini',
plain: true,
icon: 'el-icon-delete',
},
],
callback: (row, title) => {
this.fnOperation(row, title)
},
},
]
} else {
arr = [
...arr,
{
label: '单位',
width: '160px',
prop: 'deptId',
collectionType: true,
options: this.sysOrgOptions,
},
{ label: '姓名', prop: 'talentName' },
{
label: '性别',
prop: 'sex',
options: this.sexOptions,
collectionType: true,
},
{ label: '出生年月', prop: 'birthday' },
{ label: '联系方式', prop: 'telephone' },
{ label: '邮箱', prop: 'email' },
{
label: '专业领域',
prop: 'professionalField',
options: this.professionalFieldOptions,
collectionType: true,
},
{ label: '成果简介', prop: 'remark' },
{
label: '操作',
type: 'operation',
width: '200px',
actionButtons: [
{
title: '编辑',
type: 'primary',
size: 'mini',
plain: true,
icon: 'el-icon-edit',
},
{
title: '删除',
type: 'danger',
size: 'mini',
plain: true,
icon: 'el-icon-delete',
},
],
callback: (row, title) => {
this.fnOperation(row, title)
},
},
]
}
return arr
},
},
created() {
// 初始化查询列表
this.getList()
this.getDicts()
},
methods: {
indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1
},
search_table() {
//搜索
this.pager.current = 1
this.getList()
},
// 查询列表
getList() {
this.loading = true
const params = {
talentPoolName: this.searchParams.talentPoolName,
tagId: this.searchParams.tagId,
state: this.searchParams.state,
current: this.pager.current,
pageSize: this.pager.size,
}
getETPManageList(params).then((res) => {
Promise.all([
this.getSelect2(),
this.getSelect4(),
this.getSelect3(),
]).then((res2) => {
res.records.map((item) => {
if (item.tagIdlist && item.tagIdlist.length > 0) {
res2[2].forEach((item2) => {
item.tagIdlist.map((item3) => {
if (item2.value == item3.tagId) {
item3['name'] = item2.label
}
})
})
}
let result1 = res2[0].find((item2) => item2.value == item.level)
let result2 = res2[1].find((item2) => item2.value == item.state)
item['level_'] = result1 ? result1.label : ''
item['state_'] = result2 ? result2.label : ''
})
this.pager.current = res.current
this.pager.total = res.total
this.pager.size = res.size
this.tableData = res.records
})
getDicts() {
getDictTypeOptions('talent_status').then((res) => {
this.talentStatusOptions = res
})
getDictTypeOptions('sys_org').then((res) => {
this.sysOrgOptions = res
})
getDictTypeOptions('sys_sex').then((res) => {
this.sexOptions = res
})
getDictTypeOptions('sys_education').then((res) => {
this.educationOptions = res
})
getDictTypeOptions('sys_professional_field').then((res) => {
this.professionalFieldOptions = res
})
},
// 重置
reset() {
this.params = {
talentPoolName: '',
tagId: '',
state: '',
}
},
// 分页事件
handleSizeChange(val) {
this.pager.current = 1
this.pager.size = val
this.getList()
},
handleCurrentChange(val) {
this.pager.current = val
this.getList()
},
// 所有操作
operate(type, item) {
this.openType = type
if (type == 'add') {
this.add_dialog = true
this.title = '新建专家人才库'
this.resetForm()
this.formData.talentId = null
} else if (type == 'edit') {
this.add_dialog = true
this.title = '编辑专家人才库'
this.resetForm()
// this.formData = item;
this.formData.deptName = item.deptName
this.formData.talentPoolName = Number(item.talentPoolName)
this.formData.talentName = item.talentName
this.formData.state = String(item.state)
this.formData.level = String(item.level)
this.formData.taglist = []
if (item.tagIdlist) {
item.tagIdlist.forEach((item) => {
this.formData.taglist.push(String(item.tagId))
})
}
this.formData.comments = item.comments
this.formData.remark = item.remark
this.formData.talentId = item.talentId
} else if (type == 'create') {
let tagIdlist_ = []
this.selectData3.forEach((item1) => {
this.formData.taglist.forEach((item2) => {
if (item1.value == item2) {
tagIdlist_.push({
tagId: item1.value,
})
}
})
})
const params = { ...this.formData, taglist: tagIdlist_ }
if (this.formData.talentId) {
// 编辑保存
getETPManageUpdate(params).then((res) => {
if (res.code == 200) {
this.$message.success('保存成功')
this.add_dialog = false
this.getList()
} else {
this.add_dialog = false
this.$message.error(res.msg)
}
})
} else {
// 新建保存
getETPManageAdd(params).then((res) => {
if (res.code == 200) {
this.$message.success('保存成功')
this.add_dialog = false
this.getList()
} else {
this.add_dialog = false
this.$message.error(res.msg)
}
})
}
} else if (type == 'del') {
// 删除
const params = {
talentId: item.talentId,
delFlag: 1,
}
this.$confirm('确认删除吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'confirmClass',
type: 'warning',
})
.then(() => {
getETPManageUpdate(params).then((res) => {
if (res.code == 200) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
} else if (type == 'delMultiple') {
if (this.selectList.length <= 0) {
this.$message.error('请选择一项进行删除')
return
}
let params = {
talentId: [],
}
this.selectList.map((item) => {
params.talentId.push(item.talentId)
fnAdd() {
this.rowData = {}
if (this.activeName === '1') {
this.dialogTitle = '新增专家信息'
this.$nextTick(() => {
this.expertVisible = true
})
this.$confirm('确认批量删除吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'confirmClass',
type: 'warning',
} else {
this.dialogTitle = '新增人才信息'
this.$nextTick(() => {
this.talentVisible = true
})
.then(() => {
getETPManageDelBatch(params).then((res) => {
if (res.code == 200) {
this.$message.success('批量删除成功')
this.getList()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
}
},
// 新建清空表单
resetForm() {
this.formData = {
deptName: '',
talentPoolName: '',
talentName: '',
taglist: [],
level: '',
comments: '',
state: '',
remark: '',
}
this.labelList = []
},
exportFile() {
//导出
// getTypicalExampleExcel(this.params).then(res => {
// let blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
// let url = URL.createObjectURL(blob);
// let link = document.createElement('a');
// link.href = url;
// document.body.appendChild(link);
// link.click();
// })
// 表格勾选的数据
selectionChange(data) {
this.selectRows = data
},
add_select1() {
//新增专家库名称
const params = {
talentPoolName: this.add_select1_value,
querySearch(data) {
this.query.queryParam = {
...this.query.queryParam,
...data,
}
getETPManagePoolNameAdd(params).then((res) => {
if (res.code == 200) {
Message({
type: 'success',
message: '新增成功!',
})
this.getSelect1()
}
})
this.$refs.searchTable.queryData()
},
getSelect1() {
//专家库下来
getETPManagePoolName().then((res) => {
if (res.code == 200) {
this.selectData1 = res.data
}
})
},
getSelect2() {
//专家级别下拉
const params = {
key: 'talent_level',
handleClick(tab, event) {
if (this.activeName === '1') {
this.query.url = queryExpert
} else {
this.query.url = queryqKLPerson
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
}
})
})
// console.log(tab, event)
},
getSelect3() {
//专家标签下拉
const params = {
key: 'talent_tag',
/**
* @description: 操作按钮
* @param {Object} row 当前操作行数据
* @param {String} title 当前操作按钮名称
* @author: pan
*/
fnOperation(row, title) {
switch (title) {
case '编辑':
this.fnEdit(row)
break
case '入库':
break
case '出库':
break
case '删除':
this.fnDel(row)
break
default:
break
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
}
})
})
},
getSelect4() {
//专家状态下拉
const params = {
key: 'talent_status',
fnEdit(row) {
this.rowData = row
if (this.activeName === '1') {
this.dialogTitle = '修改专家信息'
this.expertVisible = true
} else {
this.dialogTitle = '修改人才信息'
this.talentVisible = true
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
},
fnDel(row) {
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
const params = {
talentId: row.talentId,
delFlag: 1,
}
getETPManageUpdate(params).then((res) => {
if (res.code === 200) {
this.$message.success('删除成功')
this.$refs.searchTable.queryData()
} else {
this.$message.error('删除失败')
}
})
})
})
},
set_table_height() {
//动态设置表格高度
const table_container_height = $('.table_container').height()
const search_menu_height = $('.search_menu').height()
const search_btn_height = $('.search_btn').outerHeight(true)
this.tableHeight =
table_container_height -
search_menu_height -
search_btn_height -
90 +
'px'
},
// 表格多选
handleSelectionChange(e) {
this.selectList = e
},
selectInit(row, index) {
if (row.state != '1') {
return true //可勾选
} else {
return false //不可勾选
}
.catch(() => {})
},
},
}
</script>
<style>
.confirmClass {
background-color: #0d867f !important;
}
.el-message-box__content {
padding: 60px 15px 60px 15px;
}
</style>
<style lang="scss" scoped>
/deep/ .el-input-group__append {
background-color: #0d867f;
color: #fff;
cursor: pointer;
}
/deep/ .el-dialog__header {
background-color: #0d867f;
text-align: left;
}
/deep/ .el-dialog__title {
color: #fff;
}
/deep/ .el-dialog__close {
color: #fff;
}
/deep/ .el-tag {
color: #0d867f;
}
.etpManage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.dialog_content_1 {
display: flex;
justify-content: space-between;
.el-input {
width: 210px;
}
.el-select {
width: 210px;
}
}
.dialog_form_item3 {
margin-top: 20px;
display: flex;
align-items: center;
.dialog_form_item3_content1 {
display: flex;
align-items: center;
.tu_biao_icon2 {
width: 20px;
}
}
}
.search_menu {
display: flex;
justify-content: space-between;
}
.search_menu_item_container {
display: flex;
align-items: center;
}
.search_menu_btn_container {
display: flex;
align-items: center;
}
.search_menu_item {
display: flex;
align-items: center;
width: 344px;
}
.search_title {
/* width: 20%; */
flex-shrink: 0;
margin-right: 15px;
}
.search_item {
width: 60%;
}
.search_btn {
width: 100%;
display: flex;
margin-top: 14px;
margin-bottom: 14px;
.el-button--primary {
background: rgba(13, 134, 127, 0.1);
color: #0d867f;
border: 0;
}
}
.el-button--primary {
background: rgba(13, 134, 127, 0.1);
color: #0d867f;
border: 0;
}
.add_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13, 134, 127, 0.1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0d867f;
font-size: 14px;
color: #0d867f;
cursor: pointer;
}
.version_btn {
display: flex;
align-items: center;
justify-content: center;
width: 104px;
height: 32px;
background: rgba(13, 134, 127, 0.1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0d867f;
font-size: 14px;
color: #0d867f;
cursor: pointer;
margin-left: 15px;
}
.query_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13, 134, 127, 1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0d867f;
font-size: 14px;
color: #fff;
margin-right: 10px;
cursor: pointer;
}
.reset_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(244, 244, 244, 1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #ccc;
font-size: 14px;
color: #666;
cursor: pointer;
}
.btn_icon {
margin-right: 10px;
}
.table_container {
width: 97%;
margin-top: 20px;
height: calc(100% - 40px);
.tableIcon {
width: 100%;
display: flex;
justify-content: center;
.iconItem {
width: 30px;
height: 30px;
}
}
.delBtn {
color: #dd6a15;
background-color: #f8ebe2;
}
.stopBtn {
color: #e7a20e;
}
.tagName {
.el-tag {
margin: 0 5px;
}
}
}
.el-pagination {
margin-top: 50px;
}
.dialog_form_item {
display: flex;
align-items: center;
margin-bottom: 10px;
.formArea {
width: 900px;
border-radius: 5px;
border: 1px solid #0d867f;
margin-top: 10px;
.formLine {
display: flex;
align-items: center;
height: 50px;
margin-left: 10px;
.formItem {
margin-left: 15px;
display: flex;
align-items: center;
.label {
width: 70px;
text-align: right;
margin-right: 5px;
}
/deep/.el-select {
width: 140px;
}
/deep/.el-input {
width: 140px;
}
}
.newBtn {
margin-left: 15px;
.addItem {
background-color: #0d867f;
color: #fff;
}
}
}
}
}
.dialog_form_item_title {
flex-shrink: 0;
margin-right: 15px;
width: 100px;
text-align: right;
.reqIcon {
color: red;
}
}
/deep/ .el-dialog__header {
text-align: left;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #0d867f;
}
.greenButton {
background-color: #0d867f;
color: #fff;
}
<style scoped lang="scss">
@import '@/styles/common.scss';
</style>
<template>
<template>
<div class="etpManage">
<div class="table_container">
<div class="search_menu">
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">专家库名称</span>
<el-input
v-model="searchParams.talentPoolName"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">专家标签</span>
<el-select
v-model="searchParams.tagId"
placeholder="请选择"
clearable
class="search_item"
>
<el-option
v-for="(item, idnex) in selectData3"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="search_menu_item">
<span class="search_title">专家状态</span>
<el-select
v-model="searchParams.state"
placeholder="请选择"
clearable
class="search_item"
>
<el-option
v-for="(item, idnex) in selectData4"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table">
<img
class="btn_icon"
src="@/assets/archi-ele-list/search.png"
alt=""
/>
<p>查询</p>
</div>
<div class="reset_btn" @click="reset">
<img
class="btn_icon"
src="@/assets/archi-ele-list/reset.png"
alt=""
/>
<p>重置</p>
</div>
</div>
</div>
<div class="search_btn">
<el-button
type="primary"
size="medium"
icon="el-icon-document-add"
@click="operate('add')"
>新建</el-button
>
<el-button
type="primary"
size="medium"
icon="el-icon-delete"
@click="operate('delMultiple')"
>删除</el-button
>
<!-- <el-button type="primary" size="medium" icon="el-icon-plus" @click="exportFile">导出</el-button> -->
</div>
<el-table
:height="tableHeight"
:data="tableData"
stripe
border
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column> -->
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
:index="indexMethod"
align="center"
></el-table-column>
<el-table-column
prop="talentPoolName"
label="专家库名称"
align="center"
></el-table-column>
<el-table-column
prop="deptName"
label="单位"
width="150"
align="center"
></el-table-column>
<el-table-column
prop="talentName"
label="专家名称"
align="center"
></el-table-column>
<el-table-column prop="" width="250" label="专家标签" align="center">
<template slot-scope="scope">
<div class="tagName">
<el-tag v-for="item in scope.row.tagIdlist" :key="item.tagId">
{{ item.name }}
</el-tag>
</div>
</template>
</el-table-column>
<el-table-column
prop="level_"
label="专家级别"
align="center"
></el-table-column>
<el-table-column
prop="comments"
label="专家评价"
align="center"
></el-table-column>
<el-table-column
prop="state_"
label="专家状态"
width="150"
align="center"
></el-table-column>
<el-table-column
prop="remark"
label="备注"
align="center"
></el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<el-button
type="primary"
icon="el-icon-edit"
size="mini"
@click="operate('edit', scope.row)"
>编辑</el-button
>
<el-button
class="delBtn"
type="primary"
icon="el-icon-delete"
size="mini"
@click="operate('del', scope.row)"
>删除</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="pager.sizes"
:page-size="pager.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager.total"
>
</el-pagination>
</div>
<el-dialog
:title="title"
:visible.sync="add_dialog"
:center="false"
width="55%"
>
<div class="add_dialog_content">
<div class="dialog_content_1">
<div class="dialog_form_item">
<div class="dialog_form_item_title">单位</div>
<el-input
v-model="formData.deptName"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家库名称</div>
<el-select
v-model="formData.talentPoolName"
placeholder="请选择"
clearable
class="search_item"
>
<el-input placeholder="请输入内容" v-model="add_select1_value">
<div slot="append" @click="add_select1">新增</div>
</el-input>
<el-option
v-for="(item, idnex) in selectData1"
:key="idnex"
:label="item.talentPoolName"
:value="item.talentPoolName"
></el-option>
</el-select>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家名称</div>
<el-input
v-model="formData.talentName"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
</div>
<div class="dialog_content_1">
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家标签</div>
<el-select
v-model="formData.taglist"
placeholder="请选择"
clearable
class="search_item"
:multiple="true"
>
<el-option
v-for="(item, idnex) in selectData3"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家级别</div>
<el-select
v-model="formData.level"
placeholder="请选择"
clearable
class="search_item"
>
<el-option
v-for="(item, idnex) in selectData2"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家评价</div>
<el-input
v-model="formData.comments"
placeholder="请输入内容"
class="search_item"
></el-input>
</div>
</div>
<div class="dialog_content_1">
<div class="dialog_form_item">
<div class="dialog_form_item_title">专家状态</div>
<el-select
v-model="formData.state"
placeholder="请选择"
clearable
class="search_item"
>
<el-option
v-for="(item, idnex) in selectData4"
:key="idnex"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="dialog_form_item">
<div class="dialog_form_item_title">备注</div>
<el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
class="dialog_form_item_content"
v-model="formData.remark"
></el-input>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="operate('create')"
>保存</el-button
>
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getETPManageList,
getETPManageAdd,
getETPManageUpdate,
getETPManageDel,
getETPManageDelBatch,
getDianXingAnLiSelectData,
getETPManagePoolName,
getETPManagePoolNameAdd,
} from '@/api/index.js'
import $ from 'jquery'
import { MessageBox, Message } from 'element-ui'
export default {
name: 'etpManage',
components: {},
data() {
return {
tableData: [],
selectList: [],
add_dialog: false,
add_dialog3: false,
title: '',
openType: '',
formData: {
deptName: '',
talentPoolName: '',
talentName: '',
taglist: [],
level: '',
comments: '',
state: '',
remark: '',
talentId: null,
},
searchParams: {
talentPoolName: '',
tagId: '',
state: '',
},
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 0, //总条数
},
selectData1: [],
selectData2: [],
selectData3: [],
selectData4: [],
eleList: [],
radioName: '',
search_select1: [],
tableHeight: null,
add_select1_value: '',
}
},
mounted() {
window.addEventListener('resize', () => {
this.set_table_height()
})
this.set_table_height()
// 获取元素列表
this.getSelect1()
this.getSelect2().then((res) => {
this.selectData2 = res
})
this.getSelect3().then((res) => {
this.selectData3 = res
})
this.getSelect4().then((res) => {
this.selectData4 = res
})
},
created() {
// 初始化查询列表
this.getList()
},
methods: {
indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1
},
search_table() {
//搜索
this.pager.current = 1
this.getList()
},
// 查询列表
getList() {
this.loading = true
const params = {
talentPoolName: this.searchParams.talentPoolName,
tagId: this.searchParams.tagId,
state: this.searchParams.state,
current: this.pager.current,
pageSize: this.pager.size,
}
getETPManageList(params).then((res) => {
Promise.all([
this.getSelect2(),
this.getSelect4(),
this.getSelect3(),
]).then((res2) => {
res.records.map((item) => {
if (item.tagIdlist && item.tagIdlist.length > 0) {
res2[2].forEach((item2) => {
item.tagIdlist.map((item3) => {
if (item2.value == item3.tagId) {
item3['name'] = item2.label
}
})
})
}
let result1 = res2[0].find((item2) => item2.value == item.level)
let result2 = res2[1].find((item2) => item2.value == item.state)
item['level_'] = result1 ? result1.label : ''
item['state_'] = result2 ? result2.label : ''
})
this.pager.current = res.current
this.pager.total = res.total
this.pager.size = res.size
this.tableData = res.records
})
})
},
// 重置
reset() {
this.params = {
talentPoolName: '',
tagId: '',
state: '',
}
},
// 分页事件
handleSizeChange(val) {
this.pager.current = 1
this.pager.size = val
this.getList()
},
handleCurrentChange(val) {
this.pager.current = val
this.getList()
},
// 所有操作
operate(type, item) {
this.openType = type
if (type == 'add') {
this.add_dialog = true
this.title = '新建专家人才库'
this.resetForm()
this.formData.talentId = null
} else if (type == 'edit') {
this.add_dialog = true
this.title = '编辑专家人才库'
this.resetForm()
// this.formData = item;
this.formData.deptName = item.deptName
this.formData.talentPoolName = Number(item.talentPoolName)
this.formData.talentName = item.talentName
this.formData.state = String(item.state)
this.formData.level = String(item.level)
this.formData.taglist = []
if (item.tagIdlist) {
item.tagIdlist.forEach((item) => {
this.formData.taglist.push(String(item.tagId))
})
}
this.formData.comments = item.comments
this.formData.remark = item.remark
this.formData.talentId = item.talentId
} else if (type == 'create') {
let tagIdlist_ = []
this.selectData3.forEach((item1) => {
this.formData.taglist.forEach((item2) => {
if (item1.value == item2) {
tagIdlist_.push({
tagId: item1.value,
})
}
})
})
const params = { ...this.formData, taglist: tagIdlist_ }
if (this.formData.talentId) {
// 编辑保存
getETPManageUpdate(params).then((res) => {
if (res.code == 200) {
this.$message.success('保存成功')
this.add_dialog = false
this.getList()
} else {
this.add_dialog = false
this.$message.error(res.msg)
}
})
} else {
// 新建保存
getETPManageAdd(params).then((res) => {
if (res.code == 200) {
this.$message.success('保存成功')
this.add_dialog = false
this.getList()
} else {
this.add_dialog = false
this.$message.error(res.msg)
}
})
}
} else if (type == 'del') {
// 删除
const params = {
talentId: item.talentId,
delFlag: 1,
}
this.$confirm('确认删除吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'confirmClass',
type: 'warning',
})
.then(() => {
getETPManageUpdate(params).then((res) => {
if (res.code == 200) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
} else if (type == 'delMultiple') {
if (this.selectList.length <= 0) {
this.$message.error('请选择一项进行删除')
return
}
let params = {
talentId: [],
}
this.selectList.map((item) => {
params.talentId.push(item.talentId)
})
this.$confirm('确认批量删除吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'confirmClass',
type: 'warning',
})
.then(() => {
getETPManageDelBatch(params).then((res) => {
if (res.code == 200) {
this.$message.success('批量删除成功')
this.getList()
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
}
},
// 新建清空表单
resetForm() {
this.formData = {
deptName: '',
talentPoolName: '',
talentName: '',
taglist: [],
level: '',
comments: '',
state: '',
remark: '',
}
this.labelList = []
},
exportFile() {
//导出
// getTypicalExampleExcel(this.params).then(res => {
// let blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
// let url = URL.createObjectURL(blob);
// let link = document.createElement('a');
// link.href = url;
// document.body.appendChild(link);
// link.click();
// })
},
add_select1() {
//新增专家库名称
const params = {
talentPoolName: this.add_select1_value,
}
getETPManagePoolNameAdd(params).then((res) => {
if (res.code == 200) {
Message({
type: 'success',
message: '新增成功!',
})
this.getSelect1()
}
})
},
getSelect1() {
//专家库下来
getETPManagePoolName().then((res) => {
if (res.code == 200) {
this.selectData1 = res.data
}
})
},
getSelect2() {
//专家级别下拉
const params = {
key: 'talent_level',
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
}
})
})
},
getSelect3() {
//专家标签下拉
const params = {
key: 'talent_tag',
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
}
})
})
},
getSelect4() {
//专家状态下拉
const params = {
key: 'talent_status',
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then((res) => {
if (res.code == 200) {
resolve(res.data)
}
})
})
},
set_table_height() {
//动态设置表格高度
const table_container_height = $('.table_container').height()
const search_menu_height = $('.search_menu').height()
const search_btn_height = $('.search_btn').outerHeight(true)
this.tableHeight =
table_container_height -
search_menu_height -
search_btn_height -
90 +
'px'
},
// 表格多选
handleSelectionChange(e) {
this.selectList = e
},
selectInit(row, index) {
if (row.state != '1') {
return true //可勾选
} else {
return false //不可勾选
}
},
},
}
</script>
<style>
.confirmClass {
background-color: #0d867f !important;
}
.el-message-box__content {
padding: 60px 15px 60px 15px;
}
</style>
<style lang="scss" scoped>
/deep/ .el-input-group__append {
background-color: #0d867f;
color: #fff;
cursor: pointer;
}
/deep/ .el-dialog__header {
background-color: #0d867f;
text-align: left;
}
/deep/ .el-dialog__title {
color: #fff;
}
/deep/ .el-dialog__close {
color: #fff;
}
/deep/ .el-tag {
color: #0d867f;
}
.etpManage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.dialog_content_1 {
display: flex;
justify-content: space-between;
.el-input {
width: 210px;
}
.el-select {
width: 210px;
}
}
.dialog_form_item3 {
margin-top: 20px;
display: flex;
align-items: center;
.dialog_form_item3_content1 {
display: flex;
align-items: center;
.tu_biao_icon2 {
width: 20px;
}
}
}
.search_menu {
display: flex;
justify-content: space-between;
}
.search_menu_item_container {
display: flex;
align-items: center;
}
.search_menu_btn_container {
display: flex;
align-items: center;
}
.search_menu_item {
display: flex;
align-items: center;
width: 344px;
}
.search_title {
/* width: 20%; */
flex-shrink: 0;
margin-right: 15px;
}
.search_item {
width: 60%;
}
.search_btn {
width: 100%;
display: flex;
margin-top: 14px;
margin-bottom: 14px;
.el-button--primary {
background: rgba(13, 134, 127, 0.1);
color: #0d867f;
border: 0;
}
}
.el-button--primary {
background: rgba(13, 134, 127, 0.1);
color: #0d867f;
border: 0;
}
.add_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13, 134, 127, 0.1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0d867f;
font-size: 14px;
color: #0d867f;
cursor: pointer;
}
.version_btn {
display: flex;
align-items: center;
justify-content: center;
width: 104px;
height: 32px;
background: rgba(13, 134, 127, 0.1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0d867f;
font-size: 14px;
color: #0d867f;
cursor: pointer;
margin-left: 15px;
}
.query_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13, 134, 127, 1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0d867f;
font-size: 14px;
color: #fff;
margin-right: 10px;
cursor: pointer;
}
.reset_btn {
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(244, 244, 244, 1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #ccc;
font-size: 14px;
color: #666;
cursor: pointer;
}
.btn_icon {
margin-right: 10px;
}
.table_container {
width: 97%;
margin-top: 20px;
height: calc(100% - 40px);
.tableIcon {
width: 100%;
display: flex;
justify-content: center;
.iconItem {
width: 30px;
height: 30px;
}
}
.delBtn {
color: #dd6a15;
background-color: #f8ebe2;
}
.stopBtn {
color: #e7a20e;
}
.tagName {
.el-tag {
margin: 0 5px;
}
}
}
.el-pagination {
margin-top: 50px;
}
.dialog_form_item {
display: flex;
align-items: center;
margin-bottom: 10px;
.formArea {
width: 900px;
border-radius: 5px;
border: 1px solid #0d867f;
margin-top: 10px;
.formLine {
display: flex;
align-items: center;
height: 50px;
margin-left: 10px;
.formItem {
margin-left: 15px;
display: flex;
align-items: center;
.label {
width: 70px;
text-align: right;
margin-right: 5px;
}
/deep/.el-select {
width: 140px;
}
/deep/.el-input {
width: 140px;
}
}
.newBtn {
margin-left: 15px;
.addItem {
background-color: #0d867f;
color: #fff;
}
}
}
}
}
.dialog_form_item_title {
flex-shrink: 0;
margin-right: 15px;
width: 100px;
text-align: right;
.reqIcon {
color: red;
}
}
/deep/ .el-dialog__header {
text-align: left;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #0d867f;
}
.greenButton {
background-color: #0d867f;
color: #fff;
}
</style>
......@@ -4,7 +4,7 @@
* @Autor: pan
* @Date: 2024-03-28 16:08:56
* @LastEditors: pan
* @LastEditTime: 2024-03-29 16:06:36
* @LastEditTime: 2024-04-01 15:32:12
-->
<template>
<div>
......@@ -25,11 +25,17 @@
<el-row class="m-t-20">
<el-col :span="6" class="flex">
<div class="label">单位</div>
<div class="value">{{ detailInfo.manageOrgId }}</div>
<div class="value">
{{ codeToName(detailInfo.manageOrgId, 'sysOrgOptions') }}
</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">部门</div>
<div class="value">{{ detailInfo.manageDeptId }}</div>
<div class="value">
{{
codeToName(detailInfo.manageDeptId, 'sysDeptOptions')
}}
</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">关联系统名称</div>
......@@ -39,7 +45,9 @@
</el-col>
<el-col :span="6" class="flex">
<div class="label">建设类型</div>
<div class="value">{{ detailInfo.buildType }}</div>
<div class="value">
{{ codeToName(detailInfo.buildType, 'buildTypeOptins') }}
</div>
</el-col>
</el-row>
<el-row class="m-t-20">
......@@ -106,7 +114,7 @@
align="center"
></el-table-column>
<el-table-column
prop="name2"
prop="fileName"
width="500"
label="资料名称"
align="center"
......@@ -181,6 +189,18 @@ export default {
type: Object,
default: () => {},
},
sysOrgOptions: {
type: Array,
default: () => [],
},
sysDeptOptions: {
type: Array,
default: () => [],
},
buildTypeOptins: {
type: Array,
default: () => [],
},
},
data() {
return {
......@@ -205,6 +225,10 @@ export default {
},
mounted() {},
methods: {
codeToName(code, options) {
const obj = this[options]?.find((v) => v.value == code) || {}
return obj.label
},
handleClose() {
this.showDialog = false
},
......
......@@ -121,6 +121,7 @@
prop="manageOrgId"
label="单位"
align="center"
width="160"
:formatter="
(row, column, cellValue, index) =>
formatterDept(row, column, cellValue, index, 'sysOrgOptions')
......@@ -185,9 +186,10 @@
<el-table-column
prop="createTime"
label="创建时间"
width="120"
align="center"
></el-table-column>
<el-table-column label="操作" width="260" align="center">
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<div
style="
......@@ -677,7 +679,13 @@
</el-dialog>
<!-- 项目信息详情 -->
<ProjectDetail :row-data="rowData" :visible.sync="projectDetailVisible" />
<ProjectDetail
:sysOrgOptions="sysOrgOptions"
:sysDeptOptions="sysDeptOptions"
:buildTypeOptins="jianSheLeiXingSelect"
:row-data="rowData"
:visible.sync="projectDetailVisible"
/>
</div>
</template>
......
......@@ -40,6 +40,7 @@
v-model="searchParams.tplName"
placeholder="请选择"
style="width: 210px"
filterable
>
<el-option
v-for="item in moBanMingCheng"
......
......@@ -4,9 +4,8 @@
* @Autor: pan
* @Date: 2024-03-29 11:44:57
* @LastEditors: pan
* @LastEditTime: 2024-03-29 16:28:15
* @LastEditTime: 2024-04-01 15:34:42
-->
<template>
<div>
<el-dialog
......@@ -26,11 +25,25 @@
<el-row class="m-t-20">
<el-col :span="6" class="flex">
<div class="label">单位</div>
<div class="value">{{ systemInfoDetail.manageOrgId }}</div>
<div class="value">
{{
codeToName(
systemInfoDetail.manageOrgId,
'sysOrgOptions',
)
}}
</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">部门</div>
<div class="value">{{ systemInfoDetail.manageDeptId }}</div>
<div class="value">
{{
codeToName(
systemInfoDetail.manageDeptId,
'sysDeptOptions',
)
}}
</div>
</el-col>
<el-col :span="6" class="flex">
<div class="label">系统名称</div>
......@@ -40,7 +53,14 @@
</el-col>
<el-col :span="6" class="flex">
<div class="label">建设类型</div>
<div class="value">{{ systemInfoDetail.buildType }}</div>
<div class="value">
{{
codeToName(
systemInfoDetail.buildType,
'buildTypeOptins',
)
}}
</div>
</el-col>
</el-row>
<el-row class="m-t-20">
......@@ -124,6 +144,18 @@ export default {
type: Object,
default: () => {},
},
sysOrgOptions: {
type: Array,
default: () => [],
},
sysDeptOptions: {
type: Array,
default: () => [],
},
buildTypeOptins: {
type: Array,
default: () => [],
},
},
data() {
return {
......@@ -148,6 +180,10 @@ export default {
},
mounted() {},
methods: {
codeToName(code, options) {
const obj = this[options]?.find((v) => v.value == code) || {}
return obj.label
},
handleClose() {
this.showDialog = false
},
......
......@@ -279,8 +279,8 @@
</el-form-item>
<el-form-item label="系统类型:" prop="let4">
<el-select clearable v-model="ruleForm.let4">
<el-option label="统推" :value="1"></el-option>
<el-option label="自建" :value="2"></el-option>
<el-option label="统推" value="1"></el-option>
<el-option label="自建" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="承建单位:" prop="let5">
......@@ -315,7 +315,13 @@
</el-dialog>
<!-- 系统信息详情 -->
<SystemInfoDetail :row-data="rowData" :visible.sync="appDetailVisible" />
<SystemInfoDetail
:sysOrgOptions="sysOrgOptions"
:sysDeptOptions="sysDeptOptions"
:buildTypeOptins="jianSheLeiXingSelect"
:row-data="rowData"
:visible.sync="appDetailVisible"
/>
</div>
</template>
......@@ -436,11 +442,11 @@ export default {
//编辑
this.add_dialog = true
this.dialogTitle = '编辑系统'
this.ruleForm.let1 = row.manageOrgId
this.ruleForm.let2 = row.manageDeptId
this.ruleForm.let1 = row.manageOrgId + ''
this.ruleForm.let2 = row.manageDeptId + ''
this.ruleForm.let3 = row.appName
this.ruleForm.let4 = row.buildType
this.ruleForm.let5 = row.buildOrg
this.ruleForm.let4 = row.buildType + ''
this.ruleForm.let5 = row.buildOrg + ''
this.ruleForm.let6 = row.projectManager
this.appId = row.appId
this.$nextTick(() => {
......@@ -516,11 +522,11 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
const params = {
manageOrgId: this.ruleForm.let1,
manageDeptId: this.ruleForm.let2,
manageOrgId: +this.ruleForm.let1,
manageDeptId: +this.ruleForm.let2,
appName: this.ruleForm.let3,
buildType: this.ruleForm.let4,
buildOrg: this.ruleForm.let5,
buildOrg: +this.ruleForm.let5,
projectManager: this.ruleForm.let6,
}
const requestParams =
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!