mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 14:34:46 +00:00
fix: 修正测试产生的Bugs (#593)
* fix: 调整登录复核工单字段 * fix: 移除创建网关的详情链接展示 * fix: 调整我发起的工单的API字段 * fix: 移除工单申请表单的非必选字段 * fix: 修正创建密码匣子时表单错误 * fix: 调整申请应用时推荐应用对应字段 * fix: 移除旧版本请求 * fix: 优化内部变量写法 * fix: 干掉旧刷新方法 * fix: 优化写法 Co-authored-by: Orange <orangemtony@gmail.com>
This commit is contained in:
@@ -240,10 +240,7 @@ export default {
|
||||
})
|
||||
},
|
||||
refresh: function() {
|
||||
this.$axios.post(
|
||||
'/api/v1/assets/nodes/00000000-0000-0000-0000-000000000000/tasks/',
|
||||
{ action: 'refresh_cache' }
|
||||
)
|
||||
|
||||
},
|
||||
getSelectedNodes: function() {
|
||||
return this.zTree.getSelectedNodes()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<GenericCreateUpdatePage
|
||||
:fields="fields"
|
||||
:has-detail-in-msg="false"
|
||||
:initial="initial"
|
||||
:fields-meta="fieldsMeta"
|
||||
:url="url"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<script>
|
||||
import TicketListTable from './TicketListTable'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'MyTicketList',
|
||||
components: {
|
||||
@@ -11,8 +12,16 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
url: '/api/v1/tickets/tickets/?assign=0'
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
url() {
|
||||
return `/api/v1/tickets/tickets/?applicant=${this.currentUser.id}`
|
||||
},
|
||||
...mapGetters([
|
||||
'currentUser'
|
||||
])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-input v-model="requestForm.name" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('assets.Applications')" required>
|
||||
<Select2 v-model="requestForm.asset" v-bind="asset_select2" style="width: 50% !important" />
|
||||
<Select2 v-model="requestForm.application" v-bind="apps_select2" style="width: 50% !important" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('tickets.SystemUser')" required>
|
||||
<Select2 v-model="requestForm.systemuser" v-bind="systemuser_select2" style="width: 50% !important" />
|
||||
@@ -62,14 +62,14 @@ export default {
|
||||
statusMap: this.object.status === 'open' ? STATUS_MAP[this.object.status] : STATUS_MAP[this.object.action],
|
||||
requestForm: {
|
||||
name: this.object.meta.approve_permission_name,
|
||||
asset: this.object.meta.recommend_assets,
|
||||
application: this.object.meta.recommend_applications,
|
||||
systemuser: this.object.meta.recommend_system_users,
|
||||
apply_date_expired: this.object.meta.apply_date_expired,
|
||||
apply_date_start: this.object.meta.apply_date_start
|
||||
},
|
||||
comments: '',
|
||||
assets: [],
|
||||
asset_select2: {
|
||||
apps_select2: {
|
||||
multiple: true,
|
||||
value: this.object.meta.recommend_applications,
|
||||
ajax: {
|
||||
@@ -202,14 +202,14 @@ export default {
|
||||
window.location.reload()
|
||||
},
|
||||
handleApprove() {
|
||||
if (this.requestForm.asset.length === 0 || this.requestForm.systemuser.length === 0) {
|
||||
if (this.requestForm.application.length === 0 || this.requestForm.systemuser.length === 0) {
|
||||
return this.$message.error(this.$t('common.NeedAssetsAndSystemUserErrMsg'))
|
||||
} else {
|
||||
this.$axios.put(`/api/v1/tickets/tickets/${this.object.id}/approve/`, {
|
||||
meta: {
|
||||
approve_permission_name: this.requestForm.name,
|
||||
approve_system_users: this.requestForm.systemuser,
|
||||
approve_applications: this.requestForm.asset,
|
||||
approve_applications: this.requestForm.application,
|
||||
approve_date_start: this.requestForm.apply_date_start,
|
||||
approve_date_expired: this.requestForm.apply_date_expired
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ export default {
|
||||
],
|
||||
fieldsMeta: {
|
||||
type: {
|
||||
hidden: () => true,
|
||||
el: {
|
||||
disabled: true
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ export default {
|
||||
],
|
||||
fieldsMeta: {
|
||||
type: {
|
||||
hidden: () => true,
|
||||
el: {
|
||||
disabled: true
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
return [
|
||||
{
|
||||
key: this.$t('tickets.Applicant'),
|
||||
value: this.object.user_display
|
||||
value: this.object.applicant_display
|
||||
},
|
||||
{
|
||||
key: this.$t('tickets.type'),
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
},
|
||||
{
|
||||
key: this.$t('tickets.Assignee'),
|
||||
value: this.object.assignee_display
|
||||
value: this.object.processor_display
|
||||
},
|
||||
{
|
||||
key: this.$t('common.dateCreated'),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-col :span="17">
|
||||
<Details :detail-card-items="detailCardItems" :title="$t('common.BasicInfo')" />
|
||||
<Details v-if="specialCardItems.length > 0" :detail-card-items="specialCardItems" :title="$t('common.ApplyInfo')" />
|
||||
<Details v-if="object.action === 'approve'" :detail-card-items="assignedCardItems" :title="$t('tickets.AssignedInfo')" />
|
||||
<Details v-if="object.action === 'approve' && assignedCardItems.length > 0" :detail-card-items="assignedCardItems" :title="$t('tickets.AssignedInfo')" />
|
||||
<slot id="MoreDetails" />
|
||||
<Comments :object="object" v-bind="$attrs" />
|
||||
</el-col>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<script>
|
||||
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
|
||||
import Uploadkey from '@/components/UploadKey'
|
||||
|
||||
import Select2 from '@/components/Select2'
|
||||
export default {
|
||||
name: 'AdminUserCreateUpdate',
|
||||
components: {
|
||||
@@ -23,6 +23,7 @@ export default {
|
||||
fieldsMeta: {
|
||||
asset: {
|
||||
label: this.$t('perms.Asset'),
|
||||
component: Select2,
|
||||
el: {
|
||||
multiple: false,
|
||||
ajax: {
|
||||
|
||||
Reference in New Issue
Block a user