index.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  3. <div slot="header">
  4. <span>通知日志</span>
  5. </div>
  6. <div class="table-body">
  7. <el-form size="small" :inline="true" flex="dir:left cross:center">
  8. <div class="item-box">
  9. <el-select v-model="search.type" placeholder="通知类型" clearable size="small">
  10. <el-option v-for="(name, index) in notice_type" :key="index" :label="name" :value="index"></el-option>
  11. </el-select>
  12. </div>
  13. <div class="item-box" style="margin-right: 15px">
  14. <el-input clearable size="small" style="width: 200px" v-model="search.keyword" placeholder="请输入推送数据关键字"></el-input>
  15. </div>
  16. <div class="item-box" flex="dir:left cross:center">
  17. <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索</el-button>
  18. </div>
  19. </el-form>
  20. <el-tabs v-model="activeName" @tab-click="handleClick" v-="loading">
  21. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;">
  22. <el-table-column prop="id" label="ID" align="center" width="150px"></el-table-column>
  23. <el-table-column label="通知类型" align="center" width="150">
  24. <template slot-scope="scope">
  25. {{scope.row.type == 'order' ? '订单' : '商品'}}
  26. </template>
  27. </el-table-column>
  28. <el-table-column label="推送数据">
  29. <template slot-scope="scope">
  30. {{scope.row.content}}
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="错误信息" width="150" align="center">
  34. <template slot-scope="scope">
  35. {{scope.row.err_message}}
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="推送时间" width="160" align="center" width="150px">
  39. <template slot-scope="scope">
  40. <div>{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="操作" align="center" width="150">
  44. <template slot-scope="scope">
  45. <!-- 更新库存, 修改商品, 提交审核,上架,下架,删除,取消审核 -->
  46. <template v-if="scope.row.err_message != '无错误信息'">
  47. <el-popconfirm @confirm="onCompensate(scope.row, scope.$index)" title="您真的补偿当前记录吗?">
  48. <el-button type="text" slot="reference" style="color: #67C23A">补偿</el-button>
  49. </el-popconfirm>
  50. </template>
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. </el-tabs>
  55. <!-- 分页器 -->
  56. <div flex="box:last cross:center">
  57. <div></div>
  58. <div>
  59. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize" style="display: inline-block;" background @current-change="pageChange" layout="prev, pager, next" :total="pagination.totalCount">
  60. </el-pagination>
  61. </div>
  62. </div>
  63. </div>
  64. <!-- 这个是复制用的容器,已隐藏 -->
  65. <textarea id="inputs" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
  66. </el-card>
  67. </div>
  68. <script>
  69. const app = new Vue({
  70. el: '#app',
  71. data: {
  72. page: 1,
  73. time: [], //本地存时间,请求时不发送
  74. loading: false,
  75. activeName: '-1',
  76. list: [], //列表数据
  77. pagination: null,
  78. types: {
  79. 0: {
  80. title: '待提审',
  81. type: 'default'
  82. },
  83. 2: {
  84. title: '审核未通过',
  85. type: 'danger'
  86. },
  87. 3: {
  88. title: '审核通过',
  89. type: 'success'
  90. },
  91. },
  92. search: {
  93. type: ''
  94. },
  95. notice_type: {
  96. goods: '商品',
  97. order: '订单',
  98. },
  99. },
  100. mounted() {
  101. // 获取列表首页数据
  102. this.loadData(this.page, this.search); //获取列表数据
  103. },
  104. methods: {
  105. // 1.0 获取视频列表
  106. loadData(page, others) {
  107. this.loading = true;
  108. request({
  109. method: 'get',
  110. params: {
  111. r: 'qi-ding-dong/notice/index',
  112. page: page,
  113. limit: 10,
  114. ...others, //其他搜索字段
  115. },
  116. }).then(e => {
  117. this.loading = false;
  118. if (e.data.code === 0) {
  119. this.list = e.data.data.list;
  120. this.pagination = e.data.data.pagination;
  121. } else {
  122. this.$message.error(e.data.msg);
  123. }
  124. }).catch(e => {});
  125. },
  126. onCompensate(item, index) {
  127. request({
  128. method: 'get',
  129. params: {
  130. r: 'qi-ding-dong/notice/compensate',
  131. id: item.id
  132. },
  133. }).then(e => {
  134. if (e.data.code === 0) {
  135. this.loadData(this.page, this.search);
  136. this.$message.success(e.data.msg);
  137. } else {
  138. this.$message.error(e.data.msg);
  139. }
  140. }).catch(e => {});
  141. },
  142. pageChange(page) {
  143. this.page = page;
  144. this.loadData(this.page, this.search);
  145. },
  146. handleClick(tab, event) {
  147. this.page = 1;
  148. this.search.status = this.activeName;
  149. this.loadData(this.page, this.search)
  150. },
  151. searchs() {
  152. this.page = 1;
  153. this.loadData(this.page, this.search);
  154. },
  155. },
  156. });
  157. </script>
  158. <style>
  159. .set-el-button {
  160. padding: 0 !important;
  161. border: 0;
  162. margin: 0 5px;
  163. }
  164. .sort-input {
  165. width: 100%;
  166. background-color: #F3F5F6;
  167. height: 32px;
  168. }
  169. .sort-input span {
  170. height: 32px;
  171. width: 100%;
  172. line-height: 32px;
  173. display: inline-block;
  174. padding: 0 10px;
  175. font-size: 13px;
  176. }
  177. .sort-input .el-input__inner {
  178. height: 32px;
  179. line-height: 32px;
  180. background-color: #F3F5F6;
  181. float: left;
  182. padding: 0 10px;
  183. border: 0;
  184. }
  185. .table-body {
  186. padding: 20px;
  187. background-color: #fff;
  188. }
  189. .table-info .el-button {
  190. padding: 0 !important;
  191. border: 0;
  192. margin: 0 5px;
  193. }
  194. .input-item {
  195. margin: 0 0 20px;
  196. }
  197. .input-item-name {
  198. margin-right: 5px;
  199. }
  200. .input-search {
  201. margin-right: 30px;
  202. }
  203. .input-item .el-input-group__append {
  204. background-color: #fff;
  205. border-left: 0;
  206. width: 10%;
  207. padding: 0;
  208. }
  209. .input-item .el-input-group__append .el-button {
  210. padding: 0;
  211. }
  212. .input-item .el-input-group__append .el-button {
  213. margin: 0;
  214. }
  215. .data-pop-info {
  216. /* padding: 18px 15px 30px; */
  217. color: #333;
  218. }
  219. .data-pop-mode {
  220. background: #F8F8F8;
  221. border-radius: 4px;
  222. margin-bottom: 10px;
  223. }
  224. .data-pop-top {
  225. height: 90px;
  226. }
  227. .data-price {
  228. width: 200px;
  229. flex-direction: column;
  230. border-right: 1px solid #E5E5E5;
  231. }
  232. .data-info {
  233. flex: 1;
  234. padding: 22px 15px;
  235. font-size: 16px;
  236. }
  237. .data-info-name {
  238. display: inline-block;
  239. text-align: end;
  240. }
  241. .data-pop-detail {
  242. padding: 15px 18px;
  243. }
  244. .data-detail-mode {
  245. min-width: 33%;
  246. flex-shrink: 0;
  247. text-align: center;
  248. margin-top: 16px;
  249. line-height: 26px;
  250. font-size: 16px;
  251. }
  252. .share-pop-model {
  253. margin-top: 20px;
  254. }
  255. .share-name {
  256. width: 90px;
  257. display: inline-block;
  258. margin-right: 18px;
  259. text-align: end;
  260. }
  261. .flex-y-center {
  262. display: -webkit-box;
  263. display: -webkit-flex;
  264. display: flex;
  265. -webkit-box-align: center;
  266. -webkit-align-items: center;
  267. -ms-flex-align: center;
  268. -ms-grid-row-align: center;
  269. align-items: center;
  270. }
  271. </style>
  272. <style>
  273. .el-tabs__header {
  274. font-size: 16px;
  275. }
  276. .table-body {
  277. padding: 20px;
  278. background-color: #fff;
  279. }
  280. .table-body .el-button {
  281. padding: 0 !important;
  282. border: 0;
  283. margin: 0 5px;
  284. }
  285. .input-item {
  286. width: 250px;
  287. margin: 0 0 20px;
  288. display: inline-block;
  289. }
  290. .input-item .el-input__inner {
  291. border-right: 0;
  292. }
  293. .input-item .el-input__inner:hover {
  294. border: 1px solid #dcdfe6;
  295. border-right: 0;
  296. outline: 0;
  297. }
  298. .input-item .el-input__inner:focus {
  299. border: 1px solid #dcdfe6;
  300. border-right: 0;
  301. outline: 0;
  302. }
  303. .input-item .el-input-group__append {
  304. background-color: #fff;
  305. border-left: 0;
  306. width: 10%;
  307. padding: 0;
  308. }
  309. .input-item .el-input-group__append .el-button {
  310. padding: 0;
  311. }
  312. .input-item .el-input-group__append .el-button {
  313. margin: 0;
  314. }
  315. .batch {
  316. margin: 0 0 20px;
  317. display: inline-block;
  318. }
  319. .batch .el-button {
  320. padding: 9px 15px !important;
  321. }
  322. .item-box {
  323. margin-right: 20px;
  324. }
  325. .item-box .label {
  326. margin-right: 8px;
  327. }
  328. .item-box .symbol {
  329. margin: 0 6px;
  330. }
  331. .form-nickname {
  332. width: 180px;
  333. white-space: nowrap;
  334. overflow: hidden;
  335. text-overflow: ellipsis;
  336. }
  337. .index-video-url {
  338. width: 300px;
  339. }
  340. .index-video-url video {
  341. width: 100%;
  342. }
  343. .index-related-info {
  344. width: 500px;
  345. }
  346. .video-top {
  347. width: 100%;
  348. display: flex;
  349. align-items: flex-start;
  350. box-sizing: border-box;
  351. padding: 20px;
  352. /* opacity: .5; */
  353. background-color: #FFFFFF;
  354. }
  355. .video-top .top-right {
  356. line-height: 26px;
  357. }
  358. .video-top .top-right .top-title {
  359. font-size: 18px;
  360. white-space: nowrap;
  361. overflow: hidden;
  362. text-overflow: ellipsis;
  363. width: 360px;
  364. }
  365. .video-top .top-right .wrapper {
  366. display: flex;
  367. /* align-items: flex-start; */
  368. }
  369. .video-top .top-right .wrapper .to-copy {
  370. /* color: #03C5FF; */
  371. margin-left: 20px;
  372. }
  373. .video-top .top-right .detail-price {
  374. color: #BC0100;
  375. font-size: 18px;
  376. font-family: Microsoft YaHei;
  377. font-weight: bold;
  378. }
  379. /* .atooltip {
  380. background: #FFFFFF !important;
  381. border: none !important;
  382. } */
  383. .el-table th>.cell {
  384. color: #333;
  385. font-weight: bold;
  386. font-size: 14px;
  387. }
  388. .el-table__footer-wrapper,
  389. .el-table__header-wrapper {
  390. border-bottom: 1.4px solid #D6D6D6;
  391. }
  392. .price_col {
  393. color: #FF5D05;
  394. }
  395. </style>