generated from Leo_Ding/web-template
Compare commits
No commits in common. "4211973c83881399449f5a4b49de9cd116d56593" and "a1655462b53cc141d39515476c748cf3f7186a00" have entirely different histories.
4211973c83
...
a1655462b5
@ -25,20 +25,6 @@
|
|||||||
</a-date-picker>
|
</a-date-picker>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24">-->
|
|
||||||
<!-- <a-form-item :label="'顺序是否置顶'" name="sequence">-->
|
|
||||||
<!-- <a-input-number :placeholder="'请选择是否置顶'" v-model:value="formData.sequence"></a-input-number>-->
|
|
||||||
<!-- </a-form-item>-->
|
|
||||||
<!-- </a-col>-->
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-form-item label="是否置顶" name="sequence">
|
|
||||||
<a-radio-group v-model:value="formData.sequence">
|
|
||||||
<a-radio :value="0">置顶</a-radio>
|
|
||||||
<a-radio :value="1">不置顶</a-radio>
|
|
||||||
</a-radio-group>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
|
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item :label="'状态'" name="status">
|
<a-form-item :label="'状态'" name="status">
|
||||||
<a-radio-group v-model:value="formData.status" :options="[
|
<a-radio-group v-model:value="formData.status" :options="[
|
||||||
@ -81,7 +67,6 @@ formRules.value = {
|
|||||||
content: { required: true, message: '请输入内容' },
|
content: { required: true, message: '请输入内容' },
|
||||||
link: { required: true, message: '请输入链接' },
|
link: { required: true, message: '请输入链接' },
|
||||||
status: [{ required: true, message: '请选择状态', trigger: 'change' }],
|
status: [{ required: true, message: '请选择状态', trigger: 'change' }],
|
||||||
sequence: [{ required: true, message: '请选择顺序', trigger: 'change' }],
|
|
||||||
pushAt: [{ required: true, message: '请选择发布日期', trigger: 'change' }],
|
pushAt: [{ required: true, message: '请选择发布日期', trigger: 'change' }],
|
||||||
// imgUrl: [{ required: true, message: '请上传图片', trigger: 'change' }],
|
// imgUrl: [{ required: true, message: '请上传图片', trigger: 'change' }],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,12 +58,6 @@
|
|||||||
<span>{{ record.content }}</span>
|
<span>{{ record.content }}</span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'sequence'">
|
|
||||||
<a-tooltip :title="record.sequence === 0 ? '置顶' : '不置顶'">
|
|
||||||
<span>{{ record.sequence === 0 ? '置顶' : '不置顶' }}</span>
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'link'">
|
<template v-if="column.dataIndex === 'link'">
|
||||||
<a-tooltip :title="record.link">
|
<a-tooltip :title="record.link">
|
||||||
<a :href="record.link" target="_blank" style="text-decoration: underline;">{{
|
<a :href="record.link" target="_blank" style="text-decoration: underline;">{{
|
||||||
@ -116,7 +110,6 @@ const columns = [
|
|||||||
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
|
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
|
||||||
{ title: '发布日期', dataIndex: 'pushAt', width: 120, align: 'center' },
|
{ title: '发布日期', dataIndex: 'pushAt', width: 120, align: 'center' },
|
||||||
{ title: '链接', dataIndex: 'link', align: 'center' },
|
{ title: '链接', dataIndex: 'link', align: 'center' },
|
||||||
{ title: '顺序', dataIndex: 'sequence', width: 100, align: 'center' },
|
|
||||||
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
|
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -145,7 +138,6 @@ async function getPageList() {
|
|||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
listData.value = data.filter(item => item.type === "news")
|
listData.value = data.filter(item => item.type === "news")
|
||||||
console.log('消息:',this.listData.value)
|
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -210,6 +202,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -202,6 +202,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -150,7 +150,7 @@ const columns = [
|
|||||||
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
|
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
|
||||||
{ title: '发布日期', dataIndex: 'pushAt', width: 120, align: 'center' },
|
{ title: '发布日期', dataIndex: 'pushAt', width: 120, align: 'center' },
|
||||||
{ title: '链接', dataIndex: 'link', align: 'center' },
|
{ title: '链接', dataIndex: 'link', align: 'center' },
|
||||||
// { title: '月份+事件', dataIndex: 'month', key: 'month' },
|
{ title: '月份+事件', dataIndex: 'month', key: 'month' },
|
||||||
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
|
{ title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -119,8 +119,7 @@ async function getPageList() {
|
|||||||
const { success, data, total } = await apis.imgmgt
|
const { success, data, total } = await apis.imgmgt
|
||||||
.getDataList({
|
.getDataList({
|
||||||
pageSize,
|
pageSize,
|
||||||
page: current,
|
current:current,
|
||||||
type:80,
|
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -129,7 +128,7 @@ async function getPageList() {
|
|||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
//筛选type的值80对应about
|
//筛选type的值80对应about
|
||||||
listData.value = data
|
listData.value = data.filter( item => item.type===80)
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -194,7 +193,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -119,8 +119,7 @@ async function getPageList() {
|
|||||||
const { success, data, total } = await apis.imgmgt
|
const { success, data, total } = await apis.imgmgt
|
||||||
.getDataList({
|
.getDataList({
|
||||||
pageSize,
|
pageSize,
|
||||||
page: current,
|
current:current,
|
||||||
type: 100,
|
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -129,7 +128,7 @@ async function getPageList() {
|
|||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
//筛选type的值100对应corporateHonor
|
//筛选type的值100对应corporateHonor
|
||||||
listData.value = data
|
listData.value = data.filter( item => item.type===100)
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -194,7 +193,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -120,8 +120,8 @@ async function getPageList() {
|
|||||||
const { success, data, total } = await apis.imgmgt
|
const { success, data, total } = await apis.imgmgt
|
||||||
.getDataList({
|
.getDataList({
|
||||||
pageSize,
|
pageSize,
|
||||||
page: current,
|
current:current,
|
||||||
type: 120,
|
type:120,
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -195,6 +195,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -119,8 +119,8 @@ async function getPageList() {
|
|||||||
const { success, data, total } = await apis.imgmgt
|
const { success, data, total } = await apis.imgmgt
|
||||||
.getDataList({
|
.getDataList({
|
||||||
pageSize,
|
pageSize,
|
||||||
page: current,
|
current:current,
|
||||||
type: 110,
|
type:110,
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -129,7 +129,7 @@ async function getPageList() {
|
|||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
//筛选type的值110对应researchHonor
|
//筛选type的值110对应researchHonor
|
||||||
listData.value = data
|
// listData.value = data.filter(item => item.type===110)
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -194,7 +194,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -119,8 +119,7 @@ async function getPageList() {
|
|||||||
const { success, data, total } = await apis.imgmgt
|
const { success, data, total } = await apis.imgmgt
|
||||||
.getDataList({
|
.getDataList({
|
||||||
pageSize,
|
pageSize,
|
||||||
page: current,
|
current:current,
|
||||||
type: 90,
|
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -129,7 +128,7 @@ async function getPageList() {
|
|||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
//筛选type的值90对应talentCenter
|
//筛选type的值90对应talentCenter
|
||||||
listData.value = data
|
listData.value = data.filter(item => item.type===90)
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -194,7 +193,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -119,8 +119,7 @@ async function getPageList() {
|
|||||||
const { success, data, total } = await apis.imgmgt
|
const { success, data, total } = await apis.imgmgt
|
||||||
.getDataList({
|
.getDataList({
|
||||||
pageSize,
|
pageSize,
|
||||||
page: current,
|
current:current,
|
||||||
type: 70,
|
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -129,7 +128,7 @@ async function getPageList() {
|
|||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
//筛选type的值90对应talentCenter
|
//筛选type的值90对应talentCenter
|
||||||
listData.value = data
|
listData.value = data.filter(item => item.type===70)
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -194,7 +193,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -193,7 +193,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -62,11 +62,6 @@
|
|||||||
<a-input v-model:value="formArea.name" :placeholder="'请输入基地名称'" />
|
<a-input v-model:value="formArea.name" :placeholder="'请输入基地名称'" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
|
||||||
<a-form-item :label="'基地排序'" name="name">
|
|
||||||
<a-input v-model:value="formArea.sequence" :placeholder="'请输入基地排序'" />
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item :label="'状态'" name="status" style="width: 100%;">
|
<a-form-item :label="'状态'" name="status" style="width: 100%;">
|
||||||
<a-radio-group v-model:value="formArea.status" :options="[
|
<a-radio-group v-model:value="formArea.status" :options="[
|
||||||
@ -152,7 +147,6 @@ function handleCreate() {
|
|||||||
formData.value.status = 'enabled'
|
formData.value.status = 'enabled'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//新建基地
|
//新建基地
|
||||||
|
|
||||||
const childHandleOk = async () => {
|
const childHandleOk = async () => {
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
<a-input placeholder="请输入岗位名称" v-model:value="searchFormData.title"></a-input>
|
<a-input placeholder="请输入岗位名称" v-model:value="searchFormData.title"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col v-bind="colSpan">
|
<a-col v-bind="colSpan">
|
||||||
<a-form-item label="状态" name="status">
|
<a-form-item label="状态" name="status">
|
||||||
<a-select v-model:value="searchFormData.status" allowClear>
|
<a-select v-model:value="searchFormData.status" allowClear>
|
||||||
@ -39,17 +40,11 @@
|
|||||||
</template>
|
</template>
|
||||||
新增招聘
|
新增招聘
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button style="margin: 0 20px" type="primary" @click="handleCreateJD()">
|
|
||||||
<template #icon>
|
|
||||||
<EditOutlined />
|
|
||||||
</template>
|
|
||||||
编辑基地
|
|
||||||
</a-button>
|
|
||||||
</x-action-bar>
|
</x-action-bar>
|
||||||
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
||||||
:pagination="paginationState" :scroll="{ x: 1000 }" @change="onTableChange">
|
:pagination="paginationState" :scroll="{ x: 1000 }" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'introduce'">
|
<template v-if="column.dataIndex === 'introduce'">
|
||||||
<a-tooltip :title="record.introduce">
|
<a-tooltip :title="record.introduce">
|
||||||
<div class="text-ellipsis">{{ record.introduce }}</div>
|
<div class="text-ellipsis">{{ record.introduce }}</div>
|
||||||
@ -60,7 +55,7 @@
|
|||||||
<div class="text-ellipsis">{{ record.duty }}</div>
|
<div class="text-ellipsis">{{ record.duty }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="'status' === column.dataIndex">
|
<template v-if="'status' === column.dataIndex">
|
||||||
<a-tag v-if="record.status === 'enabled'" :color="'green'">启用</a-tag>
|
<a-tag v-if="record.status === 'enabled'" :color="'green'">启用</a-tag>
|
||||||
<a-tag v-if="record.status === 'disabled'" :color="'red'">停用</a-tag>
|
<a-tag v-if="record.status === 'disabled'" :color="'red'">停用</a-tag>
|
||||||
@ -200,19 +195,9 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 编辑基地
|
|
||||||
*/
|
|
||||||
function handleCreateJD() {
|
|
||||||
showModal({
|
|
||||||
type: 'edit',
|
|
||||||
title: '编辑地基',
|
|
||||||
})
|
|
||||||
initData()
|
|
||||||
formData.value.status = 'enabled'
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
|||||||
@ -10,25 +10,14 @@
|
|||||||
<a-input :placeholder="'请输入姓名'" v-model:value="formData.name"></a-input>
|
<a-input :placeholder="'请输入姓名'" v-model:value="formData.name"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24">-->
|
|
||||||
<!-- <a-form-item :label="'人物描述'" name="rank">-->
|
|
||||||
<!-- <a-input :placeholder="'请输入人物描述内容'" v-model:value="formData.rank"></a-input>-->
|
|
||||||
<!-- </a-form-item>-->
|
|
||||||
<!-- </a-col>-->
|
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item :label="'研究领域'" name="area">
|
<a-form-item :label="'人物描述'" name="rank">
|
||||||
<a-input :placeholder="'请输入研究领域内容'" v-model:value="formData.area"></a-input>
|
<a-input :placeholder="'请输入人物描述内容'" v-model:value="formData.rank"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item :label="'人物简介'">
|
<a-form-item :label="'研究领域'" name="area">
|
||||||
<a-select
|
<a-input :placeholder="'请输入研究领域内容'" v-model:value="formData.area"></a-input>
|
||||||
v-model:value="formData.rank"
|
|
||||||
mode="tags"
|
|
||||||
:placeholder="'请输入研究领域,按回车分隔'"
|
|
||||||
:token-separators="[',']"
|
|
||||||
style="width: 100%;"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@ -76,7 +65,6 @@ const roles = ref([])
|
|||||||
const img = ref('')
|
const img = ref('')
|
||||||
formRules.value = {
|
formRules.value = {
|
||||||
name: { required: true, message: '请输入名称' },
|
name: { required: true, message: '请输入名称' },
|
||||||
rank: { required: true, message: '请输入人物简介' },
|
|
||||||
status: [{ required: true, message: '请选择状态', trigger: 'change' }],
|
status: [{ required: true, message: '请选择状态', trigger: 'change' }],
|
||||||
sequence: [{ required: true, message: '请选择顺序', trigger: 'change' }],
|
sequence: [{ required: true, message: '请选择顺序', trigger: 'change' }],
|
||||||
img: [{ required: true, message: '请上传图片', trigger: 'change' }],
|
img: [{ required: true, message: '请上传图片', trigger: 'change' }],
|
||||||
@ -117,7 +105,7 @@ async function handleEdit(record = {}) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
formData.value = { ...data }
|
formData.value = { ...data }
|
||||||
formData.value.pushAt = dayjs(data.pushAt)
|
formData.value.pushAt=dayjs(data.pushAt)
|
||||||
console.log(formData.value)
|
console.log(formData.value)
|
||||||
img.value = config('http.apiBasic') + data.img
|
img.value = config('http.apiBasic') + data.img
|
||||||
}
|
}
|
||||||
@ -133,8 +121,15 @@ function handleOk() {
|
|||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
...values,
|
||||||
|
rank: Array.isArray(formData.rank)
|
||||||
|
? formData.rank
|
||||||
|
: typeof formData.rank === 'string'
|
||||||
|
? formData.rank
|
||||||
|
.split(/[\s;]+/)
|
||||||
|
.map(item => item.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
: [],
|
||||||
img: formData.value.img,
|
img: formData.value.img,
|
||||||
rank: formData.value.rank,
|
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
console.log(modal.value.type)
|
console.log(modal.value.type)
|
||||||
|
|||||||
@ -55,24 +55,12 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- <template v-if="column.dataIndex === 'rank'">-->
|
|
||||||
<!-- <a-tooltip :title="record.rank">-->
|
|
||||||
<!-- <span>{{ record.rank }}</span>-->
|
|
||||||
<!-- </a-tooltip>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<template v-if="column.dataIndex === 'rank'">
|
<template v-if="column.dataIndex === 'rank'">
|
||||||
<div>
|
<a-tooltip :title="record.rank">
|
||||||
<a-tag
|
<span>{{ record.rank }}</span>
|
||||||
v-for="(item, index) in record.rank"
|
</a-tooltip>
|
||||||
:key="index"
|
|
||||||
color="blue"
|
|
||||||
>
|
|
||||||
{{ item }}
|
|
||||||
</a-tag>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'area'">
|
<template v-if="column.dataIndex === 'area'">
|
||||||
<a-tooltip :title="record.area">
|
<a-tooltip :title="record.area">
|
||||||
<span>{{ record.area }}</span>
|
<span>{{ record.area }}</span>
|
||||||
@ -104,7 +92,6 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { message, Modal } from 'ant-design-vue'
|
import { message, Modal } from 'ant-design-vue'
|
||||||
import { computed } from 'vue';
|
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import apis from '@/apis'
|
import apis from '@/apis'
|
||||||
import { formatUtcDateTime } from '@/utils/util'
|
import { formatUtcDateTime } from '@/utils/util'
|
||||||
@ -123,7 +110,7 @@ const { t } = useI18n() // 解构出t方法
|
|||||||
const columns = [
|
const columns = [
|
||||||
{ title: '图片', dataIndex: 'img', width: 100, align: 'center' },
|
{ title: '图片', dataIndex: 'img', width: 100, align: 'center' },
|
||||||
{ title: '名称', dataIndex: 'name', key: 'name' },
|
{ title: '名称', dataIndex: 'name', key: 'name' },
|
||||||
{ title: '人物描述', dataIndex: 'rank', key: 'rank' },
|
{ title: '任务描述', dataIndex: 'rank', key: 'rank' },
|
||||||
{ title: '研究领域', dataIndex: 'area', key: 'area' },
|
{ title: '研究领域', dataIndex: 'area', key: 'area' },
|
||||||
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
|
{ title: '状态', dataIndex: 'status', width: 120, align: 'center' },
|
||||||
{ title: '顺序', dataIndex: 'sequence', width: 100, align: 'center' },
|
{ title: '顺序', dataIndex: 'sequence', width: 100, align: 'center' },
|
||||||
@ -219,6 +206,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -5,8 +5,7 @@
|
|||||||
<a-textarea :placeholder="'请输入零容忍内容'" v-model:value="reportContent"></a-textarea>
|
<a-textarea :placeholder="'请输入零容忍内容'" v-model:value="reportContent"></a-textarea>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :label="'零容忍图片'" name="reportImage">
|
<a-form-item :label="'零容忍图片'" name="reportImage">
|
||||||
<!-- <x-upload-image v-model="reportImage" @imgChange="imgChange" />-->
|
<x-upload-image v-model="reportImage" @imgChange="imgChange" />
|
||||||
<gx-upload v-model="reportImage" :fileNumber="1" />
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :label="'举报邮箱'" name="email">
|
<a-form-item :label="'举报邮箱'" name="email">
|
||||||
<a-input :placeholder="'请输入举报邮箱'" v-model:value="email"></a-input>
|
<a-input :placeholder="'请输入举报邮箱'" v-model:value="email"></a-input>
|
||||||
@ -36,9 +35,9 @@
|
|||||||
v-model:value="itemImg.name"
|
v-model:value="itemImg.name"
|
||||||
placeholder="请输入图片名称"
|
placeholder="请输入图片名称"
|
||||||
/>
|
/>
|
||||||
<gx-upload
|
<x-upload-image
|
||||||
v-model="itemImg.image"
|
v-model="itemImg.image"
|
||||||
:fileNumber="1"
|
@imgChange="(value) => imgChange(index, value)"
|
||||||
/>
|
/>
|
||||||
<a-input
|
<a-input
|
||||||
class="inputPhone"
|
class="inputPhone"
|
||||||
@ -72,10 +71,8 @@ import { ref } from 'vue'
|
|||||||
import apis from '@/apis' // 假设这里包含 saveAffirm 接口
|
import apis from '@/apis' // 假设这里包含 saveAffirm 接口
|
||||||
import { usePagination } from '@/hooks'
|
import { usePagination } from '@/hooks'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { spliceUrl } from '@/utils/util'
|
|
||||||
import { getWebData,updateWebData} from '@/apis/modules/webSite'
|
import { getWebData,updateWebData} from '@/apis/modules/webSite'
|
||||||
import XSearchBar from '@/components/SearchBar/SearchBar.vue'
|
import XSearchBar from '@/components/SearchBar/SearchBar.vue' // 获取声明接口
|
||||||
import GxUpload from '@/components/GxUpload/index.vue' // 获取声明接口
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'contactUs',
|
name: 'contactUs',
|
||||||
})
|
})
|
||||||
@ -116,9 +113,7 @@ async function getPageList() {
|
|||||||
address.value = res.data.address
|
address.value = res.data.address
|
||||||
phone.value = res.data.phone
|
phone.value = res.data.phone
|
||||||
reportNum.value = res.data.reportNum
|
reportNum.value = res.data.reportNum
|
||||||
|
|
||||||
socialMedia.value = Array.isArray(res.data.socialMedia) ? res.data.socialMedia : []
|
socialMedia.value = Array.isArray(res.data.socialMedia) ? res.data.socialMedia : []
|
||||||
|
|
||||||
//console.log(affirm.value)
|
//console.log(affirm.value)
|
||||||
console.log("web-Id:",id.value)
|
console.log("web-Id:",id.value)
|
||||||
console.log('webData',res.data)
|
console.log('webData',res.data)
|
||||||
@ -136,60 +131,19 @@ async function handleSearch() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
console.log("id.value:", id.value)
|
console.log("id.value:", id.value)
|
||||||
// 转换 socialMedia.image 为字符串
|
|
||||||
// const formattedSocialMedia = Array.isArray(socialMedia.value)
|
|
||||||
// ? socialMedia.value.map(item => ({
|
|
||||||
// ...item,
|
|
||||||
// image: Array.isArray(item.image) ? item.image[0] : item.image
|
|
||||||
// }))
|
|
||||||
// : []
|
|
||||||
const formattedSocialMedia = Array.isArray(socialMedia?.value)
|
|
||||||
? socialMedia.value.map(item => {
|
|
||||||
const imageRaw = Array.isArray(item?.image)
|
|
||||||
? item.image[0]
|
|
||||||
: item?.image;
|
|
||||||
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
image: spliceUrl(imageRaw)
|
|
||||||
};
|
|
||||||
})
|
|
||||||
: [];
|
|
||||||
|
|
||||||
const reportImageRaw = Array.isArray(reportImage?.value)
|
|
||||||
? reportImage.value[0]
|
|
||||||
: reportImage?.value;
|
|
||||||
const reportImageFormatted = {
|
|
||||||
reportImage: spliceUrl(reportImageRaw)};
|
|
||||||
|
|
||||||
await apis.webSite.updateWebData(id.value, {
|
await apis.webSite.updateWebData(id.value, {
|
||||||
affirm: affirm.value,
|
affirm: affirm.value,
|
||||||
reportContent: reportContent.value,
|
reportContent: reportContent.value,
|
||||||
reportImage: reportImageFormatted.reportImage,
|
reportImage: reportImage.value,
|
||||||
//reportImage:Array.isArray(reportImage.value) ? reportImage.value[0] : reportImage.value,
|
|
||||||
email: email.value,
|
email: email.value,
|
||||||
lat: lat.value,
|
lat: lat.value,
|
||||||
lon: lon.value,
|
lon: lon.value,
|
||||||
address: address.value,
|
address: address.value,
|
||||||
phone: phone.value,
|
phone: phone.value,
|
||||||
reportNum: reportNum.value,
|
reportNum: reportNum.value,
|
||||||
socialMedia: formattedSocialMedia,
|
socialMedia: socialMedia.value,
|
||||||
})
|
})
|
||||||
// await apis.webSite.updateWebData(id.value, {
|
|
||||||
// affirm: affirm.value,
|
|
||||||
// reportContent: reportContent.value,
|
|
||||||
//
|
|
||||||
// reportImage: reportImage.value,
|
|
||||||
//
|
|
||||||
// email: email.value,
|
|
||||||
// lat: lat.value,
|
|
||||||
// lon: lon.value,
|
|
||||||
// address: address.value,
|
|
||||||
// phone: phone.value,
|
|
||||||
// reportNum: reportNum.value,
|
|
||||||
//
|
|
||||||
// socialMedia: socialMedia.value,
|
|
||||||
// })
|
|
||||||
message.success('保存成功')
|
message.success('保存成功')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
message.error('保存失败,请重试')
|
message.error('保存失败,请重试')
|
||||||
|
|||||||
@ -125,8 +125,7 @@ async function getPageList() {
|
|||||||
const { success, data, total } = await apis.imgmgt
|
const { success, data, total } = await apis.imgmgt
|
||||||
.getDataList({
|
.getDataList({
|
||||||
pageSize,
|
pageSize,
|
||||||
page: current,
|
current:current,
|
||||||
type: 10,
|
|
||||||
...searchFormData.value,
|
...searchFormData.value,
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -135,7 +134,7 @@ async function getPageList() {
|
|||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
//筛选type的值10对应friendlyLinks
|
//筛选type的值10对应friendlyLinks
|
||||||
listData.value = data
|
listData.value = data.filter(item => item.type===10)
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -200,7 +199,7 @@ function handleResetSearch() {
|
|||||||
* 编辑完成
|
* 编辑完成
|
||||||
*/
|
*/
|
||||||
async function onOk() {
|
async function onOk() {
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
await getPageList()
|
await getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user