index.vue 62 KB

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