diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index b6d9c566e..f70d748eb 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -726,12 +726,24 @@ class CoursesIndex extends Component { (props) => () } > + {/* 子目录普通作业 */} + () + } + > {/* 分组作业 */} () } > + {/* 分组作业 */} + () + } + > {/* 普通作业 */} () } > + {/* 子普通作业 */} + () + } + > {/* 分组作业 */} - {/* 问卷答题 */} + {/* 分组作业 */} + () + } + > + + + {/* 问卷答题 */} () diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js index 3f13f619f..1bb79d28f 100644 --- a/public/react/src/modules/courses/ListPageIndex.js +++ b/public/react/src/modules/courses/ListPageIndex.js @@ -230,6 +230,12 @@ class ListPageIndex extends Component { (props) => () } > + {/* 普通作业 */} + () + } + > {/* 作品列表 */} () } > + {/* 作品列表 */} + () + } + > + () + } + > + {/* 作品列表 */} + {/* 作品列表 */} + () + } + > + {/* 作业问答 */} () } > + () + } + > + () } > + () + } + > () } > - + () + } + > {/* 作品列表 */} () } > - + () + } + > {/* 作业问答 */} () } > + () + } + > () } > + () + } + > diff --git a/public/react/src/modules/courses/busyWork/Index.js b/public/react/src/modules/courses/busyWork/Index.js index 79b6c6cc6..555ffc7c4 100644 --- a/public/react/src/modules/courses/busyWork/Index.js +++ b/public/react/src/modules/courses/busyWork/Index.js @@ -57,83 +57,141 @@ class CoursesWorkIndex extends Component { render() { return (
- - - {/* --------------------------------------------------------------------- */} - - {/* 作业设置 */} - {/* http://localhost:3007/courses/1309/homework/9300/setting */} - () - } - > - - {/* 作品列表 */} - () - } - > - {/* 作业问答 */} - () - } - > - () - } - > - - {/* 评阅 */} - () - } - > - - {/* 提交作品 */} - () - } - > - () - } - > - - - {/* 新建 */} - {/* http://localhost:3007/courses/1309/common_homeworks/9299/edit/1 */} - () - } - > - () - } - > - - - - {/* 作业列表 */} - () - } - > - - {/* --------------------------------------------------------------------- */} - - - - + + + {/* --------------------------------------------------------------------- */} + + {/* 作业设置 */} + {/* http://localhost:3007/classrooms/1309/homework/9300/setting */} + () + } + > + () + } + > + + + {/* 作品列表 */} + () + } + > + {/* 作品列表 */} + () + } + > + + {/* 作业问答 */} + () + } + > + () + } + > + + () + } + > + () + } + > + + + {/* 评阅 */} + () + } + > + () + } + > + + + {/* 提交作品 */} + () + } + > + () + } + > + + () + } + > + () + } + > + + + {/* 新建 */} + {/* http://localhost:3007/classrooms/1309/common_homeworks/9299/edit/1 */} + () + } + > + () + } + > + + () + } + > + + () + } + > + + + {/* 作业列表 */} + () + } + > + () + } + > + + {/* --------------------------------------------------------------------- */} + + + +
) } diff --git a/public/react/src/modules/courses/busyWork/IndexGroup.js b/public/react/src/modules/courses/busyWork/IndexGroup.js index e111bcae3..d9345dea9 100644 --- a/public/react/src/modules/courses/busyWork/IndexGroup.js +++ b/public/react/src/modules/courses/busyWork/IndexGroup.js @@ -58,80 +58,131 @@ class CoursesWorkIndex extends Component { render() { return (
- - - - {/* --------------------------------------------------------------------- */} - - {/* --------------------------------------------------------------------- */} - - {/* 作业设置 */} - () - } - > - - {/* 作品列表 */} - () - } - > - - {/* 作业问答 */} - () - } - > - {/* 参考答案 */} - () - } - > - {/* 评阅 */} - () - } - > - - - () - } - > - () - } - > - - {/* 新建 */} - {/* http://localhost:3007/courses/1309/group_homeworks/9299/edit/1 */} - () - } - > - () - } - > - - {/* 作业列表 */} - () - } - > - - - + + + + {/* --------------------------------------------------------------------- */} + + {/* --------------------------------------------------------------------- */} + + {/* 作业设置 */} + () + } + > + () + } + > + + {/* 作品列表 */} + () + } + > + () + } + > + + {/* 作业问答 */} + () + } + > + () + } + > + {/* 参考答案 */} + () + } + > + () + } + > + {/* 评阅 */} + () + } + > + () + } + > + + () + } + > + + () + } + > + + () + } + > + () + } + > + {/* 新建 */} + {/* http://localhost:3007/classrooms/1309/group_homeworks/9299/edit/1 */} + () + } + > + () + } + > + () + } + > + () + } + > + + {/* 作业列表 */} + () + } + > + {/* 作业列表 */} + () + } + > + + +
) } diff --git a/public/react/src/modules/courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js index 79beb9620..edf22a37f 100644 --- a/public/react/src/modules/courses/busyWork/NewWork.js +++ b/public/react/src/modules/courses/busyWork/NewWork.js @@ -29,8 +29,17 @@ class NewWork extends Component { } } fetchCourseData = (courseId) => { + let newcategory=undefined; + if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"){ + newcategory=this.props.match.params.workId + } const isGroup = this.props.isGroup() - const url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}` + let url="" + if(newcategory){ + url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}&category=${newcategory}`; + }else{ + url = `/courses/${courseId}/homework_commons/new.json?type=${isGroup ? 3 : 1}` + } axios.get(url, { }) .then((response) => { @@ -49,7 +58,17 @@ class NewWork extends Component { }); } fetchWork = (workId) => { - const url = `/homework_commons/${workId}/edit.json` + let newcategory=undefined; + if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"){ + newcategory=this.props.match.params.workId + } + let url="" + if(newcategory){ + url = `/homework_commons/${workId}/edit.json?category=${newcategory}`; + }else{ + url = `/homework_commons/${workId}/edit.json` + } + axios.get(url, { }) .then((response) => { @@ -91,6 +110,9 @@ class NewWork extends Component { doNew = (params) => { const coursesId = this.props.match.params.coursesId const newUrl = `/courses/${coursesId}/homework_commons.json` + if(this.props.match.path==="/classrooms/:coursesId/common_homework/:workId/:pageType"){ + params.category=this.props.match.params.workId + } axios.post(newUrl, params) .then((response) => { diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index 6c98695ba..b31412470 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -132,7 +132,7 @@ class UseBank extends Component{ onSave = () => { debugger const { checkBoxValues } = this.state; - const { object_type } = this.props + const { object_type,category_id } = this.props if(checkBoxValues.length==0){ this.setState({ isChecked:"请先选择"+engNameMap[object_type] @@ -149,7 +149,8 @@ class UseBank extends Component{ , { "object_type": object_type, "bank_id": checkBoxValues, - "course_id": courseId + "course_id": courseId, + "category":category_id } ) .then((response) => { diff --git a/public/react/src/modules/courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js index ebcce2c12..b413f2c53 100644 --- a/public/react/src/modules/courses/busyWork/common.js +++ b/public/react/src/modules/courses/busyWork/common.js @@ -39,8 +39,23 @@ export function RouteHOC(options = {}) { let chName = isGroup ? '分组作业' : '普通作业' return chName; } - const secondName = isGroup ? 'group_homeworks' : 'common_homeworks' - return secondName; + + if(window.location.pathname.indexOf('group_homeworks') != -1){ + const secondName ='group_homeworks'; + return secondName; + } + + if(window.location.pathname.indexOf('common_homeworks') != -1){ + const secondName ='common_homeworks'; + return secondName; + } + + if(window.location.pathname.indexOf('common_homework') != -1){ + const secondName ='common_homework'; + return secondName; + } + + } getModuleType = () => { const isGroup = this.isGroup() diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index 8ba6303fc..d4b097cec 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -6,7 +6,7 @@ import '../css/busyWork.css' import CommonWorkItem from './CommonWorkItem' import PublishRightnow from './PublishRightnow' import ConnectProject from './ConnectProject' -import { WordsBtn, on, off } from 'educoder' +import { WordsBtn, on, off ,trigger} from 'educoder' import Modals from '../../modals/Modals' import NoneData from "../coursesPublic/NoneData" import Titlesearchsection from '../common/titleSearch/TitleSearchSection'; @@ -34,7 +34,8 @@ class commonWork extends Component{ totalCount:0, checkAll:false, checkBoxValues:[], - isSpin:false + isSpin:false, + category_id:undefined } } //输入搜索条件 @@ -45,8 +46,8 @@ class commonWork extends Component{ } //搜索查询 searchStudent=()=>{ - let {page,search,order}=this.state; - this.getList(1,search,order); + let {category_id,search,order}=this.state; + this.getList(1,search,order,category_id); } openConnectionProject = (work) => { this.refs['connectProject'].openConnectionProject(work) @@ -54,7 +55,7 @@ class commonWork extends Component{ // 新建 createCommonWork=(type)=>{ - this.props.toNewPage(this.props.match.params) + this.props.toNewPage(this.props.match.params) } cancelDelClasses=()=>{ @@ -69,23 +70,60 @@ class commonWork extends Component{ } componentDidUpdate(prevProps, prevState) { - if (prevProps.match.path != this.props.match.path) { - this.clearSelection() - this.setState({ selectedKeys: 'all', order: '' }, () => { - this._getList() - }) + console.log(this.props) + if (prevProps.coursesidtype != this.props.coursesidtype) { + if (this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id" || this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id") { + + if (this.props.coursesidtype === "node" && this.props.match.path === "/classrooms/:coursesId/common_homeworks/:category_id") { + this.clearSelection() + this.setState({selectedKeys: 'all', order: ''}, () => { + this._getList() + }) + } + if (this.props.coursesidtype === "child" && this.props.match.path === "/classrooms/:coursesId/common_homework/:category_id") { + this.clearSelection() + this.setState({selectedKeys: 'all', order: ''}, () => { + this._getList(this.props.match.params.category_id) + }) + } + } } + // + // if(this.props.match.path==="/classrooms/:coursesId/common_homeworks/:category_id"||this.props.match.path==="/classrooms/:coursesId/common_homework/:category_id"){ + // + // + // if(this.props.coursesidtype==="node"&&this.props.match.path==="/classrooms/:coursesId/common_homeworks/:category_id"){ + // this.clearSelection() + // this.setState({ selectedKeys: 'all', order: '' }, () => { + // this._getList() + // }) + // } + // if(this.props.coursesidtype==="child"&&this.props.match.path==="/classrooms/:coursesId/common_homework/:category_id"){ + // this.clearSelection() + // this.setState({ selectedKeys: 'all', order: '' }, () => { + // this._getList(this.props.match.params.category_id) + // }) + // } + // + // } + } - - _getList = () => { + + _getList = (id) => { this.setState({ - isSpin:true + isSpin:true, + category_id:id }) let {page,search,order}=this.state; - this.getList(page,search,order); + this.getList(page,search,order,id); } componentDidMount(){ - this._getList() + if(this.props.coursesidtype==="node"){ + this._getList() + }else{ + this._getList(this.props.match.params.category_id) + } + on('updateNavSuccess', this.updateNavSuccess) } @@ -93,9 +131,13 @@ class commonWork extends Component{ off('updateNavSuccess', this.updateNavSuccess) } updateNavSuccess = () => { - this._getList() + if(this.props.coursesidtype==="node"){ + this._getList() + }else{ + this._getList(this.props.match.params.category_id) + } } - + useBankSuccess = (checkBoxValues, newWorkIdArray) => { this.setState({ page:1, @@ -103,12 +145,14 @@ class commonWork extends Component{ }, () => { this.refs['publishModalRef'].open() }) - - let {search, order}=this.state; - this.getList(1, search, order); + + let {search, order,category_id}=this.state; + this.getList(1, search, order,category_id); } - getList=(page,search,order)=>{ + getList=(page,search,order,category_id)=>{ + console.log(category_id) + this.setState({ isSpin:true }) @@ -121,6 +165,9 @@ class commonWork extends Component{ if(search!=""){ url+="&search="+search; } + if(category_id){ + url+="&category="+category_id; + } axios.get(encodeURI(url)).then((result)=>{ if(result.status==200){ this.setState({ @@ -148,8 +195,8 @@ class commonWork extends Component{ checkBoxValues:[], checkAll:false }) - let {search}=this.state; - this.getList(1,search,e.key==="all"?"":e.key); + let {search,category_id}=this.state; + this.getList(1,search,e.key==="all"?"":e.key,category_id); } onPageChange=(pageNumber)=>{ @@ -157,8 +204,8 @@ class commonWork extends Component{ page:pageNumber, checkBoxValues:[] }) - let {search,order}=this.state; - this.getList(pageNumber,search,order); + let {search,order,category_id}=this.state; + this.getList(pageNumber,search,order,category_id); } // 全选和反选 @@ -191,7 +238,7 @@ class commonWork extends Component{ } onWorkDelete = () => { - const { checkBoxValues } = this.state; + const { checkBoxValues,category_id} = this.state; const len = checkBoxValues.length; if (len == 0) { this.props.showNotification('请先选择要删除的作业') @@ -209,13 +256,14 @@ class commonWork extends Component{ axios.post(url, { homework_ids: checkBoxValues, all_check: 0, + // category:category_id // group_ids }).then((response) => { - if (response.data.status == 0) { + if (response.data.status == 0) { this.props.showNotification('删除成功') this.clearSelection() let {search,order}=this.state; - this.getList(1,search,order); + this.getList(1,search,order,category_id); this.props.updataleftNavfun() } @@ -224,12 +272,12 @@ class commonWork extends Component{ }) } }) - + } clearSelection = () => { this.setState({ checkBoxValues: [], checkAll: false }) } - // + // onSetPublic = () => { const { checkBoxValues } = this.state; const len = checkBoxValues.length; @@ -249,10 +297,10 @@ class commonWork extends Component{ homework_ids: checkBoxValues, all_check: 0 }).then((response) => { - if (response.data.status == 0) { + if (response.data.status == 0) { this.props.showNotification('设为公开操作成功') let {search,order, page}=this.state; - this.getList(page,search,order); + this.getList(page,search,order,category_id); } }).catch((error) => { @@ -262,8 +310,8 @@ class commonWork extends Component{ }) } doWhenSuccess = () => { - let {search,order, page}=this.state; - this.getList(page,search,order); + let {search,order, page,category_id}=this.state; + this.getList(page,search,order,category_id); this.setState({ checkBoxValues:[] }) @@ -279,7 +327,7 @@ class commonWork extends Component{ this.onChangeSelect(checkBoxValues) } addToBank = () => { - const { checkBoxValues } = this.state; + const { checkBoxValues,category_id } = this.state; const len = checkBoxValues.length; if (len == 0) { this.props.showNotification('请先选择要加入题库的作业') @@ -291,10 +339,10 @@ class commonWork extends Component{ homework_ids: checkBoxValues, all_check: 0 }).then((response) => { - if (response.data.status == 0) { + if (response.data.status == 0) { this.props.showNotification('加入成功') let {search,order}=this.state; - this.getList(1,search,order); + this.getList(1,search,order,category_id); } }).catch((error) => { @@ -302,27 +350,36 @@ class commonWork extends Component{ }) } connectSuccess = () => { - let {page,search,order}=this.state; - this.getList(page,search,order); + let {page,search,order,category_id}=this.state; + this.getList(page,search,order,category_id); } cancelConnectionProject = (work) => { let workId=this.props.match.params.workId; let courseId=this.props.match.params.coursesId; - + let {page,search,order,category_id}=this.state; const url = `/homework_commons/${work.homework_id}/student_works/cancel_relate_project.json` axios.get(url).then((response)=> { if (response.data.status == 0) { - let {page,search,order}=this.state; - this.getList(page,search,order); + + this.getList(page,search,order,category_id); this.props.showNotification('取消关联成功') } }).catch((error)=>{ console.log(error) }) } + addDir = (id) => { + + if(!id){ + trigger('addcommon_homeworks', parseInt(this.props.match.params.category_id)) + }else{ + let data={id:parseInt(id),name:name} + trigger('editcommon_homeworks', data) + } + + } - render(){ let { search, @@ -339,6 +396,8 @@ class commonWork extends Component{ published_count, unpublished_count, main_category_name, + category_name, + category_id }=this.state; const { coursedata } = this.props; if (!coursedata) { @@ -354,12 +413,12 @@ class commonWork extends Component{ // // return( - +
{/*

{moduleChineseName} - +

@@ -374,7 +433,7 @@ class commonWork extends Component{
- } + { isAdmin &&
  • + this.addDir(category_id)}>{!category_id?"新建目录":"目录重命名"} +
  • } } secondRowBotton={ @@ -425,7 +487,7 @@ class commonWork extends Component{ searchPlaceholder={"请输入名称进行搜索"} showSearchInput={true} > - this.refs['publishModalRef'].homeworkstart()}>{ "立即发布" }
  • -
  • - + { !!course_public &&
  • 设为公开
  • } {this.props.user&&this.props.user.main_site===true?
  • 15 && -
    +
    } diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index a9495e78d..f7aef34c7 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -142,6 +142,8 @@ class Coursesleftnav extends Component{ off('editshixunmainname',this.editshixunmainname) off('videoAdd',this.addVideo) off('editVideo',this.editVideo) + off('addcommon_homeworks',this.addcommon_homeworks) + off('editcommon_homeworks',this.editcommon_homeworks) } addshixunchild=(e, data)=>{ this.Navmodalnames(e,1,"shixun_homework",data); @@ -149,6 +151,12 @@ class Coursesleftnav extends Component{ editshixunchild=(e, data)=>{ this.Navmodalnames(e,4,"editSecondname",data.id,data.name); } + addcommon_homeworks=(e, data)=>{ + this.Navmodalnames(e,1,"common_homework",data); + } + editcommon_homeworks=(e, data)=>{ + this.Navmodalnames(e,4,"editSecondname",data.id,data.name); + } editshixunmainname=(e, data)=>{ this.Navmodalnames(e,3,"editname",data.id,data.name); } @@ -196,7 +204,8 @@ class Coursesleftnav extends Component{ on('editshixunmainname',this.editshixunmainname); on('videoAdd',this.addVideo); on('editVideo',this.editVideo) - + on('addcommon_homeworks',this.addcommon_homeworks) + on('editcommon_homeworks',this.editcommon_homeworks) let courstype=this.props.match.url; @@ -537,7 +546,7 @@ class Coursesleftnav extends Component{ } saveNavmodapost=(url,value,positiontype,coursesId,type)=>{ - + console.log(positiontype) axios.post(url, {name:value}).then((result)=>{ if(result!=undefined){ @@ -548,6 +557,23 @@ class Coursesleftnav extends Component{ description:result.data.message }); + if(positiontype==="common_homeworks"||positiontype==="common_homework"||positiontype==="group_homeworks"||positiontype==="group_homework"){ + if(type===true){ + this.updasaveNavmoda() + trigger('updateNavSuccess') + }else{ + this.updasaveNavmoda() + if(positiontype==="common_homeworks"){ + this.props.history.push(`/classrooms/${coursesId}/common_homework/${result.data.category_id}`); + } + if(positiontype==="group_homeworks"){ + this.props.history.push(`/classrooms/${coursesId}/group_homework/${result.data.category_id}`); + } + + } + return + } + if(positiontype==="shixun_homeworks"||positiontype==="shixun_homework"){ if(type===true){ this.updasaveNavmoda() @@ -557,6 +583,7 @@ class Coursesleftnav extends Component{ this.props.history.push(`/classrooms/${coursesId}/shixun_homework/${result.data.category_id}`); } + return } if(positiontype==="files"||positiontype==="file"){ @@ -569,22 +596,25 @@ class Coursesleftnav extends Component{ this.updasaveNavmoda() this.props.history.push(`/classrooms/${coursesId}/file/${result.data.category_id}`); } - + return } if(positiontype==="boards"){ this.updasaveNavmoda() trigger('updateNavSuccess') this.props.history.push(`/classrooms/${coursesId}/boards/${result.data.category_id}`); + return } if(positiontype!="course_groups"&&positiontype!="shixun_homeworks"&&positiontype!="shixun_homework"){ this.updasaveNavmoda() + return } if(positiontype==="course_groups"){ this.props.updataleftNavfun(); this.props.history.push(`/classrooms/${coursesId}/course_groups/${result.data.group_id}`); + return } } @@ -863,6 +893,10 @@ class Coursesleftnav extends Component{ {/*公告栏*/} {/*作业*/} {item.type==="shixun_homework"?
    this.Navmodalnames(e,1,"shixun_homework",item.id)}>新建目录
    :""} + {/* 普通作业 */} + {item.type==="common_homework"?
    this.Navmodalnames(e,1,"common_homeworks",item.id)}>新建目录
    :""} + {/*/!* 分组作业 *!/*/} + {item.type==="group_homework"?
    this.Navmodalnames(e,1,"group_homeworks",item.id)}>新建目录
    :""} {/*资源*/} {item.type==="attachment"?
    this.Navmodalnames(e,1,"attachment",item.id)}>新建目录
    :""} {/* 视频 */} @@ -893,8 +927,8 @@ class Coursesleftnav extends Component{ let {twosandiantypes,twosandiantypenum}=this.state; return (item.type==="graduation"?"":
    {/*作业/资源*/} - {item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"?
    this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名
    :""} - {item.type==="shixun_homework"||item.type==="attachment"?
    this.deleteSecondary(e,1,iem.category_id)}>删除
    :""} + {item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"||item.type==="common_homework"||item.type==="group_homework"?
    this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名
    :""} + {item.type==="shixun_homework"||item.type==="attachment"||item.type==="common_homework"||item.type==="group_homework"?
    this.deleteSecondary(e,1,iem.category_id)}>删除
    :""} {/*分班*/} {item.type==="course_group"?
    this.Navmodalnames(e,5,"editSecondname",iem.category_id,iem.category_name)}>重命名
    :""} {item.type==="course_group"?
    this.deleteSecondary(e,2,iem.category_id)}>删除
    :""} diff --git a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js index 0e60ddcc5..1394ac2f9 100644 --- a/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js +++ b/public/react/src/modules/user/usersInfo/banks/NewGtaskForm.js @@ -110,11 +110,11 @@ class NewGtaskForms extends Component { } handleSubmit = () => { - - let { contentFileList, min_num, max_num, base_on_project } = this.state; - let { data } = this.props; - let task_type = data.task_type - let topicId = this.props.topicId + console.log(this.props) + let {contentFileList,min_num,max_num,base_on_project}=this.state; + let {data}=this.props; + let task_type=data.task_type + let topicId=this.props.topicId let attachment_ids = contentFileList.map(item => { return item.response ? item.response.id : item.id })