From 3e6ebec9afdfd4758b5894d898dcc916c2800d5a Mon Sep 17 00:00:00 2001 From: pycook <pycook@126.com> Date: Mon, 18 Dec 2023 19:25:22 +0800 Subject: [PATCH] feat(ui): lint --- cmdb-ui/src/api/auth.js | 1 - .../views/ci/modules/ciDetailAttrContent.vue | 2 +- .../operation_history/modules/typeTable.vue | 2 +- .../cmdb/views/relation_views/index.vue | 8 ++- .../modules/cmdb/views/tree_views/index.vue | 10 ++-- cmdb-ui/src/views/setting/auth/loginModal.vue | 54 +++++++++---------- 6 files changed, 42 insertions(+), 35 deletions(-) diff --git a/cmdb-ui/src/api/auth.js b/cmdb-ui/src/api/auth.js index 4e23e72..4ac0a24 100644 --- a/cmdb-ui/src/api/auth.js +++ b/cmdb-ui/src/api/auth.js @@ -30,7 +30,6 @@ export function getAuthDataEnable() { }) } - export function testLDAP(test_type, data) { return axios({ url: `/common-setting/v1/auth_config/LDAP/test?test_type=${test_type}`, diff --git a/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue b/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue index 8b60e6f..8b0e905 100644 --- a/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue +++ b/cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue @@ -241,7 +241,7 @@ export default { this.$nextTick(async () => { if (this.attr.is_list && !this.attr.is_choice) { this.form.setFieldsValue({ - [`${this.attr.name}`]: this.ci[this.attr.name]|| null, + [`${this.attr.name}`]: this.ci[this.attr.name] || null, }) return } diff --git a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/typeTable.vue b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/typeTable.vue index d743c2d..c58eec7 100644 --- a/cmdb-ui/src/modules/cmdb/views/operation_history/modules/typeTable.vue +++ b/cmdb-ui/src/modules/cmdb/views/operation_history/modules/typeTable.vue @@ -61,7 +61,7 @@ </vxe-column> <vxe-column field="type_id" title="模型" width="150px"> <template #default="{ row }"> - {{ row.operate_type === '删除模型' ? row.change.alias : row.type_id}} + {{ row.operate_type === '删除模型' ? row.change.alias : row.type_id }} </template> </vxe-column> <vxe-column field="changeDescription" title="描述"> diff --git a/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue b/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue index e5b87f3..70d1c2d 100644 --- a/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/relation_views/index.vue @@ -58,8 +58,12 @@ /> <div class="relation-views-right-bar"> <a-space> - <a-button v-if="isLeaf" type="primary" size="small" @click="$refs.create.handleOpen(true, 'create')" - >新建</a-button + <a-button + v-if="isLeaf" + type="primary" + size="small" + @click="$refs.create.handleOpen(true, 'create')" + >新建</a-button > <div class="ops-list-batch-action" v-if="isLeaf && isShowBatchIcon"> diff --git a/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue b/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue index 81fb909..3b06fd5 100644 --- a/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue +++ b/cmdb-ui/src/modules/cmdb/views/tree_views/index.vue @@ -14,12 +14,16 @@ } " class="cmdb-views-header-metadata" - ><a-icon type="info-circle" /> + ><a-icon type="info-circle" /> 属性说明 </span> </span> - <a-button size="small" icon="plus" type="primary" @click="$refs.create.handleOpen(true, 'create')" - >新建</a-button + <a-button + size="small" + icon="plus" + type="primary" + @click="$refs.create.handleOpen(true, 'create')" + >新建</a-button > </div> <SplitPane diff --git a/cmdb-ui/src/views/setting/auth/loginModal.vue b/cmdb-ui/src/views/setting/auth/loginModal.vue index a144b7a..682e253 100644 --- a/cmdb-ui/src/views/setting/auth/loginModal.vue +++ b/cmdb-ui/src/views/setting/auth/loginModal.vue @@ -1,30 +1,30 @@ <template> - <a-modal :visible="visible" @cancel="handleCancel" @ok="handleOK"> - <a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }"> - <a-form-item label="用户名/邮箱"> - <a-input - v-decorator="[ - 'username', - { - rules: [{ required: true, message: '请输入用户名或邮箱' }], - validateTrigger: 'change', - }, - ]" - > - </a-input> - </a-form-item> - <a-form-item label="密码"> - <a-input - type="password" - autocomplete="false" - v-decorator="['password', { rules: [{ required: true, message: '请输入密码' }], validateTrigger: 'blur' }]" - > - </a-input> - </a-form-item> - </a-form> - </a-modal> - </template> - + <a-modal :visible="visible" @cancel="handleCancel" @ok="handleOK"> + <a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }"> + <a-form-item label="用户名/邮箱"> + <a-input + v-decorator="[ + 'username', + { + rules: [{ required: true, message: '请输入用户名或邮箱' }], + validateTrigger: 'change', + }, + ]" + > + </a-input> + </a-form-item> + <a-form-item label="密码"> + <a-input + type="password" + autocomplete="false" + v-decorator="['password', { rules: [{ required: true, message: '请输入密码' }], validateTrigger: 'blur' }]" + > + </a-input> + </a-form-item> + </a-form> + </a-modal> +</template> + <script> export default { name: 'LoginModal', @@ -53,4 +53,4 @@ } </script> - <style></style> \ No newline at end of file + <style></style>