index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <div>
  3. <viewIndex ></viewIndex>
  4. </div>
  5. </template>
  6. <script>
  7. import viewIndex from './components/viewIndex.vue'
  8. export default {
  9. components: {
  10. viewIndex,
  11. },
  12. computed:{},
  13. mounted() {
  14. },
  15. methods: {
  16. },
  17. }
  18. </script>
  19. <style lang="scss" scoped></style>
  20. <!-- <template>
  21. <div>
  22. <el-container>
  23. <el-header>
  24. <div>
  25. <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption"
  26. :disabled="!$permission('/workspace/project/check')"></mySearch>
  27. </div>
  28. <div style="display:flex;margin-right:10px">
  29. <el-button-group class="margin-left_10" v-if="[2].indexOf(isOperate) == -1">
  30. <el-button :type="viewType === 'commonTable' ? 'primary' : ''" @click="onChange2('commonTable')"
  31. size="small">列表</el-button>
  32. <el-button :type="viewType === 'commonCard' ? 'primary' : ''" @click="onChange2('commonCard')"
  33. size="small">卡片</el-button>
  34. </el-button-group>
  35. <el-dropdown trigger="click" split-button type="primary" size="small">
  36. <span @click="handleAdd">创建项目</span>
  37. <el-dropdown-menu slot="dropdown" class="text-align_center">
  38. </el-dropdown-menu>
  39. </el-dropdown>
  40. </div>
  41. </el-header>
  42. <el-main>
  43. <component :is="viewType" v-bind="$attrs" v-on="$listeners" :isOperate="isOperate" :tableData="dataList"
  44. :group="group" :queryParams="queryParams" @option="handleOption" @sort="handleSort"></component>
  45. </el-main>
  46. <el-footer class="pagination">
  47. <div>
  48. <el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
  49. :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
  50. </el-pagination>
  51. </div>
  52. </el-footer>
  53. </el-container>
  54. <addAndEditProject ref="addAndEditProject"></addAndEditProject>
  55. </div>
  56. </template>
  57. <script>
  58. import commonTable from './components/view/commonTable.vue';
  59. import addAndEditProject from './components/dialog/addAndEditProject.vue';
  60. export default {
  61. components: {
  62. commonTable,
  63. addAndEditProject
  64. },
  65. props: {
  66. isOperate: ''
  67. },
  68. data() {
  69. return {
  70. //当前组件名称
  71. viewType: 'commonTable',
  72. //专利挖掘项目数据集合
  73. dataList: [
  74. {
  75. name: 'xxx有限公司',
  76. type: '本公司专利数据库',
  77. status: '进行中',
  78. createPerson: '朱豪',
  79. id: 1,
  80. }
  81. ],
  82. //分页
  83. queryParams: {
  84. size: 10,
  85. current: 0,
  86. },
  87. //分组
  88. group: '',
  89. //排序
  90. sort: [
  91. {
  92. "orderBy": "createTime",
  93. "orderType": 1
  94. }
  95. ],
  96. //总数
  97. total: 0,
  98. //检索字段
  99. searchFiled: [
  100. {
  101. label: '项目名称',
  102. value: 'name',
  103. type: 1,
  104. placeholder: '请输入项目名称'
  105. },
  106. {
  107. label: '创建人',
  108. value: 'createPerson',
  109. type: 1,
  110. placeholder: '请输入创建人名称'
  111. },
  112. ],
  113. //检索条件
  114. searchOption: {}
  115. };
  116. },
  117. watch: {},
  118. computed: {},
  119. created() { },
  120. mounted() { },
  121. methods: {
  122. //获取检索组件传过来的数据
  123. search(val) {
  124. },
  125. //排序
  126. handleSort(sort) {
  127. this.sort = { ...sort }
  128. this.getList()
  129. },
  130. //操作列
  131. handleOption({ option, row }) {
  132. switch (option) {
  133. case '0'://设置定时任务
  134. this.$refs.addAndEditDB.open(row, true)
  135. break;
  136. case '1'://删除
  137. break;
  138. case 'e'://编辑
  139. this.$refs.addAndEditProject.open(row)
  140. break;
  141. }
  142. },
  143. //分页
  144. handleCurrentChange(val) {
  145. this.queryParams.current = val;
  146. this.getList();
  147. },
  148. //获取专利挖掘项目数据列表
  149. getList() {
  150. },
  151. //添加其他企业专利数据库
  152. handleAdd() {
  153. this.$refs.addAndEditProject.open({})
  154. },
  155. //切换视图
  156. onChange2(val) {
  157. this.viewType = val
  158. },
  159. },
  160. };
  161. </script>
  162. <style lang="scss" scoped></style> -->