Record.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <div>
  3. <div class="manager_statistics_box boxMinHeight">
  4. <el-form :inline="true">
  5. <el-form-item label="时间">
  6. <el-date-picker v-model="time" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
  7. </el-form-item>
  8. </el-form>
  9. <el-table :data="list" style="width: 100%;cursor: pointer;" v-loading="loading">
  10. <el-table-column prop="name" label="操作人员">
  11. <template slot-scope="scope">
  12. <userImage class="fl" :id="scope.row.userInfo.id" :user_name="scope.row.userInfo.name" :img_url="scope.row.userInfo.img_url" width="50px" height="50px"></userImage>
  13. <span style="line-height: 50px; padding-left: 10px;">{{ scope.row.userInfo.name }}</span>
  14. </template>
  15. </el-table-column>
  16. <el-table-column prop="content" min-width="300" label="内容"></el-table-column>
  17. <el-table-column prop="ct" label="时间"></el-table-column>
  18. <template slot="empty">
  19. <NoData></NoData>
  20. </template>
  21. </el-table>
  22. <center style="padding: 20px 0;">
  23. <el-pagination
  24. background
  25. @size-change="handleSizeChange"
  26. @current-change="handleCurrentChange"
  27. :current-page="page"
  28. :page-sizes="[10, 20, 50, 100]"
  29. layout="total, sizes, prev, pager, next"
  30. :page-size="page_size"
  31. :total="total"
  32. ></el-pagination>
  33. </center>
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. export default {
  39. name:'Record',
  40. data() {
  41. return {
  42. loading: false,
  43. loading2: false,
  44. dept_tree: [],
  45. page: 1,
  46. total: 0,
  47. page_size: 10,
  48. page2: 1,
  49. total2: 0,
  50. page_size2: 10,
  51. dept_id:0,
  52. formData: {
  53. dept_id: 0,
  54. },
  55. time: [this.$moment().startOf('month').format('YYYY-MM-DD'),this.$moment().endOf('month').format('YYYY-MM-DD')],
  56. list: [],
  57. point:0,
  58. owner_id:0,
  59. isShowTable:false,
  60. tableList:[],
  61. isShowDetail:false,
  62. detail:{},
  63. };
  64. },
  65. watch: {
  66. time(val) {
  67. this.page = 1;
  68. this.get_list();
  69. },
  70. },
  71. methods: {
  72. get_list() {
  73. this.loading = true;
  74. let data = {
  75. page: this.page,
  76. page_size: this.page_size,
  77. };
  78. if(this.time){
  79. data.start_day= this.time[0];
  80. data.end_day= this.time[1];
  81. }
  82. this.$axiosUser('get', '/api/pro/log',data).then(res => {
  83. let list = res.data.data.list;
  84. list.forEach((item,index)=>{
  85. item.userInfo=this.$getEmployeeMapItem(item.employee_id);
  86. })
  87. this.list = list;
  88. this.total = res.data.data.total;
  89. }).finally(() => {
  90. this.loading = false;
  91. });
  92. },
  93. // 页面变更
  94. handleCurrentChange(val) {
  95. this.page = val;
  96. this.get_list();
  97. },
  98. handleSizeChange(val) {
  99. this.page_size = val;
  100. this.get_list();
  101. },
  102. },
  103. mounted() {
  104. this.get_list();
  105. }
  106. };
  107. </script>
  108. <style scoped lang="scss">
  109. .message-box .label{
  110. font-size: 18px;
  111. font-weight: 600;
  112. margin-bottom: 20px;
  113. }
  114. .message-box .flex-box-ce{
  115. margin-bottom:16px ;
  116. }
  117. .message-box .fontColorC{
  118. width: 100px;
  119. }
  120. .search_box {
  121. /deep/ button:active {
  122. background: #409eff;
  123. }
  124. /deep/ button:active .el-icon-search {
  125. color: #fff;
  126. }
  127. }
  128. .date-picker-width {
  129. width: 100% !important;
  130. }
  131. .color_green {
  132. color: #67c23a;
  133. }
  134. .nopoint_box {
  135. display: inline-block;
  136. text-align: center;
  137. width: 100%;
  138. margin-bottom: 10px;
  139. }
  140. .title {
  141. display: block;
  142. text-align: center;
  143. font-size: 12px !important;
  144. line-height: 30px;
  145. color: #909399 !important;
  146. padding: 0;
  147. }
  148. .nopoint_box a {
  149. color: #409eff;
  150. }
  151. .chart_content {
  152. .chart-legend__wrap {
  153. text-align: right;
  154. padding: 20px;
  155. padding-right: 50px;
  156. & .chart-legend__pink {
  157. position: relative;
  158. padding-left: 12px;
  159. padding-right: 5px;
  160. &:after {
  161. content: '';
  162. position: absolute;
  163. margin-top: -2px;
  164. top: 35%;
  165. left: 0;
  166. width: 8px;
  167. height: 8px;
  168. background: #f56c6c;
  169. border-radius: 100%;
  170. }
  171. }
  172. & .chart-legend__green {
  173. position: relative;
  174. padding-left: 12px;
  175. &:after {
  176. content: '';
  177. position: absolute;
  178. margin-top: -2px;
  179. top: 35%;
  180. left: 0;
  181. width: 8px;
  182. height: 8px;
  183. background: #53b87f;
  184. border-radius: 100%;
  185. }
  186. }
  187. }
  188. }
  189. .drawer_title {
  190. font-size: 18px;
  191. padding: 20px;
  192. }
  193. .manager_statistics_box {
  194. background-color: #ffffff;
  195. // padding: 20px;
  196. /deep/ .el-row .el-checkbox .el-checkbox__label {
  197. line-height: 20px;
  198. }
  199. }
  200. .diy_tip_bg {
  201. background: #f5f6f9;
  202. overflow: hidden;
  203. .diy-tip {
  204. margin-bottom: 10px;
  205. border: 1px solid #67c23a;
  206. padding: 20px 16px;
  207. p {
  208. color: #67c23a !important;
  209. font-size: 15px;
  210. margin: 0 !important;
  211. padding-bottom: 4px;
  212. }
  213. }
  214. }
  215. /deep/ .el-dialog__body {
  216. padding: 0px 20px 30px;
  217. }
  218. .headLi {
  219. padding: 4px;
  220. list-style: disc;
  221. font-size: 14px;
  222. }
  223. </style>