index.vue 61 KB

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