index.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/element/element.css">
  2. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/common.css">
  3. <style>
  4. #indexPage {
  5. font-family: Source Han Sans SC;
  6. /* padding: 0 0 20px; */
  7. /* background: #fff; */
  8. border-radius: 10px 10px 0px 0px;
  9. }
  10. .shopro-screen-container {
  11. padding-top: 16px;
  12. background: #fff;
  13. }
  14. .shopro-table-container {
  15. background: #fff;
  16. margin-top: 10px;
  17. padding: 20px 20px 30px;
  18. }
  19. .shopro-reset-button {
  20. margin-right: 20px;
  21. }
  22. .title {
  23. height: 58px;
  24. line-height: 58px;
  25. font-weight: 600;
  26. font-size: 13px;
  27. }
  28. .btn-common {
  29. width: 80px;
  30. height: 30px;
  31. line-height: 30px;
  32. border-radius: 4px;
  33. font-size: 13px;
  34. text-align: center;
  35. cursor: pointer;
  36. display: inline-block;
  37. }
  38. .btn-box {
  39. margin-bottom: 20px;
  40. display: flex;
  41. justify-content: space-between;
  42. }
  43. .create-btn {
  44. background: #7536D0;
  45. color: #fff;
  46. width: 100px;
  47. height: 32px;
  48. line-height: 32px;
  49. }
  50. .operation-status {
  51. color: #7438D5;
  52. margin-right: 14px;
  53. cursor: pointer;
  54. }
  55. .table-header-bgcolor th {
  56. background-color: #f9f9f9 !important;
  57. padding: 8px 0;
  58. }
  59. .table-header-bgcolor th .cell {
  60. font-weight: 400;
  61. color: #444;
  62. }
  63. /* 搜索 筛选 */
  64. .screen-con {
  65. display: flex;
  66. }
  67. .header-input-item {
  68. margin-right: 30px;
  69. margin-bottom: 14px;
  70. width: 242px;
  71. }
  72. .header-input-item .header-input-tip {
  73. margin-right: 14px;
  74. }
  75. .header-input-item .el-input {
  76. width: 176px;
  77. }
  78. .multiple-set-acitve-1,
  79. .multiple-set-acitve-2,
  80. .multiple-set-acitve-3 {
  81. cursor: pointer;
  82. margin-right: 14px;
  83. }
  84. .multiple-set-acitve .multiple-set-acitve-1 {
  85. color: #60CC9E;
  86. }
  87. .multiple-set-acitve .multiple-set-acitve-2 {
  88. color: #ED655F;
  89. }
  90. .multiple-set-acitve .multiple-set-acitve-3 {
  91. color: #7438D5
  92. }
  93. .shopro-pagination-container .shopro-edit-text {
  94. color: inherit;
  95. }
  96. .shopro-refresh-button {
  97. margin-bottom: 20px;
  98. margin-right: 20px;
  99. }
  100. .el-checkbox__inner:focus {
  101. border: none;
  102. outline: none;
  103. }
  104. .el-table--border th:first-child .cell {
  105. padding-left: 5px;
  106. }
  107. .activity-type {
  108. justify-content: space-around;
  109. width: 90px;
  110. }
  111. .activity-type-btn {
  112. width: 40px;
  113. height: 20px;
  114. padding-top: 2px;
  115. border-radius: 4px;
  116. color: #fff;
  117. justify-content: center;
  118. }
  119. .seckill-btn {
  120. background: #FFF4F3;
  121. border: 1px solid #FECAC4;
  122. color: #FE9488;
  123. }
  124. .groupon-btn {
  125. background: #F1EDFA;
  126. border: 1px solid #CEBEEC;
  127. color: #9C7EDA;
  128. }
  129. .score-btn {
  130. background: #FDF5E8;
  131. border: 1px solid #F8DCAE;
  132. color: #F2BA5E;
  133. }
  134. .really-status-tip {
  135. margin-right: 10px;
  136. color: #444;
  137. font-size: 12px;
  138. }
  139. .really-status-icon {
  140. font-size: 20px;
  141. color: #7C7C7C;
  142. margin-right: 16px;
  143. }
  144. .el-popover--plain {
  145. padding: 12px;
  146. color: #444;
  147. }
  148. .nice-validator .el-input__inner {
  149. vertical-align: baseline !important;
  150. }
  151. .active-cursor-line {
  152. color: #7438D5;
  153. cursor: pointer;
  154. }
  155. [v-cloak] {
  156. display: none
  157. }
  158. </style>
  159. <script src="__CDN__/assets/addons/shopro/libs/vue.js"></script>
  160. <script src="__CDN__/assets/addons/shopro/libs/element/element.js"></script>
  161. <script src="__CDN__/assets/addons/shopro/libs/moment.js"></script>
  162. <div id="indexPage" v-cloak v-loading="isAjax">
  163. <div class="shopro-screen-container">
  164. <div class="shopro-button shopro-refresh-button" @click="getListData">
  165. <i class="el-icon-refresh"></i>
  166. </div>
  167. <div class="display-flex shopro-screen-item">
  168. <div class="really-status-tip">实时动态</div>
  169. <el-popover placement="top" trigger="hover" content="开启后,该页面将实时刷新">
  170. <i class="el-icon-question really-status-icon" slot="reference"></i>
  171. </el-popover>
  172. <el-switch @change="changeReallyStatus" v-model="really_status" active-value="1" inactive-value="0"
  173. active-color="#7536D0" inactive-color="#eee">
  174. </el-switch>
  175. </div>
  176. <div class="display-flex shopro-screen-item">
  177. <el-input placeholder="请输入内容" v-model="searchForm.form_1_value" class="screen-item-select" size="small">
  178. <el-select v-model="searchForm.form_1_key" slot="prepend" placeholder="请选择">
  179. <el-option label="分销用户ID" value="agent_id"></el-option>
  180. <el-option label="分销用户昵称" value="agent_nickname"></el-option>
  181. <el-option label="分销用户手机号" value="agent_mobile"></el-option>
  182. </el-select>
  183. </el-input>
  184. </div>
  185. <div class="display-flex shopro-screen-item">
  186. <div class="shopro-screen-tip">操作人类型</div>
  187. <div class="shopro-screen-condition">
  188. <el-select v-model="searchForm.oper_type" placeholder="请选择动态类型" size="small">
  189. <el-option :label="type.label" :value="type.value" v-for="type in operTypeOptions">
  190. </el-option>
  191. </el-select>
  192. </div>
  193. </div>
  194. <div class="display-flex shopro-screen-item"
  195. v-if="searchForm.oper_type=='user' || searchForm.oper_type=='admin'">
  196. <el-input placeholder="请输入内容" v-model="searchForm.form_2_value" class="screen-item-select" size="small">
  197. <el-select v-model="searchForm.form_2_key" slot="prepend" placeholder="请选择">
  198. <el-option label="操作人ID" value="oper_id"></el-option>
  199. <el-option label="操作人昵称" value="oper_nickname"></el-option>
  200. <el-option label="操作人手机号" value="oper_mobile" v-if="searchForm.oper_type=='user'"></el-option>
  201. </el-select>
  202. </el-input>
  203. </div>
  204. <div class="display-flex shopro-screen-item">
  205. <div class="shopro-screen-tip">动态时间</div>
  206. <div>
  207. <el-date-picker v-model="searchForm.createtime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
  208. size="small" format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
  209. end-placeholder="结束日期">
  210. </el-date-picker>
  211. </div>
  212. </div>
  213. <div class="display-flex shopro-screen-item">
  214. <div class="shopro-screen-tip">动态类型</div>
  215. <div class="shopro-screen-condition">
  216. <el-select v-model="searchForm.event" placeholder="请选择动态类型" size="small">
  217. <el-option :label="log.name" :value="log.type" v-for="log in logOptions">
  218. </el-option>
  219. </el-select>
  220. </div>
  221. </div>
  222. <div class="display-flex shopro-screen-item-button">
  223. <div class="shopro-button shopro-reset-button" @click="screenEmpty">重置</div>
  224. <div class="shopro-button shopro-screen-button" @click="pageCurrentChange(1)">筛选</div>
  225. </div>
  226. </div>
  227. <div class="shopro-table-container">
  228. <el-table :data="listData" style="width: 100%" border stripe="true" :cell-class-name="tableCellClassName"
  229. :header-cell-class-name="tableCellClassName">
  230. </el-table-column>
  231. <el-table-column prop="id" label="ID" width="70">
  232. </el-table-column>
  233. <el-table-column prop="event_text" label="动态筛选" min-width="100">
  234. </el-table-column>
  235. <el-table-column label="分销商" width="160">
  236. <template slot-scope="scope">
  237. <el-popover placement="bottom" trigger="hover" width="180">
  238. <div class="popover-container">
  239. <div class="display-flex">
  240. <div class="display-flex">
  241. <div class="popover-tip">用户ID</div>:
  242. </div>
  243. <div class="active-cursor-line" @click="openAgentProfile(scope.row.agent_id)">
  244. {{scope.row.agent.id}}
  245. </div>
  246. </div>
  247. <div class="display-flex" v-if="scope.row.agent && scope.row.agent.mobile">
  248. <div class="display-flex">
  249. <div class="popover-tip">手机号</div>:
  250. </div>
  251. <div>{{scope.row.agent.mobile}}</div>
  252. </div>
  253. </div>
  254. <div class="display-flex" slot="reference" v-if="scope.row.agent">
  255. <div class="table-image">
  256. <el-image :src="Fast.api.cdnurl(scope.row.agent.avatar)" fit="contain">
  257. <div slot="error" class="image-slot">
  258. <i class="el-icon-picture-outline"></i>
  259. </div>
  260. </el-image>
  261. </div>
  262. <div class="ellipsis-item">{{scope.row.agent.nickname}}</div>
  263. </div>
  264. </el-popover>
  265. <div v-if="!scope.row.agent">-</div>
  266. </template>
  267. </el-table-column>
  268. <el-table-column prop="remark" label="内容" width="400">
  269. </el-table-column>
  270. <el-table-column prop="oper_type_text" label="操作人类型" width="100">
  271. </el-table-column>
  272. <el-table-column label="操作人" width="160">
  273. <template slot-scope="scope">
  274. <div class="display-flex" v-if="scope.row.oper">
  275. <div class="table-image">
  276. <el-image :src="Fast.api.cdnurl(scope.row.oper.avatar)" fit="contain">
  277. <div slot="error" class="image-slot">
  278. <i class="el-icon-picture-outline"></i>
  279. </div>
  280. </el-image>
  281. </div>
  282. <div class="ellipsis-item">{{scope.row.oper.nickname}}</div>
  283. </div>
  284. <div v-if="!scope.row.oper">系统</div>
  285. </template>
  286. </el-table-column>
  287. <el-table-column label="动态时间" width="160">
  288. <template slot-scope="scope">
  289. <div>
  290. {{moment(scope.row.createtime*1000).format("YYYY-MM-DD HH:mm:ss")}}
  291. </div>
  292. </template>
  293. </el-table-column>
  294. <el-table-column label="操作" fixed="right" min-width="80">
  295. <template slot-scope="scope">
  296. <div class="operation-status">
  297. <span v-if="['order','reward','share','agent','level'].includes(scope.row.event)"
  298. @click="operation(scope.row.event,scope.row)">详情</span>
  299. <span v-else>-</span>
  300. </div>
  301. </template>
  302. </el-table-column>
  303. </el-table>
  304. <div class="shopro-pagination-container">
  305. <el-pagination @size-change="pageSizeChange" @current-change="pageCurrentChange" :current-page="currentPage"
  306. :page-sizes="[10, 20, 30, 40]" :page-size="limit" layout="total, sizes, prev, pager, next, jumper"
  307. :total="totalPage">
  308. </el-pagination>
  309. </div>
  310. </div>
  311. </div>