提交 90125a0e 编写于 作者: K klausY

顶部搜索功能添加及生成代码功能去重校验

上级 4954ff1d
...@@ -2,7 +2,7 @@ package model ...@@ -2,7 +2,7 @@ package model
import ( import (
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
uuid "github.com/satori/go.uuid" "github.com/satori/go.uuid"
) )
type SysUser struct { type SysUser struct {
...@@ -15,3 +15,4 @@ type SysUser struct { ...@@ -15,3 +15,4 @@ type SysUser struct {
Authority SysAuthority `json:"authority" gorm:"ForeignKey:AuthorityId;AssociationForeignKey:AuthorityId"` Authority SysAuthority `json:"authority" gorm:"ForeignKey:AuthorityId;AssociationForeignKey:AuthorityId"`
AuthorityId string `json:"authorityId" gorm:"default:888"` AuthorityId string `json:"authorityId" gorm:"default:888"`
} }
...@@ -2878,8 +2878,7 @@ ...@@ -2878,8 +2878,7 @@
"version": "4.6.0", "version": "4.6.0",
"resolved": "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz", "resolved": "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true, "dev": true
"optional": true
}, },
"coa": { "coa": {
"version": "2.0.2", "version": "2.0.2",
...@@ -5246,8 +5245,7 @@ ...@@ -5246,8 +5245,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -5268,14 +5266,12 @@ ...@@ -5268,14 +5266,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -5290,20 +5286,17 @@ ...@@ -5290,20 +5286,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -5420,8 +5413,7 @@ ...@@ -5420,8 +5413,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -5433,7 +5425,6 @@ ...@@ -5433,7 +5425,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -5448,7 +5439,6 @@ ...@@ -5448,7 +5439,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -5456,14 +5446,12 @@ ...@@ -5456,14 +5446,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -5482,7 +5470,6 @@ ...@@ -5482,7 +5470,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -5563,8 +5550,7 @@ ...@@ -5563,8 +5550,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -5576,7 +5562,6 @@ ...@@ -5576,7 +5562,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -5662,8 +5647,7 @@ ...@@ -5662,8 +5647,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -5699,7 +5683,6 @@ ...@@ -5699,7 +5683,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -5719,7 +5702,6 @@ ...@@ -5719,7 +5702,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -5763,14 +5745,12 @@ ...@@ -5763,14 +5745,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -9892,8 +9872,7 @@ ...@@ -9892,8 +9872,7 @@
"version": "4.0.8", "version": "4.0.8",
"resolved": "https://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz", "resolved": "https://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true, "dev": true
"optional": true
}, },
"rx-lite-aggregates": { "rx-lite-aggregates": {
"version": "4.0.8", "version": "4.0.8",
...@@ -10115,6 +10094,11 @@ ...@@ -10115,6 +10094,11 @@
"ajv-keywords": "^3.1.0" "ajv-keywords": "^3.1.0"
} }
}, },
"screenfull": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.0.2.tgz",
"integrity": "sha512-cCF2b+L/mnEiORLN5xSAz6H3t18i2oHh9BA8+CQlAh5DRw2+NFAGQJOSYbcGw8B2k04g/lVvFcfZ83b3ysH5UQ=="
},
"script-ext-html-webpack-plugin": { "script-ext-html-webpack-plugin": {
"version": "2.1.4", "version": "2.1.4",
"resolved": "https://registry.npmjs.org/script-ext-html-webpack-plugin/-/script-ext-html-webpack-plugin-2.1.4.tgz", "resolved": "https://registry.npmjs.org/script-ext-html-webpack-plugin/-/script-ext-html-webpack-plugin-2.1.4.tgz",
......
...@@ -28,6 +28,19 @@ ...@@ -28,6 +28,19 @@
>{{item.meta.title}}</el-breadcrumb-item> >{{item.meta.title}}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div class="fl-right right-box"> <div class="fl-right right-box">
<transition name="el-fade-in-linear">
<div v-show="show" class="transition-box" style="display: inline-block; ">
<el-select v-model="value" filterable placeholder="请选择" @blur="test()">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</transition>
<i class="el-icon-search" style="font-size: 20px; display: inline-block; " @click="show = !show"></i>
<Screenfull class="screenfull"></Screenfull> <Screenfull class="screenfull"></Screenfull>
<el-dropdown> <el-dropdown>
<span class="el-dropdown-link"> <span class="el-dropdown-link">
...@@ -95,6 +108,7 @@ export default { ...@@ -95,6 +108,7 @@ export default {
name: "Layout", name: "Layout",
data() { data() {
return { return {
show:false,
isCollapse: false, isCollapse: false,
isSider: true, isSider: true,
isMobile: false, isMobile: false,
...@@ -124,7 +138,24 @@ export default { ...@@ -124,7 +138,24 @@ export default {
trigger: "blur" trigger: "blur"
} }
] ]
} },
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
value:''
}; };
}, },
components: { components: {
...@@ -133,6 +164,9 @@ export default { ...@@ -133,6 +164,9 @@ export default {
Screenfull Screenfull
}, },
methods: { methods: {
test(){
this.show = false
},
...mapActions("user", ["LoginOut"]), ...mapActions("user", ["LoginOut"]),
totalCollapse() { totalCollapse() {
this.isCollapse = !this.isCollapse; this.isCollapse = !this.isCollapse;
...@@ -321,7 +355,7 @@ $mainHight: 100vh; ...@@ -321,7 +355,7 @@ $mainHight: 100vh;
&:not(.el-menu--collapse) { &:not(.el-menu--collapse) {
width: 220px; width: 220px;
} }
} }
.el-menu--collapse{ .el-menu--collapse{
li{ li{
...@@ -374,8 +408,12 @@ $mainHight: 100vh; ...@@ -374,8 +408,12 @@ $mainHight: 100vh;
vertical-align: middle; vertical-align: middle;
} }
} }
.el-input__inner{
border: none;
border-bottom: 1px solid #606266;
}
.screenfull{ .screenfull{
display: inline-block; display: inline-block;
} }
</style> </style>
...@@ -78,11 +78,11 @@ export default { ...@@ -78,11 +78,11 @@ export default {
fieldJson:[ { required: true, message: '请输入field格式化json', trigger: 'blur' }], fieldJson:[ { required: true, message: '请输入field格式化json', trigger: 'blur' }],
fieldType:[ { required: true, message: '请选择field数据类型', trigger: 'blur' }] fieldType:[ { required: true, message: '请选择field数据类型', trigger: 'blur' }]
} }
} }
} },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
</style> </style>
\ No newline at end of file
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
width="280"> width="280">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-test
prop="fieldName" prop="fieldName"
label="Field名" label="Field名"
width="280"> width="280">
...@@ -117,12 +116,6 @@ export default { ...@@ -117,12 +116,6 @@ export default {
components:{ components:{
FieldDialog FieldDialog
}, },
directives:{
'test':function(el,binding,vnode){
/** el可以获取当前dom节点,并且进行编译,也可以操作事件 **/
/** binding指的是一个对象,一般不用 **/ /** vnode 是 Vue 编译生成的虚拟节点 **/
console.log(el.click()); //获取v-model的值
}},
methods:{ methods:{
editAndAddField(item){ editAndAddField(item){
this.dialogFlag = true this.dialogFlag = true
...@@ -135,9 +128,14 @@ export default { ...@@ -135,9 +128,14 @@ export default {
this.dialogMiddle = JSON.parse(JSON.stringify(fieldTemplate)) this.dialogMiddle = JSON.parse(JSON.stringify(fieldTemplate))
} }
}, },
regExp(ele){
return ele.replace(/\s*/g,"")
},
enterDialog(){ enterDialog(){
console.log(this.dialogMiddle.fieldName.replace(/\s*/g,"")) this.dialogMiddle.fieldName = this.regExp(this.dialogMiddle.fieldName)
this.dialogMiddle.fieldDesc = this.regExp(this.dialogMiddle.fieldDesc)
this.dialogMiddle.fieldJson = this.regExp(this.dialogMiddle.fieldJson)
this.dialogMiddle.columnName = this.regExp(this.dialogMiddle.columnName)
this.$refs.fieldDialog.$refs.fieldDialogFrom.validate((valid) => { this.$refs.fieldDialog.$refs.fieldDialogFrom.validate((valid) => {
if (valid) { if (valid) {
this.dialogMiddle.fieldName = toUpperCase(this.dialogMiddle.fieldName) this.dialogMiddle.fieldName = toUpperCase(this.dialogMiddle.fieldName)
...@@ -170,7 +168,11 @@ export default { ...@@ -170,7 +168,11 @@ export default {
} }
this.$refs.autoCodeForm.validate(async (valid) => { this.$refs.autoCodeForm.validate(async (valid) => {
if (valid) { if (valid) {
this.form.structName = toUpperCase(this.form.structName) this.form.structName = this.regExp(this.form.structName)
this.form.structName = toUpperCase(this.form.structName)
this.form.abbreviation = this.regExp(this.form.abbreviation)
this.form.packageName = this.regExp(this.form.packageName)
if(this.form.structName == this.form.abbreviation){ if(this.form.structName == this.form.abbreviation){
this.$message({ this.$message({
type:"error", type:"error",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册