mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
fix(接口测试): 只读用户定时任务页面自动跳转
This commit is contained in:
parent
e56c42dcc4
commit
b5d926e264
@ -31,7 +31,7 @@
|
||||
</el-dialog>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('schedule.task_notification')" name="second">
|
||||
<schedule-task-notification :test-id="testId" :schedule-receiver-options="scheduleReceiverOptions"></schedule-task-notification>
|
||||
<schedule-task-notification :is-tester-permission="isTesterPermission" :test-id="testId" :schedule-receiver-options="scheduleReceiverOptions"></schedule-task-notification>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@ -46,6 +46,7 @@ import CrontabResult from "../cron/CrontabResult";
|
||||
import {cronValidate} from "@/common/js/cron";
|
||||
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||
import ScheduleTaskNotification from "../../settings/organization/components/ScheduleTaskNotification";
|
||||
import {checkoutTestManagerOrTestUser} from "../../../../common/js/utils";
|
||||
function defaultCustomValidate() {
|
||||
return {pass: true};
|
||||
}
|
||||
@ -113,10 +114,13 @@ export default {
|
||||
name: '',
|
||||
organizationId: this.currentUser().lastOrganizationId
|
||||
};
|
||||
this.result = this.$post('user/org/member/list/all', param, response => {
|
||||
this.scheduleReceiverOptions = response.data
|
||||
|
||||
});
|
||||
if (this.isTesterPermission) {
|
||||
this.result = this.$post('user/org/member/list/all', param, response => {
|
||||
this.scheduleReceiverOptions = response.data
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
/* handleClick() {
|
||||
if (this.activeName === "second") {
|
||||
@ -188,6 +192,11 @@ export default {
|
||||
let time1 = new Date(resultList[0]);
|
||||
let time2 = new Date(resultList[1]);
|
||||
return time2 - time1;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isTesterPermission() {
|
||||
return checkoutTestManagerOrTestUser();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel('scheduleTask')">
|
||||
<el-button :disabled="!isTesterPermission" icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel('scheduleTask')">
|
||||
{{ $t('organization.message.create_new_notification') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -69,12 +69,14 @@
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-show="scope.row.isSet"
|
||||
:disabled="!isTesterPermission"
|
||||
@click="handleAddTask(scope.$index,scope.row)"
|
||||
>{{ $t('commons.add') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-show="scope.row.isSet"
|
||||
:disabled="!isTesterPermission"
|
||||
@click.native.prevent="removeRowTask(scope.$index,form.scheduleTask)"
|
||||
>{{ $t('commons.cancel') }}
|
||||
</el-button>
|
||||
@ -82,6 +84,7 @@
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-show="!scope.row.isSet"
|
||||
:disabled="!isTesterPermission"
|
||||
@click="handleEditTask(scope.$index,scope.row)"
|
||||
>{{ $t('commons.edit') }}</el-button>
|
||||
<el-button
|
||||
@ -89,6 +92,7 @@
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
v-show="!scope.row.isSet"
|
||||
:disabled="!isTesterPermission"
|
||||
@click.native.prevent="deleteRowTask(scope.$index,scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
@ -106,6 +110,10 @@ export default {
|
||||
props: {
|
||||
testId:String,
|
||||
scheduleReceiverOptions:Array,
|
||||
isTesterPermission: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -120,7 +128,6 @@ export default {
|
||||
identification: "",
|
||||
isReadOnly: false,
|
||||
testId:this.testId,
|
||||
|
||||
}],
|
||||
},
|
||||
scheduleEventOptions: [
|
||||
|
@ -497,7 +497,6 @@ export default {
|
||||
},
|
||||
showPopover(row, column, cell) {
|
||||
if (column.property === 'name') {
|
||||
console.log(row, column);
|
||||
this.currentCaseId = row.id;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user