|
@@ -37,7 +37,8 @@ class AddminiFans extends Component {
|
|
formOption3: { modal: "", title: "" },
|
|
formOption3: { modal: "", title: "" },
|
|
formOption4: { modal: "", title: "" },
|
|
formOption4: { modal: "", title: "" },
|
|
formOption5: { modal: "", title: "" },
|
|
formOption5: { modal: "", title: "" },
|
|
- formOption6: { modal: "", title: "" }
|
|
|
|
|
|
+ formOption6: { modal: "", title: "" },
|
|
|
|
+ initValue1: {}
|
|
};
|
|
};
|
|
}
|
|
}
|
|
//点击编辑
|
|
//点击编辑
|
|
@@ -62,8 +63,9 @@ class AddminiFans extends Component {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
/* 弹出框取消事件 */
|
|
/* 弹出框取消事件 */
|
|
- cancelClick() {
|
|
|
|
|
|
+ cancelClick() {
|
|
this.setState({
|
|
this.setState({
|
|
|
|
+ initValue1: {},
|
|
formVisiable: false,
|
|
formVisiable: false,
|
|
formConfirmLoading: false
|
|
formConfirmLoading: false
|
|
});
|
|
});
|
|
@@ -133,7 +135,17 @@ class AddminiFans extends Component {
|
|
}).then(function(result) {
|
|
}).then(function(result) {
|
|
console.log(result)
|
|
console.log(result)
|
|
if (result.success === 1) {
|
|
if (result.success === 1) {
|
|
- message.success("保存成功");
|
|
|
|
|
|
+ message.success("操作成功");
|
|
|
|
+
|
|
|
|
+ // 成功之后
|
|
|
|
+ self.refs.gridResource.reload();
|
|
|
|
+ self.setState({
|
|
|
|
+ formVisiable: false,
|
|
|
|
+ formConfirmLoading: false,
|
|
|
|
+ editVisiable: false,
|
|
|
|
+ editConfirmLoading: false
|
|
|
|
+ });
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
if (result.message) {
|
|
if (result.message) {
|
|
message.error(result.message);
|
|
message.error(result.message);
|
|
@@ -142,15 +154,8 @@ class AddminiFans extends Component {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (callback) callback(result);
|
|
if (callback) callback(result);
|
|
- self.setState({
|
|
|
|
- formVisiable: false,
|
|
|
|
- formConfirmLoading: false,
|
|
|
|
- editVisiable: false,
|
|
|
|
- editConfirmLoading: false
|
|
|
|
- });
|
|
|
|
//self.refs.tg.getGrid().reload();
|
|
//self.refs.tg.getGrid().reload();
|
|
//self.refs.gridOptionResource.reload();
|
|
//self.refs.gridOptionResource.reload();
|
|
- self.refs.gridResource.reload();
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
render() {
|
|
render() {
|
|
@@ -228,14 +233,13 @@ class AddminiFans extends Component {
|
|
name: '编辑',
|
|
name: '编辑',
|
|
onClick: (data) => {
|
|
onClick: (data) => {
|
|
this.changeEdit(data)
|
|
this.changeEdit(data)
|
|
- console.log(data)
|
|
|
|
- const fields = [{ title: "端口名称", data: "portName", key:"portName" ,type: "text", editor: { tips: "填写一个方便记忆的名称,以免公众号/企业微信等同名" },query: true},
|
|
|
|
|
|
+ const fields = [{ title: "端口名称", data: "portName", key:"portName" ,type: "text", editor: { tips: "填写一个方便记忆的名称,以免公众号/企业微信等同名" , isRequired: true },query: true},
|
|
{ title: "公众号图标",data: "headImg", type: "img",value: WXMpAPI + "/wx/file/upload", editor: { tips: "请上传1:1尺寸的图标",action: WXMpAPI + "/wx/file/upload"}, query: true },
|
|
{ title: "公众号图标",data: "headImg", type: "img",value: WXMpAPI + "/wx/file/upload", editor: { tips: "请上传1:1尺寸的图标",action: WXMpAPI + "/wx/file/upload"}, query: true },
|
|
- { title: "公众号名称",data: "name", type: "text", editor: { tips: "微信公众号名称"}, query: true},
|
|
|
|
- { title: "AppID", data: "appId", type: "text", editor: { tips: "微信公众号AppID" }, query: true },
|
|
|
|
- { title: "AppSecret", data: "secret", type: "text", editor: { tips: "微信公众号AppSecret" },query: true },
|
|
|
|
- { title: "token", data: "token", type: "text", editor: { tips: "微信公众号token" }, query: true },
|
|
|
|
- { title: "aesKey", data: "aesKey", type: "text", editor: { tips: "微信公众号aesKey" },query: true }
|
|
|
|
|
|
+ { title: "公众号名称",data: "name", type: "text", editor: { tips: "微信公众号名称" , isRequired: true }, query: true},
|
|
|
|
+ { title: "AppID", data: "appId", type: "text", editor: { tips: "微信公众号AppID" , isRequired: true }, query: true },
|
|
|
|
+ { title: "AppSecret", data: "secret", type: "text", editor: { tips: "微信公众号AppSecret" , isRequired: true},query: true },
|
|
|
|
+ { title: "token", data: "token", type: "text", editor: { tips: "微信公众号token" , isRequired: true}, query: true },
|
|
|
|
+ { title: "aesKey", data: "aesKey", type: "text", editor: { tips: "微信公众号aesKey" , isRequired: true},query: true }
|
|
];
|
|
];
|
|
const fields2 = [ { title: "端口名称",data: "text4",type: "text",editor: {},query: true} ];
|
|
const fields2 = [ { title: "端口名称",data: "text4",type: "text",editor: {},query: true} ];
|
|
const fields3 = [ { title: "端口名称",data: "text5",type: "text",editor: {},query: true},
|
|
const fields3 = [ { title: "端口名称",data: "text5",type: "text",editor: {},query: true},
|
|
@@ -267,13 +271,13 @@ class AddminiFans extends Component {
|
|
{
|
|
{
|
|
name: "添加端口",
|
|
name: "添加端口",
|
|
onClick: function() {
|
|
onClick: function() {
|
|
- const fields = [{ title: "端口名称", data: "portName", type: "text", editor: { tips: "填写一个方便记忆的名称,以免公众号/企业微信等同名" },query: true},
|
|
|
|
|
|
+ const fields = [{ title: "端口名称", data: "portName", type: "text", editor: { tips: "填写一个方便记忆的名称,以免公众号/企业微信等同名",isRequired: true },query: true},
|
|
{ title: "公众号图标",data: "headImg", type: "img", editor: { tips: "请上传1:1尺寸的图标",action: WXMpAPI + "/wx/file/upload"}, query: true },
|
|
{ title: "公众号图标",data: "headImg", type: "img", editor: { tips: "请上传1:1尺寸的图标",action: WXMpAPI + "/wx/file/upload"}, query: true },
|
|
- { title: "公众号名称",data: "name", type: "text", editor: { tips: "微信公众号名称"}, query: true},
|
|
|
|
- { title: "AppID", data: "appId", type: "text", editor: { tips: "微信公众号AppID" }, query: true },
|
|
|
|
- { title: "AppSecret", data: "secret", type: "text", editor: { tips: "微信公众号AppSecret" },query: true },
|
|
|
|
- { title: "token", data: "token", type: "text", editor: { tips: "微信公众号token" }, query: true },
|
|
|
|
- { title: "aesKey", data: "aesKey", type: "text", editor: { tips: "微信公众号aesKey" },query: true }
|
|
|
|
|
|
+ { title: "公众号名称",data: "name", type: "text", editor: { tips: "微信公众号名称" , isRequired: true}, query: true},
|
|
|
|
+ { title: "AppID", data: "appId", type: "text", editor: { tips: "微信公众号AppID" , isRequired: true }, query: true },
|
|
|
|
+ { title: "AppSecret", data: "secret", type: "text", editor: { tips: "微信公众号AppSecret" , isRequired: true },query: true },
|
|
|
|
+ { title: "token", data: "token", type: "text", editor: { tips: "微信公众号token" , isRequired: true }, query: true },
|
|
|
|
+ { title: "aesKey", data: "aesKey", type: "text", editor: { tips: "微信公众号aesKey" , isRequired: true },query: true }
|
|
];
|
|
];
|
|
const fields2 = [ { title: "端口名称",data: "text4",type: "text",editor: {},query: true} ];
|
|
const fields2 = [ { title: "端口名称",data: "text4",type: "text",editor: {},query: true} ];
|
|
const fields3 = [ { title: "端口名称",data: "text5",type: "text",editor: {},query: true},
|
|
const fields3 = [ { title: "端口名称",data: "text5",type: "text",editor: {},query: true},
|
|
@@ -284,7 +288,7 @@ class AddminiFans extends Component {
|
|
{ title: "通讯录同步",data: "text9",type: "text", editor: {tips: "企业微信后台,“管理工具-通讯录同步”中获取"},query: true},
|
|
{ title: "通讯录同步",data: "text9",type: "text", editor: {tips: "企业微信后台,“管理工具-通讯录同步”中获取"},query: true},
|
|
{ title: "客户信息查询",data: "text10",type: "text",editor: { tips: "企业微信后台,“应用管理-自建-客户信息查询”中获取" }, query: true }
|
|
{ title: "客户信息查询",data: "text10",type: "text",editor: { tips: "企业微信后台,“应用管理-自建-客户信息查询”中获取" }, query: true }
|
|
];
|
|
];
|
|
- let formOption = { model: "add",title: "添加端口", fields: fields, value: {}, extraParams: [] };
|
|
|
|
|
|
+ let formOption = { model: "add",title: "添加公众号端口", fields: fields, value: {}, extraParams: [] };
|
|
let formOption2 = { model: "add", title: "基础设置", fields: fields2, value: {}, extraParams: [] };
|
|
let formOption2 = { model: "add", title: "基础设置", fields: fields2, value: {}, extraParams: [] };
|
|
let formOption3 = { model: "add", title: "基础设置", fields: fields3, value: {}, extraParams: [] };
|
|
let formOption3 = { model: "add", title: "基础设置", fields: fields3, value: {}, extraParams: [] };
|
|
self.setState({
|
|
self.setState({
|
|
@@ -292,6 +296,7 @@ class AddminiFans extends Component {
|
|
formOption: formOption,
|
|
formOption: formOption,
|
|
formOption2: formOption2,
|
|
formOption2: formOption2,
|
|
formOption3: formOption3,
|
|
formOption3: formOption3,
|
|
|
|
+ initValue1: {"aafd":"asdfas"},
|
|
mode: '0'
|
|
mode: '0'
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -315,7 +320,7 @@ class AddminiFans extends Component {
|
|
this.setState({ type: key });
|
|
this.setState({ type: key });
|
|
}}>
|
|
}}>
|
|
<TabPane tab="公众号" key="0">
|
|
<TabPane tab="公众号" key="0">
|
|
- <AutoForm formOption={this.state.formOption} ref="autoForm1" />
|
|
|
|
|
|
+ <AutoForm formOption={this.state.formOption} initValue={this.state.initValue1} ref="autoForm1" />
|
|
</TabPane>
|
|
</TabPane>
|
|
{/**
|
|
{/**
|
|
<TabPane tab="小程序" key="2">
|
|
<TabPane tab="小程序" key="2">
|