|
@@ -8,7 +8,9 @@ import {Modal,
|
|
|
Col,
|
|
|
Button,
|
|
|
Icon,
|
|
|
- Upload
|
|
|
+ Upload,
|
|
|
+ Model,
|
|
|
+ message
|
|
|
} from 'antd';
|
|
|
class tag_setting extends React.Component {
|
|
|
constructor(props) {
|
|
@@ -19,11 +21,17 @@ class tag_setting extends React.Component {
|
|
|
formVisiable:false,
|
|
|
formVisiable2:false,
|
|
|
getdDisdatas:[],
|
|
|
+ userId:"",
|
|
|
fileName:"",
|
|
|
fileName2:""
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ cancelClick(){
|
|
|
+ this.setState({
|
|
|
+ formVisiable:false
|
|
|
+ })
|
|
|
+ }
|
|
|
render() {
|
|
|
let user=util.auth.getUser();
|
|
|
let self = this;
|
|
@@ -72,17 +80,71 @@ class tag_setting extends React.Component {
|
|
|
],
|
|
|
columns: [
|
|
|
{ title: "ID", data: "id", type: "text", editor: {},query:false },
|
|
|
- { title: "姓名(昵称)", data: "name", type: "text",editor: {},source: { data:genderbase }, query: true},
|
|
|
- { title: "性别", data: "gender", type: "dropdown", editor: {},query:true },
|
|
|
+ { title: "姓名(昵称)", data: "name", type: "text",editor: {}, query: true},
|
|
|
+ { title: "性别", data: "gender", type: "dropdown", editor: {},source: { data:genderbase },query:true },
|
|
|
{ title: "手机", data: "mobile", type: "text", editor: {},query:true},
|
|
|
{ title: "添加时间", data: "create_time", type: "datetime", editor: {},query:true,hide:true},
|
|
|
{ title: "企业用户ID", data: "user_id", type: "text", editor: {},query:true,hide:true},
|
|
|
{ title: "职位", data: "position", type: "text", editor: {},query:true,hide:true},
|
|
|
- { title: "状态", data: "status", type: "dropdown", editor: {},source: { data:database },query:true}
|
|
|
+ { title: "状态", data: "status", type: "dropdown", editor: {},source: { data:database },query:true},
|
|
|
+ {
|
|
|
+ title: "操作选项", type: "command", actions: [{
|
|
|
+ name: '关联账户',
|
|
|
+ onClick: (data) => {
|
|
|
+ self.setState({
|
|
|
+ formVisiable:true,
|
|
|
+ userId:data.id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ let gridOption0 = {
|
|
|
+ title: "账户列表",
|
|
|
+
|
|
|
+ url: {
|
|
|
+ read:WXAPIV5+"/api/users/getAccountList"
|
|
|
+ },
|
|
|
+ actions: [
|
|
|
+ {name:"关联",color:"red",
|
|
|
+ onClick:function(checkedValues, checkedDatas){
|
|
|
+ let dto={};
|
|
|
+ let userId=self.state.userId;
|
|
|
+ if(userId!=null&&userId!=""){
|
|
|
+ dto.userId=userId;
|
|
|
+ if(checkedDatas!=null&&checkedDatas.length==1){
|
|
|
+ dto.account=checkedDatas[0]
|
|
|
+ console.log(dto)
|
|
|
+ //请求后台保存企业用户关联登录账户
|
|
|
+
|
|
|
+ }else{
|
|
|
+ message.error("单选!")
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ message.error("请先选择!")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ checkable: true,
|
|
|
+ columns: [
|
|
|
+ { title: "ID", data: "id", type: "text", editor: {},query:false },
|
|
|
+ { title: "姓名", data: "nickName", type: "text",editor: {}, query: true},
|
|
|
+ { title: "账户", data: "loginId", type: "text", editor: {},query:true },
|
|
|
]
|
|
|
};
|
|
|
+
|
|
|
return <div>
|
|
|
<BirdGrid gridOption={gridOption} ref="grid"></BirdGrid>
|
|
|
+ <Modal title="关联账户"
|
|
|
+ width="50%"
|
|
|
+ visible={self.state.formVisiable}
|
|
|
+ onCancel={() => self.cancelClick()}
|
|
|
+ onOk={() => self.cancelClick()}>
|
|
|
+ <BirdGrid gridOption={gridOption0} ref="grid0"></BirdGrid>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
}
|
|
|
}
|