index.vue 62 KB

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