Merge branch 'dev'

This commit is contained in:
Captain.B 2020-06-16 11:31:14 +08:00
commit 1212c3e7ce
4 changed files with 11 additions and 15 deletions

View File

@ -35,7 +35,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<ms-create-test v-permission="['test_manager','test_user']" :to="'/api/test/create'"/> <ms-create-test :to="'/api/test/create'"/>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="8"/> <el-col :span="8"/>

View File

@ -1,5 +1,5 @@
<template> <template>
<router-link v-if="this.show" class="create-test" :to="this.to" v-permission="this.permission"> <router-link class="create-test" :to="this.to" v-permission="this.permission">
<el-button type="primary" size="small">{{this.title}}</el-button> <el-button type="primary" size="small">{{this.title}}</el-button>
</router-link> </router-link>
</template> </template>
@ -8,7 +8,6 @@
export default { export default {
name: "MsCreateTest", name: "MsCreateTest",
props: { props: {
show: Boolean,
to: [String, Object], to: [String, Object],
title: { title: {
type: String, type: String,

View File

@ -36,7 +36,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<ms-create-test v-permission="['test_manager','test_user']" :to="'/performance/test/create'"/> <ms-create-test :to="'/performance/test/create'"/>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="8"/> <el-col :span="8"/>

View File

@ -3,17 +3,9 @@
<ms-main-container> <ms-main-container>
<el-card class="table-card" v-loading="result.loading"> <el-card class="table-card" v-loading="result.loading">
<template v-slot:header> <template v-slot:header>
<div> <ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="search"
<el-row type="flex" justify="space-between" align="middle"> :title="$t('commons.test')"
<span class="title">{{$t('commons.test')}}</span> @create="create" :createTip="$t('load_test.create')"/>
<span class="search">
<el-input type="text" size="small" :placeholder="$t('load_test.search_by_name')"
prefix-icon="el-icon-search"
maxlength="60"
v-model="condition.name" @change="search" clearable/>
</span>
</el-row>
</div>
</template> </template>
<el-table :data="tableData" class="test-content" <el-table :data="tableData" class="test-content"
@ -89,9 +81,11 @@
import MsPerformanceTestStatus from "./PerformanceTestStatus"; import MsPerformanceTestStatus from "./PerformanceTestStatus";
import MsTableOperators from "../../common/components/MsTableOperators"; import MsTableOperators from "../../common/components/MsTableOperators";
import {_filter, _sort} from "../../../../common/js/utils"; import {_filter, _sort} from "../../../../common/js/utils";
import MsTableHeader from "../../common/components/MsTableHeader";
export default { export default {
components: { components: {
MsTableHeader,
MsPerformanceTestStatus, MsPerformanceTestStatus,
MsTablePagination, MsTablePagination,
MsTableOperator, MsTableOperator,
@ -210,6 +204,9 @@
this.$router.push({ this.$router.push({
path: '/performance/test/edit/' + row.id, path: '/performance/test/edit/' + row.id,
}) })
},
create() {
this.$router.push('/performance/test/create');
} }
} }
} }