index.vue 65 KB

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