project.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <div>
  3. <el-scrollbar >
  4. <div style="margin: auto;max-height: 200px">
  5. <el-row>
  6. <el-col :span="12">
  7. <span style="font-size: 16px;color: #333">新增项目</span>
  8. </el-col>
  9. <el-col :span="12">
  10. <quickDate @selectQuick="selectQuickAdd"></quickDate>
  11. </el-col>
  12. </el-row>
  13. <tableLayout style="margin-top: 10px" :layout="tablecolsAdd" :data="listAdd" :opwidth="200" :custom="true" :height="tableHieght">
  14. <template v-slot:customcol="scope">
  15. <p>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
  16. </template>
  17. </tableLayout>
  18. <div class="container normal-panel" style="text-align:right">
  19. <el-pagination
  20. background
  21. @size-change="handleSizeChangeAdd"
  22. @current-change="handleCurrentChangeAdd"
  23. :current-page="currentPageAdd"
  24. :page-sizes="[10,20, 50, 100, 200]"
  25. :page-size="10"
  26. layout="total,sizes, prev, pager, next, jumper"
  27. :total="totalAdd">
  28. </el-pagination>
  29. </div>
  30. <el-row>
  31. <el-col :span="12">
  32. <span style="font-size: 16px;color: #333">更新项目</span>
  33. </el-col>
  34. <el-col :span="12">
  35. <quickDate @selectQuick="selectQuickUpd"></quickDate>
  36. </el-col>
  37. </el-row>
  38. <tableLayout style="margin-top: 10px" :layout="tablecolsUpdate" :data="listUpdate" :opwidth="200" :custom="true" :height="tableHieght">
  39. <template v-slot:customcol="scope">
  40. <p>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
  41. </template>
  42. </tableLayout>
  43. <div class="container normal-panel" style="text-align:right">
  44. <el-pagination
  45. background
  46. @size-change="handleSizeChangeUpdate"
  47. @current-change="handleCurrentChangeUpdate"
  48. :current-page="currentPageUpdate"
  49. :page-sizes="[10,20, 50, 100, 200]"
  50. :page-size="10"
  51. layout="total,sizes, prev, pager, next, jumper"
  52. :total="totalUpdate">
  53. </el-pagination>
  54. </div>
  55. <el-row>
  56. <el-col :span="12">
  57. <span style="font-size: 16px;color: #333">跟进项目</span>
  58. </el-col>
  59. <el-col :span="12">
  60. <quickDate @selectQuick="selectQuickFow"></quickDate>
  61. </el-col>
  62. </el-row>
  63. <tableLayout style="margin-top: 10px" :layout="tablecolsFollow" :data="listFollow" :opwidth="200" :custom="true" :height="tableHieght">
  64. <template v-slot:customcol="scope">
  65. <p>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
  66. </template>
  67. </tableLayout>
  68. <div class="container normal-panel" style="text-align:right">
  69. <el-pagination
  70. background
  71. @size-change="handleSizeChangeFollow"
  72. @current-change="handleCurrentChangeFollow"
  73. :current-page="currentPageFollow"
  74. :page-sizes="[10,20, 50, 100, 200]"
  75. :page-size="10"
  76. layout="total,sizes, prev, pager, next, jumper"
  77. :total="totalFollow">
  78. </el-pagination>
  79. </div>
  80. </div>
  81. </el-scrollbar>
  82. </div>
  83. </template>
  84. <script>
  85. import quickDate from "@/HDrpManagement/dataanalysis/components/quickDate";
  86. export default {
  87. name: "project",
  88. props:['param','isDep','dataid','isPerson'],
  89. components:{quickDate},
  90. data() {
  91. return {
  92. listAdd:[],
  93. tablecolsAdd:[],
  94. listUpdate:[],
  95. tablecolsUpdate:[],
  96. tableHieght:'50px',
  97. currentPageAdd:0,
  98. totalAdd:0,
  99. currentPageUpdate:0,
  100. totalUpdate:0,
  101. listFollow:[],
  102. tablecolsFollow:[],
  103. currentPageFollow:0,
  104. totalFollow:0,
  105. begindate:'',
  106. enddate:''
  107. }
  108. },
  109. methods:{
  110. async queryAdd(){
  111. /* this.isDep ? this.param.content.type = 1: this.isPerson ? this.param.content.type = 0 : this.param.content.type = ''*/
  112. this.param.content.dataType = 7
  113. /* this.param.content.dataid = this.dataid*/
  114. this.param.content.where.begindate = this.begindate
  115. this.param.content.where.enddate = this.enddate
  116. const res = await this.$api.requested(this.param)
  117. this.listAdd = res.data
  118. this.currentPageAdd = res.pageNumber
  119. this.totalAdd = res.total
  120. },
  121. handleSizeChangeAdd(val) {
  122. // console.log(`每页 ${val} 条`);
  123. this.param.content.pageSize = val
  124. this.queryAdd()
  125. },
  126. handleCurrentChangeAdd(val) {
  127. // console.log(`当前页: ${val}`);
  128. this.param.content.pageNumber = val
  129. this.queryAdd()
  130. },
  131. async queryUpdate(){
  132. /* this.isDep ? this.param.content.type = 1: this.isPerson ? this.param.content.type = 0 : this.param.content.type = ''*/
  133. this.param.content.dataType = 8
  134. /* this.param.content.dataid = this.dataid*/
  135. this.param.content.where.begindate = this.begindate
  136. this.param.content.where.enddate = this.enddate
  137. const res = await this.$api.requested(this.param)
  138. this.listUpdate = res.data
  139. this.currentPageUpdate = res.pageNumber
  140. this.totalUpdate = res.total
  141. },
  142. handleSizeChangeUpdate(val) {
  143. // console.log(`每页 ${val} 条`);
  144. this.param.content.pageSize = val
  145. this.queryUpdate()
  146. },
  147. handleCurrentChangeUpdate(val) {
  148. // console.log(`当前页: ${val}`);
  149. this.param.content.pageNumber = val
  150. this.queryUpdate()
  151. },
  152. async queryFollow(){
  153. /* this.isDep ? this.param.content.type = 1: this.isPerson ? this.param.content.type = 0 : this.param.content.type = ''*/
  154. this.param.content.dataType = 9
  155. /* this.param.content.dataid = this.dataid*/
  156. this.param.content.where.begindate = this.begindate
  157. this.param.content.where.enddate = this.enddate
  158. const res = await this.$api.requested(this.param)
  159. this.listFollow = res.data
  160. this.currentPageFollow = res.pageNumber
  161. this.totalFollow = res.total
  162. },
  163. handleSizeChangeFollow(val) {
  164. // console.log(`每页 ${val} 条`);
  165. this.param.content.pageSize = val
  166. this.queryFollow()
  167. },
  168. handleCurrentChangeFollow(val) {
  169. // console.log(`当前页: ${val}`);
  170. this.param.content.pageNumber = val
  171. this.queryFollow()
  172. },
  173. /*日期筛选*/
  174. selectQuickAdd(begindate,enddate){
  175. this.begindate = begindate
  176. this.enddate = enddate
  177. this.queryAdd(this.param.content.pageNumber = 1)
  178. },
  179. selectQuickUpd(begindate,enddate){
  180. this.begindate = begindate
  181. this.enddate = enddate
  182. this.queryUpdate(this.param.content.pageNumber = 1)
  183. },
  184. selectQuickFow(begindate,enddate){
  185. this.begindate = begindate
  186. this.enddate = enddate
  187. this.queryFollow(this.param.content.pageNumber = 1)
  188. }
  189. },
  190. created() {
  191. this.tablecolsAdd = this.tool.tabelCol(this.$route.name).projectAdd.tablecols
  192. this.tablecolsUpdate = this.tool.tabelCol(this.$route.name).projectUpdate.tablecols
  193. this.tablecolsFollow = this.tool.tabelCol(this.$route.name).projectFollow.tablecols
  194. }
  195. }
  196. </script>
  197. <style scoped>
  198. </style>