index.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. /*我的项目*/
  2. <template>
  3. <div class="myproject">
  4. <div class="title">
  5. <span>公开项目</span>
  6. </div>
  7. <div class="btn">
  8. </div>
  9. <div class="scher">
  10. <!-- <span></span>
  11. <span class="xuanzhogn">搜索</span><span style="padding: 0 5px;">|</span> -->
  12. <div class="input ">
  13. <!-- <el-select v-model="value" placeholder="请选择">
  14. <el-option
  15. v-for="item in options"
  16. :key="item.value"
  17. :label="item.label"
  18. :value="item.value">
  19. </el-option>
  20. </el-select> -->
  21. <el-input v-model="searchtag" placeholder="请输入项目名称" class="text" ></el-input>
  22. <el-button @click="search()" type="primary" icon="el-icon-search" style="border-radius:0;">搜索</el-button>
  23. </div>
  24. </div>
  25. <!-- 表格 -->
  26. <template>
  27. <el-table
  28. v-loading="loading"
  29. element-loading-text="拼命加载中"
  30. :data="tableData"
  31. height="600"
  32. class="lbg_color2"
  33. @row-click="rowclinck"
  34. style="width: 100%">
  35. <el-table-column
  36. label="名称"
  37. prop="name"
  38. >
  39. </el-table-column>
  40. <el-table-column
  41. prop="updateTime"
  42. label="最近编辑时间"
  43. >
  44. </el-table-column>
  45. <el-table-column
  46. prop="remark"
  47. label="描述">
  48. </el-table-column>
  49. <el-table-column
  50. prop="isshare"
  51. label="是否公开">
  52. <template slot-scope="scope">
  53. <span slot="content">{{
  54. scope.row.isshare == '0'?"公有":"私有"
  55. }}</span>
  56. </template>
  57. </el-table-column>
  58. </el-table>
  59. <div class="pagination">
  60. <Pagination
  61. :pagination-config="paginationConfig"
  62. @putPagination="getPagination"
  63. ></Pagination>
  64. </div>
  65. </template>
  66. </div>
  67. </template>
  68. <script>
  69. import Pagination from '@/components/Pagination'
  70. import { request, getImage } from '@/utils/request'
  71. export default {
  72. name: 'Project',
  73. components: {
  74. Pagination
  75. },
  76. data() {
  77. return {
  78. loading: false, // 是显示加载
  79. paginationConfig: {
  80. hideSinglePage: false,
  81. page: 1,
  82. size: 10,
  83. sizeList: [10, 15, 30, 50],
  84. layout: 'total, sizes, prev, pager, next, jumper',
  85. total: 0,
  86. },
  87. searchtag:'',
  88. isshare:"",
  89. formLabelWidth: '60px',
  90. formLabelWidth2:'73px',
  91. formLabelWidth4:'37px',
  92. formLabelWidth5:'100px',
  93. formLabelWidth6:'120px',
  94. value:'0',
  95. input:'',
  96. tableData: [ ],
  97. dialogVisible: false,
  98. }
  99. },
  100. created() {
  101. },
  102. mounted(){
  103. this.init();
  104. },
  105. methods: {
  106. init(){
  107. this.projectlist('');
  108. },
  109. // 分页查询
  110. getPagination(data) {
  111. this.paginationConfig = data;
  112. this.projectlist("");
  113. },
  114. // 项目查询
  115. search(){
  116. this.projectlist(this.searchtag);
  117. },
  118. projectlist(searchtag){//列表加载
  119. const loading = this.$loading({
  120. lock: true,
  121. text: 'Loading',
  122. spinner: 'el-icon-loading',
  123. background: 'rgba(0, 0, 0, 0.7)',
  124. })
  125. setTimeout(() => {
  126. const params = {
  127. transCode: 'C000011',
  128. page: this.paginationConfig.page,
  129. count: this.paginationConfig.size,
  130. searchtag:searchtag,
  131. }
  132. request(params)
  133. .then((res) => {
  134. loading.close()
  135. this.paginationConfig.total = res.total
  136. this.tableData=res.rows;
  137. })
  138. .catch((err) => {
  139. loading.close()
  140. })
  141. }, 1500)
  142. },
  143. rowclinck(row, column, event){
  144. },
  145. }
  146. }
  147. </script>
  148. <style lang="scss" scoped>
  149. @import '@/styles/variables.scss';
  150. @import '@/styles/mixin.scss';
  151. .myproject{
  152. padding: 15px;
  153. }
  154. .myproject .title span{
  155. font-size: 26px;
  156. display: inline-block;
  157. color: #b6b6b6;
  158. }
  159. /deep/.el-dialog__title{
  160. color: #fff;
  161. }
  162. /deep/ .el-pagination__editor {
  163. width: 50px;
  164. border: none;
  165. }
  166. .btn{
  167. padding: 10px;
  168. display: flex;
  169. justify-content: flex-end;
  170. }
  171. .scher{
  172. display: flex;
  173. padding-bottom: 15px;
  174. }
  175. .scher span{
  176. font-size: 16px;
  177. height: 40px;
  178. line-height: 40px;
  179. display: inline-block;
  180. }
  181. /deep/.newfile .el-form-item__label{
  182. line-height: 40px;
  183. }
  184. .newfile .el-form-item__label {
  185. text-align: right;
  186. vertical-align: middle;
  187. float: left;
  188. font-size: 14px;
  189. color: #606266;
  190. line-height: 1px;
  191. padding: 12px 12px 0 0;
  192. -webkit-box-sizing: border-box;
  193. box-sizing: border-box;
  194. }
  195. .xuanzhogn{
  196. font-size: 16px;
  197. color: #b6b6b6;
  198. }
  199. .scher .input{
  200. width: 25%;
  201. min-width: 200px;
  202. box-sizing: border-box;
  203. transition: 0.5s linear;
  204. position:relative;
  205. -moz-box-sizing: border-box;
  206. box-sizing: border-box;
  207. overflow: hidden;
  208. color: #fff;
  209. .search{
  210. padding: 0 10px;
  211. }
  212. }
  213. .scher .el-select{
  214. width: 110px;
  215. }
  216. .input{
  217. display: flex;
  218. }
  219. .input .text{
  220. flex:1;
  221. }
  222. </style>
  223. <style >
  224. .scher .el-input__inner{
  225. border-radius: 0;
  226. border: none;
  227. }
  228. .pagination{
  229. margin-top: 50px;
  230. }
  231. </style>