|
@@ -19,14 +19,7 @@
|
|
|
<el-table-column type="index" label="序号" width="60" align="center"> </el-table-column>
|
|
|
<el-table-column prop="url" label="图片" align="center">
|
|
|
<template #default="scope">
|
|
|
- <custom-upload
|
|
|
- model="url"
|
|
|
- :list="scope.row.url"
|
|
|
- :limit="1"
|
|
|
- listType="picture-card"
|
|
|
- url="/files/web/cxyy_sector/upload"
|
|
|
- @change="onFriendUpload($event, scope.row)"
|
|
|
- ></custom-upload>
|
|
|
+ <custom-upload model="url" :list="scope.row.url" :limit="1" listType="picture-card" url="/files/web/cxyy_sector/upload" @change="onFriendUpload($event, scope.row)"></custom-upload>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="名称" align="center">
|
|
@@ -42,12 +35,30 @@
|
|
|
</el-table>
|
|
|
</el-col>
|
|
|
</template>
|
|
|
+ <template #companyPerson>
|
|
|
+ <companyPerson :data="form.companyPerson" @change="change"></companyPerson>
|
|
|
+ </template>
|
|
|
+ <template #news>
|
|
|
+ <news :data="form.news" @change="change"></news>
|
|
|
+ </template>
|
|
|
+ <template #carousel>
|
|
|
+ <custom-upload model="carousel" :list="form.carousel" :limit="4" url="/files/web/cxyy_sector/upload" @change="onUpload" listType="picture-card"></custom-upload>
|
|
|
+ </template>
|
|
|
<template #file>
|
|
|
<custom-upload model="file" :list="form.file" :limit="1" url="/files/web/cxyy_sector/upload" @change="onUpload" listType="picture-card"></custom-upload>
|
|
|
</template>
|
|
|
<template #brief>
|
|
|
<WangEditor v-model="form.brief" />
|
|
|
</template>
|
|
|
+ <template #process>
|
|
|
+ <WangEditor v-model="form.process" />
|
|
|
+ </template>
|
|
|
+ <template #situation>
|
|
|
+ <WangEditor v-model="form.situation" />
|
|
|
+ </template>
|
|
|
+ <template #activity>
|
|
|
+ <WangEditor v-model="form.activity" />
|
|
|
+ </template>
|
|
|
<template #is_use>
|
|
|
<el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
|
|
|
</template>
|
|
@@ -59,6 +70,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+// 组件
|
|
|
+import news from './other/news.vue'
|
|
|
+import companyPerson from './other/companyPerson.vue'
|
|
|
import moment from 'moment'
|
|
|
const $checkRes = inject('$checkRes')
|
|
|
import { cloneDeep, get } from 'lodash-es'
|
|
@@ -79,8 +93,7 @@ const fields = [
|
|
|
model: 'is_use',
|
|
|
format: (i) => getDict(i, 'is_use'),
|
|
|
custom: true
|
|
|
- },
|
|
|
- { label: t('pages.sector.remark'), model: 'remark' }
|
|
|
+ }
|
|
|
]
|
|
|
const opera = [
|
|
|
{ label: t('common.update'), method: 'edit' },
|
|
@@ -96,19 +109,24 @@ const loading = ref(false)
|
|
|
const formFields = [
|
|
|
{ label: t('pages.sector.title'), model: 'title' },
|
|
|
{ label: t('pages.sector.href'), model: 'href' },
|
|
|
+ { label: t('pages.sector.carousel'), model: 'carousel', custom: true },
|
|
|
{ label: t('pages.sector.file'), model: 'file', custom: true },
|
|
|
- { label: t('pages.sector.partner'), model: 'partner', custom: true },
|
|
|
+ { label: t('pages.sector.companyPerson'), model: 'companyPerson', custom: true },
|
|
|
+ { label: t('pages.sector.news'), model: 'news', custom: true },
|
|
|
{ label: t('pages.sector.sort'), model: 'sort', type: 'number' },
|
|
|
{ label: t('pages.sector.is_use'), model: 'is_use', type: 'radio' },
|
|
|
- { label: t('pages.sector.remark'), model: 'remark', type: 'textarea' },
|
|
|
- { label: t('pages.sector.brief'), model: 'brief', custom: true }
|
|
|
+ { label: t('pages.sector.brief'), model: 'brief', custom: true },
|
|
|
+ { label: t('pages.sector.process'), model: 'process', custom: true },
|
|
|
+ { label: t('pages.sector.situation'), model: 'situation', custom: true },
|
|
|
+ { label: t('pages.sector.activity'), model: 'activity', custom: true },
|
|
|
+ { label: t('pages.sector.partner'), model: 'partner', custom: true }
|
|
|
]
|
|
|
const rules = reactive({
|
|
|
title: [{ required: true, message: t('pages.sector.titleMessage'), trigger: 'blur' }],
|
|
|
sort: [{ required: true, message: t('pages.sector.sortfMessage'), trigger: 'blur' }]
|
|
|
})
|
|
|
const dialog = ref({ type: '1', show: false, title: t('pages.sector.dialogTitle'), top: '15vh' })
|
|
|
-const form = ref({ partner: [], file: [] })
|
|
|
+const form = ref({ partner: [], file: [], carousel: [], companyPerson: [], news: [] })
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
|
loading.value = true
|
|
@@ -217,5 +235,8 @@ const toUse = async (data, is_use) => {
|
|
|
})
|
|
|
.catch(() => {})
|
|
|
}
|
|
|
+const change = ({ list, type }) => {
|
|
|
+ form[type] = list || []
|
|
|
+}
|
|
|
</script>
|
|
|
<style scoped lang="scss"></style>
|