提交 455d3591 编写于 作者: S shenjizhe

1

上级 4d2802e6
......@@ -41,7 +41,7 @@ export default {
data() {
return {
componentIndex: -1,
menuContent: [{ text: '加载' }, { text: '保存' }],
menuContent: [{ text: '加载' }, { text: '保存' }, { text: '跳转' }],
component: {
columns: [
{
......@@ -213,6 +213,28 @@ export default {
};
},
methods: {
toEntitiy() {
if (this.componentIndex >= 0) {
let component = this.component.datas[this.componentIndex];
if (component.modelId != null && component.templateId != null) {
uni.navigateTo({
url: 'test-er?componentId=' + component.id + '&modelId=' + component.modelId + '&templateId=' + component.templateId
});
}else{
uni.showToast({
title: '组件信息缺失',
icon: 'error',
duration: 2000
});
}
} else {
uni.showToast({
title: '请选择组件',
icon: 'error',
duration: 2000
});
}
},
componentSelected(index, action, data) {
this.componentIndex = index;
},
......@@ -237,6 +259,9 @@ export default {
case 1:
this.saveComponents();
break;
case 2:
this.toEntitiy();
break;
}
},
loadDatas(data, name, func) {
......
......@@ -64,6 +64,11 @@ let passwordColumn = { name: 'password', type: 'password', info: '密码', pk: f
export default {
data() {
return {
options: {
componentId: null,
modelId: null,
templateId: null
},
positionY: 0,
selected: 0,
texts: '',
......@@ -242,9 +247,16 @@ export default {
}
},
methods: {
onLoad: function(option) {
console.log("加载",option);
this.options.componentId = option.componentId;
this.options.modelId = option.modelId;
this.options.templateId = option.templateId;
return 0;
},
appendText(text) {
console.log(text);
let line = "\t" + text + "\n";
let line = '\t' + text + '\n';
this.texts += line;
},
confirm() {},
......@@ -388,7 +400,7 @@ export default {
let _this = this;
uni.showModal({
title: '请输入数据源id',
content: '1',
content: this.options.modelId,
editable: true,
success: function(res) {
if (res.confirm) {
......@@ -438,7 +450,7 @@ export default {
let _this = this;
uni.showModal({
title: '请输入组件id',
content: '1',
content: this.options.componentId,
editable: true,
success: function(res) {
if (res.confirm) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册