advertisement.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <div>
  3. <div class="container">
  4. <div class="container-box">
  5. <h2 class="font-ui">素材库</h2>
  6. <div class="adv-type">
  7. <div
  8. v-for="item in typeList"
  9. :key="item.dataCode"
  10. @click="advmaterial(item)"
  11. >
  12. <span><i class="el-icon-folder-opened"></i></span>
  13. <span>{{ item.dataName }}</span>
  14. </div>
  15. </div>
  16. <h2 class="font-ui" style="margin-top: 20px">广告管理</h2>
  17. <div class="adv-box">
  18. <div class="adv-tit" @click="jumpadv('0')">
  19. <i class="el-icon-time"></i>
  20. <span
  21. >待审批
  22. <!-- <em>{{ info.approvalNum || 0 }}</em> -->
  23. </span
  24. >
  25. </div>
  26. <div class="adv-tit" @click="jumpadv('1')">
  27. <i class="el-icon-time"></i>
  28. <span
  29. >已审批
  30. <!-- <em>{{ info.approvalNum || 0 }}</em> -->
  31. </span
  32. >
  33. </div>
  34. <div class="adv-tit" @click="jumpadv('2')">
  35. <i class="el-icon-time"></i>
  36. <span
  37. >我发起的
  38. <!-- <em>{{ info.approvalNum || 0 }}</em> -->
  39. </span
  40. >
  41. </div>
  42. <div class="adv-tit" @click="jumpadv('3')">
  43. <i class="el-icon-notebook-1"></i>
  44. <!-- <span>定稿 <em>{{info.designNum||0}}</em></span> -->
  45. <span
  46. >定稿
  47. <!-- <em>{{ info.finalNum || 0 }}</em> -->
  48. </span
  49. >
  50. </div>
  51. <div class="adv-tit" @click="jumpinfo">
  52. <span>广告设计费明细</span>
  53. </div>
  54. <div class="adv-tit" @click="advadd">
  55. <i class="el-icon-plus"></i>
  56. <span>申请</span>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. export default {
  65. components: {},
  66. data() {
  67. return {
  68. info: {},
  69. typeList: [],
  70. };
  71. },
  72. methods: {
  73. jumpinfo() {
  74. this.$router.push({
  75. path: "/advdetailed",
  76. });
  77. this.setabList("广告设计费明细", "/advdetailed");
  78. },
  79. advadd() {
  80. this.$router.push({
  81. path: "/advertincrease",
  82. });
  83. this.setabList("广告申请", "/advertincrease");
  84. },
  85. jumpadv(v) {
  86. this.$router.push({
  87. path: "/advcheck",
  88. query: {
  89. type: v,
  90. },
  91. });
  92. this.setabList("广告管理列表", "/advcheck?type=" + v);
  93. },
  94. advmaterial(v) {
  95. this.$router.push({
  96. path: "/advertmaterial",
  97. query: {
  98. type: v.dataCode,
  99. },
  100. });
  101. this.setabList("素材库", "/advertmaterial?type=" + v.dataCode);
  102. },
  103. setabList(n, p) {
  104. let params = {
  105. children: "",
  106. name: n,
  107. rountPath: p,
  108. target: "_self",
  109. };
  110. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  111. if (this.$store.state.tabList[i].name === params.name) {
  112. this.$store.state.tabList[i] = params;
  113. }
  114. }
  115. let set = new Set([...this.$store.state.tabList, params]);
  116. set.add(params);
  117. this.$store.commit("setDefaultActive", params.rountPath);
  118. this.$store.commit("setTabList", Array.from(set));
  119. },
  120. getlist() {
  121. this.$http({
  122. url: "/market/cadv/queryMkAdvStsNum",
  123. method: "post",
  124. headers: {
  125. "Content-Type": "application/json",
  126. },
  127. data: {},
  128. }).then((res) => {
  129. this.info = res.data;
  130. });
  131. },
  132. gettype() {
  133. this.$http({
  134. url: "/sysmgr/cfgDataDicts/queryMap",
  135. method: "post",
  136. headers: {
  137. "Content-Type": "application/json",
  138. },
  139. data: {
  140. dictCodePks: "materType",
  141. },
  142. }).then((res) => {
  143. this.typeList = res.data.body.materType;
  144. });
  145. },
  146. getUser() {
  147. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  148. },
  149. },
  150. mounted() {
  151. this.gettype();
  152. // this.getUser();
  153. this.getlist();
  154. },
  155. created() {},
  156. };
  157. </script>
  158. <style scoped lang="scss">
  159. .container-box {
  160. padding: 0 30px;
  161. height: calc(100% - 40px);
  162. overflow-y: scroll;
  163. padding-bottom: 20px;
  164. }
  165. .adv-box {
  166. margin-top: 20px;
  167. display: flex;
  168. flex-wrap: wrap;
  169. justify-content: space-between;
  170. div {
  171. display: inline-block;
  172. cursor: pointer;
  173. .el-card {
  174. width: 100%;
  175. }
  176. i {
  177. margin-right: 10px;
  178. }
  179. }
  180. .adv-tit {
  181. width: 28%;
  182. border: 1px solid transparent;
  183. border-radius: 5px;
  184. height: 60px;
  185. line-height: 60px;
  186. padding-left: 20px;
  187. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  188. overflow: hidden;
  189. em {
  190. float: right;
  191. margin-right: 20px;
  192. font-style: normal;
  193. color: #0074d9;
  194. }
  195. }
  196. .adv-tit:hover {
  197. border: 1px solid #cfe8fc;
  198. background: #cfe8fc;
  199. }
  200. .adv-add {
  201. width: 100px;
  202. }
  203. }
  204. .adv-type {
  205. margin-top: 20px;
  206. display: flex;
  207. justify-content: space-between;
  208. flex-wrap: wrap;
  209. // border: 1px solid #ddd;
  210. border-radius: 5px;
  211. padding: 20px;
  212. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  213. div {
  214. width: 24%;
  215. text-align: center;
  216. height: 80px;
  217. overflow: hidden;
  218. min-width: 100px;
  219. cursor: pointer;
  220. padding-top: 10px;
  221. margin: 10px 0;
  222. }
  223. div:hover {
  224. background: #cfe8fc;
  225. border-radius: 5px;
  226. }
  227. span {
  228. width: 100%;
  229. display: inline-block;
  230. height: 40px;
  231. // line-height: 40px;
  232. i {
  233. color: #0074d9;
  234. font-size: 36px;
  235. }
  236. }
  237. }
  238. </style>