index.vue 62 KB

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