898e15abcc0baf1ab688939bb4b596eb.json 27 KB

1
  1. {"remainingRequest":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/vue-loader/lib/index.js??vue-loader-options!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/advertising-delivery/advertisement_examine.vue?vue&type=script&lang=js&","dependencies":[{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/advertising-delivery/advertisement_examine.vue","mtime":1659005464000},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js","mtime":1665684022107},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/thread-loader/dist/cjs.js","mtime":1665684003955},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/babel-loader/lib/index.js","mtime":1665684010704},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js","mtime":1665684022107},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/vue-loader/lib/index.js","mtime":1665684006084}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport axios from '@/libs/api.request'\nexport default {\n\n name: 'voice',\n data () {\n return {\n curImg: '',\n formItem: {\n cover: '',\n id: ''\n }, // 上传担保协议的图片地址\n guarantee_url: '',\n showImg: false,\n promotionId: '',\n showRelieve: false,\n showTreaty: false,\n queryDataPage: 1,\n total: 0,\n showVideoModal: false,\n showEditAd: false,\n showIntelligence: false,\n showAdItem: {},\n // 资质数据\n intelligence: {\n business_name: '',\n company_industry: '',\n license_number: '',\n license: ''\n },\n isShowDuiDu: false,\n isShowAuitFail: false,\n auitFailsendMsg:'',\n msg: '',\n curDataId: '',\n posterTitle: '', // 广告标题\n posterImg: [], // 广告图片\n domain: this.domain,\n posterContent: '', // 广告内容\n showLevelModal: false,\n batchdelIDarray: '', // 选中的id数组\n // 查询条件\n queryData: {\n title: '',\n name: '',\n guarantee: '',\n pagenum: 15\n },\n editAd: {\n id: '',\n title: '',\n industry: [],\n province: '',\n city: '',\n district: '',\n scene: '',\n image: [],\n content: ''\n },\n industry: [],\n provinceList: [], // 省列表\n cityList: [], // 市列表\n districtList: [], // 区列表\n discounts: '',\n min_num: '',\n task_num: '',\n levelData: [],\n columns: [{\n type: 'selection',\n width: 60,\n align: 'center'\n },\n {\n title: '发布者ID',\n key: 'uid',\n render: (h, params) => {\n return h('div', [\n h('p', {\n style: {\n color: '#4B8BF4',\n cursor: 'pointer'\n },\n on: {\n click: () => {\n this.$router.push({\n path: '/course/voice',\n query: {\n id: params.row.uid\n }\n })\n }\n }\n }, params.row.uid)\n ])\n }\n },\n {\n title: '广告标题',\n key: 'title'\n },\n {\n title: '姓名',\n key: 'real_name'\n },\n {\n title: '电话',\n key: 'mobile'\n },\n {\n title: '企业名',\n key: 'company_name'\n },\n {\n title: '投放行业',\n key: 'industryArr',\n minWidth: 200,\n render: (h, params) => {\n return h('div', [\n h('p', {}, params.row.industryArr ? params.row.industryArr.join(',') : '全行业投放')\n ])\n }\n },\n {\n title: '投放城区',\n key: 'area'\n },\n {\n title: '费用',\n key: 'total_price'\n },\n {\n title: '当前单价',\n key: 'price'\n },\n {\n title: '总展示量',\n key: 'total_num'\n },\n {\n title: '是否对赌',\n key: '是否对赌',\n render: (h, params) => {\n if (params.row.guarantee != undefined) {\n return h('span', params.row.guarantee == 0 ? '否' : '是')\n }\n }\n },\n {\n title: '审核状态',\n key: '审核状态',\n render: (h, params) => {\n let text = ''\n if (params.row.guarantee == 1 && params.row.bet_status == 3) {\n text = '待审核(上级已确认)'\n } else if (params.row.guarantee == 1 && params.row.bet_status == 0) {\n text = '待审核(待上级确认)'\n } else {\n text = '待审核'\n }\n if (params.row.status != undefined) {\n return h('span', text)\n }\n }\n },\n {\n title: '操作',\n minWidth: 200,\n key: 'action',\n align: 'center',\n render: (h, params) => {\n return h('div', [\n h('Button', {\n props: {\n size: 'small',\n type: 'error'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: (params.row.guarantee == 1 && params.row.guarantee_url == '') ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n this.showTreaty = true\n this.formItem.id = params.row.id\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/adver/procotol'\n }\n ]\n }, '担保协议(未上传)'),\n h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: (params.row.guarantee_url == '') ? 'none' : 'inline-block'\n },\n on: {\n click: () => {\n this.showImg = true\n this.guarantee_url = params.row.guarantee_url\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/adver/procotol'\n }\n ]\n }, '担保协议(已上传)'),\n h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px'\n },\n on: {\n click: () => {\n this.showIntelligence = true\n axios\n .request({\n url: '/admins/adver/audit/company',\n data: {\n id: params.row.id\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.intelligence.business_name = res.data.data.company_name\n this.intelligence.company_industry = res.data.data.company_industry\n this.intelligence.license_number = res.data.data.license_number\n this.intelligence.license = res.data.data.license\n } else {\n that.$Message.error(res.data.message)\n }\n })\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/adver/audit/company'\n }\n ]\n }, '资质查看'),\n h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px'\n },\n on: {\n click: () => {\n axios\n .request({\n url: '/admins/adver/show',\n data: {\n id: params.row.id\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.showVideoModal = true\n // this.posterTitle = res.data.data.title;\n this.posterImg = res.data.data.image_group\n // this.posterContent = res.data.data.content;\n this.showAdItem = res.data.data\n this.showAdItem.industry = res.data.data.industry.split(',')\n this.showAdItem.industry.map((value, key, arr) => {\n this.$set(this.showAdItem.industry, key, parseInt(value))\n })\n this.$set(this.showAdItem, 'user_achievement_url', res.data.data.bet ? res.data.data.bet.user_achievement_url : '')\n this.$set(this.showAdItem, 'is_win', res.data.data.bet ? res.data.data.bet.is_win + '' : '')\n\n this.editAd.image = res.data.data.image_group.filter(item => item != '')\n this.editAd.title = res.data.data.title\n this.editAd.content = res.data.data.content\n this.editAd.scene = res.data.data.scene\n this.editAd.province = res.data.data.province\n this.editAd.city = res.data.data.city\n this.editAd.district = res.data.data.district\n this.editAd.industry = res.data.data.industry\n this.editAd.industry.map((value, key, arr) => {\n this.$set(this.editAd.industry, key, parseInt(value))\n })\n this.editAd.id = params.row.id\n this.getProvince()\n this.getCity(this.editAd.province)\n this.getDistrict(this.editAd.city)\n } else {\n that.$Message.error(res.data.message)\n }\n })\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/adver/show'\n }\n ]\n }, '预览'),\n h('a', {\n domProps: {\n target: '_blank',\n href: params.row.redirect\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: params.row.redirect == '' ? 'none' : 'inline-block',\n color: '#fff',\n padding: '1px 7px 2px',\n backgroundColor: '#2d8cf0',\n borderColor: '#2d8cf0',\n borderRadius: '3px',\n border: '1px solid transparent'\n },\n on: {\n click: () => {\n\n }\n }\n },\n '查看已有广告链接'\n ),\n h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: (params.row.guarantee == 1 && params.row.bet_status == 3) || (params.row.guarantee == 1 && params.row.bet_status == 0 && this.datedifference(params.row.created_at) >= 3) ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n this.msg = ''\n this.isShowDuiDu = true\n this.curDataId = params.row.id\n }\n }\n }, '确认对赌'),\n h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: (params.row.status == 2) ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n this.batchdelIDarray = []\n this.batchdelIDarray.push(params.row.id)\n this.$Modal.confirm({\n title: '确定审核通过该条记录吗?',\n content: '',\n loading: true,\n onOk: () => {\n var that = this\n axios\n .request({\n url: '/admins/adver/audit',\n data: {\n ids: that.batchdelIDarray,\n status: 3\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n that.$Modal.remove()\n that.$Message.success(res.data.message, 'middle')\n if (that.isSearch) {\n that.cateadd(this.queryDataPage)\n } else {\n that.taskList()\n }\n that.batchdelIDarray = []\n } else {\n that.$Message.error(res.data.message)\n }\n })\n }\n })\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/adver/audit'\n }\n ]\n }, '审核通过'),\n h('Button', {\n props: {\n size: 'small',\n type: 'error'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginRight: '5px',\n display: (params.row.status == 2) ? 'inline-block' : 'none'\n },\n on: {\n click: () => {\n // console.log(params)\n this.batchdelIDarray = []\n this.batchdelIDarray.push(params.row.id)\n this.auitFailsendMsg = ''\n this.isShowAuitFail = true\n // this.$Modal.confirm({\n // title: '确定对该条记录审核不予通过吗?',\n // content: '',\n // loading: true,\n // onOk: () => {\n // var that = this\n // axios\n // .request({\n // url: '/admins/adver/audit',\n // data: {\n // ids: that.batchdelIDarray,\n // status: 5\n // },\n // method: 'POST'\n // })\n // .then(res => {\n // if (res.data.code === 'success') {\n // that.$Modal.remove()\n // that.$Message.success(res.data.message, 'middle')\n // if (that.isSearch) {\n // that.cateadd(this.queryDataPage)\n // } else {\n // that.taskList()\n // }\n // that.batchdelIDarray = []\n // } else {\n // that.$Message.error(res.data.message)\n // }\n // })\n // }\n // })\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/adver/audit'\n }\n ]\n }, '审核不通过')\n ])\n }\n }\n ],\n tableData: [],\n isSearch: false\n }\n },\n created () {\n this.taskList()\n this.getIndustry()\n this.datedifference('2019-08-09 17:23:58')\n },\n methods: {\n show (src) {\n this.curImg = src\n },\n // 计算两个时间差\n datedifference (date) {\n let day1 = new Date(date)\n let day2 = new Date()\n let day3 = (day2.getTime() - day1.getTime()) / (24 * 60 * 60 * 1000)\n return day3\n },\n // 发送推送消息给业务经理\n sendMsg () {\n if (this.msg == '') {\n this.$Message.error('请输入业务经理手机号或ID', 'middle')\n return\n }\n axios\n .request({\n url: '/admins/adver/betcomfirm',\n data: {\n id: this.curDataId,\n name: this.msg\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.msg = ''\n this.isShowDuiDu = false\n this.$Message.success(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message)\n }\n })\n },\n // 发送审核不通过原因\n auitFailsendMsgFunc () {\n if (this.auitFailsendMsg == '') {\n this.$Message.error('请输入审核不通过原因/理由', 'middle')\n return\n }\n axios\n .request({\n url: '/admins/adver/audit',\n data: {\n ids: this.batchdelIDarray,\n status: 5,\n auitFailsendMsg: this.auitFailsendMsg\n },\n method: 'POST'\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.auitFailsendMsg = ''\n this.isShowAuitFail = false\n this.$Message.success(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message)\n }\n })\n },\n delImage (index) {\n this.editAd.image.splice(index, 1)\n },\n // 分页\n levelchangepage (res) {\n this.queryDataPage = res\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n },\n handleFormatError (file) {\n this.$Notice.warning({\n title: '格式错误',\n desc: file.name + '文件格式错误,请上传正确的格式!'\n })\n },\n handleMaxSize (file) {\n this.$Notice.warning({\n title: '文件超出指定大小',\n desc: file.name + '文件太大,请上传正确大小的文件!'\n })\n },\n uploadCoverSuccess (res, file) {\n if (res.code == 'success') {\n this.$set(this.formItem, 'cover', res.data.url)\n } else {\n this.$Message.error(res.message)\n }\n },\n uploadAdSuccess (res, file) {\n if (res.code == 'success') {\n this.editAd.image.push(res.data.url)\n // this.$set(this.formItem, 'cover', this.domain + res.data.url)\n } else {\n this.$Message.error(res.message)\n }\n },\n // 上传担保协议\n treatyok () {\n axios\n .request({\n method: 'POST',\n url: '/admins/adver/procotol',\n data: {\n file: this.formItem.cover,\n id: this.formItem.id\n }\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.$Modal.remove()\n this.$Message.success(res.data.message, 'middle')\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 点击查询\n cateadd (page) {\n var listData = {\n page: page,\n title: this.queryData.title,\n nick_name: this.queryData.name,\n guarantee: this.queryData.guarantee,\n perPage: this.queryData.pagenum\n }\n // 清除对象中的空属性\n listData = this.clearNullData(listData)\n // listData = clearNullData(listData)\n axios\n .request({\n method: 'POST',\n url: '/admins/adver/audit/index',\n data: listData\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.$refs['pages'].currentPage = page\n this.tableData = res.data.data.data\n this.total = res.data.data.total\n this.isSearch = true\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 获取列表信息\n taskList () {\n axios\n .request({\n method: 'POST',\n url: '/admins/adver/audit/index',\n data: {\n page: this.queryDataPage,\n perPage: this.queryData.pagenum\n }\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.tableData = res.data.data.data\n this.total = res.data.data.total\n this.isSearch = false\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 全选\n selectionClick (data) {\n // 只要选中项发生变化时就会触发\n this.batchdelIDarray = []\n if (data.length !== 0) {\n for (var item of data) {\n this.batchdelIDarray.push(item.id)\n }\n // console.log(this.batchdelIDarray)\n }\n },\n // 批量审核\n batchSccress () {\n var that = this\n if (this.batchdelIDarray.length === 0) {\n this.$Message.warning('请先选择审核记录', 'middle')\n return\n }\n var ids = this.batchdelIDarray\n this.$Modal.confirm({\n title: '确定要审核所选择的审核记录吗?',\n content: '',\n onOk: () => {\n axios.request({\n method: 'POST',\n url: '/admins/adver/audit',\n params: {\n ids: ids,\n status: 3\n }\n })\n .then(res => {\n this.$Message.info(res.data.message)\n if (res.data.code === 'success') {\n setTimeout(function () {\n if (that.isSearch) {\n that.cateadd(this.queryDataPage)\n } else {\n that.taskList()\n }\n }, 2000)\n }\n })\n }\n })\n },\n // 获取行业\n getIndustry () {\n axios\n .request({\n method: 'POST',\n url: '/admins/adver/industry',\n data: {}\n })\n .then(res => {\n if (res.data.code === 'success') {\n this.industry = res.data.data\n } else {\n // this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 省\n getProvince () {\n axios.request({\n method: 'GET',\n url: '/admins/area/0'\n }).then((res) => {\n if (res.data.code === 'success') {\n this.provinceList = res.data.data.list\n // this.editAd.province = res.data.data.list[0].id;\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 市\n getCity (id) {\n axios.request({\n method: 'GET',\n url: '/admins/area/' + id\n }).then((res) => {\n if (res.data.code === 'success') {\n this.cityList = res.data.data.list\n // if(type){\n // this.editAd.city = id\n // }\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 区\n getDistrict (id) {\n axios.request({\n method: 'GET',\n url: '/admins/area/' + id\n }).then((res) => {\n if (res.data.code === 'success') {\n this.districtList = res.data.data.list\n // if(type){\n // this.editAd.district = id\n // }\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 保存编辑后的广告\n saveEditAd () {\n axios.request({\n method: 'POST',\n url: '/admins/adver/modify',\n params: {\n title: this.editAd.title,\n id: this.editAd.id,\n industry: this.editAd.industry.join(','),\n province: this.editAd.province,\n city: this.editAd.city,\n district: this.editAd.district,\n scene: this.editAd.scene,\n image: this.editAd.image.join(','),\n content: this.editAd.content\n }\n }).then((res) => {\n if (res.data.code === 'success') {\n this.$Message.success(res.data.message, 'middle')\n this.showVideoModal = false\n this.showEditAd = false\n if (this.isSearch) {\n this.cateadd(this.queryDataPage)\n } else {\n this.taskList()\n }\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n }\n }\n}\n",null]}