index.vue 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885
  1. <template>
  2. <!-- 广告服务 -->
  3. <div>
  4. <!-- 广告页面头部 -->
  5. <!-- <AdvertisingHead></AdvertisingHead> -->
  6. <HomePageHead></HomePageHead>
  7. <HomePageNavigation1></HomePageNavigation1>
  8. <div class="adtips">
  9. <div class="inner">
  10. <p v-if="activeName == '1'">注意:广告购买需提交信息,用户与商务人员进行线下金额交易,交易成功后由商务人员后台审核。审核通过,即广告投放成功。</p>
  11. </div>
  12. </div>
  13. <div class="advertising">
  14. <div class="inner">
  15. <el-tabs v-model="activeName" :tab-position="tabPosition" class="demo-tabs" @tab-change="goOrderList">
  16. <!-- {{ ad }} -->
  17. <el-tab-pane label="广告购买" name="1" @click="goBuyAd">
  18. <!-- 广告购买 -->
  19. <div id="buyAd">
  20. <div class="buyAD">
  21. <div class="inner">
  22. <!-- 填写广告信息内容 -->
  23. <div class="textOne" v-if="ad == 1">
  24. <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="120"
  25. class="demo-ruleForm" :size="formSize" status-icon>
  26. <el-form-item label="广告名称:" prop="adName">
  27. <el-input v-model="ruleForm.adName" placeholder="请输入广告名称" />
  28. </el-form-item>
  29. <el-form-item label="广告链接:" prop="adLink">
  30. <el-input v-model="ruleForm.adLink" placeholder="请输入广告链接" />
  31. </el-form-item>
  32. <el-form-item label="广告持续时间:" required class="">
  33. <el-config-provider :locale="zhCn">
  34. <!-- <el-date-picker v-model="ruleForm.time" type="daterange"
  35. range-separator="至" start-placeholder="请选择开始时间"
  36. end-placeholder="请选择结束时间" :size="size" @change="changeStartTime"
  37. :disabled-date="disabledStartTime" /> -->
  38. <el-date-picker v-model="ruleForm.time" type="datetimerange"
  39. format="YYYY-MM-DD HH:mm"
  40. value-format="YYYY-MM-DD HH:00:00"
  41. range-separator="至" start-placeholder="请选择开始时间"
  42. end-placeholder="请选择结束时间" :size="size" @change="changeStartTime"
  43. :disabled-date="disabledStartTime"
  44. :disabledMinutes="disabledMinutes">
  45. </el-date-picker>
  46. </el-config-provider>
  47. </el-form-item>
  48. <el-form-item label="广告尺寸:" prop="adSize">
  49. <el-radio-group v-model="ruleForm.adSize">
  50. <el-radio :value="item.id" v-for="item in options" :key="item.id"
  51. @change="changeAdSize">{{
  52. item.size }}</el-radio>
  53. </el-radio-group>
  54. <!-- <el-select v-model="ruleForm.adSize" placeholder="请选择广告尺寸" @change="changeAdSize">
  55. <el-option v-for="item in options" :key="item.id" :label="item.size"
  56. :value="item.id"></el-option>
  57. </el-select> -->
  58. <a class="pic" @click="goPhoto">查看示意图</a>
  59. </el-form-item>
  60. <!-- 表格部分 phone-->
  61. <div class="pc_none">
  62. <div class="phone_advertis_box" v-show="tableData.length <= 0">
  63. <div class="phone_advertis_head">
  64. <div class="phone_advertis_head_li">网站</div>
  65. <div class="phone_advertis_head_li">广告位名称</div>
  66. <div class="phone_advertis_head_li">广告尺寸</div>
  67. <div class="phone_advertis_head_li">金额(元)/天</div>
  68. </div>
  69. <div class="phone_advertis_text"> 请先选择广告持续时间</div>
  70. </div>
  71. <div class="phone_advertis_ul">
  72. <div class="phone_advertis_li" v-for="(per_obj,per_index) in tableData" :key="per_obj">
  73. <div class="phone_advertis_li_in ">
  74. <div class="phone_advertis_li_tip">
  75. <label class="phone_advertis_li_label">网站:</label>
  76. <div class="phone_advertis_li_text"> {{ per_obj.website_name }}</div>
  77. </div>
  78. <div class="phone_advertis_li_tip">
  79. <label class="phone_advertis_li_label">广告位名称:</label>
  80. <div class="phone_advertis_li_text">{{ per_obj.name }}</div>
  81. </div>
  82. <div class="phone_advertis_li_tip">
  83. <label class="phone_advertis_li_label">广告尺寸:</label>
  84. <div class="phone_advertis_li_text">{{ per_obj.size }}</div>
  85. </div>
  86. <div class="phone_advertis_li_tip">
  87. <label class="phone_advertis_li_label">金额(元)/天:</label>
  88. <div class="phone_advertis_li_text">{{ per_obj.price }}</div>
  89. </div>
  90. </div>
  91. <el-checkbox v-model="per_obj.selected" class="phone_advertis_li_btn"
  92. @change="toggleRowSelection(per_obj)">
  93. </el-checkbox>
  94. </div>
  95. </div>
  96. </div>
  97. <!-- 表格部分 pc-->
  98. <div class="pageTable phone_none">
  99. <el-table :data="tableData" border ref="multipleTable" empty-text="请先选择广告持续时间"
  100. @selection-change="handleSelectionChange" style="width: 100%"
  101. :header-row-style="{ height: '60px' }"
  102. :row-style="{ height: '74px' }"
  103. :header-cell-style="{ backgroundColor: '#fafafa', color: '#666' }">
  104. <!-- <el-table-column type="selection" :reserve-selection="true"
  105. width="152" align="center" /> -->
  106. <el-table-column width="" align="center" >
  107. <template #default="{ row }">
  108. <el-checkbox v-model="row.selected"
  109. @change="toggleRowSelection(row)">
  110. </el-checkbox>
  111. </template>
  112. </el-table-column>
  113. <el-table-column prop="website_name" label="网站" width="220" />
  114. <el-table-column prop="name" label="广告位名称" width="320" />
  115. <el-table-column prop="size" label="广告尺寸" width="180" />
  116. <el-table-column prop="price" label="金额 (元) / 天" width="160" />
  117. </el-table>
  118. </div>
  119. <el-form-item label="广告图:" prop="adImg">
  120. <el-upload class="avatar-uploader" action="#" :show-file-list="false"
  121. :on-success="handleAvatarSuccess"
  122. :before-upload="beforeAvatarUpload" accept=".jpg,.jpeg,.png">
  123. <img v-if="imageUrl" :src="imageUrl" class="avatar" />
  124. <div v-else>
  125. <el-icon class="avatar-uploader-icon">
  126. <Plus></Plus>
  127. <div class="chooseImgDiv">选择图片</div>
  128. </el-icon>
  129. </div>
  130. </el-upload>
  131. </el-form-item>
  132. </el-form>
  133. <!-- 示意图弹框 -->
  134. <el-dialog v-model="dialogTableVisible" :show-close="false" width="1280px"
  135. :close-on-click-modal="false">
  136. <template #header="{ close, titleId, titleClass }">
  137. <div class="my-header">
  138. <h4 :id="titleId" :class="titleClass" class="left">示意图类型</h4>
  139. <el-button type="danger" @click="close" class="right">
  140. <el-icon class="el-icon--left">
  141. <CircleCloseFilled />
  142. </el-icon>
  143. 关闭
  144. </el-button>
  145. </div>
  146. </template>
  147. <div class="block text-center dialogPicBox" m="t-4">
  148. <el-carousel trigger="click" height="680px" autoplay="">
  149. <el-carousel-item>
  150. <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/new1.png" alt="">
  151. </el-carousel-item>
  152. <el-carousel-item>
  153. <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/new2.png" alt="">
  154. </el-carousel-item>
  155. </el-carousel>
  156. </div>
  157. </el-dialog>
  158. </div>
  159. <!-- 提交工单信息 -->
  160. <div class="submit" v-if="ad == 2">
  161. <div class="inner">
  162. <h1>广告信息已提交成功,请等待审核......</h1>
  163. <p>
  164. 工单编号:
  165. <span>{{ orderInformation }}</span>
  166. </p>
  167. <div class="btn">
  168. <button class="check" @click="lookOrder">查看工单</button>
  169. <button class="apply" @click="reapply">再次申请</button>
  170. </div>
  171. <span>如有疑问,可联系客服人员。</span>
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. </el-tab-pane>
  178. <el-tab-pane label="工单列表" name="2">
  179. <!-- 工单列表 -->
  180. <AdvertisingOrderList @childData="handleChildData"></AdvertisingOrderList>
  181. </el-tab-pane>
  182. </el-tabs>
  183. </div>
  184. <div class="bottom" v-if="ad == 1 && activeName == '1'" :key="ad">
  185. <div class="inner">
  186. <!-- 总金额 -->
  187. <div class="amount" v-if="ad == 1">
  188. 总金额:
  189. <span>{{ priceTotal == '' ? 0 : priceTotal }}</span>
  190. </div>
  191. <!-- 按钮 -->
  192. <div class="btn">
  193. <button class="btn2" @click="submitStep" v-if="ad == 1"> 提交工单</button>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. <!-- 广告页面底部 -->
  199. <HomeFoot1></HomeFoot1>
  200. </div>
  201. </template>
  202. <script setup>
  203. import { ref, onMounted, watch, reactive } from 'vue'
  204. // import { ElCheckbox, ElRadio, ElRadioGroup, ElDatePicker, ElInput, ElUpload, ElPagination, ElIcon, ElSelect, ElOption, ElTabs, ElTabPane, ElTable, ElTableColumn, ElMessage, ElForm, ElFormItem, ElCol, valueEquals } from 'element-plus'
  205. import { ElCheckbox, ElRadio, ElRadioGroup, ElDatePicker, ElInput, ElUpload, ElPagination, ElIcon, ElSelect, ElOption, ElTabs, ElTabPane, ElTable, ElTableColumn, ElMessage, ElForm, ElFormItem, ElCol, valueEquals, ElConfigProvider,ElCarousel, ElCarouselItem } from 'element-plus'
  206. import { ElButton, ElDialog } from 'element-plus'
  207. import { CircleCloseFilled } from '@element-plus/icons-vue'
  208. import { Plus, DArrowRight, Edit, Picture, UploadFilled } from '@element-plus/icons-vue'
  209. import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
  210. import { getToken, setToken, removeToken } from '@/store/useCookieStore'
  211. const { $webUrl, $CwebUrl, $BwebUrl,$LoginWebUrl } = useNuxtApp()
  212. import { useRoute } from 'vue-router'
  213. const route = useRoute()
  214. // axios请求
  215. const nuxtApp = useNuxtApp();
  216. const axios = nuxtApp.$axios;
  217. // 通过变量ad控制tab栏标题的颜色及每一步下的不同的内容
  218. let ad = useState("ad", () => 1)
  219. let dialogTableVisible = useState("dialogTableVisible", () => false)//示意图弹框
  220. let dialogTableVisible1 = useState("dialogTableVisible1", () => false)//示意图弹框
  221. let activeName = useState("activeName", () => "1")
  222. let startTime = useState("startTime", () => new Date())
  223. let adSize = useState("adSize", () => "")
  224. let tableData = useState("tableData", () => [])
  225. let processedData = useState("processedData", () => [])
  226. let pid = useState("pid", () => [])
  227. let pids = useState("pids", () => [])
  228. let pidArr = useState("pidArr", () => [])
  229. let orderInformation = useState("orderInformation", () => "")
  230. let adWeb = useState("adWeb", () => "")
  231. let adWebId = useState("adWebId", () => "")
  232. let adWebList = useState("adWebList", () => [])
  233. let priceTotal = useState("priceTotal", () => '')//总金额
  234. let orderId = useState("orderId", () => "")
  235. let options = useState('options', () => [])
  236. const multipleTable = ref('');
  237. let shopCode = useState('shopCode', () => '')
  238. let token = useState('token', () => '')
  239. let showToken = useState("showToken", () => '')
  240. watch(token, (newval, oldval) => {
  241. console.log(newval, oldval);
  242. showToken.value = newval
  243. }, {
  244. deep: true,
  245. immediate: true,
  246. })
  247. // 定义响应式数据
  248. const seoData = ref({
  249. title: '广告服务',
  250. description: '默认描述',
  251. keywords: '默认关键词',
  252. image: 'https://example.com/default-image.jpg'
  253. });
  254. // 在 onMounted 钩子中获取数据
  255. onMounted(() => {
  256. seoData.value.title = '广告服务';
  257. seoData.value.description = '默认描述';
  258. seoData.value.keywords = '默认关键词';
  259. })
  260. // 分页
  261. let total = useState('total', () => 0)
  262. let pageSize = useState("pageSize", () => 20)
  263. let page = useState("page", () => 1)
  264. //ruleForm
  265. let logoUrl = ref('');
  266. const formSize = ref('default');
  267. const ruleFormRef = ref();
  268. const ruleForm = reactive({
  269. adName: '',
  270. adLink: '',
  271. time: "",
  272. startTime: '',
  273. endTime: '',
  274. adSize: 1,
  275. adImg: '',
  276. });
  277. const rules = reactive({
  278. adName: [{ required: true, message: '请输入广告名称', trigger: 'blur' }],
  279. adLink: [{ required: true, message: '请输入广告链接', trigger: 'change' }],
  280. startTime: [{ required: true, message: '请输入开始时间', trigger: 'change' }],
  281. endTime: [{ required: true, message: '请输入结束时间', trigger: 'change' }],
  282. adSize: [{ required: true, message: '请选择广告尺寸', trigger: 'change' }],
  283. adImg: [{ required: true, message: '请选择广告图', trigger: 'change' }],
  284. });
  285. const tabPosition = ref('left')
  286. //禁用分钟
  287. const disabledMinutes = () => {
  288. return Array.from({ length: 60 }, (_, i) => i).filter(minute => minute !== 0);
  289. }
  290. // 获取开始时间
  291. let changeStartTime = (val) => {
  292. //第一步,获取用户选择的时间跟当前时间进行对比
  293. let setTime = new Date(new Date(val[0])).getTime();
  294. let localtime = new Date().getTime();
  295. if(setTime < localtime){
  296. //第二步,将时间戳转换为本地时间
  297. ElMessage.error('时间选择错误,已为您自动重设!');
  298. //获取当前小时之后的整数小时0分0秒
  299. let time1 = new Date(new Date(val[0]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
  300. let time2 = new Date(new Date(val[1]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
  301. //同样的道理,获取当前时间的下一个整数小时0分0秒
  302. let currentTimestamp = new Date(new Date().setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
  303. let localTime = new Date(currentTimestamp).toLocaleString('zh-CN', {
  304. year: 'numeric',
  305. month: '2-digit',
  306. day: '2-digit',
  307. hour: '2-digit',
  308. minute: '2-digit'
  309. }).replace(/\//g, '-');
  310. //第三步,将当前时间加24小时
  311. let twoHoursLocalTime = new Date(currentTimestamp + 24 * 60 * 60 * 1000).toLocaleString('zh-CN', {
  312. year: 'numeric',
  313. month: '2-digit',
  314. day: '2-digit',
  315. hour: '2-digit',
  316. minute: '2-digit'
  317. }).replace(/\//g, '-');
  318. //第四步,将当前时间赋值给ruleForm.time[0]
  319. ruleForm.time[0] = localTime;
  320. ruleForm.time[1] = twoHoursLocalTime;
  321. ruleForm.startTime = localTime;
  322. ruleForm.endTime = twoHoursLocalTime;
  323. //获取广告尺寸
  324. getAdSize()
  325. //创建购物车
  326. axios.post("/order/addShoppingCart").then(response => {
  327. // console.log("创建购物车", response.data);
  328. shopCode.value = response.data
  329. console.log('shopCode', shopCode.value);
  330. })
  331. }else{
  332. //获取当前小时之后的整数小时0分0秒
  333. let time1 = new Date(new Date(val[0]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
  334. let time2 = new Date(new Date(val[1]).setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
  335. //同样的道理,获取当前时间的下一个整数小时0分0秒
  336. let currentTimestamp = new Date(new Date().setMinutes(0, 0, 0) + 60 * 60 * 1000).getTime();
  337. //第二种情况,传入的时间戳大于当前时间
  338. //但是时间间隔小于2小时
  339. if(time2 - time1 < 24 * 60 * 60 * 1000){
  340. ElMessage.error('广告持续时间不得低于24小时,已为您自动重设!');
  341. //第一步,将时间戳转换为本地时间
  342. let localTime = new Date(currentTimestamp).toLocaleString('zh-CN', {
  343. year: 'numeric',
  344. month: '2-digit',
  345. day: '2-digit',
  346. hour: '2-digit',
  347. minute: '2-digit'
  348. }).replace(/\//g, '-');
  349. //第二步,将当前时间加2小时
  350. let twoHoursLocalTime = new Date(currentTimestamp + 24 * 60 * 60 * 1000).toLocaleString('zh-CN', {
  351. year: 'numeric',
  352. month: '2-digit',
  353. day: '2-digit',
  354. hour: '2-digit',
  355. minute: '2-digit'
  356. }).replace(/\//g, '-');
  357. //第三步,将当前时间赋值给ruleForm.time[0]
  358. ruleForm.time[0] = localTime;
  359. ruleForm.time[1] = twoHoursLocalTime;
  360. ruleForm.startTime = localTime;
  361. ruleForm.endTime = twoHoursLocalTime;
  362. //获取广告尺寸
  363. getAdSize()
  364. //创建购物车
  365. axios.post("/order/addShoppingCart").then(response => {
  366. // console.log("创建购物车", response.data);
  367. shopCode.value = response.data
  368. console.log('shopCode', shopCode.value);
  369. })
  370. }else{
  371. //第三种情况,用户时间选择正确,无需操作
  372. ruleForm.startTime = val[0]
  373. ruleForm.endTime = val[1]
  374. //获取广告尺寸
  375. getAdSize()
  376. //创建购物车
  377. axios.post("/order/addShoppingCart").then(response => {
  378. // console.log("创建购物车", response.data);
  379. shopCode.value = response.data
  380. console.log('shopCode', shopCode.value);
  381. })
  382. }
  383. }
  384. //第四种情况,使广告立即生效,请注释上面的if 直接使用下面这一段
  385. // ruleForm.startTime = val[0]
  386. // ruleForm.endTime = val[1]
  387. // //获取广告尺寸
  388. // getAdSize()
  389. // //创建购物车
  390. // axios.post("/order/addShoppingCart").then(response => {
  391. // // console.log("创建购物车", response.data);
  392. // shopCode.value = response.data
  393. // console.log('shopCode', shopCode.value);
  394. // })
  395. }
  396. //禁止选择的时间区域
  397. let disabledStartTime = (time) => {
  398. // console.log("time", time);
  399. return time.getTime() <= (Date.now() - 3600 * 1000 * 24);
  400. }
  401. const imageUrl = ref('');
  402. const handleAvatarSuccess = (response, uploadFile) => {
  403. imageUrl.value = URL.createObjectURL(uploadFile.raw);
  404. };
  405. const bb = (item) => {
  406. console.log("===", item)
  407. navigateTo({
  408. path: "/advertising/addetail",
  409. query: {
  410. id: item
  411. }
  412. })
  413. }
  414. //获取图片地址
  415. const beforeAvatarUpload = (file) => {
  416. console.log('file', file);
  417. if (!file) return;
  418. const isJPG = file.type === 'image/jpeg';
  419. const isPNG = file.type === 'image/png';
  420. const isLt2M = file.size / 1024 / 1024 < 2;
  421. if (!isJPG && !isPNG) {
  422. ElMessage.error('上传图片只能是 JPG 或 PNG 格式!');
  423. return;
  424. }
  425. if (!isLt2M) {
  426. ElMessage.error('上传图片大小不能超过 2MB!');
  427. return;
  428. }
  429. const data = new FormData();
  430. data.append('file', file);
  431. axios.post("/public/uploadFile", data).then(res => {
  432. console.log(res);
  433. logoUrl.value = res.data.imgUrl;
  434. ruleForm.adImg = res.data.imgUrl;
  435. }).catch(() => {
  436. ElMessage({
  437. type: 'info',
  438. message: '网络错误,请重试!'
  439. });
  440. });
  441. };
  442. let goPhoto = () => {
  443. dialogTableVisible.value = true
  444. }
  445. //选择的广告位
  446. let handleSelectionChange = (selectedRows) => {
  447. pidArr.value = selectedRows.map(row => row.pid);
  448. console.log("选中的广告位llllllllll", pidArr.value);
  449. // getPrice() //获取总金额
  450. let aa = JSON.parse(JSON.stringify(pidArr.value))
  451. console.log("pids", aa);
  452. for (let item = 0; item <= aa.length - 1; item++) {
  453. console.log('pidArr.value', aa[item]);
  454. pids.value = aa[item]
  455. }
  456. }
  457. pidArr.value.forEach((item) => {
  458. const index = tableData.findIndex((row) => row.id === item);
  459. if (index !== -1) {
  460. tableData[index].selected = true;
  461. }
  462. });
  463. let toggleRowSelection = (row) => {
  464. console.log('11111', row);
  465. console.log('类型', typeof (row.pid));
  466. // 判断 row.pid 是否已经存在于 pid.value 数组中
  467. const isExist = pid.value.includes(row.pid);
  468. console.log('判断当前选择的id是否已被选择', isExist); // 输出: true
  469. if (isExist) {
  470. //删除购物车中的广告位
  471. let data = {
  472. shopping_id: shopCode.value,
  473. pid: row.pid,
  474. }
  475. //删除购物车接口
  476. axios.post('/order/delShoppingCartAD', data).then(data => {
  477. console.log('删除购物车广告位--------------', data);
  478. if (data.code == 200) {
  479. getShoppingCartAD()
  480. }
  481. })
  482. } else {
  483. //添加购物车中的广告位
  484. let data = {
  485. shopping_id: shopCode.value,
  486. pid: row.pid,
  487. }
  488. //添加购物车接口
  489. axios.post('/order/addShoppingCartAD', data).then(data => {
  490. console.log('添加购物车广告位--------------', data);
  491. if (data.code == 200) {
  492. getShoppingCartAD()
  493. }
  494. })
  495. }
  496. };
  497. onMounted(() => {
  498. tableData.value.forEach((row) => {
  499. console.log(row);
  500. if (row.selected) {
  501. multipleTable.value.toggleRowSelection(row, true);
  502. }
  503. });
  504. });
  505. //获取广告尺寸列表
  506. let adSizeList = () => {
  507. // 搜索按钮接口
  508. axios.post("/order/getAD").then(response => {
  509. console.log("response", response);
  510. options.value = response.data
  511. for (let item of options.value) {
  512. console.log(item);
  513. item.size = item.width + ' * ' + item.height + ' px '
  514. // ruleForm.adSize = item.id
  515. }
  516. console.log("=========", options.value);
  517. })
  518. }
  519. //查看工单
  520. let lookOrder = () => {
  521. activeName.value = '2'
  522. sessionStorage.setItem('activeName', JSON.stringify('2'));
  523. // window.location.href = (`http://localhost:3000/advertising?activeName=${'2'}`)
  524. let url = $CwebUrl + '/advertising?activeName=2';
  525. window.location.href = url;
  526. }
  527. //再次申请
  528. let reapply = () => {
  529. ad.value = 1
  530. // window.location.href = ('http://localhost:3000/advertising')
  531. let url = $CwebUrl + '/advertising';
  532. window.location.href = url;
  533. }
  534. //获取总金额
  535. const getPrice = () => {
  536. let data = {
  537. starttime: ruleForm.startTime,
  538. endtime: ruleForm.endTime,
  539. pid: pid.value
  540. }
  541. // console.log('data=========', data);
  542. axios.post('/order/getPrice', data).then(data => {
  543. console.log('获取到的金额', data.data);
  544. priceTotal.value = data.data
  545. })
  546. }
  547. //获取购物车广告位
  548. const getShoppingCartAD = () => {
  549. axios.post('/order/getShoppingCartAD', {
  550. shopping_id: shopCode.value
  551. }).then(data => {
  552. console.log('获取购物车广告位=====================', data.data.pid);
  553. pid.value = data.data.pid
  554. getPrice()
  555. })
  556. }
  557. //挂载成功
  558. onMounted(() => {
  559. adSizeList()
  560. getPrice()
  561. if (route.query.activeName == '1' || route.query.activeName == '2') {
  562. activeName.value = route.query.activeName;
  563. }
  564. if (!route.query.activeName) {
  565. activeName.value = JSON.parse(sessionStorage.getItem('activeName'));
  566. // console.log('activeName', activeName.value);
  567. }
  568. })
  569. onMounted(() => {
  570. // ad.value=route.query.ad
  571. watch(activeName, (newval) => {
  572. console.log('activeName', newval);
  573. sessionStorage.setItem('activeName', JSON.stringify(newval));
  574. }, {
  575. deep: true,
  576. immediate: true
  577. })
  578. })
  579. //6.子组件传递的数据 start ---------------------------------------->
  580. let handleChildData = (data) => {
  581. activeName.value = `${data}`
  582. }
  583. //6.子组件传递的数据 end ---------------------------------------->
  584. //广告尺寸发生变化的时候
  585. let changeAdSize = (val) => {
  586. console.log('val', val);
  587. ruleForm.adSize = val
  588. getAdSize()
  589. }
  590. //获取广告尺寸
  591. let getAdSize = () => {
  592. // 获取广告位需要传递的参数
  593. let adData = {
  594. ad_size_id: ruleForm.adSize,
  595. starttime: ruleForm.startTime,
  596. endtime: ruleForm.endTime,
  597. pageSize: pageSize.value,
  598. page: page.value,
  599. }
  600. //获取广告位
  601. axios.post("/order/getWebsiteAd", adData).then(response => {
  602. console.log("广告位", response.data);
  603. // console.log("广告位信息", response.data.rows);
  604. total.value = response.data.count
  605. tableData.value = response.data.rows
  606. for (let item of tableData.value) {
  607. item.size = item.size_width + ' * ' + item.size_height + ' px '
  608. item.selected = false
  609. }
  610. console.log('tableData', tableData.value);
  611. }).catch(error => {
  612. console.log(error);
  613. })
  614. }
  615. // 点击提交工单信息
  616. let submitStep = () => {
  617. // 表单验证
  618. if (ruleForm.adName == '') {
  619. ElMessage({
  620. message: '请输入广告名称',
  621. type: 'error',
  622. })
  623. return
  624. }
  625. if (ruleForm.adLink == '') {
  626. ElMessage({
  627. message: '请输入广告链接',
  628. type: 'error',
  629. })
  630. return
  631. }
  632. if (ruleForm.startTime == '') {
  633. ElMessage({
  634. message: '请选择广告持续时间!',
  635. type: 'error',
  636. })
  637. return
  638. }
  639. if (ruleForm.endTime == '') {
  640. ElMessage({
  641. message: '请选择广告尺寸',
  642. type: 'error',
  643. })
  644. return
  645. }
  646. if (ruleForm.adSize == '') {
  647. ElMessage({
  648. message: '请选择广告尺寸',
  649. type: 'error',
  650. })
  651. return
  652. }
  653. if (ruleForm.adImg == '') {
  654. ElMessage({
  655. message: '请添加广告图',
  656. type: 'error',
  657. })
  658. return
  659. }
  660. ad.value++
  661. // 获取广告位需要传递的参数
  662. let orderData = {
  663. name: ruleForm.adName,
  664. ad_size_id: ruleForm.adSize,
  665. starttime: ruleForm.startTime,
  666. endtime: ruleForm.endTime,
  667. imgurl: ruleForm.adLink,
  668. imgsrc: ruleForm.adImg,
  669. pid: pid.value,
  670. price: priceTotal.value
  671. }
  672. //提交工单
  673. axios.post("/order/addAD", orderData).then(response => {
  674. console.log("提交工单", response); //order_id
  675. console.log("orderData", orderData);
  676. if (response.code == 200) {
  677. tableData.value = response.data.rows
  678. orderInformation.value = response.data.ordernum
  679. orderId.value = response.data.order_id
  680. }
  681. }).catch(error => {
  682. console.log(error);
  683. })
  684. }
  685. // // 点击广告购买标签的事件驱动函数
  686. let goBuyAd = () => {
  687. activeName.value = '1'
  688. }
  689. // 点击工单列表标签的事件驱动函数
  690. let goOrderList = (item) => {
  691. if (item == 2 && (route.query.activeName == '1' || route.query.activeName == '2')) {
  692. // window.location.href = ('http://localhost:3000/advertising')
  693. let url = $CwebUrl + '/advertising';
  694. window.location.href = url;
  695. }
  696. }
  697. watch(adSize, (newval) => {
  698. // console.log('newval', newval);
  699. adSize.value = newval
  700. }, {
  701. deep: true,
  702. immediate: true
  703. })
  704. watch(ad, (newval) => {
  705. // console.log('adnewval', newval);
  706. adSize.value = newval
  707. }, {
  708. deep: true,
  709. immediate: true
  710. })
  711. //seo
  712. useSeoMeta({
  713. title: "广告服务" + "_" + "三农资讯网_全国政务信息一体化应用平台",
  714. meta: [
  715. { name: 'description', content: "三农资讯网以服务于党和国家各级职能部门三农政务资讯发布及政务公开信息公示为基点,为全国县级以上各级党政机关及其职能部门配置各自公开独立网络发布平台。主要频道有:三农政务资讯,农科资讯,农资购销,农产购销,农贸资讯,三农致富信息,农村文化生活,三农政策法规,三农之窗,三农调查,三农服务,三农知识,农民工,打假维权等。三农资讯网打造最具影响力的三农信息发布平台,并成为最具权威的三农资讯网。_三农资讯网-测试专用_全国政务信息一体化应用平台" , tagPriority: 10 },
  716. { name: 'keywords', content: "三农资讯,农业,三农,三农在线,农业新闻,三农资讯网_三农资讯网-测试专用_全国政务信息一体化应用平台" , tagPriority: 10 },
  717. { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no',tagPriority: 10 }
  718. ]
  719. });
  720. </script>
  721. <style lang="less" scoped>
  722. // 广告页面头部
  723. .head {
  724. width: 100%;
  725. padding: 15px 0;
  726. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  727. .inner {
  728. width: 1200px;
  729. height: 27px;
  730. }
  731. .headLogo {
  732. .webName {
  733. display: inline-block;
  734. span {
  735. margin-right: 30px;
  736. font-family: Microsoft YaHei, Microsoft YaHei;
  737. font-weight: 400;
  738. font-size: 12px;
  739. color: #666666;
  740. line-height: 14px;
  741. text-align: left;
  742. font-style: normal;
  743. text-transform: none;
  744. }
  745. }
  746. >span {
  747. display: inline-block;
  748. width: 100px;
  749. padding-left: 25px;
  750. vertical-align: middle;
  751. font-family: Microsoft YaHei, Microsoft YaHei;
  752. font-weight: 400;
  753. font-size: 12px;
  754. color: #333333;
  755. line-height: 21px;
  756. text-align: left;
  757. font-style: normal;
  758. text-transform: none;
  759. border-left: 1px solid #ccc;
  760. }
  761. }
  762. .right {
  763. span {
  764. margin-left: 26px;
  765. font-family: PingFang SC, PingFang SC;
  766. font-weight: 400;
  767. font-size: 12px;
  768. color: #666666;
  769. line-height: 14px;
  770. text-align: left;
  771. font-style: normal;
  772. text-transform: none;
  773. }
  774. .login,
  775. .reg,
  776. .user,
  777. .topic,
  778. .ad {
  779. display: inline-block;
  780. width: 16px;
  781. height: 16px;
  782. vertical-align: -6px;
  783. }
  784. .topic {
  785. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/shopping-mall.png") no-repeat;
  786. }
  787. .ad {
  788. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/ad-product.png") no-repeat;
  789. }
  790. .login {
  791. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/user.png") no-repeat;
  792. }
  793. .reg {
  794. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/write.png") no-repeat;
  795. }
  796. .user {
  797. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/user.png") no-repeat;
  798. }
  799. }
  800. .tips1 {
  801. padding: 20px 0;
  802. text-align: center;
  803. font-size: 20px;
  804. color: #40663B;
  805. font-weight: bold;
  806. img {
  807. width: 78px;
  808. height: 78px;
  809. vertical-align: middle;
  810. margin-right: 20px;
  811. p {
  812. line-height: 30px;
  813. }
  814. }
  815. p {
  816. line-height: 40px;
  817. }
  818. >p:first-child {
  819. margin-bottom: 30px;
  820. }
  821. }
  822. }
  823. //提示信息
  824. .adtips {
  825. width: 100%;
  826. height: 70px;
  827. line-height: 70px;
  828. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  829. .inner {
  830. width: 1200px;
  831. height: 70px;
  832. }
  833. p {
  834. font-family: Microsoft YaHei, Microsoft YaHei;
  835. font-weight: 400;
  836. font-size: 16px;
  837. color: #FE0101;
  838. // line-height: 19px;
  839. text-align: left;
  840. font-style: normal;
  841. text-transform: none;
  842. }
  843. }
  844. .advertising {
  845. width: 100%;
  846. overflow: hidden;
  847. .inner {
  848. width: 1520px;
  849. // height: 900px;
  850. overflow: hidden;
  851. position: relative;
  852. // 左侧tab导航
  853. :deep(.el-tabs--left .el-tabs__header.is-left) {
  854. margin-top: 50px;
  855. margin-right: 10px;
  856. }
  857. // 左侧tab导航字体颜色
  858. :deep(.el-tabs__item.is-active),
  859. :deep(.el-tabs__item:hover) {
  860. color: #139602;
  861. // font-weight: bold;
  862. }
  863. // 左侧tab导航字体大小
  864. :deep(.el-tabs--left .el-tabs__item.is-left) {
  865. text-align: right;
  866. font-size: 20px;
  867. }
  868. // 左侧tab导航下划线
  869. :deep(.el-tabs__active-bar) {
  870. background-color: #139602;
  871. }
  872. // 广告购买
  873. #buyAd {
  874. width: 1200px;
  875. margin: 0 35px;
  876. .buyAD {
  877. width: 1200px;
  878. overflow: hidden;
  879. .inner {
  880. width: 1200px;
  881. overflow: hidden;
  882. position: relative;
  883. // 填写信息页tab标题
  884. .tabTitle {
  885. width: 1100px;
  886. height: 80px;
  887. padding-top: 26px;
  888. margin: 0 auto;
  889. box-sizing: border-box;
  890. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  891. .icon,
  892. .title {
  893. font-family: Microsoft YaHei, Microsoft YaHei;
  894. font-weight: bold;
  895. font-size: 16px;
  896. color: #D5D5D5;
  897. text-align: center;
  898. font-style: normal;
  899. text-transform: none;
  900. }
  901. .number {
  902. display: inline-block;
  903. width: 32px;
  904. height: 32px;
  905. line-height: 32px;
  906. color: #ffffff;
  907. background-color: #d5d5d5;
  908. border-radius: 50%;
  909. }
  910. .bgc {
  911. background-color: #139602;
  912. }
  913. .color {
  914. color: #139602;
  915. }
  916. // 填写广告信息字体及背景颜色
  917. .title:first-child {
  918. color: #139602;
  919. }
  920. .title:first-child .number {
  921. background-color: #139602;
  922. }
  923. // 图标>>
  924. .icon {
  925. padding: 0 165px;
  926. }
  927. }
  928. // 1.填写信息内容
  929. .textOne {
  930. width: 1100px;
  931. overflow: hidden;
  932. // height: 515px;
  933. margin-top: 35px;
  934. margin-left: 50px;
  935. .pic {
  936. margin-left: 30px;
  937. width: 80px;
  938. height: 21px;
  939. padding-left: 30px;
  940. font-family: Microsoft YaHei, Microsoft YaHei;
  941. font-weight: 400;
  942. font-size: 16px;
  943. color: #47ACFF;
  944. line-height: 19px;
  945. text-align: left;
  946. font-style: normal;
  947. text-transform: none;
  948. cursor: pointer;
  949. }
  950. //示意图
  951. .my-header {
  952. display: flex;
  953. flex-direction: row;
  954. justify-content: space-between;
  955. gap: 16px;
  956. .el-button {
  957. border-radius: var(--el-border-radius-base);
  958. font-size: var(--el-font-size-base);
  959. background: #ee8787;
  960. border: none;
  961. }
  962. }
  963. .graph {
  964. background-color: #fff;
  965. padding: 40px 60px 80px;
  966. overflow: hidden;
  967. display: flex;
  968. li {
  969. float: left;
  970. span {
  971. display: inline-block;
  972. width: 246px;
  973. font-family: Microsoft YaHei, Microsoft YaHei;
  974. font-weight: bold;
  975. font-size: 16px;
  976. color: #333333;
  977. line-height: 30px;
  978. text-align: center;
  979. margin-bottom: 15px;
  980. }
  981. img {
  982. width: 246px;
  983. height: 344px;
  984. }
  985. }
  986. >li:first-child {
  987. margin-right: 60px;
  988. }
  989. >li:last-child {
  990. margin-left: 60px;
  991. }
  992. }
  993. // 页面中的表格
  994. .pageTable {
  995. width: 90%;
  996. overflow: hidden;
  997. padding-bottom: 60px;
  998. margin-left: 110px;
  999. box-sizing: border-box;
  1000. :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
  1001. background-color: #333;
  1002. border-color: #333;
  1003. }
  1004. :deep(.el-table tr) {
  1005. background-color: #fafafa;
  1006. height: 74px;
  1007. }
  1008. :deep(.el-table .cell) {
  1009. text-align: center;
  1010. box-sizing: border-box;
  1011. height: 23px;
  1012. line-height: 23px;
  1013. overflow-wrap: break-word;
  1014. padding: 0 12px;
  1015. text-overflow: ellipsis;
  1016. white-space: normal;
  1017. font-family: Microsoft YaHei, Microsoft YaHei;
  1018. font-weight: 400;
  1019. font-size: 16px;
  1020. color: #333333;
  1021. line-height: 19px;
  1022. font-style: normal;
  1023. text-transform: none;
  1024. }
  1025. }
  1026. :deep(.el-select) {
  1027. --el-select-width: 30%;
  1028. }
  1029. :deep(.el-form-item) {
  1030. margin-bottom: 35px;
  1031. }
  1032. .el-col {
  1033. height: 36px;
  1034. }
  1035. .el-col-2 {
  1036. text-align: center;
  1037. }
  1038. .chooseImg {
  1039. display: block;
  1040. }
  1041. .chooseImgDiv {
  1042. font-size: 16px;
  1043. font-style: normal;
  1044. }
  1045. .avatar-uploader {
  1046. width: 120px;
  1047. height: 120px;
  1048. border: 1px solid #ededed;
  1049. border-radius: 12px;
  1050. }
  1051. .avatar-uploader .avatar {
  1052. width: 120px;
  1053. border-top-left-radius: 12px;
  1054. border-top-right-radius: 12px;
  1055. }
  1056. .avatar-uploader .el-upload {
  1057. border: 1px dashed var(--el-border-color);
  1058. border-radius: 6px;
  1059. cursor: pointer;
  1060. position: relative;
  1061. overflow: hidden;
  1062. transition: var(--el-transition-duration-fast);
  1063. }
  1064. .avatar-uploader .el-upload:hover {
  1065. border-color: var(--el-color-primary);
  1066. }
  1067. .el-icon.avatar-uploader-icon {
  1068. display: block;
  1069. font-size: 36px;
  1070. color: #8c939d;
  1071. background-color: #fafafa;
  1072. width: 120px;
  1073. height: 120px;
  1074. padding-top: 30px;
  1075. box-sizing: border-box;
  1076. border: 1px solid #EDEDED;
  1077. border-radius: 12px;
  1078. text-align: center;
  1079. }
  1080. >p {
  1081. width: 1110px;
  1082. height: 75px;
  1083. strong {
  1084. font-weight: 500;
  1085. color: #333333;
  1086. padding: 0 14px;
  1087. }
  1088. label {
  1089. display: inline-block;
  1090. width: 125px;
  1091. text-align: right;
  1092. padding-right: 10px;
  1093. box-sizing: border-box;
  1094. font-family: Microsoft YaHei, Microsoft YaHei;
  1095. font-weight: 400;
  1096. font-size: 16px;
  1097. color: #333333;
  1098. line-height: 19px;
  1099. font-style: normal;
  1100. text-transform: none;
  1101. }
  1102. >label::before {
  1103. content: "*";
  1104. display: inline-block;
  1105. width: 10px;
  1106. height: 2px;
  1107. color: #fe0101;
  1108. }
  1109. span {
  1110. color: #fe0101;
  1111. display: block;
  1112. padding-left: 135px;
  1113. height: 30px;
  1114. }
  1115. .upload-demo {
  1116. display: inline-block;
  1117. width: 112px;
  1118. height: 112px;
  1119. vertical-align: -93px;
  1120. }
  1121. //上传图片相关样式
  1122. .avatar-uploader .el-upload {
  1123. border: 1px dashed var(--el-border-color);
  1124. border-radius: 6px;
  1125. cursor: pointer;
  1126. position: relative;
  1127. overflow: hidden;
  1128. transition: var(--el-transition-duration-fast);
  1129. }
  1130. .avatar-uploader .el-upload:hover {
  1131. border-color: var(--el-color-primary);
  1132. }
  1133. .el-icon.avatar-uploader-icon {
  1134. font-size: 28px;
  1135. color: #8c939d;
  1136. width: 178px;
  1137. height: 178px;
  1138. text-align: center;
  1139. }
  1140. //上传图片相关样式 end
  1141. :deep(.el-input__wrapper.is-focus) {
  1142. box-shadow: 0 0 0 1px #c0c4cc;
  1143. }
  1144. :deep(.el-date-editor.el-input),
  1145. :deep(.el-date-editor.el-input__wrapper) {
  1146. height: 44px;
  1147. width: 470px;
  1148. }
  1149. :deep(.el-input__inner) {
  1150. font-size: 16px;
  1151. }
  1152. :deep(.el-upload-dragger) {
  1153. padding: 0;
  1154. margin: 0;
  1155. border: 1px solid #ededed;
  1156. }
  1157. :deep(.el-upload-dragger .el-icon--upload) {
  1158. font-size: 67px;
  1159. line-height: 50px;
  1160. padding: 0;
  1161. margin: 0;
  1162. }
  1163. :deep(.el-upload-dragger .el-upload__text) {
  1164. font-size: 18px;
  1165. font-weight: 400;
  1166. color: #999;
  1167. text-align: center;
  1168. margin-bottom: 14px;
  1169. margin-top: 5px;
  1170. }
  1171. :deep(.el-icon svg) {
  1172. width: 34px;
  1173. height: 34px;
  1174. }
  1175. }
  1176. }
  1177. // 2.选择相应网站
  1178. .textTwo {
  1179. width: 1200px;
  1180. overflow: hidden;
  1181. // 页面头部搜索和按钮
  1182. .pageTop {
  1183. width: 1150px;
  1184. height: 44px;
  1185. margin: 30px 0 40px 50px;
  1186. >.left {
  1187. font-family: Microsoft YaHei, Microsoft YaHei;
  1188. font-weight: 400;
  1189. font-size: 16px;
  1190. color: #333333;
  1191. line-height: 19px;
  1192. >a {
  1193. width: 80px;
  1194. height: 21px;
  1195. padding-left: 30px;
  1196. font-family: Microsoft YaHei, Microsoft YaHei;
  1197. font-weight: 400;
  1198. font-size: 16px;
  1199. color: #47ACFF;
  1200. line-height: 19px;
  1201. text-align: left;
  1202. font-style: normal;
  1203. text-transform: none;
  1204. }
  1205. :deep(.el-select__wrapper.is-focused) {
  1206. box-shadow: 0 0 0 1px var(--el-border-color) inset;
  1207. }
  1208. }
  1209. >.right {
  1210. button {
  1211. width: 94px;
  1212. height: 36px;
  1213. line-height: 36px;
  1214. font-family: Microsoft YaHei, Microsoft YaHei;
  1215. font-weight: 400;
  1216. font-size: 16px;
  1217. color: #33B023;
  1218. line-height: 19px;
  1219. text-align: center;
  1220. border: none;
  1221. border-radius: 7px;
  1222. }
  1223. .reset {
  1224. border: 1px solid #33B023;
  1225. color: #33B023;
  1226. background-color: #fff;
  1227. margin-right: 25px;
  1228. }
  1229. .search {
  1230. background-color: #33B023;
  1231. color: #ffffff;
  1232. }
  1233. }
  1234. }
  1235. //示意图
  1236. .my-header {
  1237. display: flex;
  1238. flex-direction: row;
  1239. justify-content: space-between;
  1240. gap: 16px;
  1241. .el-button {
  1242. border-radius: var(--el-border-radius-base);
  1243. font-size: var(--el-font-size-base);
  1244. background: #ee8787;
  1245. border: none;
  1246. }
  1247. }
  1248. .graph {
  1249. background-color: #fff;
  1250. padding: 40px 60px 80px;
  1251. overflow: hidden;
  1252. display: flex;
  1253. li {
  1254. float: left;
  1255. span {
  1256. display: inline-block;
  1257. width: 246px;
  1258. font-family: Microsoft YaHei, Microsoft YaHei;
  1259. font-weight: bold;
  1260. font-size: 16px;
  1261. color: #333333;
  1262. line-height: 30px;
  1263. text-align: center;
  1264. margin-bottom: 15px;
  1265. }
  1266. img {
  1267. width: 246px;
  1268. height: 344px;
  1269. }
  1270. }
  1271. >li:first-child {
  1272. margin-right: 60px;
  1273. }
  1274. >li:last-child {
  1275. margin-left: 60px;
  1276. }
  1277. }
  1278. // 页面中的表格
  1279. .pageTable {
  1280. width: 100%;
  1281. overflow: hidden;
  1282. padding-bottom: 60px;
  1283. :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
  1284. background-color: #333;
  1285. border-color: #333;
  1286. }
  1287. :deep(.el-table tr) {
  1288. background-color: #fafafa;
  1289. height: 74px;
  1290. }
  1291. :deep(.el-table .cell) {
  1292. text-align: center;
  1293. box-sizing: border-box;
  1294. height: 23px;
  1295. line-height: 23px;
  1296. overflow-wrap: break-word;
  1297. padding: 0 12px;
  1298. text-overflow: ellipsis;
  1299. white-space: normal;
  1300. font-family: Microsoft YaHei, Microsoft YaHei;
  1301. font-weight: 400;
  1302. font-size: 16px;
  1303. color: #333333;
  1304. line-height: 19px;
  1305. font-style: normal;
  1306. text-transform: none;
  1307. }
  1308. }
  1309. // 页码
  1310. .pagination {
  1311. display: flex;
  1312. justify-content: center;
  1313. // margin-top: 60px;
  1314. margin-bottom: 90px;
  1315. // 鼠标移入后字体颜色
  1316. :deep(.el-pagination:hover) {
  1317. color: #139609;
  1318. }
  1319. :deep(.el-pagination.is-background .btn-next),
  1320. :deep(.el-pagination.is-background .btn-prev) {
  1321. width: 70px;
  1322. height: 34px;
  1323. margin: 0px 10px;
  1324. border-radius: 4px;
  1325. }
  1326. :deep(.el-pagination.is-background .el-pager li) {
  1327. margin: 0px 10px;
  1328. width: 38px;
  1329. height: 34px;
  1330. border-radius: 4px;
  1331. }
  1332. :deep(.el-pagination.is-background .btn-next.is-active),
  1333. :deep(.el-pagination.is-background .btn-prev.is-active),
  1334. :deep(.el-pagination.is-background .el-pager li.is-active) {
  1335. background-color: #028e21;
  1336. color: #fff;
  1337. }
  1338. }
  1339. }
  1340. // 3.提交工单信息
  1341. .submit {
  1342. width: 1200px;
  1343. overflow: hidden;
  1344. text-align: center;
  1345. .inner {
  1346. width: 1100px;
  1347. padding-left: 50px;
  1348. padding-bottom: 130px;
  1349. font-family: Microsoft YaHei, Microsoft YaHei;
  1350. font-style: normal;
  1351. text-transform: none;
  1352. // 标题
  1353. >h1 {
  1354. margin-top: 80px;
  1355. margin-bottom: 30px;
  1356. font-weight: bold;
  1357. font-size: 26px;
  1358. color: #333333;
  1359. line-height: 30px;
  1360. text-align: center;
  1361. }
  1362. // 工单编号
  1363. >p {
  1364. margin-bottom: 257px;
  1365. font-weight: 400;
  1366. font-size: 22px;
  1367. color: #333333;
  1368. text-align: center;
  1369. }
  1370. // 按钮
  1371. >.btn {
  1372. margin-bottom: 30px;
  1373. button {
  1374. width: 134px;
  1375. height: 50px;
  1376. border: none;
  1377. font-weight: 400;
  1378. font-size: 16px;
  1379. text-align: center;
  1380. border-radius: 7px;
  1381. }
  1382. .check {
  1383. background-color: #fff;
  1384. color: #33B023;
  1385. border: 1px solid #33B023;
  1386. margin-right: 160px;
  1387. }
  1388. .apply {
  1389. background-color: #33B023;
  1390. color: #fff;
  1391. }
  1392. }
  1393. // 提示文字
  1394. >span {
  1395. font-weight: 400;
  1396. font-size: 14px;
  1397. color: #999999;
  1398. }
  1399. }
  1400. }
  1401. }
  1402. }
  1403. }
  1404. //工单列表
  1405. #orderList {
  1406. width: 1200px;
  1407. margin: 0 auto;
  1408. }
  1409. }
  1410. //广告页面底部部分
  1411. .bottom {
  1412. width: 1200px;
  1413. height: 145px;
  1414. background-color: #ecf5ee;
  1415. padding: 0px 30px;
  1416. margin: 0 auto;
  1417. box-sizing: border-box;
  1418. // display: none;
  1419. .inner {
  1420. width: 1200px;
  1421. height: 145px;
  1422. padding: 0;
  1423. .amount {
  1424. float: left;
  1425. padding-top: 52px;
  1426. font-family: Microsoft YaHei, Microsoft YaHei;
  1427. font-weight: 400;
  1428. font-size: 16px;
  1429. color: #333333;
  1430. line-height: 19px;
  1431. text-align: left;
  1432. font-style: normal;
  1433. text-transform: none;
  1434. span {
  1435. padding: 0 15px 0 25px;
  1436. font-family: Microsoft YaHei, Microsoft YaHei;
  1437. font-weight: bold;
  1438. font-size: 24px;
  1439. color: #028E21;
  1440. line-height: 28px;
  1441. text-align: left;
  1442. font-style: normal;
  1443. text-transform: none;
  1444. }
  1445. }
  1446. .btn {
  1447. float: right;
  1448. margin-right: 60px;
  1449. .btn1 {
  1450. width: 115px;
  1451. height: 40px;
  1452. font-size: 16px;
  1453. background-color: #ffffff;
  1454. color: #028e21;
  1455. border: 1px solid #028e21;
  1456. border-radius: 6px;
  1457. margin-right: 50px;
  1458. margin-top: 53px;
  1459. }
  1460. .btn2 {
  1461. width: 115px;
  1462. height: 40px;
  1463. font-size: 16px;
  1464. background-color: #028e21;
  1465. color: #ffffff;
  1466. border: none;
  1467. border-radius: 6px;
  1468. margin: 53px 0;
  1469. }
  1470. }
  1471. }
  1472. }
  1473. }
  1474. .dialogPicBox {
  1475. img {
  1476. width: 1200px;
  1477. }
  1478. }
  1479. /deep/.el-carousel__indicators .el-carousel__indicator button {
  1480. width: 12px; /* 宽度 */
  1481. height: 12px; /* 高度 */
  1482. border-radius: 50%; /* 圆形 */
  1483. background-color: #999;
  1484. }
  1485. /* 可选:更改当前项指示器的颜色 */
  1486. /deep/.el-carousel__indicators .el-carousel__indicator.is-active button {
  1487. background-color: #028e21; /* 当前项颜色 */
  1488. }
  1489. </style>
  1490. <style lang="less" scoped>
  1491. @media screen and (min-width:801px){/*pc*/
  1492. .pc_none{display:none;}
  1493. }
  1494. @media screen and (max-width:800px){/*ipad_phone*/
  1495. .adtips{height:auto;line-height:normal;}
  1496. .adtips .inner{width:92%;height:auto;}
  1497. .adtips p{line-height:22px;display:block;margin:5px auto;}
  1498. .advertising .inner{width:92%;}
  1499. //选项卡-按钮
  1500. /deep/.el-tabs__header {
  1501. // display:none;
  1502. }
  1503. /deep/.el-tabs {
  1504. display:block;position:relative;
  1505. padding-top:111px;
  1506. }
  1507. /deep/.el-tabs__header {
  1508. position:absolute;left:0px;top:0px;border-bottom:1px solid #D9D9D9;
  1509. height:50px!important;
  1510. margin:10px 0px 0px 0px!important;display:block;width:100%;
  1511. }
  1512. /deep/.el-tabs__nav-prev{display:none;}
  1513. /deep/.el-tabs__nav-next{display:none;}
  1514. /deep/.el-tabs__nav-wrap{width:100%;height:100%;padding:0!important;}
  1515. /deep/.el-tabs__nav-scroll{width:100%;height:100%;padding:0!important;}
  1516. /deep/.el-tabs__nav{width:100%;height:100%;padding:0!important;display:block;}
  1517. /deep/.el-tabs__item{float:left; height:100%;line-height:50px;font-size:18px!important;}
  1518. /deep/.el-tabs__active-bar{display:none;}
  1519. /deep/.el-tabs__nav .is-active{ font-weight:bold;box-sizing:border-box;border-bottom:solid 2px #139602;padding:0px 11px;}
  1520. /deep/.el-tabs--left .el-tabs__nav-wrap.is-left:after{display:none;}
  1521. .advertising .inner #buyAd{width:100%;margin:10px 0px;}
  1522. .advertising .inner #buyAd .buyAD {width:100%; }
  1523. .advertising .inner #buyAd .buyAD .inner{width:100%;margin:0;}
  1524. .advertising .inner #buyAd .buyAD .inner .textOne{width:100%;margin:0;}
  1525. /deep/.el-form{width:100%;}
  1526. .advertising .inner #buyAd .buyAD .inner .textOne .pic{margin-left:8px;padding-left:8px;}
  1527. /deep/.el-form-item{width:100%;display:block;}
  1528. /deep/.el-form-item__label{display:block;font-size:16px;}
  1529. /deep/.el-form-item__content{width:100%;}
  1530. .advertising .inner #buyAd .buyAD .inner .textOne .pageTable{margin:0;width:100%;}
  1531. /deep/.el-input__wrapper{box-shadow:0 0 0 0px;border-bottom:1px solid #D9D9D9;border-radius:0px;}
  1532. /deep/.el-input__inner{font-size:14px;}
  1533. .advertising .inner #buyAd .buyAD .inner .textOne .avatar-uploader{width:88px;height:88px;overflow:hidden;margin-top:10px;}
  1534. /deep/.el-upload{width:88px;height:88px;overflow:hidden;}
  1535. /deep/.el-upload>div{width:100%;height:100%;}
  1536. .advertising .inner #buyAd .buyAD .inner .textOne .el-icon.avatar-uploader-icon{width:100%;height:100%;padding-top:10px;}
  1537. /deep/.el-icon svg{width:22px;height:22px;}
  1538. .advertising .bottom{width:100%;padding:0;height:auto;padding:10px 0px;margin-bottom:20px;}
  1539. .advertising .bottom .inner{width:92%;margin:10px auto;height:auto;}
  1540. .advertising .bottom .inner .amount{padding-top:0px;font-size:16px;}
  1541. .advertising .bottom .inner .amount span {font-size:18px;padding:0px 10px;}
  1542. .advertising .bottom .inner .btn{float:right;margin:0;}
  1543. .advertising .bottom .inner .btn .btn2{width:auto;display:block;
  1544. font-size:14px;margin:0px;padding:0px 8px;height:28px;line-height:18px;}
  1545. .phone_advertis_box{border:solid 1px #ebeef5; }
  1546. .phone_advertis_head{height:55px;text-align:center;background:#fafafa;}
  1547. .phone_advertis_head_li{display:inline-block;height:100%;line-height:55px;text-align:center;
  1548. color:#333;font-size:16px; padding:0px 2.5vw;}
  1549. .phone_advertis_text{color:#909399;font-size:14px;text-align:center;padding:15px 0px;
  1550. border-top:solid 1px #ebeef5; }
  1551. .phone_advertis_ul{ width:100%;display:block;margin-top:11px;}
  1552. .phone_advertis_li{width:100%;display:block;overflow:hidden;
  1553. padding-left:33px;
  1554. position:relative;
  1555. margin-bottom:11px;
  1556. width:100%;box-sizing:border-box;
  1557. .phone_advertis_li_in{width:100%;height:100%;border:solid 1px #ccc;
  1558. border-radius:5px;box-sizing:border-box;
  1559. padding:10px 10px 0px;
  1560. }
  1561. .phone_advertis_li_tip{display:flex;overflow:hidden;margin-bottom:22px;}
  1562. .phone_advertis_li_label{width:100px;margin-right:8px;color:#909399;font-size:16px;line-height:22px;height:22px;}
  1563. .phone_advertis_li_text{flex:1;line-height:22px;color:#333;font-size:16px;}
  1564. }
  1565. .phone_advertis_li_btn{overflow:hidden;
  1566. position:absolute;width:22px;height:22px;
  1567. left:0px;top:11px;border:solid 2px #ccc;border-radius:50%;
  1568. box-sizing:border-box;
  1569. }
  1570. /deep/.el-checkbox__input{display:block;width:100%;height:100%;border-radius:50%;}
  1571. /deep/.el-checkbox__inner{display:block;width:100%;height:100%;border-radius:50%;}
  1572. /deep/.el-checkbox__input.is-checked .el-checkbox__inner{background:url(../../public/image/8.png) no-repeat left top #139602;
  1573. background-size:100% 100%; border-color:#139602;}
  1574. /deep/.el-checkbox__input.is-checked .el-checkbox__inner:after{display:none;}
  1575. /deep/.is-checked.phone_advertis_li_btn{border-color:#139602;}
  1576. /deep/.el-checkbox__inner:hover{border:0;}
  1577. .phone_none{display:none;}
  1578. }
  1579. </style>