Browse Source

内容管理

yu_ber 4 years ago
parent
commit
919b334e80

UI/src/pages/contentManage/contentManageSer.js → UI/src/pages/ArticleContentManage/contentManageSer.js


+ 246 - 210
UI/src/pages/contentManage/index.js

@@ -37,11 +37,12 @@ class ArticleManage extends React.Component {
       Selected: "",
       Topping: false,
       offshelf: false,
-      httpModal:false,
-      textUrl:"",
+      httpModal: false,
+      textUrl: "",
       offshelfId: '',
-      stickyPosts:"",
-      defaultAdd:false,
+      stickyPosts: "",
+      defaultAdd: false,
+      articleContent:"",
       editorState: BraftEditor.createEditorState('<p>亮剑集团!</b></p>'), // 设置编辑器初始内容
       outputHTML: '<p></p>',
       typeItem: [
@@ -80,7 +81,7 @@ class ArticleManage extends React.Component {
         // },
       ],
       handImgPath: "",
-      articleId:"", // 文章ID
+      articleId: "", // 文章ID
       defaultName: "", // 栏目
       articleTitle: "", //  标题
       articleEditorId: "",// 作者
@@ -112,20 +113,22 @@ class ArticleManage extends React.Component {
 
     });
   }
-  componentWillUnmount () {
+  componentWillUnmount() {
     this.isLivinig = false
+    // setTimeout(this.setEditorContentAsync, 200)
   }
   handleChangeText = (editorState) => {
     this.setState({
       editorState: editorState,
       outputHTML: editorState.toHTML()
-    },()=>{
+    }, () => {
       console.log(editorState.toHTML());
     })
   }
   setEditorContentAsync = () => {
+    console.log('执行了的Async');
     this.isLivinig && this.setState({
-      editorState: BraftEditor.createEditorState('<p>你好,<b>世界!</b><p>')
+      editorState: BraftEditor.createEditorState(this.state.articleContent)
     })
   }
   // 栏目id 查询
@@ -160,7 +163,7 @@ class ArticleManage extends React.Component {
   // 查询详情
   editMation = (id) => {
     request({
-      url: config.WXMpAPI + "/wx/content/article/queryArticleByArticleId/"+id,
+      url: config.WXMpAPI + "/wx/content/article/queryArticleByArticleId/" + id,
       method: "get",
     }).then((data) => {
       const returned = data.result
@@ -183,9 +186,7 @@ class ArticleManage extends React.Component {
           headImgList: list,
         })
       }
-      this.setState({
-        visible:true,
-      })
+ 
       var typographicTypeList = []
       var checkedList = returned.typographicTypeList
       for (let i = 0; i < checkedList.length; i++) {
@@ -195,17 +196,21 @@ class ArticleManage extends React.Component {
           }
         }
       }
+      console.log(returned,'returned');
       this.setState({
-        defaultName: returned.column.columnName, // 栏目
+        defaultName:returned.column ? returned.column.columnName : "", // 栏目
+        tagId:returned.column ? returned.column.columnId : "", // 栏目
         articleTitle: returned.articleTitle, //  标题
         articleEditorId: returned.articleAuthorId,// 作者
         articleCardinalnumber: returned.articleCardinalnumber, //  基数
         // headImgList:obj,  // 图片地址
-        typographicTypeList:typographicTypeList, // 置顶设置
+        typographicTypeList: typographicTypeList, // 置顶设置
         articleSummary: returned.articleSummary,  // 摘要
         selectLableKeys: returned.tagTypeList, // 标签
         selectDepartment: returned.departmentList,  //  科室
         selectCategory: returned.classificationList, // 分类
+        articleContent: returned.articleContent, // 分类
+        visible: true,
       }, () => {
         console.log(this.state.typographicTypeList, 'typographicTypeList');
       })
@@ -248,26 +253,29 @@ class ArticleManage extends React.Component {
     return state
   }
   onShow = (type) => {
-    const state = this.screen(type)
-    console.log(state);
-    if (state) {
-      this.setState({
-        Selected: false,
-      })
-    } else {
-      switch (type) {
-        case 'show':
-          message.error("请勾选标签");
-          break;
-        case 'Department':
-          message.error("请勾选科室");
-          break;
-        case 'category':
-          message.error("请勾选分类");
-          break
-        default:
-      }
-    }
+    this.setState({
+      Selected: false,
+    })
+    // const state = this.screen(type)
+    // console.log(state);
+    // if (state) {
+    //   this.setState({
+    //     Selected: false,
+    //   })
+    // } else {
+    //   switch (type) {
+    //     case 'show':
+    //       message.error("请勾选标签");
+    //       break;
+    //     case 'Department':
+    //       message.error("请勾选科室");
+    //       break;
+    //     case 'category':
+    //       message.error("请勾选分类");
+    //       break
+    //     default:
+    //   }
+    // }
   }
   close = (type) => {
     const state = this.screen(type)
@@ -306,47 +314,47 @@ class ArticleManage extends React.Component {
       [type]: false
     })
   }
-  offshelfClick = ( type ) => {
-    if(type == "bottom"){
+  offshelfClick = (type) => {
+    if (type == "bottom") {
       let data = {}
       data.articleId = this.state.offshelfId.articleId
       data.articleStatus = '-1'
       this.props.dispatch({ type: 'ContentManage/goodsTheShelf', payload: { data } });
       setTimeout(() => this.refs.grid.reload(), 3000);
     } else {
-      const value =  this.refs.myInput;
+      const value = this.refs.myInput;
       console.log(value);
       this.setState({
-      
+
       })
     }
-   
+
   }
   toppingClick = () => {
     const data = {}
     data.articleId = this.state.stickyPosts
     const { typeItem } = this.state
     var hicTypeList = []     //  //  置顶类型
-    var checkedList = this.state.typographicTypeList   
+    var checkedList = this.state.typographicTypeList
     for (let i = 0; i < checkedList.length; i++) {
       for (let k = 0; k < typeItem.length; k++) {
         if (checkedList[i] == typeItem[k].label) {
           const element = {}
           element.typographicTypeId = typeItem[k].typographicTypeId,
-          hicTypeList.push(element)
+            hicTypeList.push(element)
         }
       }
     }
     data.typographicTypeList = hicTypeList
     console.log(data, 'date-wrapper');
-     this.props.dispatch({ type: 'ContentManage/goodsTheShelves', payload: { data } });
-     this.setState({
-      Topping:false,
+    this.props.dispatch({ type: 'ContentManage/goodsTheShelves', payload: { data } });
+    this.setState({
+      Topping: false,
     });
     setTimeout(() => this.refs.grid.reload(), 3000);
   }
   onChangeCheckbox = checkedList => {
-    console.log(checkedList,'选中的');
+    console.log(checkedList, '选中的');
     const { typeItem } = this.state
     var selectTypeLable = []
     for (let i = 0; i < checkedList.length; i++) {
@@ -370,7 +378,7 @@ class ArticleManage extends React.Component {
       }
     }
   }
-  handleSubmit = (e,index) => {
+  handleSubmit = (e, index) => {
     e.preventDefault();
     this.props.form.validateFields((err, values) => {
       if (!err) {
@@ -382,13 +390,13 @@ class ArticleManage extends React.Component {
         // ]
         const { typeItem } = this.state
         var hicTypeList = []     //  //  置顶类型
-        var checkedList = this.state.typographicTypeList   
+        var checkedList = this.state.typographicTypeList
         for (let i = 0; i < checkedList.length; i++) {
           for (let k = 0; k < typeItem.length; k++) {
             if (checkedList[i] == typeItem[k].label) {
               const element = {}
               element.typographicTypeId = typeItem[k].typographicTypeId,
-              hicTypeList.push(element)
+                hicTypeList.push(element)
             }
           }
         }
@@ -399,7 +407,7 @@ class ArticleManage extends React.Component {
         let hicTag = this.state.selectLableKeys //  标签ID
         parame.articleTitle = values.title;
         parame.articleId = this.state.articleId,
-        parame.articleStatus = index;  // 文章状态(0为保存,1为保存并发布,-1下架)
+          parame.articleStatus = index;  // 文章状态(0为保存,1为保存并发布,-1下架)
         parame.articleAuthorId = 4;   // 作者ID
         parame.articleSummary = values.content
         parame.articlePhotoaddress = this.state.handImgPath
@@ -411,6 +419,7 @@ class ArticleManage extends React.Component {
         parame.tagTypeList = hicTag
         parame.articleContent = this.state.outputHTML
         this.props.dispatch({ type: 'ContentManage/addColumn', payload: { parame } });
+        setTimeout(() => this.refs.grid.reload(), 3000);
       }
     });
   };
@@ -448,7 +457,8 @@ class ArticleManage extends React.Component {
       },
       ],
       columns: [
-        { title: "分类ID", data: "classificationColumnId", type: "text", query: false },
+        { title: "关键词", data: "column_id", type: "text", editor: {}, query: true, hide: true },
+        { title: "分类ID", data: "classificationId", type: "text", query: false },
         { title: "分类名称", data: "classificationDescription", type: "text", query: false },
       ],
     };
@@ -481,6 +491,7 @@ class ArticleManage extends React.Component {
       },
       ],
       columns: [
+        { title: "关键词", data: "department_name", type: "text", editor: {}, query: true, hide: true },
         { title: "科室ID", data: "departmentId", type: "text", query: false },
         { title: "科室名称", data: "departmentName", type: "text", query: false },
       ],
@@ -505,7 +516,7 @@ class ArticleManage extends React.Component {
           preservation.map(val => {
             const obj = {}
             obj.tagTypeId = val.tagTypeId
-            obj.tagTypeName = val.tagTypeGroupName
+            obj.tagTypeName = val.tagTypeName
             selectArr.push(obj)
           })
           that.setState({
@@ -515,7 +526,10 @@ class ArticleManage extends React.Component {
       },
       ],
       columns: [
-        // {  title: "栏目名称", data: "checkStatusA", type: "dropdown" },
+        // {
+        //   title: "标签选择", data: "tag_type_group_id", type: "dropdown",
+        //   source: { url: WXMpAPI + "/wx/content/tagtype/listTagType" }, query: true, hide: true,
+        // },
         { title: "标签ID", data: "tagTypeId", type: "text", query: false },
         { title: "标签类型", data: "tagTypeGroupName", type: "text", query: false },
         { title: "标签名称", data: "tagTypeName", type: "text", query: false },
@@ -526,6 +540,27 @@ class ArticleManage extends React.Component {
   // 获取栏目
   getColumnInformation = () => {
     let that = this;
+
+    var baseDate = []
+    let parme = {
+      "filters": [
+        {
+          "field": "column_id",
+          "operate": "equal",
+          "value": 2
+        }
+      ]
+    }
+    request({
+      url: config.WXMpAPI + "/wx/content/column/queryAllColumns",
+      method: "post",
+      data: parme
+    }).then((data) => {
+
+    }).catch((error) => {
+
+    });
+
     let gridOption = {
       title: "权限资源",
       title: "关键词",
@@ -534,25 +569,28 @@ class ArticleManage extends React.Component {
       },
       pageSize: 10,
       checkable: true,
+      afterQuery: function (resultout, filters) {
+
+      },
       actions: [{
         name: '添加文章', onClick: function () {
           that.setState({
             dynamicTitle: "添加文章",
-            defaultName :"",
-            articleTitle :"",
-            articleEditorId:"",
-            articleCardinalnumber:"",
-            typographicTypeList :"",
-            articleSummary :"",
-            headImgList:[],
-            typographicTypeList:[],
-            classificationName:[],
-            departmentName:[],
-            tagTypeName:[],
-            selectLableKeys:[],
-            selectDepartment:[],
-            selectCategory:[],
-            articleId:""
+            defaultName: "",
+            articleTitle: "",
+            articleEditorId: "",
+            articleCardinalnumber: "",
+            typographicTypeList: "",
+            articleSummary: "",
+            headImgList: [],
+            typographicTypeList: [],
+            classificationName: [],
+            departmentName: [],
+            tagTypeName: [],
+            selectLableKeys: [],
+            selectDepartment: [],
+            selectCategory: [],
+            articleId: ""
           })
           that.showModal('visible')
         }
@@ -561,31 +599,17 @@ class ArticleManage extends React.Component {
       columns: [
         {
           title: "栏目名称", data: "article_column_id", type: "dropdown",
-          // source: { data: that.state.columnName }, query: true, hide: true
           source: { url: WXMpAPI + "/wx/content/column/queryAllColumnsSelection" }, query: true, hide: true,
-
-          actions: [{
-            name: '行内按钮',
-            onChange:function(key,value){
-              console.log(key,value)
-            }
-          }]
-          // ,editor:{
-          //   onChange:function(key,value){
-          //     console.log(key,value)
-          //   }
-          // }
-          // source: { url: ymallAPI + "/ymall/doctor/getLevelList" }
         },
         {
           title: "关联科室", data: "department_id", type: "dropdown",
           source: { url: WXMpAPI + "/wx/content/department/queryAllSecondDepartmentsSelection" }, query: true, hide: true
-          // source: { data: that.state.relatedDeparTments }, query: true, hide: true
         },
         {
+
           title: "文章分类", data: "classification_id", type: "dropdown",
-          // source: { url: WXMpAPI + "/wx/content/classification/queryAllClassificationsSelection" }, query: true, hide: true
-          source: { data: that.state.classificationArticles }, query: true, hide: true
+          source: { data: baseDate }, query: true, hide: true,
+          // source: { url: WXMpAPI + "/wx/content/column/queryAllColumns"  }, query: true, hide: true
         },
         {
           title: "置顶类型", data: "typographic_type_id", type: "text",
@@ -595,7 +619,7 @@ class ArticleManage extends React.Component {
           title: "发布状态", data: "article_status", type: "text",
           source: { data: that.state.releaseStatus }, query: true, hide: true
         },
-        { title: "关键词", data: "article_title", type: "text", editor: {}, query: true },
+        { title: "关键词", data: "article_title", type: "text", editor: {}, query: true, hide: true },
 
 
         { title: "文章ID", data: "articleId", type: "text", query: false },
@@ -618,9 +642,12 @@ class ArticleManage extends React.Component {
                 that.setState({
                   dynamicTitle: "编辑文章",
                   articleId:data.articleId,
+                  // defaultName:data.column.columnName, // 栏目
+                  // tagId:data.column.columnId, // 栏目ID
                 })
+                console.log(data);
                 that.editMation(data.articleId);
-                // that.queryColumnByColumnId(data.articleId);
+                setTimeout(that.setEditorContentAsync,1000)
               }
             },
             {
@@ -637,7 +664,7 @@ class ArticleManage extends React.Component {
                 }
                 that.setState({
                   Topping: true,
-                  stickyPosts:data.articleId,
+                  stickyPosts: data.articleId,
                   typographicTypeList: typographicTypeList
                 }, () => {
 
@@ -655,15 +682,15 @@ class ArticleManage extends React.Component {
             {
               name: '链接', onClick: function (data) {
                 console.log(data);
-                if(data.articleLinkAddress){
+                if (data.articleLinkAddress) {
                   that.setState({
-                    httpModal:true,
-                    textUrl:data.articleLinkAddress
+                    httpModal: true,
+                    textUrl: data.articleLinkAddress
                   })
                 } else {
                   message.error('暂未配置链接')
                 }
-                
+
               }
             },
 
@@ -744,7 +771,7 @@ class ArticleManage extends React.Component {
           onCancel={(e) => this.setState({ httpModal: false })}
           width={400}
         >
-            <Input value={ this.state.textUrl } disabled  ref="myInput" />
+          <Input value={this.state.textUrl} disabled ref="myInput" />
         </Modal>
 
         <Modal
@@ -753,6 +780,9 @@ class ArticleManage extends React.Component {
           onOk={(e) => this.onShow("show")}
           onCancel={(e) => this.close("show")}
           width={800}
+           footer = {
+            []
+          }
         >
           <BirdGrid gridOption={this.selectLable()} />
         </Modal>
@@ -763,6 +793,9 @@ class ArticleManage extends React.Component {
           onOk={(e) => this.onShow("Department")}
           onCancel={(e) => this.close("Department")}
           width={800}
+          footer = {
+            []
+          }
         >
           <BirdGrid gridOption={this.selectDepartment()} />
         </Modal>
@@ -773,6 +806,9 @@ class ArticleManage extends React.Component {
           onOk={(e) => this.onShow("category")}
           onCancel={(e) => this.close("category")}
           width={800}
+          footer = {
+            []
+          }
         >
           <BirdGrid gridOption={this.selectCategoryt()} />
         </Modal>
@@ -788,129 +824,129 @@ class ArticleManage extends React.Component {
           }
         >
 
-        <div style={{display:"flex"}}>
-          <Form className="login-form"  {...layout}  style={{ flex: 1 }}>
-            <Form.Item label="栏目选择">
-              {getFieldDecorator('column', {
-                initialValue: this.state.defaultName || "",
-                rules: [{ required: true, message: '请选择栏目!' }],
-              })(
-                <Select onChange={(val) => this.handleChangeColumn(val)}>
-                  {
-                    this.state.queryAllColumns && this.state.queryAllColumns.map((item, key) => {
-                      return <Option value={item.columnName}>{item.columnName}</Option>
-                    })
-                  }
-                </Select>
-              )}
-            </Form.Item>
-            <Form.Item label="标题">
-              {getFieldDecorator('title', {
-                initialValue: this.state.articleTitle || "",
-                rules: [{ required: true, message: '请填写标题!' }],
-              })(
-                <Input />
-              )}
-            </Form.Item>
-            <Form.Item label="封面图片">
-              <Upload
-                listType="picture-card"
-                fileList={this.state.headImgList}
-                showUploadList={{ showPreviewIcon: true }}
-                onPreview={file => this.onPreview(file)}// 预览
-                onRemove={file => this.removeImg("headImgList")}
-                onChange={result => this.handleChange(result, "headImgList")}
-                action={WXMpAPI + "/wx/file/upload"}
-              >
-                {this.state.headImgList.length >= 1 ? null : uploadButton}
-              </Upload>
-            </Form.Item>
-            <Form.Item label="作者">
-              {getFieldDecorator('author', {
-                initialValue: this.state.articleEditorId || "",
-                rules: [{ required: true, message: '请填写作者!' }],
-              })(
-                <Input />
-              )}
-            </Form.Item>
-            <Form.Item label="虚假阅读量基数">
-              {getFieldDecorator('read', {
-                initialValue: this.state.articleCardinalnumber || "",
-                rules: [{ required: true, pattern: new RegExp(/^[1-9]\d*$/, "g"), message: '请输入正确基数类型' }],
-              })(
-                <Input />
-              )}
-            </Form.Item>
-            <Form.Item label="置顶设置">
-              {getFieldDecorator('setup', {
-                initialValue: this.state.typographicTypeList || [],
-                rules: [{ required: true, message: '请勾选置顶设置' }],
-              })(
-                <CheckboxGroup
-                  options={plainOptions}
-                  onChange={(e) => this.onChangeCheckbox(e)}
-                />
-              )}
+          <div style={{ display: "flex" }}>
+            <Form className="login-form"  {...layout} style={{ flex: 1 }}>
+              <Form.Item label="栏目选择">
+                {getFieldDecorator('column', {
+                  initialValue: this.state.defaultName || "",
+                  rules: [{ required: true, message: '请选择栏目!' }],
+                })(
+                  <Select onChange={(val) => this.handleChangeColumn(val)}>
+                    {
+                      this.state.queryAllColumns && this.state.queryAllColumns.map((item, key) => {
+                        return <Option value={item.columnName}>{item.columnName}</Option>
+                      })
+                    }
+                  </Select>
+                )}
+              </Form.Item>
+              <Form.Item label="标题">
+                {getFieldDecorator('title', {
+                  initialValue: this.state.articleTitle || "",
+                  rules: [{ required: true, message: '请填写标题!' }],
+                })(
+                  <Input />
+                )}
+              </Form.Item>
+              <Form.Item label="封面图片">
+                <Upload
+                  listType="picture-card"
+                  fileList={this.state.headImgList}
+                  showUploadList={{ showPreviewIcon: true }}
+                  onPreview={file => this.onPreview(file)}// 预览
+                  onRemove={file => this.removeImg("headImgList")}
+                  onChange={result => this.handleChange(result, "headImgList")}
+                  action={WXMpAPI + "/wx/file/upload"}
+                >
+                  {this.state.headImgList.length >= 1 ? null : uploadButton}
+                </Upload>
+              </Form.Item>
+              <Form.Item label="作者">
+                {getFieldDecorator('author', {
+                  initialValue: this.state.articleEditorId || "",
+                  rules: [{ required: true, message: '请填写作者!' }],
+                })(
+                  <Input />
+                )}
+              </Form.Item>
+              <Form.Item label="虚假阅读量基数">
+                {getFieldDecorator('read', {
+                  initialValue: this.state.articleCardinalnumber || "",
+                  rules: [{ required: true, pattern: new RegExp(/^-?\d*(\.\d*)?$/, "g"), message: '请输入正确基数类型' }],
+                })(
+                  <Input />
+                )}
+              </Form.Item>
+              <Form.Item label="置顶设置">
+                {getFieldDecorator('setup', {
+                  initialValue: this.state.typographicTypeList || [],
+                  rules: [{ required: true, message: '请勾选置顶设置' }],
+                })(
+                  <CheckboxGroup
+                    options={plainOptions}
+                    onChange={(e) => this.onChangeCheckbox(e)}
+                  />
+                )}
 
-              {/* <CheckboxGroup
+                {/* <CheckboxGroup
                   options={plainOptions}
                   value={this.state.typographicTypeList}
                   onChange={(e) => this.onChangeCheckbox(e)}
                 /> */}
-            </Form.Item>
-            <Form.Item label="标签">
-              <div>
-                {
-                  this.state.selectLableKeys.map((item, key) => {
-                    return <Button type="dashed" size={80} style={{ marginRight: "30px" }}> {item.tagTypeName}</Button>
-                  })
-                }
-                <Button type="Dashed" size={80} style={{ width: '80px', fontSize: "30px", display: "flex", alignItems: "center", justifyContent: "center" }} onClick={() => this.showChildren('show')} ><Icon type='plus' style={{ fontSize: '20px' }} /></Button>
-              </div>
-            </Form.Item>
-            <Form.Item label="摘要">
-              {getFieldDecorator('content', {
-                initialValue: this.state.articleSummary || "",
-                rules: [{ required: true, message: '请填写摘要!' }],
-              })(
-                <Mentions rows="3" placeholder="You can use @ to ref user here"></Mentions>
-              )}
-            </Form.Item>
-            <Form.Item label="选择科室">
-              <div>
-                {
-                  this.state.selectDepartment.map((item, key) => {
-                    return <Button type="dashed" size={80} style={{ marginRight: "30px" }}> {item.departmentName}</Button>
-                  })
-                }
-                <Button type="Dashed" size={80} style={{ width: '80px', fontSize: "30px", display: "flex", alignItems: "center", justifyContent: "center" }} onClick={() => this.showChildren('Department')} ><Icon type='plus' style={{ fontSize: '20px' }} /></Button>
-              </div>
-            </Form.Item>
-
-            <Form.Item label="选择分类">
-              <div>
-                {
-                  this.state.selectCategory.map((item, key) => {
-                    return <Button type="dashed" size={80} style={{ marginRight: "30px" }}> {item.classificationName}</Button>
-                  })
-                }
-                <Button type="Dashed" size={80} style={{ width: '80px', fontSize: "30px", display: "flex", alignItems: "center", justifyContent: "center" }} onClick={() => this.showChildren('category')} ><Icon type='plus' style={{ fontSize: '20px' }} /></Button>
-              </div>
-            </Form.Item>
-
-          
-            <Form.Item label="">
-               <div style={{ width:"600px",display:"flex"}}>
-                <Button type="primary" size={80} htmlType="submit" onClick={(e)=>this.handleSubmit(e,1)} style={{ marginLeft: "100px",marginRight: "30px", width: '120px' }}>保存并发布</Button>
-                <Button type="Dashed" htmlType="submit" size={80} onClick={(e)=>this.handleSubmit(e,0)} style={{ width: '80px',marginLeft: "400px" }} >仅保存</Button>
-              </div>
-            </Form.Item>
-          </Form>
-          <BraftEditor
-            value={editorState}
-            onChange={this.handleChangeText}
-          />
-          </div>         
+              </Form.Item>
+              <Form.Item label="标签">
+                <div>
+                  {
+                    this.state.selectLableKeys.map((item, key) => {
+                      return <Button type="dashed" size={80} style={{ marginRight: "30px" }}> {item.tagTypeName}</Button>
+                    })
+                  }
+                  <Button type="Dashed" size={80} style={{ width: '80px', fontSize: "30px", display: "flex", alignItems: "center", justifyContent: "center" }} onClick={() => this.showChildren('show')} ><Icon type='plus' style={{ fontSize: '20px' }} /></Button>
+                </div>
+              </Form.Item>
+              <Form.Item label="摘要">
+                {getFieldDecorator('content', {
+                  initialValue: this.state.articleSummary || "",
+                  rules: [{ required: true, message: '请填写摘要!' }],
+                })(
+                  <Mentions rows="3" placeholder="You can use @ to ref user here"></Mentions>
+                )}
+              </Form.Item>
+              <Form.Item label="选择科室">
+                <div>
+                  {
+                    this.state.selectDepartment.map((item, key) => {
+                      return <Button type="dashed" size={80} style={{ marginRight: "30px" }}> {item.departmentName}</Button>
+                    })
+                  }
+                  <Button type="Dashed" size={80} style={{ width: '80px', fontSize: "30px", display: "flex", alignItems: "center", justifyContent: "center" }} onClick={() => this.showChildren('Department')} ><Icon type='plus' style={{ fontSize: '20px' }} /></Button>
+                </div>
+              </Form.Item>
+
+              <Form.Item label="选择分类">
+                <div>
+                  {
+                    this.state.selectCategory.map((item, key) => {
+                      return <Button type="dashed" size={80} style={{ marginRight: "30px" }}> {item.classificationName}</Button>
+                    })
+                  }
+                  <Button type="Dashed" size={80} style={{ width: '80px', fontSize: "30px", display: "flex", alignItems: "center", justifyContent: "center" }} onClick={() => this.showChildren('category')} ><Icon type='plus' style={{ fontSize: '20px' }} /></Button>
+                </div>
+              </Form.Item>
+
+
+              <Form.Item label="">
+                <div style={{ width: "600px", display: "flex" }}>
+                  <Button type="primary" size={80} htmlType="submit" onClick={(e) => this.handleSubmit(e, 1)} style={{ marginLeft: "100px", marginRight: "30px", width: '120px' }}>保存并发布</Button>
+                  <Button type="Dashed" htmlType="submit" size={80} onClick={(e) => this.handleSubmit(e, 0)} style={{ width: '80px', marginLeft: "400px" }} >仅保存</Button>
+                </div>
+              </Form.Item>
+            </Form>
+            <BraftEditor
+              value={editorState}
+              onChange={this.handleChangeText}
+            />
+          </div>
         </Modal>
         <BirdGrid gridOption={this.getColumnInformation()} ref="grid" />
       </div>

UI/src/pages/contentManage/model.js → UI/src/pages/ArticleContentManage/model.js


+ 500 - 0
UI/src/pages/contentManage/articleManage.js

@@ -0,0 +1,500 @@
+import React from 'react';
+import { BirdTreeGrid, BirdGrid } from 'components/Grid';
+import { config, request, permission, util } from 'utils'
+import { message, Modal, Radio, Input, Checkbox } from 'antd';
+import { routerRedux } from 'dva/router'
+const { TextArea } = Input;
+import AutoForm from 'components/Grid/BirdGridForm';
+const { APIV3, WXMpAPI } = config
+import styles from './cateManage.less';
+import { connect } from 'dva'
+import { node } from 'prop-types';
+class ArticleManagement extends React.Component {
+  constructor(props) {
+    super(props)
+    this.state = {
+      ToppingVisible: false,//置顶弹窗控制
+      formVisiable: false,//添加文章弹窗控制
+      lableVisiable: false,//选择标签弹窗控制
+      departmentVisiable: false,//选择科室弹窗控制
+      classVisiable: false,//选择分类弹窗控制
+      value: 1,//置顶弹窗默认选中
+      labelChecked: false,//标签是否选中
+      labelArr: [],//标签选中数组
+      dataArrLabel: {},
+
+    }
+  }
+  //置顶弹窗取消事件
+  toppingCancelClick() {
+    this.setState({
+      ToppingVisible: false
+    })
+  }
+  //置顶弹窗确认事件
+  toppingConfirmClick() {
+    this.setState({
+      ToppingVisible: false
+    })
+  }
+  //置顶弹窗选中改变
+  onChange = e => {
+    console.log('radio checked', e.target.value);
+    this.setState({
+      value: e.target.value,
+    });
+  };
+  //添加文章弹窗取消事件
+  cancelClick() {
+    this.setState({
+      formVisiable: false
+    })
+
+  }
+  //添加文章弹窗确认事件
+  saveClick() {
+    this.setState({
+      formVisiable: false
+    })
+  }
+  //选择标签弹窗
+  addLable = () => {
+    this.setState({
+      lableVisiable: true
+    })
+  }
+  //选择标签弹窗取消事件
+  lableCancelClick() {
+    this.setState({
+      lableVisiable: false
+    })
+
+  }
+  //选择标签弹窗确认事件
+  lableConfirmClick() {
+    this.setState({
+      lableVisiable: false
+    })
+  }
+
+  //选择科室弹窗
+  addDepartment = () => {
+    this.setState({
+      departmentVisiable: true
+    })
+  }
+  //选择科室弹窗取消事件
+  departmentCancelClick() {
+    this.setState({
+      departmentVisiable: false
+    })
+
+  }
+  //选择科室弹窗确认事件
+  departmentConfirmClick() {
+    this.setState({
+      departmentVisiable: false
+    })
+  }
+
+  //选择分类弹窗
+  addClass = () => {
+    this.setState({
+      classVisiable: true
+    })
+  }
+  //选择科室弹窗取消事件
+  classCancelClick() {
+    this.setState({
+      classVisiable: false
+    })
+
+  }
+  //选择科室弹窗确认事件
+  classConfirmClick() {
+    this.setState({
+      classVisiable: false
+    })
+  }
+
+  checkedType = (event) => {
+    if (event.target.checked) {
+      this.setState({
+        labelChecked: true
+      })
+    } else {
+      this.setState({
+        labelChecked: false
+      })
+    }
+
+  }
+
+  render() {
+    let self = this;
+    const radioStyle = {
+      display: 'block',
+      height: '30px',
+      lineHeight: '30px',
+      marginLeft: '30px'
+    };
+    let gridOption = {
+      title: "文章管理",
+
+      url: {
+        read: WXMpAPI + 'wx/content/article/queryArticles',
+        // add: "/test/add",
+        edit: "/test/edit",
+        // delete: "/test/delete"
+      },
+
+      checkable: false,
+      // pageSize: 10,
+      // sortDirection: "asc",
+      actions: [{
+        name: '添加文章',
+        onClick: (data) => {
+          const fields = [
+            {
+              title: "选择栏目",
+              data: "qrcodeName",
+              type: "dropdown",
+              source: {
+                data: [{ value: '1', label: '栏目一' }, { value: '2', label: '栏目二' }]
+              },
+              editor: { isRequired: true },
+              query: true,
+            },
+            {
+              title: "标题",
+              data: "title",
+              type: "text",
+              editor: { isRequired: true },
+              query: true,
+            },
+            {
+              title: "封面图片",
+              data: "imgUrl",
+              type: "img",
+              editor: { isRequired: true, tips: "请上传148*148尺寸的图片" },
+              query: true,
+            },
+            {
+              title: "作者",
+              data: "author",
+              type: "text",
+              editor: { isRequired: true },
+              query: true,
+            },
+            {
+              title: "虚假阅读量基数",
+              data: "number",
+              type: "number",
+              editor: { isRequired: true },
+              query: true,
+            },
+            {
+              title: "置顶设置",
+              data: "setting",
+              type: "dropdown",
+              source: {
+                data: [{ value: '1', label: '全局置顶' }, { value: '2', label: '科室置顶' }, { value: '3', label: '分类置顶' }]
+              },
+              editor: { isRequired: true },
+              query: true,
+            },
+          ];
+          const fields2 = [
+            {
+              title: "摘要",
+              data: "abstract",
+              type: "textarea",
+              editor: { isRequired: true },
+              query: true,
+            }
+          ];
+          const fields3 = [
+            {
+              title: "文章编辑",
+              data: "content",
+              type: "richtext",
+              editor: { isRequired: true },
+              query: true,
+              hide: false,
+            }
+          ];
+          let formOption = {
+            model: "add",
+            title: "基础设置",
+            fields: fields,
+            value: {},
+            extraParams: []
+          };
+          let formOption2 = {
+            model: "add",
+            title: "基础设置",
+            fields: fields2,
+            value: {},
+            extraParams: []
+          };
+          let formOption3 = {
+            model: "add",
+            title: "基础设置",
+            fields: fields3,
+            value: {},
+            extraParams: []
+          };
+          self.setState({
+            formVisiable: true,
+            formOption: formOption,
+            formOption2: formOption2,
+            formOption3: formOption3
+          });
+        }
+      }],
+      columns: [
+        { title: "文章ID", data: "id", type: "number", query: true },
+        { title: "标题", data: "title", type: "text" },
+        { title: "作者", data: "author", type: "text" },
+        { title: "创建时间", data: "time", type: "date" },
+        { title: "真实游览量", data: "num", type: "number" },
+        { title: "状态", data: "state", type: "text" },
+        {
+          title: "操作选项", type: "command", actions: [
+            {
+              name: '置顶',
+              onClick: (data) => {
+                self.setState({
+                  ToppingVisible: true
+                })
+              }
+            },
+            {
+              name: '下架',
+              onClick: (data) => {
+                console.log(data);
+              }
+            },
+            {
+              name: '链接',
+              onClick: (data) => {
+                console.log(data);
+              }
+            },
+          ]
+        }
+      ]
+    };
+    let lableGridOption = {
+      title: "选择标签",
+      url: {
+        // add: "/test/add",
+        // edit: "/test/edit",
+        // delete: "/test/delete"
+      },
+      checkable: false,
+      pageSize: 10,
+      sortDirection: "asc",
+      dataSource: [
+        { id: 1, lableType: "运营-健康标签", lableName: "糖尿病" },
+        { id: 2, lableType: "运营-会员标签", lableName: "心脑血管" },
+        { id: 3, lableType: "运营-行为标签", lableName: "肿瘤" },
+        { id: 4, lableType: "运营-性格标签", lableName: "女性" },
+        { id: 5, lableType: "运营-交易标签", lableName: "风湿骨科" },
+        { id: 6, lableType: "运营-消费标签", lableName: "胃肠道" },
+      ],
+      columns: [
+        { title: "标签ID", data: "id", type: "number" },
+        { title: "标签类型", data: "lableType", type: "text", query: true },
+        { title: "标签名称", data: "lableName", type: "text" },
+        {
+          title: "操作选项", type: "command", actions: [
+            {
+              name: <Checkbox onChange={(event) => this.checkedType(event)}></Checkbox>,
+              onClick: (data) => {
+                console.log(data)
+              }
+            },
+          ]
+        }
+      ]
+    };
+    let departmentGridOption = {
+      title: "选择科室",
+      url: {
+        // read: "/api/v1/table",
+        // add: "/test/add",
+        // edit: "/test/edit",
+        // delete: "/test/delete"
+      },
+      checkable: false,
+      pageSize: 10,
+      sortDirection: "asc",
+      dataSource: [
+        { id: 1, lableName: "内科" },
+        { id: 2, lableName: "外科" },
+        { id: 3, lableName: "神经科" },
+        { id: 4, lableName: "骨科" },
+      ],
+      columns: [
+        { title: "科室ID", data: "id", type: "number" },
+        { title: "科室名称", data: "lableName", type: "text", query: true },
+        {
+          title: "操作选项", type: "command", actions: [
+            {
+              name: <Checkbox onChange={(event) => this.checkedType(event)}></Checkbox>,
+              onClick: (data) => {
+                console.log(data)
+              }
+            },
+          ]
+        }
+      ]
+    };
+    let classGridOption = {
+      title: "选择分类",
+      url: {
+        // read: "/api/v1/table",
+        // add: "/test/add",
+        // edit: "/test/edit",
+        // delete: "/test/delete"
+      },
+      checkable: false,
+      pageSize: 10,
+      sortDirection: "asc",
+      dataSource: [
+        { id: 1, lableName: "糖尿病类" },
+        { id: 2, lableName: "神经类" },
+        { id: 3, lableName: "肿瘤类" },
+        { id: 4, lableName: "骨风湿类" },
+      ],
+      columns: [
+        { title: "分类ID", data: "id", type: "number" },
+        { title: "分类名称", data: "lableName", type: "text", query: true },
+        {
+          title: "操作选项", type: "command", actions: [
+            {
+              name: <Checkbox onChange={(event) => this.checkedType(event)}></Checkbox>,
+              onClick: (data) => {
+                console.log(data)
+              }
+            },
+          ]
+        }
+      ]
+    };
+    return <div>
+      <BirdGrid gridOption={gridOption} ref="grid" />
+
+      {/* 置顶弹窗 */}
+      <Modal
+        title="置顶"
+        width="520px"
+        visible={this.state.ToppingVisible}
+        onOk={(event) => this.toppingConfirmClick(event)}
+        onCancel={() => this.toppingCancelClick()}
+      >
+        <Radio.Group onChange={this.onChange} value={this.state.value}>
+          <Radio style={radioStyle} value={1}>
+            全局置顶<span style={{ marginLeft: "50px" }}>当前栏目内,改文章置顶</span>
+          </Radio>
+          <Radio style={radioStyle} value={2}>
+            科室置顶<span style={{ marginLeft: "50px" }}>文章所属分类,改文章置顶</span>
+          </Radio>
+          <Radio style={radioStyle} value={3}>
+            分类置顶<span style={{ marginLeft: "50px" }}>文章所属分类,改文章置顶</span>
+          </Radio>
+        </Radio.Group>
+      </Modal>
+      {/* 添加文章弹窗 */}
+      <Modal
+        title="添加文章"
+        width="800px"
+        visible={this.state.formVisiable}
+        onOk={(event) => this.saveClick(event)}
+        onCancel={() => this.cancelClick()}
+      >
+        <AutoForm formOption={this.state.formOption} ref="autoForm1" />
+        <div style={{ display: "flex", marginLeft: "142px", marginBottom: "20px" }}>
+          <div
+            style={{
+              marginTop: "5px",
+              marginRight: "10px",
+              marginLeft: "5px"
+            }}
+          >
+            标签:
+            </div>
+          <button onClick={() => this.addLable()} style={{
+            width: "80px", height: "30px", outline: "none", backgroundColor: "#fff",
+            border: "1px solid #D7D7D7", fontSize: "18px", cursor: "pointer"
+          }}>+</button>
+        </div>
+        <AutoForm formOption={this.state.formOption2} ref="autoForm2" />
+        <div style={{ display: "flex", marginLeft: "114px", marginBottom: "20px" }}>
+          <div
+            style={{
+              marginTop: "5px",
+              marginRight: "10px",
+              marginLeft: "5px"
+            }}
+          >
+            选择科室:
+            </div>
+          <button onClick={() => this.addDepartment()} style={{
+            width: "80px", height: "30px", outline: "none", backgroundColor: "#fff",
+            border: "1px solid #D7D7D7", fontSize: "18px", cursor: "pointer"
+          }}>+</button>
+        </div>
+        <div style={{ display: "flex", marginLeft: "114px", marginBottom: "20px" }}>
+          <div
+            style={{
+              marginTop: "5px",
+              marginRight: "10px",
+              marginLeft: "5px"
+            }}
+          >
+            选择分类:
+            </div>
+          <button onClick={() => this.addClass()} style={{
+            width: "80px", height: "30px", outline: "none", backgroundColor: "#fff",
+            border: "1px solid #D7D7D7", fontSize: "18px", cursor: "pointer"
+          }}>+</button>
+        </div>
+        <AutoForm formOption={this.state.formOption3} ref="autoForm3" />
+      </Modal>
+      {/* 选择标签弹窗 */}
+      <Modal
+        title="选择标签"
+        width="70%"
+        visible={this.state.lableVisiable}
+        onOk={(event) => this.lableConfirmClick(event)}
+        onCancel={() => this.lableCancelClick()}
+      >
+        <BirdGrid gridOption={lableGridOption} ref="lableGridOption" />
+      </Modal>
+      {/* 选择科室弹窗 */}
+      <Modal
+        title="选择科室"
+        width="70%"
+        visible={this.state.departmentVisiable}
+        onOk={(event) => this.departmentConfirmClick(event)}
+        onCancel={() => this.departmentCancelClick()}
+      >
+        <BirdGrid gridOption={departmentGridOption} ref="departmentGridOption" />
+      </Modal>
+      {/* 选择分类弹窗 */}
+      <Modal
+        title="选择分类"
+        width="70%"
+        visible={this.state.classVisiable}
+        onOk={(event) => this.classConfirmClick(event)}
+        onCancel={() => this.classCancelClick()}
+      >
+        <BirdGrid gridOption={classGridOption} ref="classGridOption" />
+      </Modal>
+
+    </div>
+  }
+}
+export default connect(({ bindActionCreators }) => ({ bindActionCreators }))(ArticleManagement);

+ 146 - 0
UI/src/pages/contentManage/cateManage.js

@@ -0,0 +1,146 @@
+import React from 'react';
+import { BirdTreeGrid, BirdGrid } from 'components/Grid';
+import { config, request, permission, util } from 'utils'
+import { message, Modal, Button, Input } from 'antd';
+const { TextArea } = Input;
+import AutoForm from 'components/Grid/BirdGridForm';
+const { APIV3, WXMpAPI } = config;
+import styles from './cateManage.less';
+import { connect } from 'dva'
+import { routerRedux } from 'dva/router'
+class BirdGridPermissionPage extends React.Component {
+  constructor(props) {
+    super(props)
+    this.state = {
+      loading: false,
+      visible: false,
+      columnName: "",
+      columnDescription: ""
+    }
+  }
+
+  showModal = () => {
+    this.setState({
+      visible: true,
+    });
+  };
+
+  handleOk = () => {
+    this.setState({ loading: true });
+    setTimeout(() => {
+      this.setState({ loading: false, visible: false });
+    }, 50);
+    let formData = {}
+    formData.columnName = this.state.columnName
+    formData.columnDescription = this.state.columnDescription
+    request({
+      url: WXMpAPI + "/wx/content/column/addColumn",
+      method: "post",
+      data: formData
+    }).then(function (res) {
+      if (res.success == 1) {
+        message.success('操作成功!');
+        // self.setState({
+        //   keywordModelVisible: false,
+        // });
+        // self.refs.grid.query();
+      } else {
+        message.error(res.message);
+      }
+    });
+
+  };
+  changeLinkValue1 = (e) => {
+    let value = e.target.value;
+    this.setState({
+      columnName: value
+    })
+  }
+  changeLinkValue2 = (e) => {
+    let value = e.target.value;
+    this.setState({
+      columnDescription: value
+    })
+  }
+  handleCancel = () => {
+    this.setState({ visible: false });
+  };
+
+  onClick = () => {
+    // const data = {
+    //   columnId:""
+    // }
+    // this.props.dispatch(routerRedux.push({
+    //   pathname: '/contentManage/columnManage',
+    //   query: { columnId: data.columnId}
+    // })
+    // )
+    // this.props.history.push('/contentManage/columnManage')
+  };
+
+  //获取规则数据
+  componentDidMount() {
+    let self = this;
+  }
+  render() {
+    let self = this
+    let gridOption = {
+      title: "表格示例",
+      url: {
+        read: WXMpAPI + "/wx/content/column/queryAllColumns",
+        // add: "/test/add",
+        // edit: "/test/edit",
+        // delete: "/test/delete"
+      },
+      pageSize: 10,
+      checkable: false,
+      actions: [{
+        name: '创建', onClick: function () {
+          self.setState({
+            visible: true,
+          });
+        }
+      }],
+      columns: [
+        { title: "编码", data: "columnId", type: "number" },
+        { title: "栏目名称", data: "columnName", type: "text", editor: {}, query: true },
+        { title: "栏目描述", data: "columnDescription", type: "text", editor: {}, query: true },
+        {
+          title: "操作选项", type: "command", actions: [{
+            name: '栏目管理',
+            onClick: (data) => {
+              this.props.dispatch({
+                type: 'app/updateState', payload: {
+                  menuPath: [{id:"310_panelchange_",name:"内容管理"}]
+                }
+              });
+              self.props.dispatch(routerRedux.push({
+                pathname: '/contentManage/columnManage',
+                query: { columnId: data.columnId},
+              })
+              );
+            }
+          }]
+        }
+      ]
+    };
+    return <div>
+      <div onClick={this.onClick}></div>
+      <BirdGrid gridOption={gridOption} />
+      <Modal
+        visible={this.state.visible}
+        onOk={this.handleOk}
+        okText="保存"
+        onCancel={this.handleCancel}
+      >
+        <div className="message_item">
+          <span>栏目名称</span><Input value={self.state.columnName} onChange={(e) => this.changeLinkValue1(e)} />
+        </div>
+        <div className="message_item">
+          <span>栏目描述</span><TextArea value={self.state.columnDescription} onChange={(e) => this.changeLinkValue2(e)} />
+        </div>
+      </Modal>
+    </div>
+  }
+}
+export default connect(({ bindActionCreators }) => ({ bindActionCreators }))(BirdGridPermissionPage);

+ 88 - 0
UI/src/pages/contentManage/cateManage.less

@@ -0,0 +1,88 @@
+:global{
+.message_item{
+  width: 80%;
+  display: flex;
+  flex-flow: row nowrap;
+  justify-content: space-between;
+  align-items: center;
+  margin:1rem auto;
+  input,TextArea{
+    width: 70%;
+    
+  }
+}
+ 
+    
+    
+  .flex {
+    display: flex;
+    height: 100%;
+    position: relative;
+  }
+
+  .flex-column {
+    flex-direction: column;
+  }
+
+  .flex-auto {
+    flex: auto;
+    position: relative;
+    height: 100%;
+  }
+
+  .flex-auto-hidden {
+    .flex-auto;
+    overflow: hidden;
+  }
+
+  .flex-none {
+    flex: none;
+    position: relative;
+  }
+
+  .abs {
+    position: absolute;
+  }
+
+  .abs-full {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+  }
+
+  
+/* 重写antd默认布局样式 
+.ant-layout {
+  .ant-layout-header {
+    height: auto;
+    line-height: normal;
+    padding: 0;
+    background: #fff;
+    overflow: hidden;
+  }
+
+  .ant-layout-content {
+    position: relative;
+    min-height: auto; // override antd min-height: 0;
+    // overflow: auto;
+  }
+
+  .ant-layout-footer {
+    text-align: center;
+    width: 100%;
+    background-color: #fff;
+    padding: 10px;
+  }
+}*/
+
+// 在路由页中的布局
+//.page {
+//  &.ant-layout {
+//    > .ant-layout-content {
+//      padding: 24px 24px 0px;
+//    }
+//  }
+//}
+}

+ 269 - 0
UI/src/pages/contentManage/columnManage.css

@@ -0,0 +1,269 @@
+:global {
+  /* 重写antd默认布局样式 
+.ant-layout {
+  .ant-layout-header {
+    height: auto;
+    line-height: normal;
+    padding: 0;
+    background: #fff;
+    overflow: hidden;
+  }
+
+  .ant-layout-content {
+    position: relative;
+    min-height: auto; // override antd min-height: 0;
+    // overflow: auto;
+  }
+
+  .ant-layout-footer {
+    text-align: center;
+    width: 100%;
+    background-color: #fff;
+    padding: 10px;
+  }
+}*/
+}
+:global .ant-input {
+  margin-right: 0;
+}
+:global .ant-input-group-addon {
+  float: left !important;
+  width: 80px !important;
+}
+:global .width-7 {
+  width: 70%;
+}
+:global .ellips {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 1;
+}
+:global .columnManage {
+  width: 98%;
+  margin: 0 auto;
+  background-color: #fff;
+  padding-bottom: 20px ;
+}
+:global .columnManage hr {
+  margin: 20px 0;
+}
+:global .columnManage /deep/ .ant-upload .ant-btn {
+  width: 150px;
+  height: 150px;
+}
+:global .columnManage .floor_3 /deep/ .ant-row {
+  display: none;
+}
+:global .columnManage .Menu {
+  display: flex;
+  height: 100%;
+  position: relative;
+}
+:global .columnManage .Menu .menu_cebian {
+  width: 25%;
+  margin: 0 20px;
+}
+:global .columnManage .Menu .menu_cebian .menu_header {
+  margin-bottom: 20px ;
+}
+:global .columnManage .Menu .menu_cebian .menu_header .active {
+  color: #4caffe !important;
+  background-color: #c9e7ff;
+}
+:global .columnManage .Menu .menu_cebian .menu_header > div {
+  width: 100%;
+  height: 30px;
+  line-height: 30px;
+  font-size: 20px;
+  text-align: left;
+  padding-left: 20px;
+  color: #000;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 1;
+}
+:global .columnManage .Menu .menu_cebian .menu_header /deep/ .ant-btn {
+  width: 100%;
+}
+:global .columnManage .Menu .slide_manage {
+  display: none;
+  width: 50%;
+  border: 1px solid #d9d9d9;
+  padding: 20px;
+  position: relative;
+}
+:global .columnManage .Menu .slide_manage .del_item {
+  width: 20px;
+  height: 20px;
+  position: absolute;
+  top: 10px;
+  right: 0;
+}
+:global .columnManage .Menu.floor_5 .slide_item .floor_1 {
+  display: flex;
+  height: 100%;
+  position: relative;
+}
+:global .columnManage .Menu.floor_5 .slide_item .floor_1 .slide_cont {
+  width: 50%;
+  display: flex;
+  height: 100%;
+  position: relative;
+}
+:global .columnManage .Menu.floor_5 .slide_item .floor_1 .slide_cont .text {
+  width: 80px;
+}
+:global .columnManage .Menu.floor_5 .slide_item .floor_footer {
+  margin: 10px 0;
+  display: flex;
+  height: 100%;
+  position: relative;
+  flex-flow: row nowrap;
+  align-items: center;
+}
+:global .columnManage .Menu.floor_5 .slide_item .slide_message {
+  margin: 10px 0;
+  height: 30px;
+  line-height: 30px;
+  display: flex;
+  height: 100%;
+  position: relative;
+}
+:global .columnManage .Menu.floor_5 .slide_item .slide_message input {
+  width: 50%;
+}
+:global .columnManage .Menu.floor_5 .slide_item .slide_message .text {
+  width: 80px;
+}
+:global .columnManage .Menu.floor_2 .slide_manage .search_name {
+  height: 50px;
+  display: flex;
+  align-items: center;
+  flex-flow: row nowrap;
+}
+:global .columnManage .Menu.floor_2 .slide_manage .search_name input {
+  width: 200px;
+  margin-left: 20px;
+}
+:global .columnManage .Menu.floor_2 .slide_manage .shop_manage {
+  width: 100%;
+  display: flex;
+  flex-flow: row wrap;
+  justify-content: space-between;
+}
+:global .columnManage .Menu.floor_2 .slide_manage .shop_manage .shop_item {
+  border: 1px solid #d9d9d9;
+  border-radius: 5px;
+  width: 49%;
+  padding: 20px;
+  margin: 10px 0;
+}
+:global .columnManage .Menu.floor_2 .slide_manage .shop_manage .shop_item .mes_item {
+  display: flex;
+  align-items: center;
+  margin: 10px 0;
+}
+:global .columnManage .Menu.floor_2 .slide_manage .shop_manage .shop_item .mes_item .text {
+  width: 90px;
+}
+:global .columnManage .Menu.floor_2 .slide_manage .shop_manage .shop_item .mes_item p {
+  margin-left: 10px;
+}
+:global .columnManage .Menu.floor_2 .slide_manage .shop_manage .shop_item .mes_item /deep/ .ant-upload .ant-btn {
+  width: 100px;
+  height: 100px;
+}
+:global .columnManage .describe {
+  width: 100%;
+  display: flex;
+  height: 100%;
+  position: relative;
+}
+:global .columnManage .describe .describe_text {
+  width: 60%;
+  margin: 0 50px;
+}
+:global .columnManage .floor_item .input_1 {
+  width: 20%;
+}
+:global .columnManage .floor_item .input_2 {
+  width: 50%;
+}
+:global .columnManage .floor_item .content {
+  display: flex;
+  height: 100%;
+  position: relative;
+  border: 1px solid #d9d9d9;
+  border-radius: 10px;
+  align-items: center;
+  padding: 20px 0;
+}
+:global .columnManage .floor_item .content div {
+  margin: 0 20px;
+}
+:global .columnManage .floor_item .content .input_1 {
+  margin-right: 20px;
+}
+:global .columnManage .floor_item .content1 {
+  border: 1px solid #d9d9d9;
+  border-radius: 10px;
+  padding: 20px;
+}
+:global .columnManage .floor_item .content1 .flex {
+  align-items: center;
+}
+:global .columnManage .floor_item .content1 .flex div {
+  margin: 0 20px;
+}
+:global .departments .header_search {
+  margin: 20px 0;
+}
+:global .departments .header_search input {
+  width: 200px;
+}
+:global .departments .ant-row {
+  display: none;
+}
+:global .flex {
+  display: flex;
+  height: 100%;
+  position: relative;
+}
+:global .flex-column {
+  flex-direction: column;
+}
+:global .flex-auto {
+  flex: auto;
+  position: relative;
+  height: 100%;
+}
+:global .flex-auto-hidden {
+  flex: auto;
+  position: relative;
+  height: 100%;
+  overflow: hidden;
+}
+:global .flex-none {
+  flex: none;
+  position: relative;
+}
+:global .abs {
+  position: absolute;
+}
+:global .abs-full {
+  position: absolute;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+}
+:global .margin-left-100 {
+  margin-left: 100px;
+}
+:global /deep/ .ant-modal-content .ant-modal-body .ant-row {
+  display: none;
+}

File diff suppressed because it is too large
+ 1100 - 0
UI/src/pages/contentManage/columnManage.js


+ 293 - 0
UI/src/pages/contentManage/columnManage.less

@@ -0,0 +1,293 @@
+:global{
+  @colorgary:#d9d9d9;
+  .ant-input{
+    margin-right: 0;
+  }
+  .ant-input-group-addon{
+    float: left !important;
+    width: 80px !important;
+  }
+  .width-7{
+    width:70%
+  }
+  .ellips {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 1;
+  }
+  .columnManage{
+    width: 98%;
+    margin: 0 auto;
+    background-color: #fff;
+    padding-bottom:20px ;
+    hr{
+      margin: 20px 0;
+    }
+    /deep/ .ant-upload{
+      .ant-btn{
+      width: 150px;
+      height: 150px;
+    }
+    }
+    .floor_3{
+      /deep/ .ant-row{
+        display: none
+      }
+    }
+    .Menu{
+      .flex();
+      .menu_cebian{
+        width: 25%;
+        margin:0 20px;
+        .menu_header{
+          margin-bottom:20px ;
+       .active{
+         color:#4caffe !important;
+         background-color:#c9e7ff
+       }
+        >div{
+          width: 100%;
+          height: 30px;
+          line-height: 30px;
+          font-size: 20px;
+          text-align: left;
+          // color:@colorgary;
+          padding-left: 20px;
+          color:#000;
+          .ellips();
+        }
+        /deep/ .ant-btn{
+          width: 100%;
+        }
+      }
+      }
+         .slide_manage{
+        display: none;
+        width: 50%;
+        border: 1px solid @colorgary;
+        padding: 20px;
+        position: relative;
+     .del_item{
+        width: 20px;
+        height: 20px;
+        position: absolute;
+        top: 10px;
+        right: 0;
+     }
+    }
+    &.floor_5 .slide_item{
+       .floor_1{
+         .flex();
+          .slide_cont{
+            .text{
+              width:80px;
+            }
+         width: 50%;
+                .flex();
+        //  flex-flow: row nowrap;
+        //  justify-content: space-around;
+        //  align-items: center;
+       }
+       }
+       .floor_footer{
+         margin: 10px 0;
+         .flex();
+         flex-flow: row nowrap;
+        align-items: center;
+        }
+        .slide_message{
+          margin: 10px 0;
+          height: 30px;
+          line-height: 30px;
+          .flex();
+          input{
+            width: 50%;
+          }
+          .text{
+            width: 80px;
+
+          }
+        }
+      
+     }
+     &.floor_2 .slide_manage{
+       
+        .search_name{
+          height: 50px;
+          display: flex;
+          align-items: center;
+          flex-flow: row nowrap;
+          input{
+            width: 200px;
+            margin-left: 20px;
+          }
+        }
+        .shop_manage{
+          width: 100%;
+          display: flex;
+          flex-flow: row wrap;
+          justify-content: space-between;
+          .shop_item{
+          border: 1px solid @colorgary;
+          border-radius: 5px;
+          width: 49%;
+          padding: 20px;
+          margin: 10px 0;
+          .mes_item{
+           display: flex;
+           align-items: center;
+           margin: 10px 0;
+           .text{
+             width: 90px;
+           }
+           p{
+             margin-left: 10px;
+           }
+           /deep/ .ant-upload .ant-btn{
+             width: 100px;
+             height: 100px;
+           }
+          }
+          
+        }
+
+        }
+        
+     }
+
+    
+    } 
+    .describe{
+      width: 100%;
+      .flex();
+      .describe_text{
+        width: 60%;
+        margin:0 50px;
+      }
+    }
+    .floor_item{
+      .input_1{
+           width: 20%;
+         }
+         .input_2{
+           width: 50%;
+         }
+      .content{
+         .flex();
+         border: 1px solid @colorgary;
+         border-radius: 10px;
+         align-items: center;
+               padding: 20px 0;
+         div{
+           margin: 0 20px;
+         }
+         .input_1{
+           margin-right: 20px;
+         }
+      }
+     .content1{
+          border: 1px solid @colorgary;
+         border-radius: 10px;
+         padding: 20px;
+         .flex{
+           align-items: center;
+           div{
+             margin: 0 20px;
+           }
+         }
+     }
+    
+    }
+    
+     
+  }
+     //推荐科室弹窗
+      .departments{
+        .header_search{
+          margin: 20px 0;
+          input{
+            width: 200px;
+          }
+        }
+         .ant-row{
+            display: none;
+        }   
+      }   
+  .flex {
+    display: flex;
+    height: 100%;
+    position: relative;
+  }
+
+  .flex-column {
+    flex-direction: column;
+  }
+
+  .flex-auto {
+    flex: auto;
+    position: relative;
+    height: 100%;
+  }
+
+  .flex-auto-hidden {
+    .flex-auto;
+    overflow: hidden;
+  }
+
+  .flex-none {
+    flex: none;
+    position: relative;
+  }
+
+  .abs {
+    position: absolute;
+  }
+
+  .abs-full {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+  }
+.margin-left-100{
+  margin-left: 100px;
+}
+  /deep/ .ant-modal-content .ant-modal-body .ant-row{
+      display: none;
+  }
+/* 重写antd默认布局样式 
+.ant-layout {
+  .ant-layout-header {
+    height: auto;
+    line-height: normal;
+    padding: 0;
+    background: #fff;
+    overflow: hidden;
+  }
+
+  .ant-layout-content {
+    position: relative;
+    min-height: auto; // override antd min-height: 0;
+    // overflow: auto;
+  }
+
+  .ant-layout-footer {
+    text-align: center;
+    width: 100%;
+    background-color: #fff;
+    padding: 10px;
+  }
+}*/
+
+// 在路由页中的布局
+//.page {
+//  &.ant-layout {
+//    > .ant-layout-content {
+//      padding: 24px 24px 0px;
+//    }
+//  }
+//}
+}

+ 1 - 1
UI/src/pages/sellmanage/templateMessage/model.js

@@ -1,5 +1,5 @@
 import { routerRedux } from 'dva/router'
-import { submit, getDataUser, getList, getWxTemplateMsg, synWxTemplateMsg ,beginEditTemplateMsg,saveTemplateMsg} from './templateMessageSer'
+import { submit, getList, getWxTemplateMsg, synWxTemplateMsg ,beginEditTemplateMsg,saveTemplateMsg} from './templateMessageSer'
 import { util} from 'utils';
 import { message,notification} from 'antd';
 import { itemDateUser } from "./mock";

+ 2 - 2
UI/src/utils/config.js

@@ -5,10 +5,10 @@ const APIV4 = 'http://192.168.50.32:8005'
 
 const APIV3Auth = 'http://192.168.50.32:13001/oauth2'
 const WXAPIV5= 'http://192.168.50.32:13001/qiyewechat'
-// const WXMpAPI= 'http://192.168.50.32:13001/mpwechat'
+const WXMpAPI= 'http://192.168.50.32:13001/mpwechat'
 const staticMpAPI = 'http://192.168.50.32:13001/mpwechat'
 const ymallAPI = 'http://localhost:8070'
-const WXMpAPI= 'http://192.168.10.86:8081'
+// const WXMpAPI= 'http://192.168.10.86:8081'
 
 // const APIV3Auth = 'http://192.168.50.32:8031'
 // const WXAPIV5= 'http://localhost:7000'