|
@@ -74,10 +74,10 @@
|
|
|
:value="dict.id"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- <el-button size="mini" style="float: right;width: 100px;margin-top: 4px;">添加数据源</el-button>
|
|
|
+ <el-button size="mini" @click="addDataItem" style="float: right;width: 100px;margin-top: 4px;">添加数据项</el-button>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <el-button size="mini" @click="addDataItem" style="float: right;margin-top: 15px;margin-right: 14px;">添加数据项</el-button>
|
|
|
+<!-- <el-button size="mini" style="float: right;margin-top: 15px;margin-right: 14px;">添加数据项</el-button>-->
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
@@ -228,7 +228,15 @@ export default {
|
|
|
},
|
|
|
/** 添加数据项 */
|
|
|
addDataItem() {
|
|
|
- getDataSourceItemTree(this.groupBasicForm.dataSourceId).then(res => {
|
|
|
+ let id = this.groupBasicForm.dataSourceId
|
|
|
+ if (!id) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择数据源!',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ getDataSourceItemTree(id).then(res => {
|
|
|
console.log(res)
|
|
|
}).catch((e) => {
|
|
|
console.error(e)
|