index.vue 65 KB

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