index.vue 61 KB

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