提交代码
This commit is contained in:
parent
02f3e48a1f
commit
8233806112
60
src/views/mediaLibrary/abolishDialog.vue
Normal file
60
src/views/mediaLibrary/abolishDialog.vue
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
<template>
|
||||||
|
<!-- 废除对话框 -->
|
||||||
|
<el-dialog title="废除" v-model="abolishOpen" width="650px" class="my_dialog" align-center :destroy-on-close="true"
|
||||||
|
:close-on-click-modal="false">
|
||||||
|
<el-form ref="abolishRef" :model="abolishForm" :rules="abolishRules" label-width="120px" label-position="top"
|
||||||
|
class="myFeedBackForm">
|
||||||
|
<el-form-item label="输入废除原因" prop="invalidReason">
|
||||||
|
<el-input v-model="abolishForm.invalidReason" style="width: 100%" :rows="5" type="textarea" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button class="my-cancel-btn" @click="abolishOpen = false">取 消</el-button>
|
||||||
|
<el-button class="my-confirm-btn" type="primary" @click="handleSubmitAbolish">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, defineExpose, ref } from 'vue';
|
||||||
|
import { mediaCancel } from "@/api/mediaLibrary"
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
const emit = defineEmits(['handleReloadList']);
|
||||||
|
const abolishOpen = ref(false)
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
abolishForm: {},
|
||||||
|
abolishRules: {
|
||||||
|
invalidReason: [{ required: true, message: "请输入废除原因", trigger: "blur" }],
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const { abolishForm, abolishRules } = toRefs(data)
|
||||||
|
|
||||||
|
const openDialog = (_mediaId) => {
|
||||||
|
abolishForm.value = {
|
||||||
|
mediaId: _mediaId,
|
||||||
|
invalidReason: undefined
|
||||||
|
}
|
||||||
|
abolishOpen.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交废除
|
||||||
|
const handleSubmitAbolish = () => {
|
||||||
|
proxy.$refs["abolishRef"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
mediaCancel(abolishForm.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("操作成功")
|
||||||
|
abolishOpen.value = false
|
||||||
|
abolishForm.value = {}
|
||||||
|
emit('handleReloadList')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 暴露方法\属性给父组件
|
||||||
|
defineExpose({
|
||||||
|
openDialog
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -161,7 +161,8 @@
|
||||||
<el-popover popper-class="myImg_popover" placement="right-start">
|
<el-popover popper-class="myImg_popover" placement="right-start">
|
||||||
<img :src="otherbg" />
|
<img :src="otherbg" />
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<span class="mediaNameLabel" @click="handleOpenDetail(scope.row.id)">{{ scope.row.mediaName
|
<span class="mediaNameLabel" @click="handleOpenDetail(scope.row.id)">{{
|
||||||
|
scope.row.mediaName
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
@ -238,27 +239,11 @@
|
||||||
<media-form ref="mediaFormRef" v-if="showForm" @handleShowList="handleShowList" />
|
<media-form ref="mediaFormRef" v-if="showForm" @handleShowList="handleShowList" />
|
||||||
<media-detail ref="mediaDetailRef" v-if="showDetail" @handleShowList="handleCloseDetail" />
|
<media-detail ref="mediaDetailRef" v-if="showDetail" @handleShowList="handleCloseDetail" />
|
||||||
<media-logs ref="mediaLogsRef" v-if="showLogs" @handleShowList="handleCloseLogs" />
|
<media-logs ref="mediaLogsRef" v-if="showLogs" @handleShowList="handleCloseLogs" />
|
||||||
|
<abolish-dialog ref="abolishRef" @handleReloadList="getMediaPageList" />
|
||||||
<history-data ref="historyDataRef" />
|
<history-data ref="historyDataRef" />
|
||||||
<down-files ref="downFileRef" />
|
<down-files ref="downFileRef" />
|
||||||
<view-file-dialog ref="viewFileRef" />
|
<view-file-dialog ref="viewFileRef" />
|
||||||
<export-dialog ref="exportDialogRef" />
|
<export-dialog ref="exportDialogRef" />
|
||||||
|
|
||||||
<!-- 废除对话框 -->
|
|
||||||
<el-dialog title="废除" v-model="abolishOpen" width="650px" class="my_dialog" align-center
|
|
||||||
:destroy-on-close="true" :close-on-click-modal="false">
|
|
||||||
<el-form ref="abolishRef" :model="abolishForm" :rules="abolishRules" label-width="120px"
|
|
||||||
label-position="top" class="myFeedBackForm">
|
|
||||||
<el-form-item label="输入废除原因" prop="content">
|
|
||||||
<el-input v-model="abolishForm.content" style="width: 100%" :rows="5" type="textarea" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button class="my-cancel-btn" @click="abolishOpen = false">取 消</el-button>
|
|
||||||
<el-button class="my-confirm-btn" type="primary" @click="handleSubmitAbolish">确 定</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 导入对话框 -->
|
<!-- 导入对话框 -->
|
||||||
<el-dialog title="导入" v-model="uploadOpen" width="650px" class="my_dialog" align-center :destroy-on-close="true"
|
<el-dialog title="导入" v-model="uploadOpen" width="650px" class="my_dialog" align-center :destroy-on-close="true"
|
||||||
:close-on-click-modal="false">
|
:close-on-click-modal="false">
|
||||||
|
@ -335,7 +320,7 @@ import { listBusSupplier } from "@/api/supplier"
|
||||||
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
|
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
|
||||||
import { sysMediaTypeListByPid } from "@/api/system/mediaType"
|
import { sysMediaTypeListByPid } from "@/api/system/mediaType"
|
||||||
import { busTradingAreaPage } from "@/api/system/businessArea"
|
import { busTradingAreaPage } from "@/api/system/businessArea"
|
||||||
import { mediaPageList, mediaCancel } from "@/api/mediaLibrary"
|
import { mediaPageList } from "@/api/mediaLibrary"
|
||||||
import { listDept } from "@/api/system/dept"
|
import { listDept } from "@/api/system/dept"
|
||||||
// 注入组件
|
// 注入组件
|
||||||
import mediaForm from "./mediaForm.vue";
|
import mediaForm from "./mediaForm.vue";
|
||||||
|
@ -345,6 +330,7 @@ import historyData from "./historyData.vue"
|
||||||
import downFiles from './downFiles.vue';
|
import downFiles from './downFiles.vue';
|
||||||
import viewFileDialog from '@/components/ViewFile/index.vue'
|
import viewFileDialog from '@/components/ViewFile/index.vue'
|
||||||
import exportDialog from './exportDialog.vue';
|
import exportDialog from './exportDialog.vue';
|
||||||
|
import abolishDialog from './abolishDialog.vue';
|
||||||
import { useBackgroundStore } from '@/store/modules/background'
|
import { useBackgroundStore } from '@/store/modules/background'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
@ -380,8 +366,6 @@ const mediaList = ref([])
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
abolishForm: {},
|
|
||||||
form: {},
|
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
@ -400,11 +384,8 @@ const data = reactive({
|
||||||
townCode: undefined,
|
townCode: undefined,
|
||||||
businessDistrictId: undefined
|
businessDistrictId: undefined
|
||||||
},
|
},
|
||||||
abolishRules: {
|
|
||||||
content: [{ required: true, message: "请输入废除原因", trigger: "blur" }],
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
const { queryParams, form, abolishForm, abolishRules } = toRefs(data)
|
const { queryParams } = toRefs(data)
|
||||||
// 表单
|
// 表单
|
||||||
const showForm = ref(false)
|
const showForm = ref(false)
|
||||||
const mediaFormRef = ref(null)
|
const mediaFormRef = ref(null)
|
||||||
|
@ -418,7 +399,7 @@ const mediaLogsRef = ref(null)
|
||||||
|
|
||||||
const uploadOpen = ref(false)
|
const uploadOpen = ref(false)
|
||||||
const docUploadList = ref([])
|
const docUploadList = ref([])
|
||||||
const abolishOpen = ref(false)
|
const abolishRef = ref(null)
|
||||||
const historyDataRef = ref(null)
|
const historyDataRef = ref(null)
|
||||||
const downFileRef = ref(null)
|
const downFileRef = ref(null)
|
||||||
const viewFileRef = ref(null)
|
const viewFileRef = ref(null)
|
||||||
|
@ -633,23 +614,7 @@ const handleCloseLogs = () => {
|
||||||
}
|
}
|
||||||
// 打开废除
|
// 打开废除
|
||||||
const handleAbolish = (row) => {
|
const handleAbolish = (row) => {
|
||||||
abolishOpen.value = true
|
abolishRef.value.abolishOpen.openDialog(row.id)
|
||||||
}
|
|
||||||
// 提交废除
|
|
||||||
const handleSubmitAbolish = () => {
|
|
||||||
proxy.$refs["abolishRef"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
// addSysReaddBusProblemFeedbackgion(form.value).then(response => {
|
|
||||||
// proxy.$modal.msgSuccess("反馈成功")
|
|
||||||
// openFeedBack.value = false
|
|
||||||
// form.value = {
|
|
||||||
// feedbackUser: undefined,
|
|
||||||
// content: undefined
|
|
||||||
// }
|
|
||||||
// proxy.resetForm("feedBackRef")
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 打开历史数据
|
// 打开历史数据
|
||||||
const handleHistoryChart = (row) => {
|
const handleHistoryChart = (row) => {
|
||||||
|
|
|
@ -46,17 +46,17 @@
|
||||||
<el-row :gutter="30" class="my_form_row">
|
<el-row :gutter="30" class="my_form_row">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="媒体类型" prop="business_department">
|
<el-form-item label="媒体类型" prop="business_department">
|
||||||
{{ detailForm.mediaType }}
|
{{ detailForm.mediaTypeStr }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="媒体大类" prop="business_department">
|
<el-form-item label="媒体大类" prop="business_department">
|
||||||
{{ detailForm.mediaCategory }}
|
{{ detailForm.mediaCategoryStr }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="展示形式" prop="business_department">
|
<el-form-item label="展示形式" prop="business_department">
|
||||||
{{ detailForm.displayForm }}
|
{{ detailForm.displayFormStr }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" v-if="detailForm.business == '优势媒体部门'">
|
<el-col :span="6" v-if="detailForm.business == '优势媒体部门'">
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
<el-form-item label="业务部门" prop="businessType">
|
<el-form-item label="业务部门" prop="businessType">
|
||||||
<el-select v-model="ruleForm.businessType" placeholder="请选择" @change="handleChangeDept"
|
<el-select v-model="ruleForm.businessType" placeholder="请选择" @change="handleChangeDept"
|
||||||
clearable style="min-width: 30px;">
|
clearable style="min-width: 30px;">
|
||||||
<el-option v-for="item in deptList" :key="item.deptId" :label="item.deptName"
|
<el-option v-for="item in deptList" :key="item.value" :label="item.label"
|
||||||
:value="item.deptId" />
|
:value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -523,7 +523,7 @@ import { Close, LocationInformation } from '@element-plus/icons-vue'
|
||||||
import { listBusSupplier } from "@/api/supplier"
|
import { listBusSupplier } from "@/api/supplier"
|
||||||
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
|
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
|
||||||
import { sysMediaTypeListByPid } from "@/api/system/mediaType"
|
import { sysMediaTypeListByPid } from "@/api/system/mediaType"
|
||||||
import { listDept } from "@/api/system/dept"
|
// import { listDept } from "@/api/system/dept"
|
||||||
import { busTradingAreaPage } from "@/api/system/businessArea"
|
import { busTradingAreaPage } from "@/api/system/businessArea"
|
||||||
import { addMedia, updateMedia, mediaDetail } from "@/api/mediaLibrary"
|
import { addMedia, updateMedia, mediaDetail } from "@/api/mediaLibrary"
|
||||||
|
|
||||||
|
@ -605,7 +605,10 @@ const city = ref([])
|
||||||
const county = ref([])
|
const county = ref([])
|
||||||
const town = ref([])
|
const town = ref([])
|
||||||
// 业务部门
|
// 业务部门
|
||||||
const deptList = ref([])
|
const deptList = ref([
|
||||||
|
{ value: 1, label: '优势媒体部' },
|
||||||
|
{ value: 2, label: '网络媒体部' }
|
||||||
|
])
|
||||||
// 归属选项
|
// 归属选项
|
||||||
const supplierList = ref([])
|
const supplierList = ref([])
|
||||||
const selectLoading = ref(false)
|
const selectLoading = ref(false)
|
||||||
|
@ -658,9 +661,10 @@ const handleClosePickLat = (backValue) => {
|
||||||
// 业务部门切换
|
// 业务部门切换
|
||||||
const businessTypeName = ref('优势媒体部')
|
const businessTypeName = ref('优势媒体部')
|
||||||
const handleChangeDept = (val) => {
|
const handleChangeDept = (val) => {
|
||||||
const choseDep = deptList.value.filter(item => item.deptId == val)[0]
|
const choseDep = deptList.value.filter(item => item.value == val)[0]
|
||||||
ruleForm.value.businessType = choseDep?.deptId
|
console.log('部门', choseDep)
|
||||||
businessTypeName.value = choseDep?.deptName
|
ruleForm.value.businessType = choseDep?.value
|
||||||
|
businessTypeName.value = choseDep?.label
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (businessTypeName.value == '优势媒体部' && competitiveOfferRef.value) competitiveOfferRef.value.getMediaPrice(ruleForm.value.id, true)
|
if (businessTypeName.value == '优势媒体部' && competitiveOfferRef.value) competitiveOfferRef.value.getMediaPrice(ruleForm.value.id, true)
|
||||||
if (businessTypeName.value == '网络媒体部' && activePriceType.value == '门禁') accessControlPriceRef.value.getMediaPrice(ruleForm.value.id, true)
|
if (businessTypeName.value == '网络媒体部' && activePriceType.value == '门禁') accessControlPriceRef.value.getMediaPrice(ruleForm.value.id, true)
|
||||||
|
@ -707,11 +711,11 @@ const getMediaTypeThree = (value) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取业务部门
|
// 获取业务部门
|
||||||
const getDepList = () => {
|
// const getDepList = () => {
|
||||||
listDept({ businessFlag: 1 }).then(response => {
|
// listDept({ businessFlag: 1 }).then(response => {
|
||||||
deptList.value = response.data
|
// deptList.value = response.data
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
// 查询条件获取供应商
|
// 查询条件获取供应商
|
||||||
const getSupplierList = (queryText) => {
|
const getSupplierList = (queryText) => {
|
||||||
if (queryText) {
|
if (queryText) {
|
||||||
|
@ -763,7 +767,7 @@ const getCityList = (value) => {
|
||||||
const getCountyList = (value) => {
|
const getCountyList = (value) => {
|
||||||
var choseCity = city.value.filter(item => item.id == value)[0]
|
var choseCity = city.value.filter(item => item.id == value)[0]
|
||||||
if (choseCity) {
|
if (choseCity) {
|
||||||
ruleForm.value.mediaCity = ruleForm.value.mediaCity + '/' + choseCity.name
|
ruleForm.value.mediaCity = ruleForm.value.provinceName + '/' + choseCity.name
|
||||||
ruleForm.value.cityName = choseCity.name
|
ruleForm.value.cityName = choseCity.name
|
||||||
} else {
|
} else {
|
||||||
ruleForm.value.cityCode = undefined
|
ruleForm.value.cityCode = undefined
|
||||||
|
@ -786,7 +790,7 @@ const getCountyList = (value) => {
|
||||||
const getTownList = (value) => {
|
const getTownList = (value) => {
|
||||||
var choseCounty = county.value.filter(item => item.id == value)[0]
|
var choseCounty = county.value.filter(item => item.id == value)[0]
|
||||||
if (choseCounty) {
|
if (choseCounty) {
|
||||||
ruleForm.value.mediaCity = ruleForm.value.mediaCity + '/' + choseCounty.name
|
ruleForm.value.mediaCity = ruleForm.value.provinceName + '/' + ruleForm.value.cityName + '/' + choseCounty.name
|
||||||
ruleForm.value.areaName = choseCounty.name
|
ruleForm.value.areaName = choseCounty.name
|
||||||
} else {
|
} else {
|
||||||
ruleForm.value.areaCode = undefined
|
ruleForm.value.areaCode = undefined
|
||||||
|
@ -805,7 +809,7 @@ const getTownList = (value) => {
|
||||||
const setTown = (value) => {
|
const setTown = (value) => {
|
||||||
var choseTown = town.value.filter(item => item.id == value)[0]
|
var choseTown = town.value.filter(item => item.id == value)[0]
|
||||||
if (choseTown) {
|
if (choseTown) {
|
||||||
ruleForm.value.mediaCity = ruleForm.value.mediaCity + '/' + choseTown.name
|
ruleForm.value.mediaCity = ruleForm.value.provinceName + '/' + ruleForm.value.cityName + '/' + ruleForm.value.areaName + '/' + choseTown.name
|
||||||
ruleForm.value.townName = choseTown.name
|
ruleForm.value.townName = choseTown.name
|
||||||
}
|
}
|
||||||
getbusinessAreaList()
|
getbusinessAreaList()
|
||||||
|
@ -972,7 +976,7 @@ async function handleResponse(response) {
|
||||||
const initForm = (_formTitle, _ruleForm) => {
|
const initForm = (_formTitle, _ruleForm) => {
|
||||||
formTitle.value = _formTitle
|
formTitle.value = _formTitle
|
||||||
ruleForm.value = _ruleForm
|
ruleForm.value = _ruleForm
|
||||||
getDepList()
|
// getDepList()
|
||||||
getMediaTypeOne()
|
getMediaTypeOne()
|
||||||
getProvinceList()
|
getProvinceList()
|
||||||
if (ruleForm.value.id) getMediaInfo()
|
if (ruleForm.value.id) getMediaInfo()
|
||||||
|
|
|
@ -112,18 +112,7 @@
|
||||||
<img :src="otherbg" fit="fill" style="width: 138px;height: 78px; border-radius: 4px" />
|
<img :src="otherbg" fit="fill" style="width: 138px;height: 78px; border-radius: 4px" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="媒体名称" align="left" prop="mediaName" width="150">
|
<el-table-column label="媒体名称" align="left" prop="mediaName" width="150" />
|
||||||
<template #default="scope">
|
|
||||||
<el-popover popper-class="myImg_popover" placement="right-start">
|
|
||||||
<img :src="otherbg" />
|
|
||||||
<template #reference>
|
|
||||||
<span class="mediaNameLabel" @click="handleOpenDetail">{{ scope.row.mediaName
|
|
||||||
}}</span>
|
|
||||||
</template>
|
|
||||||
</el-popover>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="商圈" align="left" prop="postCode" width="150" />
|
<el-table-column label="商圈" align="left" prop="postCode" width="150" />
|
||||||
<el-table-column label="媒体大类" align="left" prop="postCode" width="150" />
|
<el-table-column label="媒体大类" align="left" prop="postCode" width="150" />
|
||||||
<el-table-column label="展示形式" align="left" prop="postCode" width="150" />
|
<el-table-column label="展示形式" align="left" prop="postCode" width="150" />
|
||||||
|
|
|
@ -417,7 +417,7 @@ const getCityList2 = (value) => {
|
||||||
// 获取区/县数据
|
// 获取区/县数据
|
||||||
const getCountyList = (value) => {
|
const getCountyList = (value) => {
|
||||||
var choseCity = city.value.filter(item => item.id == value)[0]
|
var choseCity = city.value.filter(item => item.id == value)[0]
|
||||||
if (choseCity) ruleForm.value.supplierCity = ruleForm.value.supplierCity + '/' + choseCity.name
|
if (choseCity) ruleForm.value.supplierCity = ruleForm.value.provinceName + '/' + choseCity.name
|
||||||
sysRegionListByPid({ parentId: value }).then(res => {
|
sysRegionListByPid({ parentId: value }).then(res => {
|
||||||
ruleForm.value.countyId = undefined
|
ruleForm.value.countyId = undefined
|
||||||
county.value = res.data
|
county.value = res.data
|
||||||
|
@ -427,7 +427,7 @@ const getCountyList = (value) => {
|
||||||
// 设置末级供应商城市
|
// 设置末级供应商城市
|
||||||
const setCounty = (value) => {
|
const setCounty = (value) => {
|
||||||
var choseCounty = county.value.filter(item => item.id == value)[0]
|
var choseCounty = county.value.filter(item => item.id == value)[0]
|
||||||
if (choseCounty) ruleForm.value.supplierCity = ruleForm.value.supplierCity + '/' + choseCounty.name
|
if (choseCounty) ruleForm.value.supplierCity =ruleForm.value.provinceName+ '/' + ruleForm.value.cityName + '/' + choseCounty.name
|
||||||
}
|
}
|
||||||
|
|
||||||
// 详情信息联动 设置区/县数据
|
// 详情信息联动 设置区/县数据
|
||||||
|
|
Loading…
Reference in New Issue
Block a user