index.vue 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772
  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. const websiteId = ref("")
  715. //4.获得站点基本信息
  716. const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
  717. method: 'GET',
  718. query: {
  719. 'link_textnum':24,
  720. 'link_imgnum':18,
  721. 'link_footnum':4
  722. },
  723. });
  724. if (responseStatus.code == 200) {
  725. if(responseStatus.data.website_foot.foot_info.status == 1){
  726. //网站模板已停用,直接转入404页面
  727. navigateTo('/error?findPage=index')
  728. }else{
  729. //4.1设置站点基本信息
  730. templateBaseStore.setWebSiteInfo(responseStatus.data)
  731. websiteId.value = responseStatus.data.website_head.id;
  732. //4.2设置皮肤id
  733. skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
  734. //4.3设置seo
  735. useSeoMeta({
  736. title: "广告服务" + "_" + "三农资讯网_全国政务信息一体化应用平台",
  737. meta: [
  738. { name: 'description', content: "三农资讯网以服务于党和国家各级职能部门三农政务资讯发布及政务公开信息公示为基点,为全国县级以上各级党政机关及其职能部门配置各自公开独立网络发布平台。主要频道有:三农政务资讯,农科资讯,农资购销,农产购销,农贸资讯,三农致富信息,农村文化生活,三农政策法规,三农之窗,三农调查,三农服务,三农知识,农民工,打假维权等。三农资讯网打造最具影响力的三农信息发布平台,并成为最具权威的三农资讯网。_三农资讯网-测试专用_全国政务信息一体化应用平台" , tagPriority: 10 },
  739. { name: 'keywords', content: "三农资讯,农业,三农,三农在线,农业新闻,三农资讯网_三农资讯网-测试专用_全国政务信息一体化应用平台" , tagPriority: 10 }
  740. ]
  741. });
  742. }
  743. }
  744. //2.获得广告池
  745. const adData = ref([]);
  746. const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
  747. method: 'GET',
  748. query: {},
  749. });
  750. if (adResponseStatus.code == 200) {
  751. templateBaseStore.setAdList(adResponseStatus.data)
  752. adData.value = adResponseStatus.data;
  753. }
  754. //3.是否使用了搜索页
  755. const response = await requestDataPromise('/client/indexData', {
  756. method: 'POST',
  757. body: {
  758. 'website_id':websiteId.value,
  759. 'getpage':'article'
  760. },
  761. });
  762. if(response.code == 200){
  763. //是否启用搜索功能
  764. templateBaseStore.setIsSearch(response.data.isSearch)
  765. }
  766. //自助建站 end---------------------------------------->
  767. </script>
  768. <style lang="less" scoped>
  769. // 广告页面头部
  770. .head {
  771. width: 100%;
  772. padding: 15px 0;
  773. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  774. .inner {
  775. width: 1200px;
  776. height: 27px;
  777. }
  778. .headLogo {
  779. .webName {
  780. display: inline-block;
  781. span {
  782. margin-right: 30px;
  783. font-family: Microsoft YaHei, Microsoft YaHei;
  784. font-weight: 400;
  785. font-size: 12px;
  786. color: #666666;
  787. line-height: 14px;
  788. text-align: left;
  789. font-style: normal;
  790. text-transform: none;
  791. }
  792. }
  793. >span {
  794. display: inline-block;
  795. width: 100px;
  796. padding-left: 25px;
  797. vertical-align: middle;
  798. font-family: Microsoft YaHei, Microsoft YaHei;
  799. font-weight: 400;
  800. font-size: 12px;
  801. color: #333333;
  802. line-height: 21px;
  803. text-align: left;
  804. font-style: normal;
  805. text-transform: none;
  806. border-left: 1px solid #ccc;
  807. }
  808. }
  809. .right {
  810. span {
  811. margin-left: 26px;
  812. font-family: PingFang SC, PingFang SC;
  813. font-weight: 400;
  814. font-size: 12px;
  815. color: #666666;
  816. line-height: 14px;
  817. text-align: left;
  818. font-style: normal;
  819. text-transform: none;
  820. }
  821. .login,
  822. .reg,
  823. .user,
  824. .topic,
  825. .ad {
  826. display: inline-block;
  827. width: 16px;
  828. height: 16px;
  829. vertical-align: -6px;
  830. }
  831. .topic {
  832. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/shopping-mall.png") no-repeat;
  833. }
  834. .ad {
  835. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/ad-product.png") no-repeat;
  836. }
  837. .login {
  838. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/user.png") no-repeat;
  839. }
  840. .reg {
  841. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/write.png") no-repeat;
  842. }
  843. .user {
  844. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/ad/user.png") no-repeat;
  845. }
  846. }
  847. .tips1 {
  848. padding: 20px 0;
  849. text-align: center;
  850. font-size: 20px;
  851. color: #40663B;
  852. font-weight: bold;
  853. img {
  854. width: 78px;
  855. height: 78px;
  856. vertical-align: middle;
  857. margin-right: 20px;
  858. p {
  859. line-height: 30px;
  860. }
  861. }
  862. p {
  863. line-height: 40px;
  864. }
  865. >p:first-child {
  866. margin-bottom: 30px;
  867. }
  868. }
  869. }
  870. //提示信息
  871. .adtips {
  872. width: 100%;
  873. height: 40px;
  874. //line-height: 70px;
  875. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  876. .inner {
  877. width: 1200px;
  878. height: 40px;
  879. }
  880. p {
  881. font-family: Microsoft YaHei, Microsoft YaHei;
  882. font-weight: 400;
  883. font-size: 16px;
  884. color: #FE0101;
  885. // line-height: 19px;
  886. text-align: left;
  887. font-style: normal;
  888. text-transform: none;
  889. }
  890. }
  891. .advertising {
  892. width: 100%;
  893. overflow: hidden;
  894. .inner {
  895. width: 1520px;
  896. // height: 900px;
  897. overflow: hidden;
  898. position: relative;
  899. // 左侧tab导航
  900. :deep(.el-tabs--left .el-tabs__header.is-left) {
  901. margin-top: 50px;
  902. margin-right: 10px;
  903. }
  904. // 左侧tab导航字体颜色
  905. :deep(.el-tabs__item.is-active),
  906. :deep(.el-tabs__item:hover) {
  907. color: #139602;
  908. // font-weight: bold;
  909. }
  910. // 左侧tab导航字体大小
  911. :deep(.el-tabs--left .el-tabs__item.is-left) {
  912. text-align: right;
  913. font-size: 20px;
  914. }
  915. // 左侧tab导航下划线
  916. :deep(.el-tabs__active-bar) {
  917. background-color: #139602;
  918. }
  919. // 广告购买
  920. #buyAd {
  921. width: 1200px;
  922. margin: 0 35px;
  923. .buyAD {
  924. width: 1200px;
  925. overflow: hidden;
  926. .inner {
  927. width: 1200px;
  928. overflow: hidden;
  929. position: relative;
  930. // 填写信息页tab标题
  931. .tabTitle {
  932. width: 1100px;
  933. height: 80px;
  934. padding-top: 26px;
  935. margin: 0 auto;
  936. box-sizing: border-box;
  937. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  938. .icon,
  939. .title {
  940. font-family: Microsoft YaHei, Microsoft YaHei;
  941. font-weight: bold;
  942. font-size: 16px;
  943. color: #D5D5D5;
  944. text-align: center;
  945. font-style: normal;
  946. text-transform: none;
  947. }
  948. .number {
  949. display: inline-block;
  950. width: 32px;
  951. height: 32px;
  952. line-height: 32px;
  953. color: #ffffff;
  954. background-color: #d5d5d5;
  955. border-radius: 50%;
  956. }
  957. .bgc {
  958. background-color: #139602;
  959. }
  960. .color {
  961. color: #139602;
  962. }
  963. // 填写广告信息字体及背景颜色
  964. .title:first-child {
  965. color: #139602;
  966. }
  967. .title:first-child .number {
  968. background-color: #139602;
  969. }
  970. // 图标>>
  971. .icon {
  972. padding: 0 165px;
  973. }
  974. }
  975. // 1.填写信息内容
  976. .textOne {
  977. width: 1100px;
  978. overflow: hidden;
  979. // height: 515px;
  980. margin-top: 35px;
  981. margin-left: 50px;
  982. .pic {
  983. margin-left: 30px;
  984. width: 80px;
  985. height: 21px;
  986. padding-left: 30px;
  987. font-family: Microsoft YaHei, Microsoft YaHei;
  988. font-weight: 400;
  989. font-size: 16px;
  990. color: #47ACFF;
  991. line-height: 19px;
  992. text-align: left;
  993. font-style: normal;
  994. text-transform: none;
  995. cursor: pointer;
  996. }
  997. //示意图
  998. .my-header {
  999. display: flex;
  1000. flex-direction: row;
  1001. justify-content: space-between;
  1002. gap: 16px;
  1003. .el-button {
  1004. border-radius: var(--el-border-radius-base);
  1005. font-size: var(--el-font-size-base);
  1006. background: #ee8787;
  1007. border: none;
  1008. }
  1009. }
  1010. .graph {
  1011. background-color: #fff;
  1012. padding: 40px 60px 80px;
  1013. overflow: hidden;
  1014. display: flex;
  1015. li {
  1016. float: left;
  1017. span {
  1018. display: inline-block;
  1019. width: 246px;
  1020. font-family: Microsoft YaHei, Microsoft YaHei;
  1021. font-weight: bold;
  1022. font-size: 16px;
  1023. color: #333333;
  1024. line-height: 30px;
  1025. text-align: center;
  1026. margin-bottom: 15px;
  1027. }
  1028. img {
  1029. width: 246px;
  1030. height: 344px;
  1031. }
  1032. }
  1033. >li:first-child {
  1034. margin-right: 60px;
  1035. }
  1036. >li:last-child {
  1037. margin-left: 60px;
  1038. }
  1039. }
  1040. // 页面中的表格
  1041. .pageTable {
  1042. width: 90%;
  1043. overflow: hidden;
  1044. padding-bottom: 60px;
  1045. margin-left: 110px;
  1046. box-sizing: border-box;
  1047. :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
  1048. background-color: #333;
  1049. border-color: #333;
  1050. }
  1051. :deep(.el-table tr) {
  1052. background-color: #fafafa;
  1053. height: 74px;
  1054. }
  1055. :deep(.el-table .cell) {
  1056. text-align: center;
  1057. box-sizing: border-box;
  1058. height: 23px;
  1059. line-height: 23px;
  1060. overflow-wrap: break-word;
  1061. padding: 0 12px;
  1062. text-overflow: ellipsis;
  1063. white-space: normal;
  1064. font-family: Microsoft YaHei, Microsoft YaHei;
  1065. font-weight: 400;
  1066. font-size: 16px;
  1067. color: #333333;
  1068. line-height: 19px;
  1069. font-style: normal;
  1070. text-transform: none;
  1071. }
  1072. }
  1073. :deep(.el-select) {
  1074. --el-select-width: 30%;
  1075. }
  1076. :deep(.el-form-item) {
  1077. margin-bottom: 35px;
  1078. }
  1079. .el-col {
  1080. height: 36px;
  1081. }
  1082. .el-col-2 {
  1083. text-align: center;
  1084. }
  1085. .chooseImg {
  1086. display: block;
  1087. }
  1088. .chooseImgDiv {
  1089. font-size: 16px;
  1090. font-style: normal;
  1091. }
  1092. .avatar-uploader {
  1093. width: 120px;
  1094. height: 120px;
  1095. border: 1px solid #ededed;
  1096. border-radius: 12px;
  1097. }
  1098. .avatar-uploader .avatar {
  1099. width: 120px;
  1100. border-top-left-radius: 12px;
  1101. border-top-right-radius: 12px;
  1102. }
  1103. .avatar-uploader .el-upload {
  1104. border: 1px dashed var(--el-border-color);
  1105. border-radius: 6px;
  1106. cursor: pointer;
  1107. position: relative;
  1108. overflow: hidden;
  1109. transition: var(--el-transition-duration-fast);
  1110. }
  1111. .avatar-uploader .el-upload:hover {
  1112. border-color: var(--el-color-primary);
  1113. }
  1114. .el-icon.avatar-uploader-icon {
  1115. display: block;
  1116. font-size: 36px;
  1117. color: #8c939d;
  1118. background-color: #fafafa;
  1119. width: 120px;
  1120. height: 120px;
  1121. padding-top: 30px;
  1122. box-sizing: border-box;
  1123. border: 1px solid #EDEDED;
  1124. border-radius: 12px;
  1125. text-align: center;
  1126. }
  1127. >p {
  1128. width: 1110px;
  1129. height: 75px;
  1130. strong {
  1131. font-weight: 500;
  1132. color: #333333;
  1133. padding: 0 14px;
  1134. }
  1135. label {
  1136. display: inline-block;
  1137. width: 125px;
  1138. text-align: right;
  1139. padding-right: 10px;
  1140. box-sizing: border-box;
  1141. font-family: Microsoft YaHei, Microsoft YaHei;
  1142. font-weight: 400;
  1143. font-size: 16px;
  1144. color: #333333;
  1145. line-height: 19px;
  1146. font-style: normal;
  1147. text-transform: none;
  1148. }
  1149. >label::before {
  1150. content: "*";
  1151. display: inline-block;
  1152. width: 10px;
  1153. height: 2px;
  1154. color: #fe0101;
  1155. }
  1156. span {
  1157. color: #fe0101;
  1158. display: block;
  1159. padding-left: 135px;
  1160. height: 30px;
  1161. }
  1162. .upload-demo {
  1163. display: inline-block;
  1164. width: 112px;
  1165. height: 112px;
  1166. vertical-align: -93px;
  1167. }
  1168. //上传图片相关样式
  1169. .avatar-uploader .el-upload {
  1170. border: 1px dashed var(--el-border-color);
  1171. border-radius: 6px;
  1172. cursor: pointer;
  1173. position: relative;
  1174. overflow: hidden;
  1175. transition: var(--el-transition-duration-fast);
  1176. }
  1177. .avatar-uploader .el-upload:hover {
  1178. border-color: var(--el-color-primary);
  1179. }
  1180. .el-icon.avatar-uploader-icon {
  1181. font-size: 28px;
  1182. color: #8c939d;
  1183. width: 178px;
  1184. height: 178px;
  1185. text-align: center;
  1186. }
  1187. //上传图片相关样式 end
  1188. :deep(.el-input__wrapper.is-focus) {
  1189. box-shadow: 0 0 0 1px #c0c4cc;
  1190. }
  1191. :deep(.el-date-editor.el-input),
  1192. :deep(.el-date-editor.el-input__wrapper) {
  1193. height: 44px;
  1194. width: 470px;
  1195. }
  1196. :deep(.el-input__inner) {
  1197. font-size: 16px;
  1198. }
  1199. :deep(.el-upload-dragger) {
  1200. padding: 0;
  1201. margin: 0;
  1202. border: 1px solid #ededed;
  1203. }
  1204. :deep(.el-upload-dragger .el-icon--upload) {
  1205. font-size: 67px;
  1206. line-height: 50px;
  1207. padding: 0;
  1208. margin: 0;
  1209. }
  1210. :deep(.el-upload-dragger .el-upload__text) {
  1211. font-size: 18px;
  1212. font-weight: 400;
  1213. color: #999;
  1214. text-align: center;
  1215. margin-bottom: 14px;
  1216. margin-top: 5px;
  1217. }
  1218. :deep(.el-icon svg) {
  1219. width: 34px;
  1220. height: 34px;
  1221. }
  1222. }
  1223. }
  1224. // 2.选择相应网站
  1225. .textTwo {
  1226. width: 1200px;
  1227. overflow: hidden;
  1228. // 页面头部搜索和按钮
  1229. .pageTop {
  1230. width: 1150px;
  1231. height: 44px;
  1232. margin: 30px 0 40px 50px;
  1233. >.left {
  1234. font-family: Microsoft YaHei, Microsoft YaHei;
  1235. font-weight: 400;
  1236. font-size: 16px;
  1237. color: #333333;
  1238. line-height: 19px;
  1239. >a {
  1240. width: 80px;
  1241. height: 21px;
  1242. padding-left: 30px;
  1243. font-family: Microsoft YaHei, Microsoft YaHei;
  1244. font-weight: 400;
  1245. font-size: 16px;
  1246. color: #47ACFF;
  1247. line-height: 19px;
  1248. text-align: left;
  1249. font-style: normal;
  1250. text-transform: none;
  1251. }
  1252. :deep(.el-select__wrapper.is-focused) {
  1253. box-shadow: 0 0 0 1px var(--el-border-color) inset;
  1254. }
  1255. }
  1256. >.right {
  1257. button {
  1258. width: 94px;
  1259. height: 36px;
  1260. line-height: 36px;
  1261. font-family: Microsoft YaHei, Microsoft YaHei;
  1262. font-weight: 400;
  1263. font-size: 16px;
  1264. color: #33B023;
  1265. line-height: 19px;
  1266. text-align: center;
  1267. border: none;
  1268. border-radius: 7px;
  1269. }
  1270. .reset {
  1271. border: 1px solid #33B023;
  1272. color: #33B023;
  1273. background-color: #fff;
  1274. margin-right: 25px;
  1275. }
  1276. .search {
  1277. background-color: #33B023;
  1278. color: #ffffff;
  1279. }
  1280. }
  1281. }
  1282. //示意图
  1283. .my-header {
  1284. display: flex;
  1285. flex-direction: row;
  1286. justify-content: space-between;
  1287. gap: 16px;
  1288. .el-button {
  1289. border-radius: var(--el-border-radius-base);
  1290. font-size: var(--el-font-size-base);
  1291. background: #ee8787;
  1292. border: none;
  1293. }
  1294. }
  1295. .graph {
  1296. background-color: #fff;
  1297. padding: 40px 60px 80px;
  1298. overflow: hidden;
  1299. display: flex;
  1300. li {
  1301. float: left;
  1302. span {
  1303. display: inline-block;
  1304. width: 246px;
  1305. font-family: Microsoft YaHei, Microsoft YaHei;
  1306. font-weight: bold;
  1307. font-size: 16px;
  1308. color: #333333;
  1309. line-height: 30px;
  1310. text-align: center;
  1311. margin-bottom: 15px;
  1312. }
  1313. img {
  1314. width: 246px;
  1315. height: 344px;
  1316. }
  1317. }
  1318. >li:first-child {
  1319. margin-right: 60px;
  1320. }
  1321. >li:last-child {
  1322. margin-left: 60px;
  1323. }
  1324. }
  1325. // 页面中的表格
  1326. .pageTable {
  1327. width: 100%;
  1328. overflow: hidden;
  1329. padding-bottom: 60px;
  1330. :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
  1331. background-color: #333;
  1332. border-color: #333;
  1333. }
  1334. :deep(.el-table tr) {
  1335. background-color: #fafafa;
  1336. height: 74px;
  1337. }
  1338. :deep(.el-table .cell) {
  1339. text-align: center;
  1340. box-sizing: border-box;
  1341. height: 23px;
  1342. line-height: 23px;
  1343. overflow-wrap: break-word;
  1344. padding: 0 12px;
  1345. text-overflow: ellipsis;
  1346. white-space: normal;
  1347. font-family: Microsoft YaHei, Microsoft YaHei;
  1348. font-weight: 400;
  1349. font-size: 16px;
  1350. color: #333333;
  1351. line-height: 19px;
  1352. font-style: normal;
  1353. text-transform: none;
  1354. }
  1355. }
  1356. // 页码
  1357. .pagination {
  1358. display: flex;
  1359. justify-content: center;
  1360. // margin-top: 60px;
  1361. margin-bottom: 90px;
  1362. // 鼠标移入后字体颜色
  1363. :deep(.el-pagination:hover) {
  1364. color: #139609;
  1365. }
  1366. :deep(.el-pagination.is-background .btn-next),
  1367. :deep(.el-pagination.is-background .btn-prev) {
  1368. width: 70px;
  1369. height: 34px;
  1370. margin: 0px 10px;
  1371. border-radius: 4px;
  1372. }
  1373. :deep(.el-pagination.is-background .el-pager li) {
  1374. margin: 0px 10px;
  1375. width: 38px;
  1376. height: 34px;
  1377. border-radius: 4px;
  1378. }
  1379. :deep(.el-pagination.is-background .btn-next.is-active),
  1380. :deep(.el-pagination.is-background .btn-prev.is-active),
  1381. :deep(.el-pagination.is-background .el-pager li.is-active) {
  1382. background-color: #028e21;
  1383. color: #fff;
  1384. }
  1385. }
  1386. }
  1387. // 3.提交工单信息
  1388. .submit {
  1389. width: 1200px;
  1390. overflow: hidden;
  1391. text-align: center;
  1392. .inner {
  1393. width: 1100px;
  1394. padding-left: 50px;
  1395. padding-bottom: 130px;
  1396. font-family: Microsoft YaHei, Microsoft YaHei;
  1397. font-style: normal;
  1398. text-transform: none;
  1399. // 标题
  1400. >h1 {
  1401. margin-top: 80px;
  1402. margin-bottom: 30px;
  1403. font-weight: bold;
  1404. font-size: 26px;
  1405. color: #333333;
  1406. line-height: 30px;
  1407. text-align: center;
  1408. }
  1409. // 工单编号
  1410. >p {
  1411. margin-bottom: 257px;
  1412. font-weight: 400;
  1413. font-size: 22px;
  1414. color: #333333;
  1415. text-align: center;
  1416. }
  1417. // 按钮
  1418. >.btn {
  1419. margin-bottom: 30px;
  1420. button {
  1421. width: 134px;
  1422. height: 50px;
  1423. border: none;
  1424. font-weight: 400;
  1425. font-size: 16px;
  1426. text-align: center;
  1427. border-radius: 7px;
  1428. }
  1429. .check {
  1430. background-color: #fff;
  1431. color: #33B023;
  1432. border: 1px solid #33B023;
  1433. margin-right: 160px;
  1434. }
  1435. .apply {
  1436. background-color: #33B023;
  1437. color: #fff;
  1438. }
  1439. }
  1440. // 提示文字
  1441. >span {
  1442. font-weight: 400;
  1443. font-size: 14px;
  1444. color: #999999;
  1445. }
  1446. }
  1447. }
  1448. }
  1449. }
  1450. }
  1451. //工单列表
  1452. #orderList {
  1453. width: 1200px;
  1454. margin: 0 auto;
  1455. }
  1456. }
  1457. //广告页面底部部分
  1458. .bottom {
  1459. width: 1200px;
  1460. height: 145px;
  1461. background-color: #ecf5ee;
  1462. padding: 0px 30px;
  1463. margin: 0 auto;
  1464. box-sizing: border-box;
  1465. margin-bottom: 30px;
  1466. // display: none;
  1467. .inner {
  1468. width: 1200px;
  1469. height: 145px;
  1470. padding: 0;
  1471. .amount {
  1472. float: left;
  1473. padding-top: 52px;
  1474. font-family: Microsoft YaHei, Microsoft YaHei;
  1475. font-weight: 400;
  1476. font-size: 16px;
  1477. color: #333333;
  1478. line-height: 19px;
  1479. text-align: left;
  1480. font-style: normal;
  1481. text-transform: none;
  1482. span {
  1483. padding: 0 15px 0 25px;
  1484. font-family: Microsoft YaHei, Microsoft YaHei;
  1485. font-weight: bold;
  1486. font-size: 24px;
  1487. color: #028E21;
  1488. line-height: 28px;
  1489. text-align: left;
  1490. font-style: normal;
  1491. text-transform: none;
  1492. }
  1493. }
  1494. .btn {
  1495. float: right;
  1496. margin-right: 60px;
  1497. .btn1 {
  1498. width: 115px;
  1499. height: 40px;
  1500. font-size: 16px;
  1501. background-color: #ffffff;
  1502. color: #028e21;
  1503. border: 1px solid #028e21;
  1504. border-radius: 6px;
  1505. margin-right: 50px;
  1506. margin-top: 53px;
  1507. }
  1508. .btn2 {
  1509. width: 115px;
  1510. height: 40px;
  1511. font-size: 16px;
  1512. background-color: #028e21;
  1513. color: #ffffff;
  1514. border: none;
  1515. border-radius: 6px;
  1516. margin: 53px 0;
  1517. }
  1518. }
  1519. }
  1520. }
  1521. }
  1522. .dialogPicBox {
  1523. img {
  1524. width: 1200px;
  1525. }
  1526. }
  1527. :deep(.el-carousel__indicators .el-carousel__indicator button) {
  1528. width: 12px; /* 宽度 */
  1529. height: 12px; /* 高度 */
  1530. border-radius: 50%; /* 圆形 */
  1531. background-color: #999;
  1532. }
  1533. :deep(.el-carousel__indicators .el-carousel__indicator.is-active button) {
  1534. background-color: #028e21; /* 当前项颜色 */
  1535. }
  1536. </style>