解决媒体库bug
This commit is contained in:
parent
6265706565
commit
3da79a6056
|
@ -89,6 +89,48 @@ export const constantRoutes = [
|
|||
// 动态路由,基于用户权限动态去加载
|
||||
export const dynamicRoutes = [
|
||||
|
||||
{
|
||||
path: '/supplier/detailPage',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['supplier:detail'],
|
||||
children: [
|
||||
{
|
||||
path: ':supplierId(\\d+)',
|
||||
component: () => import('@/views/supplier/linkSupplerDetail'),
|
||||
name: 'linkSupplerDetail',
|
||||
meta: { title: '供应商详情', activeMenu: '/supplier' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/supplier/formPage',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['supplier:update'],
|
||||
children: [
|
||||
{
|
||||
path: ':supplierId(\\d+)',
|
||||
component: () => import('@/views/supplier/linkSupplierForm'),
|
||||
name: 'linkSupplierForm',
|
||||
meta: { title: '供应商表单', activeMenu: '/supplier' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/mediaLibrary/formPage',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['mediaLibrary:update'],
|
||||
children: [
|
||||
{
|
||||
path: ':mediaId(\\d+)',
|
||||
component: () => import('@/views/mediaLibrary/linkMediaForm'),
|
||||
name: 'linkMediaForm',
|
||||
meta: { title: '媒体表单', activeMenu: '/mediaLibrary' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/supplierForm',
|
||||
// component: Layout,
|
||||
|
|
|
@ -51,7 +51,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<ul class="resource-list" v-if="notices.length > 0">
|
||||
<li v-for="(notice, index) in notices" :key="index" class="resource-link" @click="handleGoSupplierManage">
|
||||
<li v-for="(notice, index) in notices" :key="index" class="resource-link"
|
||||
@click="handleGoFormManage(notice.businessId, notice.businessType)">
|
||||
{{ notice.noticeTitle }}
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -114,7 +115,11 @@ const handleGoMediaMap = () => {
|
|||
const handleGoSupplierManage = () => {
|
||||
router.push('/supplier')
|
||||
}
|
||||
|
||||
// 通知跳转
|
||||
const handleGoFormManage = (businessId, businessType) => {
|
||||
if (businessType == 1) router.push('/supplier/formPage/' + businessId)
|
||||
if (businessType == 2) router.push('/mediaLibrary/formPage/' + businessId)
|
||||
}
|
||||
// 打开媒体库管理
|
||||
const handleGoMediaLibary = () => {
|
||||
router.push('/mediaLibrary')
|
||||
|
|
|
@ -72,6 +72,7 @@ import { mediaExcelBaseField, mediaExcelPriceField, exportMediaExcel } from "@/a
|
|||
const exportTitle = ref('导出')
|
||||
const exportOpen = ref(false)
|
||||
const activeName = ref('first')
|
||||
const curDeptIds = ref(null)
|
||||
|
||||
// 导出提交信息
|
||||
const exportForm = ref({
|
||||
|
@ -86,6 +87,7 @@ const baseFieldCheckAll = ref(false)
|
|||
const baseFieldIsIndeterminate = ref(true)
|
||||
// 基础字段
|
||||
const baseFields = ref([])
|
||||
const _baseFields = ref(null)
|
||||
// 已选择的基础字段
|
||||
const checkedBaseFields = ref([])
|
||||
|
||||
|
@ -94,6 +96,7 @@ const priceFieldCheckAll = ref(false)
|
|||
const priceFieldIsIndeterminate = ref(true)
|
||||
// 报价字段
|
||||
const priceFields = ref([])
|
||||
const _priceFields = ref(null)
|
||||
// 已选择的报价字段
|
||||
const checkedPriceFields = ref([])
|
||||
|
||||
|
@ -181,18 +184,44 @@ const getCurrentTime = () => {
|
|||
// 获取基础信息字段
|
||||
const getMediaExcelBaseField = () => {
|
||||
mediaExcelBaseField().then(res => {
|
||||
baseFields.value = res.data
|
||||
if (curDeptIds.value && curDeptIds.value.length == 2) baseFields.value = res.data
|
||||
else if (curDeptIds.value && curDeptIds.value.length == 1) {
|
||||
if (curDeptIds.value[0] == '219') {
|
||||
// 网络媒体
|
||||
_baseFields.value = "媒体名称,媒体类型,媒体大类,展示形式,省,市,区,镇,商圈,地址,经度,纬度,状态,废除原因, 部门"
|
||||
} else {
|
||||
_baseFields.value = "媒体名称,媒体类型,媒体大类,展示形式,是否照明,播放时间,媒体尺寸,mr,日均车流量,媒体朝向,省,市,区,镇,商圈,地址,经度,纬度,最小购买周期,首次制作安装费,换刊制作安装费,状态,废除原因, 部门"
|
||||
}
|
||||
baseFields.value = [...new Set( // 去重
|
||||
res.data.filter(item => _baseFields.value.includes(item.displayName))
|
||||
)];
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取报价信息字段
|
||||
const getMediaExcelPriceField = () => {
|
||||
mediaExcelPriceField().then(res => {
|
||||
priceFields.value = res.data
|
||||
if (curDeptIds.value && curDeptIds.value.length == 2) priceFields.value = res.data
|
||||
else if (curDeptIds.value && curDeptIds.value.length == 1) {
|
||||
if (curDeptIds.value[0] == '219') {
|
||||
// 网络媒体
|
||||
_priceFields.value = "年份,媒体大类,实际购买频次,是否框内,制作成本,供应商,项目名称"
|
||||
priceFields.value = [...new Set( // 去重
|
||||
res.data.filter(item => !_priceFields.value.includes(item.displayName))
|
||||
)];
|
||||
} else {
|
||||
_priceFields.value = "年份,城市/市场,媒体大类,媒体名称,频次,刊例价,刊例价单位,实际购买频次,实际购买刊例价,购买周期,折扣,媒体总净价,总制作费,总净价,单日覆盖人流量,SOV,CPM,备注,是否框内,成本,制作成本,供应商,项目名称"
|
||||
priceFields.value = [...new Set( // 去重
|
||||
res.data.filter(item => _priceFields.value.includes(item.displayName))
|
||||
)];
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化
|
||||
const initExportExcel = (_mediaIds) => {
|
||||
const initExportExcel = (_mediaIds, _curDeptIds) => {
|
||||
exportForm.value.ids = _mediaIds
|
||||
curDeptIds.value = _curDeptIds
|
||||
exportOpen.value = true
|
||||
getMediaExcelBaseField()
|
||||
getMediaExcelPriceField()
|
||||
|
|
|
@ -606,7 +606,8 @@ const handleExportExcel = () => {
|
|||
return false
|
||||
}
|
||||
const mediaIds = multipleChoseArr.value.map(item => item.id);
|
||||
exportDialogRef.value.initExportExcel(mediaIds)
|
||||
const uniqueDeptIds = [...new Set(multipleChoseArr.value.map(item => item.dataScopeDeptId))];
|
||||
exportDialogRef.value.initExportExcel(mediaIds, uniqueDeptIds)
|
||||
}
|
||||
/** 导出PPT按钮操作 */
|
||||
const handleExportPPT = (tempId) => {
|
||||
|
|
26
src/views/mediaLibrary/linkMediaForm.vue
Normal file
26
src/views/mediaLibrary/linkMediaForm.vue
Normal file
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<media-form ref="mediaFormRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="Post">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useBackgroundStore } from '@/store/modules/background'
|
||||
import otherbg from '@/assets/images/otherbg.png'
|
||||
import mediaForm from "./mediaForm.vue";
|
||||
|
||||
const bgStore = useBackgroundStore()
|
||||
const route = useRoute()
|
||||
|
||||
const mediaFormRef = ref(null)
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
bgStore.setBgImage(otherbg)
|
||||
const _mediaId = route.params && route.params.mediaId
|
||||
if (_mediaId) {
|
||||
console.log('接收id', _mediaId)
|
||||
mediaFormRef.value.initForm('编辑媒体信息', { id: _mediaId })
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -91,11 +91,22 @@
|
|||
</el-row>
|
||||
<div class="splineBar" v-if="detailForm.dataScopeDeptName == '优势媒体部'" />
|
||||
<el-row :gutter="30" class="my_form_row" v-if="detailForm.dataScopeDeptName == '优势媒体部'">
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="媒体朝向" prop="business_department">
|
||||
{{ detailForm.mediaOrientation }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名称">
|
||||
<!-- <router-link :to="'/supplier/detailPage/' + detailForm.belongSupplierId" custom>
|
||||
|
||||
</router-link> -->
|
||||
<span class="mediaNameLabel"
|
||||
@click="handleOpenSupplierDetail(detailForm.belongSupplierId)">
|
||||
{{ detailForm.belongSupplierName }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="splineBar" v-if="detailForm.dataScopeDeptName == '优势媒体部'" />
|
||||
<el-row :gutter="30" class="my_form_row">
|
||||
|
@ -182,7 +193,7 @@
|
|||
<el-row :gutter="30" class="my_form_row">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="媒体归属名称">
|
||||
{{ detailForm.belongSupplierName }}
|
||||
{{ detailForm.belongName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
@ -459,10 +470,9 @@ import highSpeedRailway from './components/highSpeedRailway.vue'
|
|||
import officeBuilding from './components/officeBuilding.vue'
|
||||
import garageLightBox from './components/garageLightBox.vue'
|
||||
import supplierDetailFile from '../../components/FileUpload/supplierDetailFile.vue';
|
||||
import { useBackgroundStore } from '@/store/modules/background'
|
||||
import otherbg from '@/assets/images/otherbg.png'
|
||||
const bgStore = useBackgroundStore()
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const { proxy } = getCurrentInstance()
|
||||
const emit = defineEmits(['handleShowList']);
|
||||
// 详情参数
|
||||
|
@ -599,6 +609,10 @@ const getMediaInfo = () => {
|
|||
|
||||
})
|
||||
}
|
||||
// 打开供应商详情
|
||||
const handleOpenSupplierDetail = (supplierId) => {
|
||||
router.push('/supplier/detailPage/' + supplierId)
|
||||
}
|
||||
const initForm = (_ruleForm) => {
|
||||
detailForm.value = _ruleForm
|
||||
if (detailForm.value.id) getMediaInfo()
|
||||
|
|
|
@ -35,6 +35,36 @@
|
|||
<el-input v-model="ruleForm.mediaName" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="ruleForm.id">
|
||||
<el-form-item label="供应商名称">
|
||||
<el-select class="filterSelect" v-model="ruleForm.belongSupplierId"
|
||||
@change="handleChoseSupplier" filterable remote reserve-keyword
|
||||
:remote-method="getSupplierList" :loading="selectLoading" placeholder="请输入"
|
||||
remote-show-suffix clearable style="min-width: 70px;">
|
||||
<el-option v-for="item in supplierList" :key="item.supplierId"
|
||||
:label="item.supplierName" :value="item.supplierId" />
|
||||
<template #footer>
|
||||
<div class="select-footer">
|
||||
<el-button v-if="!isAddSuppliering" @click="onAddSupplierOption"
|
||||
type="primary" text
|
||||
style="justify-content: flex-start; width: 100%; color: #1a75e6;">
|
||||
添加供应商
|
||||
</el-button>
|
||||
<template v-else>
|
||||
<el-input v-model="addSupplierName" class="option-input"
|
||||
placeholder="请输入供应商名称" />
|
||||
<div class="footer-buttons">
|
||||
<el-button class="my-confirm-btn" type="primary"
|
||||
@click="onSupplierConfirm">确认</el-button>
|
||||
<el-button class="my-cancel-btn"
|
||||
@click="clearSupplier">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="30" class="my_form_row">
|
||||
<el-col :span="6">
|
||||
|
@ -149,16 +179,6 @@
|
|||
<el-option v-for="item in businessAreaList" :key="item.id" :label="item.name"
|
||||
:value="item.id" />
|
||||
<template #footer>
|
||||
<!-- <el-button v-if="!isAdding" @click="onAddOption">
|
||||
添加商圈
|
||||
</el-button>
|
||||
<template v-else>
|
||||
<el-input v-model="optionName" class="option-input" placeholder="请输入商圈名称" />
|
||||
<el-button class="my-confirm-btn" type="primary" @click="onConfirm">
|
||||
确认
|
||||
</el-button>
|
||||
<el-button class="my-cancel-btn" @click="clear">取消</el-button>
|
||||
</template> -->
|
||||
<div class="select-footer">
|
||||
<el-button v-if="!isAdding" @click="onAddOption" type="primary" text
|
||||
style="justify-content: flex-start; width: 100%; color: #1a75e6;">
|
||||
|
@ -261,13 +281,7 @@
|
|||
<el-row :gutter="30" class="my_form_row">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="媒体归属名称">
|
||||
<el-select class="filterSelect" v-model="ruleForm.belongSupplierId"
|
||||
@change="handleChoseSupplier" filterable remote reserve-keyword
|
||||
:remote-method="getSupplierList" :loading="selectLoading" placeholder="请输入"
|
||||
remote-show-suffix clearable style="min-width: 70px;">
|
||||
<el-option v-for="item in supplierList" :key="item.supplierId"
|
||||
:label="item.supplierName" :value="item.supplierId" />
|
||||
</el-select>
|
||||
<el-input v-model="ruleForm.belongName" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
@ -547,7 +561,7 @@
|
|||
<script setup>
|
||||
import { onMounted, nextTick, defineEmits, ref } from 'vue'
|
||||
import { Close, LocationInformation } from '@element-plus/icons-vue'
|
||||
import { listBusSupplier, getBusSupplier } from "@/api/supplier"
|
||||
import { addBusSupplier, listBusSupplier, getBusSupplier } from "@/api/supplier"
|
||||
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
|
||||
import { sysMediaTypeListByPid } from "@/api/system/mediaType"
|
||||
import { listDept } from "@/api/system/dept"
|
||||
|
@ -625,6 +639,9 @@ const mRProductionRequirementsRef = ref(null)
|
|||
// 自定义添加商圈
|
||||
const isAdding = ref(false)
|
||||
const optionName = ref('')
|
||||
// 自定义添加供应商
|
||||
const isAddSuppliering = ref(false)
|
||||
const addSupplierName = ref('')
|
||||
|
||||
// 媒体类型数据
|
||||
const mediaTypeOne = ref([])
|
||||
|
@ -706,6 +723,19 @@ const handleChangeDept = (val) => {
|
|||
if (ruleForm.value.dataScopeDeptName == '网络媒体部' && activePriceType.value == '高铁') highSpeedRailwayRef.value.getMediaPrice(ruleForm.value.id, true)
|
||||
if (ruleForm.value.dataScopeDeptName == '网络媒体部' && activePriceType.value == '写字楼') officeBuildingRef.value.getMediaPrice(ruleForm.value.id, true)
|
||||
if (ruleForm.value.dataScopeDeptName == '网络媒体部' && activePriceType.value == '车库灯箱') garageLightBoxRef.value.getMediaPrice(ruleForm.value.id, true)
|
||||
// 批文文件-1,独家授权文件-2,媒体行业授权文件-3,媒体归属附件-4,曾经媒体照片-5,图片上传-6,视频上传-7,盖章刊例-8, 资质文件-9, 媒体链条-10, 刊例照片-11,MR和制作要求-12
|
||||
if (approvalDocumentRef.value) approvalDocumentRef.value._fileType = 1;
|
||||
if (exclusiveLicenseFileRef.value) exclusiveLicenseFileRef.value._fileType = 2;
|
||||
if (mediaLicenseFileRef.value) mediaLicenseFileRef.value._fileType = 3;
|
||||
if (mediaOwnershipRef.value) mediaOwnershipRef.value._fileType = 4;
|
||||
if (onceMediaPhotoRef.value) onceMediaPhotoRef.value._fileType = 5;
|
||||
if (mediaPicRef.value) mediaPicRef.value._fileType = 6;
|
||||
if (mediaVideoRef.value) mediaVideoRef.value._fileType = 7;
|
||||
if (stampedPublicationRef.value) stampedPublicationRef.value._fileType = 8;
|
||||
if (qualificationFileRef.value) qualificationFileRef.value._fileType = 9;
|
||||
if (mediaChainRef.value) mediaChainRef.value._fileType = 10;
|
||||
if (journalCataloguePhotoRef.value) journalCataloguePhotoRef.value._fileType = 11;
|
||||
if (mRProductionRequirementsRef.value) mRProductionRequirementsRef.value._fileType = 12;
|
||||
})
|
||||
}
|
||||
// 选择商圈
|
||||
|
@ -738,6 +768,30 @@ const clear = () => {
|
|||
optionName.value = ''
|
||||
isAdding.value = false
|
||||
}
|
||||
|
||||
// 打开添加供应商输入框
|
||||
const onAddSupplierOption = () => {
|
||||
isAddSuppliering.value = true
|
||||
}
|
||||
// 确认添加供应商
|
||||
const onSupplierConfirm = () => {
|
||||
if (addSupplierName.value) {
|
||||
const paramsForm = {
|
||||
supplierName: addSupplierName.value
|
||||
}
|
||||
addBusSupplier(paramsForm).then(response => {
|
||||
clearSupplier()
|
||||
listBusSupplier({ keyword: addSupplierName.value }).then(res => {
|
||||
supplierList.value = res.data
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
// 取消添加供应商
|
||||
const clearSupplier = () => {
|
||||
addSupplierName.value = ''
|
||||
isAddSuppliering.value = false
|
||||
}
|
||||
// 选择供应商
|
||||
const handleChoseSupplier = (val) => {
|
||||
const choseSupplier = supplierList.value.filter(item => item.supplierId == val)[0]
|
||||
|
@ -920,11 +974,18 @@ const getMediaTypeThree2 = (value) => {
|
|||
|
||||
// 设置文件结果
|
||||
const handleSetMediaFile = (_fileType, _files) => {
|
||||
// 先按类型去除旧的文件
|
||||
var cachFileList = mediaFile.value.filter(item => item.fileType !== _fileType);
|
||||
// 将新的文件追加进来
|
||||
if (_files.length > 0) mediaFile.value = cachFileList.concat(_files)
|
||||
else mediaFile.value = cachFileList
|
||||
// 获取当前的所有文件
|
||||
const currentFiles = [...mediaFile.value]; // 创建副本以避免直接修改原数组
|
||||
// 过滤掉指定类型的旧文件
|
||||
const filteredFiles = currentFiles.filter(item => item.fileType !== _fileType);
|
||||
// 如果新文件存在,则添加到过滤后的数组中
|
||||
if (_files.length > 0) {
|
||||
filteredFiles.push(..._files); // 使用 push 追加新文件
|
||||
mediaFile.value = filteredFiles; // 更新 ref
|
||||
} else {
|
||||
// 如果没有新文件,仍然需要更新 mediaFile.value 以反映过滤结果
|
||||
mediaFile.value = filteredFiles;
|
||||
}
|
||||
}
|
||||
// 设置媒体价格
|
||||
const handleSetCompetOfferMediaPrice = (mediaType, _priceList) => {
|
||||
|
@ -1071,21 +1132,6 @@ const initForm = (_formTitle, _ruleForm) => {
|
|||
getMediaTypeOne()
|
||||
getProvinceList()
|
||||
if (ruleForm.value.id) getMediaInfo()
|
||||
nextTick(() => {
|
||||
// 批文文件-1,独家授权文件-2,媒体行业授权文件-3,媒体归属附件-4,曾经媒体照片-5,图片上传-6,视频上传-7,盖章刊例-8, 资质文件-9, 媒体链条-10, 刊例照片-11,MR和制作要求-12
|
||||
if (approvalDocumentRef.value) approvalDocumentRef.value._fileType = 1;
|
||||
if (exclusiveLicenseFileRef.value) exclusiveLicenseFileRef.value._fileType = 2;
|
||||
if (mediaLicenseFileRef.value) mediaLicenseFileRef.value._fileType = 3;
|
||||
if (mediaOwnershipRef.value) mediaOwnershipRef.value._fileType = 4;
|
||||
if (onceMediaPhotoRef.value) onceMediaPhotoRef.value._fileType = 5;
|
||||
if (mediaPicRef.value) mediaPicRef.value._fileType = 6;
|
||||
if (mediaVideoRef.value) mediaVideoRef.value._fileType = 7;
|
||||
if (stampedPublicationRef.value) stampedPublicationRef.value._fileType = 8;
|
||||
if (qualificationFileRef.value) qualificationFileRef.value._fileType = 9;
|
||||
if (mediaChainRef.value) mediaChainRef.value._fileType = 10;
|
||||
if (journalCataloguePhotoRef.value) journalCataloguePhotoRef.value._fileType = 11;
|
||||
if (mRProductionRequirementsRef.value) mRProductionRequirementsRef.value._fileType = 12;
|
||||
});
|
||||
}
|
||||
// 暴露方法\属性给父组件
|
||||
defineExpose({
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<el-col :span="12">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" class="searchInputForm">
|
||||
<el-form-item label="">
|
||||
<el-input v-model="queryParams.noticeTitle" placeholder="请输入供应商/媒体名称"
|
||||
:prefix-icon="Search" style="width: 400px;" />
|
||||
<el-input v-model="queryParams.noticeTitle" placeholder="请输入供应商/媒体名称" :prefix-icon="Search"
|
||||
style="width: 400px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
@ -59,10 +59,12 @@
|
|||
import { onMounted, ref } from 'vue';
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import { noticeList, exportNotice } from "@/api/notice"
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useBackgroundStore } from '@/store/modules/background'
|
||||
import otherbg from '@/assets/images/otherbg.png'
|
||||
const bgStore = useBackgroundStore()
|
||||
|
||||
const router = useRouter()
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
// 列表数据
|
||||
|
@ -112,7 +114,8 @@ function resetQuery() {
|
|||
|
||||
/** 去处理 */
|
||||
const handleUpdate = (row) => {
|
||||
|
||||
if (row.businessType == 1) router.push('/supplier/formPage/' + row.businessId)
|
||||
if (row.businessType == 2) router.push('/mediaLibrary/formPage/' + row.businessId)
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
|
|
27
src/views/supplier/linkSupplerDetail.vue
Normal file
27
src/views/supplier/linkSupplerDetail.vue
Normal file
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<supplier-detail ref="supplierDetailRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="Post">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useBackgroundStore } from '@/store/modules/background'
|
||||
import otherbg from '@/assets/images/otherbg.png'
|
||||
|
||||
import supplierDetail from "./supplierDetail.vue";
|
||||
|
||||
const bgStore = useBackgroundStore()
|
||||
const route = useRoute()
|
||||
|
||||
const supplierDetailRef = ref(null)
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
bgStore.setBgImage(otherbg)
|
||||
const _supplierId = route.params && route.params.supplierId
|
||||
if (_supplierId) {
|
||||
console.log('接收id', _supplierId)
|
||||
supplierDetailRef.value.getSupplierInfo(_supplierId)
|
||||
}
|
||||
});
|
||||
</script>
|
26
src/views/supplier/linkSupplierForm.vue
Normal file
26
src/views/supplier/linkSupplierForm.vue
Normal file
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<supplier-form ref="supplierFormRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="Post">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useBackgroundStore } from '@/store/modules/background'
|
||||
import otherbg from '@/assets/images/otherbg.png'
|
||||
import supplierForm from "./supplierForm.vue";
|
||||
|
||||
const bgStore = useBackgroundStore()
|
||||
const route = useRoute()
|
||||
|
||||
const supplierFormRef = ref(null)
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
bgStore.setBgImage(otherbg)
|
||||
const _supplierId = route.params && route.params.supplierId
|
||||
if (_supplierId) {
|
||||
console.log('接收id', _supplierId)
|
||||
supplierFormRef.value.initForm('编辑供应商', { supplierId: _supplierId })
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user