对接删除

This commit is contained in:
wangchengming 2025-11-14 18:03:57 +08:00
parent abe5979868
commit fb98fffca3
4 changed files with 146 additions and 35 deletions

View File

@ -54,7 +54,111 @@ const exportForm = ref({
const pptFieldCheckAll = ref(false)
const pptFieldIsIndeterminate = ref(true)
// ppt
const pptFields = ref([])
const pptFields = ref([
{
displayName: "媒体名称",
propertyPath: "mediaName"
},
{
displayName: "媒体位置",
propertyPath: "address"
},
{
displayName: "纬度",
propertyPath: "mapY"
},
{
displayName: "经度",
propertyPath: "mapX"
},
{
displayName: "媒体类型",
propertyPath: "mediaTypeStr"
},
{
displayName: "媒体大类",
propertyPath: "mediaCategoryStr"
},
{
displayName: "区域属性",
propertyPath: "businessDistrictName"
},
{
displayName: "播放时间",
propertyPath: "playbackTime"
},
{
displayName: "是否照明",
propertyPath: "hasLighting"
},
{
displayName: "展示形式",
propertyPath: "displayFormStr"
},
{
displayName: "媒体尺寸",
propertyPath: "mediaSize"
},
{
displayName: "mr",
propertyPath: "mr"
},
{
displayName: "媒体朝向",
propertyPath: "mediaOrientation"
},
{
displayName: "媒体流量",
propertyPath: "dailyAvgVehicleFlow"
},
{
displayName: "媒体优势",
propertyPath: "advantages"
},
{
displayName: "首次制作安装费",
propertyPath: "firstInstallFee"
},
{
displayName: "换刊制作安装费",
propertyPath: "changeInstallFee"
},
{
displayName: "最小购买周期",
propertyPath: "minPurchaseCycle"
},
{
displayName: "省",
propertyPath: "provinceName"
},
{
displayName: "市",
propertyPath: "cityName"
},
{
displayName: "区",
propertyPath: "areaName"
},
{
displayName: "镇",
propertyPath: "townName"
},
{
displayName: "部门",
propertyPath: "dataScopeDeptName"
},
{
displayName: "状态",
propertyPath: "state"
},
{
displayName: "作废原因",
propertyPath: "invalidReason"
}
])
// ppt
const checkedPPTFields = ref([])
@ -114,18 +218,18 @@ const getCurrentTime = () => {
return gettime
}
// ppt
const getMediaExcelPPTField = () => {
mediaPPTField().then(res => {
pptFields.value = res.data
})
}
// // ppt
// const getMediaExcelPPTField = () => {
// mediaPPTField().then(res => {
// pptFields.value = res.data
// })
// }
//
const initExportPPT = (_tempId, _mediaIds, multipleChoseArr) => {
exportForm.value.templateId = _tempId
exportForm.value.mediaIds = _mediaIds
chosedMediaList.value = JSON.parse(JSON.stringify(multipleChoseArr))
getMediaExcelPPTField()
// getMediaExcelPPTField()
exportOpen.value = true
}

View File

@ -246,6 +246,8 @@
v-hasPermi="['mediaLibrary:historicalData']">历史数据</div>
<div class="popBtns" @click="handleAbolish(scope.row)"
v-hasPermi="['mediaLibrary:abolish']">废除</div>
<div class="popBtns" @click="handleDelete(scope.row)"
v-hasPermi="['mediaLibrary:delete']">删除</div>
<div class="popBtns" @click="handleLogs(scope.row)" v-hasPermi="['mediaLibrary:log']">日志
</div>
<div class="popBtns" @click="handleDownFiles(scope.row)"
@ -273,7 +275,7 @@
<view-file-dialog ref="viewFileRef" />
<export-dialog ref="exportDialogRef" />
<export-p-p-t-dialog ref="exportPPTDialogRef" />
<importPrice ref="importPriceRef" @handleReloadList="handleQuery"/>
<importPrice ref="importPriceRef" @handleReloadList="handleQuery" />
<down-records ref="downRecordsRef" />
</div>
</template>
@ -291,7 +293,7 @@ import { listBusSupplier } from "@/api/supplier"
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
import { sysMediaTypeListByPid } from "@/api/system/mediaType"
import { busTradingAreaPage } from "@/api/system/businessArea"
import { mediaPageList } from "@/api/mediaLibrary"
import { mediaPageList, deleteMedia } from "@/api/mediaLibrary"
import { listDept } from "@/api/system/dept"
import { pptTemplatePage } from "@/api/system/pptTemplate"
import { busDownloadRecordPage } from "@/api/mediaDownRecord"
@ -635,6 +637,15 @@ const handleUpdate = (row) => {
mediaFormRef.value.initForm('编辑媒体信息', row)
})
}
//
const handleDelete = (row) => {
proxy.$modal.confirm('是否确认删除名称为"' + row.mediaName + '"的媒体数据?').then(function () {
return deleteMedia({ mediaId: row.id })
}).then(() => {
getMediaPageList()
proxy.$modal.msgSuccess("删除成功")
}).catch(() => { })
}
//
const handleOpenDetail = (row) => {
showDetail.value = true

View File

@ -74,7 +74,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="日均车流量" prop="business_department">
<el-form-item label="媒体流量" prop="business_department">
{{ detailForm.dailyAvgVehicleFlow }}
</el-form-item>
</el-col>
@ -122,7 +122,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="商圈" prop="business_department">
<el-form-item label="区域属性" prop="business_department">
{{ detailForm.businessDistrictName }}
</el-form-item>
</el-col>

View File

@ -116,12 +116,8 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="日均车流量">
<el-input v-model="ruleForm.dailyAvgVehicleFlow" placeholder="请输入">
<template #suffix>
<span>/</span>
</template>
</el-input>
<el-form-item label="媒体流量">
<el-input v-model="ruleForm.dailyAvgVehicleFlow" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -173,7 +169,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="商圈" prop="businessDistrictId">
<el-form-item label="区域属性" prop="businessDistrictId">
<el-select v-model="ruleForm.businessDistrictId" placeholder="请选择"
@change="handleChosebusiness" clearable style="min-width: 30px;">
<el-option v-for="item in businessAreaList" :key="item.id" :label="item.name"
@ -182,11 +178,11 @@
<div class="select-footer">
<el-button v-if="!isAdding" @click="onAddOption" type="primary" text
style="justify-content: flex-start; width: 100%; color: #1a75e6;">
添加商圈
添加区域属性
</el-button>
<template v-else>
<el-input v-model="optionName" class="option-input"
placeholder="请输入商圈名称" />
placeholder="请输入区域属性名称" />
<div class="footer-buttons">
<el-button class="my-confirm-btn" type="primary"
@click="onConfirm">确认</el-button>
@ -632,7 +628,7 @@ const journalCataloguePhotoRef = ref(null)
// MR
const mRProductionRequirementsRef = ref(null)
//
//
const isAdding = ref(false)
const optionName = ref('')
//
@ -653,7 +649,7 @@ const deptList = ref([])
//
const supplierList = ref([])
const selectLoading = ref(false)
//
//
const businessAreaList = ref([])
//
const hasReformList = ref([
@ -673,7 +669,7 @@ const data = reactive({
mediaSize: [{ required: true, message: "媒体尺寸不能为空", trigger: "blur" }],
mediaOrientation: [{ required: true, message: "媒体朝向不能为空", trigger: "blur" }],
mediaCity: [{ required: true, message: "城市不能为空", trigger: "change" }],
businessDistrictId: [{ required: true, message: "商圈不能为空", trigger: "change" }],
businessDistrictId: [{ required: true, message: "区域属性不能为空", trigger: "change" }],
firstInstallFee: [{ required: true, message: "首次制作安装费不能为空", trigger: "blur" }],
changeInstallFee: [{ required: true, message: "换刊制作安装费不能为空", trigger: "blur" }],
},
@ -734,16 +730,16 @@ const handleChangeDept = (val) => {
if (mRProductionRequirementsRef.value) mRProductionRequirementsRef.value._fileType = 12;
})
}
//
//
const handleChosebusiness = (val) => {
const choseBusiness = businessAreaList.value.filter(item => item.id == val)[0]
ruleForm.value.businessDistrictName = choseBusiness?.name
}
//
//
const onAddOption = () => {
isAdding.value = true
}
//
//
const onConfirm = () => {
if (optionName.value) {
const paramsForm = {
@ -759,7 +755,7 @@ const onConfirm = () => {
})
}
}
//
//
const clear = () => {
optionName.value = ''
isAdding.value = false
@ -940,7 +936,7 @@ const getTownList2 = (value) => {
town.value = res.data
})
}
//
//
const getbusinessAreaList = (val) => {
const _params = {
pageIndex: 1,