|
@@ -0,0 +1,130 @@
|
|
|
+<template>
|
|
|
+ <div class="height_100">
|
|
|
+ <el-container>
|
|
|
+ <el-header>
|
|
|
+ <el-button type="primary" size="small" @click="add">添加</el-button>
|
|
|
+ </el-header>
|
|
|
+ <el-main v-DivHeight="getDivHeight">
|
|
|
+ <el-table
|
|
|
+ ref="table"
|
|
|
+ :data="tableData"
|
|
|
+ row-key="id"
|
|
|
+ style="width: 100%"
|
|
|
+ :maxHeight="tableHeight - 40"
|
|
|
+ v-loading="loading"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" :reserve-selection="true">
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="conditions" label="检索式"></el-table-column>
|
|
|
+ <el-table-column prop="dbType" label="检索范围" width="140">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ dbType[scope.row.dbType] }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="time" label="创建/更新时间" width="240">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="time">
|
|
|
+ <p>创建:{{ scope.row.retrieveTime }}</p>
|
|
|
+ <p>更新:{{ scope.row.updateTime }}</p>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="totalNum" label="检索结果" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.totalNum }}件
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="140">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="icon">
|
|
|
+ <span @click="editSearch(scope.row)" class="margin-left_10">
|
|
|
+ <el-tooltip class="item" effect="dark" content="编辑" placement="top">
|
|
|
+ <i class="iconfont icon-bianji"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ <span @click="executeSearch(scope.row)" class="margin-left_10">
|
|
|
+ <el-tooltip class="item" effect="dark" content="再次执行" placement="top">
|
|
|
+ <i class="iconfont icon-zidongzhihang"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ <span @click="delSearch(scope.row)" class="margin-left_10">
|
|
|
+ <el-tooltip class="item" effect="dark" content="删除" placement="top">
|
|
|
+ <i class="iconfont icon-shanchu"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-main>
|
|
|
+ <el-footer class="pagination" style="display:flex;justify-content:space-between;align-items:center">
|
|
|
+ <div style="display:flex;align-items:center">
|
|
|
+ <span v-if="multipleSelection.length > 0">
|
|
|
+ 已勾选 <b>{{ multipleSelection.length }}</b> 条
|
|
|
+ </span>
|
|
|
+ <div v-show="multipleSelection.length" class="margin-left_10">
|
|
|
+ <el-button type="primary" size="small" @click="del"></el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-pagination background layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :current-page.sync="queryParams.current" :page-size.sync="queryParams.size"
|
|
|
+ @current-change="handleCurrentChange" @size-change="getList" :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </el-footer>
|
|
|
+ </el-container>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getTableHeight } from '@/views/components/mixins'
|
|
|
+export default {
|
|
|
+ mixins:[getTableHeight],
|
|
|
+ components: {},
|
|
|
+ props: {
|
|
|
+ projectId:{
|
|
|
+ default:0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData:[],
|
|
|
+ multipleSelection:[],
|
|
|
+ loading:false,
|
|
|
+ queryParams:{
|
|
|
+ current:1,
|
|
|
+ size:10
|
|
|
+ },
|
|
|
+ total:0
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {},
|
|
|
+ computed: {},
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList(){},
|
|
|
+ handleCurrentChange(val){
|
|
|
+ this.queryParams.current = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ add(){},
|
|
|
+ del(){},
|
|
|
+ handleSelectionChange(val){
|
|
|
+ this.multipleSelection = val
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+</style>
|