index.vue 64 KB

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