diff --git a/src/components/EditSites.vue b/src/components/EditSites.vue
index e1b7553..578563b 100644
--- a/src/components/EditSites.vue
+++ b/src/components/EditSites.vue
@@ -89,7 +89,9 @@
-
+
+
+
@@ -129,6 +131,7 @@ export default {
group: '',
isActive: 1
},
+ siteGroup: [],
rules: {
name: [
{ required: true, message: '源站名不能为空', trigger: 'blur' }
@@ -210,7 +213,17 @@ export default {
delete i.status
}
},
+ getSitesGroup () {
+ const arr = []
+ for (const i of this.sites) {
+ if (arr.indexOf(i.group) < 0) {
+ arr.push(i.group)
+ }
+ }
+ this.siteGroup = arr
+ },
addSite () {
+ this.getSitesGroup()
this.dialogType = 'new'
this.dialogVisible = true
this.siteInfo = {
@@ -223,6 +236,7 @@ export default {
}
},
editSite (siteInfo) {
+ this.getSitesGroup()
if (this.checkAllSiteLoading) {
this.$message.info('正在检测, 请勿操作.')
return false
diff --git a/src/lib/element/index.js b/src/lib/element/index.js
index 44a7ffb..ceacc31 100644
--- a/src/lib/element/index.js
+++ b/src/lib/element/index.js
@@ -1,5 +1,5 @@
import Vue from 'vue'
-import { Message, Button, Table, TableColumn, Tag, Input, Dialog, Form, FormItem, Switch } from 'element-ui'
+import { Message, Button, Table, TableColumn, Tag, Input, Dialog, Form, FormItem, Switch, Select, Option } from 'element-ui'
import Plugin from 'v-fit-columns'
Vue.use(Button)
Vue.use(Table)
@@ -11,4 +11,6 @@ Vue.use(Form)
Vue.use(FormItem)
Vue.use(Switch)
Vue.use(Plugin)
+Vue.use(Select)
+Vue.use(Option)
Vue.prototype.$message = Message