Commit 631f44e7 authored by jiaxu.yan's avatar jiaxu.yan

项目文件格式化

parent fbd7ede1
......@@ -2,6 +2,7 @@
build/*.js
# 忽略src/assets目录下文件的语法检查
src/assets
# 忽略public目录下文件的语法检查
public/*
# 忽略当前目录下为js的文件的语法检查
......@@ -10,4 +11,6 @@ public/*
# *.vue
node_modules/*
src/api/monitor
packages/*
\ No newline at end of file
......@@ -13,7 +13,8 @@
"dev": "vue-cli-service serve",
"log": "conventional-changelog --config ./node_modules/vue-cli-plugin-commitlint/lib/log -i CHANGELOG.md -s -r 0",
"preview": "node build/index.js --preview",
"spellcheck": "cspell lint --dot --gitignore --color --cache --show-suggestions \"src/**/*.@(html|js|cjs|mjs|ts|tsx|css|scss|md|vue)\""
"spellcheck": "cspell lint --dot --gitignore --color --cache --show-suggestions \"src/**/*.@(html|js|cjs|mjs|ts|tsx|css|scss|md|vue)\"",
"prepare": "husky install"
},
"dependencies": {
"@riophae/vue-treeselect": "0.4.0",
......
......@@ -208,7 +208,7 @@ export default {
for (let i in list) {
strs += list[i].url + separator
}
return strs != '' ? strs.substr(0, strs.length - 1) : ''
return strs !== '' ? strs.substr(0, strs.length - 1) : ''
}
}
}
......
......@@ -208,7 +208,7 @@ export default {
strs += list[i].url.replace(this.baseUrl, '') + separator
}
}
return strs != '' ? strs.substr(0, strs.length - 1) : ''
return strs !=='' ? strs.substr(0, strs.length - 1) : ''
}
}
}
......
......@@ -3,7 +3,7 @@ const sessionCache = {
if (!sessionStorage) {
return
}
if (key != null && value != null) {
if (key !==null && value !==null) {
sessionStorage.setItem(key, value)
}
},
......@@ -17,13 +17,13 @@ const sessionCache = {
return sessionStorage.getItem(key)
},
setJSON(key, jsonValue) {
if (jsonValue != null) {
if (jsonValue !==null) {
this.set(key, JSON.stringify(jsonValue))
}
},
getJSON(key) {
const value = this.get(key)
if (value != null) {
if (value !==null) {
return JSON.parse(value)
}
},
......@@ -36,7 +36,7 @@ const localCache = {
if (!localStorage) {
return
}
if (key != null && value != null) {
if (key !==null && value !==null) {
localStorage.setItem(key, value)
}
},
......@@ -50,13 +50,13 @@ const localCache = {
return localStorage.getItem(key)
},
setJSON(key, jsonValue) {
if (jsonValue != null) {
if (jsonValue !==null) {
this.set(key, JSON.stringify(jsonValue))
}
},
getJSON(key) {
const value = this.get(key)
if (value != null) {
if (value !==null) {
return JSON.parse(value)
}
},
......
......@@ -70,7 +70,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
route.component = loadView(route.component)
}
}
if (route.children != null && route.children && route.children.length) {
if (route.children !==null && route.children && route.children.length) {
route.children = filterAsyncRouter(route.children, route, type)
} else {
delete route['children']
......
......@@ -519,7 +519,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobId)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
// 更多操作触发
......@@ -606,7 +606,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.jobId != undefined) {
if (this.form.jobId !==undefined) {
updateJob(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
......
......@@ -298,7 +298,7 @@ export default {
},
created() {
const jobId = this.$route.params && this.$route.params.jobId
if (jobId !== undefined && jobId != 0) {
if (jobId !== undefined && jobId !==0) {
getJob(jobId).then(response => {
this.queryParams.jobName = response.data.jobName
this.queryParams.jobGroup = response.data.jobGroup
......
......@@ -269,7 +269,7 @@ export default {
/** 多选框选中数据 */
handleSelectionChange(selection) {
this.ids = selection.map(item => item.infoId)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
this.selectName = selection.map(item => item.userName)
},
......
......@@ -8,11 +8,11 @@
:before-close="handleClose"
>
<el-form
:model="queryParams"
ref="queryForm"
:model="queryParams"
v-show="showSearch"
size="small"
:inline="true"
v-show="showSearch"
>
<el-form-item prop="deptName">
<el-input
......
......@@ -361,7 +361,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.configId)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
/** 修改按钮操作 */
......@@ -378,7 +378,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.configId != undefined) {
if (this.form.configId !==undefined) {
updateConfig(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
......
......@@ -130,7 +130,7 @@
>新增</el-button
>
<el-button
v-if="scope.row.parentId != 0"
v-if="scope.row.parentId !==0"
size="mini"
type="text"
icon="el-icon-delete"
......@@ -348,7 +348,7 @@ export default {
/** 新增按钮操作 */
handleAdd(row) {
this.reset()
if (row != undefined) {
if (row !==undefined) {
this.form.parentId = row.deptId
}
this.open = true
......@@ -389,7 +389,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.deptId != undefined) {
if (this.form.deptId !==undefined) {
updateDept(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
......
......@@ -424,7 +424,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictCode)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
/** 修改按钮操作 */
......@@ -441,7 +441,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.dictCode != undefined) {
if (this.form.dictCode !==undefined) {
updateData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType)
this.$modal.msgSuccess('修改成功')
......
......@@ -357,7 +357,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictId)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
/** 修改按钮操作 */
......@@ -374,7 +374,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
if (this.form.dictId !==undefined) {
updateType(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
......
......@@ -176,7 +176,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.menuType != 'F'">
<el-col :span="24" v-if="form.menuType !=='F'">
<el-form-item label="菜单图标" prop="icon">
<el-popover
placement="bottom-start"
......@@ -224,7 +224,7 @@
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'F'">
<el-col :span="12" v-if="form.menuType !=='F'">
<el-form-item prop="isFrame">
<span slot="label">
<el-tooltip
......@@ -241,7 +241,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'F'">
<el-col :span="12" v-if="form.menuType !=='F'">
<el-form-item prop="path">
<span slot="label">
<el-tooltip
......@@ -269,7 +269,7 @@
<el-input v-model="form.component" placeholder="请输入组件路径" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'M'">
<el-col :span="12" v-if="form.menuType !=='M'">
<el-form-item prop="perms">
<el-input
v-model="form.perms"
......@@ -322,7 +322,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'F'">
<el-col :span="12" v-if="form.menuType !=='F'">
<el-form-item prop="visible">
<span slot="label">
<el-tooltip
......@@ -497,7 +497,7 @@ export default {
handleAdd(row) {
this.reset()
this.getTreeselect()
if (row != null && row.menuId) {
if (row !==null && row.menuId) {
this.form.parentId = row.menuId
} else {
this.form.parentId = 0
......@@ -527,7 +527,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.menuId != undefined) {
if (this.form.menuId !==undefined) {
updateMenu(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
......
......@@ -329,7 +329,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.noticeId)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
......@@ -352,7 +352,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.noticeId != undefined) {
if (this.form.noticeId !==undefined) {
updateNotice(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
......
......@@ -308,7 +308,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.postId)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
......@@ -331,7 +331,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.postId != undefined) {
if (this.form.postId !==undefined) {
updatePost(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
......
......@@ -534,7 +534,7 @@ export default {
},
// 表单重置
reset() {
if (this.$refs.menu != undefined) {
if (this.$refs.menu !==undefined) {
this.$refs.menu.setCheckedKeys([])
}
;(this.menuExpand = false),
......@@ -569,7 +569,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.roleId)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
// 更多操作触发
......@@ -673,7 +673,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.roleId != undefined) {
if (this.form.roleId !==undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys()
updateRole(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
......@@ -693,7 +693,7 @@ export default {
},
/** 提交按钮(数据权限) */
submitDataScope: function () {
if (this.form.roleId != undefined) {
if (this.form.roleId !==undefined) {
this.form.deptIds = this.getDeptAllCheckedKeys()
dataScope(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
......
......@@ -715,7 +715,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.userId)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
// 更多操作触发
......@@ -782,7 +782,7 @@ export default {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.userId != undefined) {
if (this.form.userId !==undefined) {
updateUser(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
......
<template>
<!-- 导入表 -->
<el-dialog
title="导入表"
:visible.sync="visible"
width="800px"
top="5vh"
append-to-body
>
<el-dialog title="导入表" :visible.sync="visible" width="800px" top="5vh" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="表名称" prop="tableName">
<el-input
v-model="queryParams.tableName"
placeholder="请输入表名称"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.tableName" placeholder="请输入表名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="表描述" prop="tableComment">
<el-input
v-model="queryParams.tableComment"
placeholder="请输入表描述"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.tableComment" placeholder="请输入表描述" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<el-table
@row-click="clickRow"
ref="table"
:data="dbTableList"
@selection-change="handleSelectionChange"
height="260px"
>
<el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange"
height="260px">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column
prop="tableName"
label="表名称"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="tableComment"
label="表描述"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column prop="tableName" label="表名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="tableComment" label="表描述" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column prop="updateTime" label="更新时间"></el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleImportTable">确 定</el-button>
......
......@@ -307,7 +307,7 @@ export default {
},
activated() {
const time = this.$route.query.t
if (time != null && time != this.uniqueId) {
if (time !==null && time !==this.uniqueId) {
this.uniqueId = time
this.queryParams.pageNum = Number(this.$route.query.pageNum)
this.getList()
......@@ -394,7 +394,7 @@ export default {
handleSelectionChange(selection) {
this.ids = selection.map(item => item.tableId)
this.tableNames = selection.map(item => item.tableName)
this.single = selection.length != 1
this.single = selection.length !==1
this.multiple = !selection.length
},
/** 修改按钮操作 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment