<template>
  <div>
    <viewIndex ></viewIndex>
  </div>
</template>

<script>
import viewIndex from './components/viewIndex.vue'
export default {
  components: {
    viewIndex,
  },
  computed:{},
  mounted() {

  },
  methods: {
    
  },
}
</script>

<style lang="scss" scoped></style>




<!-- <template>
  <div>
    <el-container>
      <el-header>
        <div>
          <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption"
            :disabled="!$permission('/workspace/project/check')"></mySearch>
        </div>
        <div style="display:flex;margin-right:10px">
          <el-button-group class="margin-left_10" v-if="[2].indexOf(isOperate) == -1">
            <el-button :type="viewType === 'commonTable' ? 'primary' : ''" @click="onChange2('commonTable')"
              size="small">列表</el-button>
            <el-button :type="viewType === 'commonCard' ? 'primary' : ''" @click="onChange2('commonCard')"
              size="small">卡片</el-button>
          </el-button-group>
          <el-dropdown trigger="click" split-button type="primary" size="small">
            <span @click="handleAdd">创建项目</span>
            <el-dropdown-menu slot="dropdown" class="text-align_center">
            </el-dropdown-menu>
          </el-dropdown>
        </div>
      </el-header>
      <el-main>
        <component :is="viewType" v-bind="$attrs" v-on="$listeners" :isOperate="isOperate" :tableData="dataList"
          :group="group" :queryParams="queryParams" @option="handleOption" @sort="handleSort"></component>
      </el-main>
      <el-footer class="pagination">
        <div>
          <el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
            :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
          </el-pagination>
        </div>
      </el-footer>
    </el-container>
    <addAndEditProject ref="addAndEditProject"></addAndEditProject>

  </div>
</template>
  
<script>
import commonTable from './components/view/commonTable.vue';
import addAndEditProject from './components/dialog/addAndEditProject.vue';
export default {
  components: {
    commonTable,
    addAndEditProject
  },
  props: {
    isOperate: ''
  },
  data() {
    return {
      //当前组件名称
      viewType: 'commonTable',
      //专利挖掘项目数据集合
      dataList: [
        {
          name: 'xxx有限公司',
          type: '本公司专利数据库',
          status: '进行中',
          createPerson: '朱豪',
          id: 1,
        }
      ],
      //分页
      queryParams: {
        size: 10,
        current: 0,
      },
      //分组
      group: '',
      //排序
      sort: [
        {
          "orderBy": "createTime",
          "orderType": 1
        }
      ],
      //总数
      total: 0,
      //检索字段
      searchFiled: [
        {
          label: '项目名称',
          value: 'name',
          type: 1,
          placeholder: '请输入项目名称'
        },
        {
          label: '创建人',
          value: 'createPerson',
          type: 1,
          placeholder: '请输入创建人名称'
        },
      ],
      //检索条件
      searchOption: {}
    };
  },
  watch: {},
  computed: {},
  created() { },
  mounted() { },
  methods: {
    //获取检索组件传过来的数据
    search(val) {

    },
    //排序
    handleSort(sort) {
      this.sort = { ...sort }
      this.getList()
    },
    //操作列
    handleOption({ option, row }) {
      switch (option) {
        case '0'://设置定时任务
          this.$refs.addAndEditDB.open(row, true)
          break;
        case '1'://删除
          break;
        case 'e'://编辑
          this.$refs.addAndEditProject.open(row)
          break;
      }
    },
    //分页
    handleCurrentChange(val) {
      this.queryParams.current = val;
      this.getList();
    },
    //获取专利挖掘项目数据列表
    getList() {

    },
    //添加其他企业专利数据库
    handleAdd() {
      this.$refs.addAndEditProject.open({})
    },
    //切换视图
    onChange2(val) {
      this.viewType = val
    },
  },
};
</script>
<style lang="scss" scoped></style> -->