소스 검색

文件夹删除(接口未调完)

zhangxc 5 년 전
부모
커밋
bc053dd1f1

+ 3 - 2
src/components/PushContainer/index.jsx

@@ -332,8 +332,9 @@ class PushContainer extends Component {
       </div>
     </div>
   }
-  floderDelete(){//文件夹删除
-
+  floderDelete(id){//文件夹删除
+    console.log('id', id)
+    store.dispatch(delItemAdmin(id))
   }
 
   makeSure() {

+ 5 - 1
src/components/TemplateItems/TemplateItem/index.jsx

@@ -213,7 +213,11 @@ class TemplateItem extends React.Component {
   render() {
     const { allCheckShow, id, name,hospitalDeptId,folderId,spell,preview,conceptDeptName, sex,admin,checkItemsAdmin,allCheckShowAdmin,adminflg,folderName } = this.props;
     let previewJson = JSON.parse(preview);
-    let sexStr = sex == 2 ? ' (女'+(conceptDeptName&&'-'+conceptDeptName)+')' : sex == 1 ? ' (男'+(conceptDeptName&&'-'+conceptDeptName)+')' : ' (通用'+(conceptDeptName&&'-'+conceptDeptName)+')';
+    let sexStr = sex == 2 ? ' (女' : sex == 1 ? ' (男': ' (通用';
+    if(conceptDeptName) {
+      sexStr += conceptDeptName
+    }
+    sexStr += ')'
     return (
       <div className={style.wrapper}>
         <div className={this.getStyleFst()}

+ 4 - 4
src/components/TemplateItems/index.jsx

@@ -112,10 +112,10 @@ class TemplateItems extends React.Component {
         this.props.floderAction(false,'none')
         this.props.floderRename(name,id)
     }
-    floderDelete(e){
+    floderDelete(e,id){
         e.stopPropagation()
         this.props.floderAction(false,'none')
-        this.props.floderDelete()
+        this.props.floderDelete(id)
     }
     genAdminItems(items,flg) {
         const Floder=[],Items = [];
@@ -126,11 +126,11 @@ class TemplateItems extends React.Component {
                 <div className={style.floderPart}>
                     <div className={style.floderPartFl} onClick={(e)=>this.floderSlide(e,tmpItm)}>
                         <img src={tmpItm.slide == 1?floderD:floderR} className={style.floderRD}/>
-                        {tmpItm.name}
+                        {tmpItm.name}({tmpItm.templateInfoCount})
                         <span className={`${style.floderPartAction}`} id="floderActionBtn" onClick={(e)=>{this.floderAction(e,tmpItm.id)}}>...</span>
                         {tmpItm.action == 1&&<div className={style.floderAction} id="floderAction">
                             <p onClick={(e)=>{this.floderRename(e,tmpItm.name,tmpItm.id)}}>重命名文件夹</p>
-                            <p onClick={(e)=>{this.floderDelete(e)}}>删除文件夹</p>
+                            <p onClick={(e)=>{this.floderDelete(e,tmpItm.id)}}>删除文件夹</p>
                         </div>}
                     </div>
                     {

+ 1 - 1
src/store/actions/pushMessage.js

@@ -23,7 +23,7 @@ export const changeCheck=(state,action)=>{
 //获取右侧推送信息
 export const setAdvice=(state,action)=>{
 	const res=Object.assign({},state);  
-	// res.determine = action.determine
+	// res.determine = action.determine`
 	//不展示确诊,将确诊跟疑似诊断放在一起展示
   res.doubt = action.determine.concat(action.doubt);
   res.possible = action.possible;

+ 2 - 1
src/utils/config.js

@@ -1,7 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-const host='http://192.168.2.236:5050';//后端接口访问地址
+// const host='http://192.168.2.236:5050';//后端接口访问地址
+const host='http://223.93.170.82:23650';//后端接口访问地址外网
 // const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';