Commit a2ab6354 by 刘鹏

feat : 去掉信息收集卡内容

parent 43e0dba2
......@@ -86,8 +86,6 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
private var location: Int = 0
private var ffrom2: String? = null
/**单选类型*/
private const val RADIO_KEY="radio"
@JvmStatic
fun start(context: Context, toUid: String, expertInfo: IMExpertBuild, isFromQingShu: Int) {
......@@ -205,10 +203,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
/**添加view事件*/
private fun addVIewListener() {
left_back_btn.setOnClickListener {
ActionCountUtils.count("daoyi_consult_assess_page|return_click")
finish()
}
left_back_btn.setOnClickListener { finish() }
tv_skip.setOnClickListener {
if (Utils.isFastClick()) {
//防止连击
......@@ -221,11 +216,29 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
ActionCountUtils.count("daoyi_consult_assess_page|go_communication_click")
skipToIm()
}
//发送按钮
tv_send.setOnClickListener {
if (noMore) {
//最后一题 点击发送
lastAnswerSend()
lastAnswer = et_input_problem.text.toString()
if (mType71RequestList.size > 0) {
addType71Request(
et_input_problem.text.toString(),
mType71RequestList[0].data.cateId
)
} else {
addType71Request(et_input_problem.text.toString(), "")
}
tv_finish.visibility = View.VISIBLE
mackType2(lastAnswer, "")
setFirstAndLatQuestion(mQuestionBean!!.questions[2].question)
//滑动到底部
recycle.scrollToPosition(mData.size - 1)
mData.forEachIndexed { index, _ ->
mData[index].type5CanClick = false
}
} else {
//答题过程中点击 其他的弹窗
......@@ -238,7 +251,6 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
}
hideInputAndKeyboark()
}
//当前问题
tv_cur_problem.setOnClickListener {
problemContent = et_input_problem.text.toString()
if (!TextUtils.isEmpty(problemContent)){
......@@ -248,7 +260,6 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
et_input_problem.setSelection(et_input_problem.text.toString().length)
recycle.smoothScrollToPosition(mData.size - 1)
}
//持续时间
tv_duration.setOnClickListener {
problemContent = et_input_problem.text.toString()
if (!TextUtils.isEmpty(problemContent)){
......@@ -258,7 +269,6 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
et_input_problem.setSelection(et_input_problem.text.toString().length)
recycle.smoothScrollToPosition(mData.size - 1)
}
//问题影响
tv_problem_impact.setOnClickListener {
problemContent = et_input_problem.text.toString()
if (!TextUtils.isEmpty(problemContent)){
......@@ -268,7 +278,6 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
et_input_problem.setSelection(et_input_problem.text.toString().length)
recycle.smoothScrollToPosition(mData.size - 1)
}
//请简单描述遇到的问题 输入框
et_input_problem.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(p0: Editable?) {
// 动态监听输入行数大于等于4行,滚动列表到底部
......@@ -322,35 +331,7 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
}
}
}
/**
* 最后一题
* */
private fun lastAnswerSend() {
lastAnswer = et_input_problem.text.toString()
if (mType71RequestList.size > 0) {
addType71Request(
et_input_problem.text.toString(),
mType71RequestList[0].data.cateId
)
} else {
addType71Request(et_input_problem.text.toString(), "")
}
//最后一题答玩展示立即前往按钮,隐藏跳过按钮
tv_finish.visibility = View.VISIBLE
tv_skip.visibility = View.GONE
mackType2(lastAnswer, "")
setFirstAndLatQuestion(mQuestionBean!!.questions[2].question)
//滑动到底部
recycle.scrollToPosition(mData.size - 1)
mData.forEachIndexed { index, _ ->
mData[index].type5CanClick = false
}
}
/**
* 隐藏输入框
* */
private fun hideInputAndKeyboark() {
et_input_problem.setText("")
hideInputMethod(et_input_problem)
......@@ -404,13 +385,8 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
if (questionsBean != null) {
//还有下一题
questionMultiItem2.questionsBean = questionsBean
if (RADIO_KEY == questionsBean.type) {
if(!questionsBean.image.isNullOrEmpty()||!questionsBean.url.isNullOrEmpty()){
tv_skip.visibility = View.GONE
questionMultiItem2.viewType = 7
}else{
questionMultiItem2.viewType = 3
}
if ("radio" == questionsBean.type) {
questionMultiItem2.viewType = 3
} else {
questionMultiItem2.viewType = 4
questionMultiItem2.type4CanClick = true
......@@ -419,7 +395,6 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
} else {
//没有下一题了,跳转按钮展示
tv_finish.visibility = View.VISIBLE
tv_skip.visibility = View.GONE
}
mQuestionAdapter.notifyDataSetChanged()
recycle.scrollToPosition(mData.size - 1)
......@@ -588,13 +563,8 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
) {
val questionsBean = mQuestionBean!!.questionPaper.questions[questionChain.questionId]
questionMultiItem2.questionsBean = questionsBean
if (RADIO_KEY == questionsBean?.type) {
if(!questionsBean.image.isNullOrEmpty()||!questionsBean.url.isNullOrEmpty()){
tv_skip.visibility = View.GONE
questionMultiItem2.viewType = 7
}else{
questionMultiItem2.viewType = 3
}
if ("radio" == questionsBean?.type) {
questionMultiItem2.viewType = 3
} else {
questionMultiItem2.viewType = 4
questionMultiItem2.type4CanClick = true
......
......@@ -7,7 +7,6 @@ import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
......@@ -17,10 +16,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.im.R;
import com.yidianling.im.helper.SpanUtils;
......@@ -54,10 +50,6 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
addItemType(5, R.layout.item_left_describe_layout);
//主诉----单选
addItemType(6, R.layout.item_left_one_check_layout);
//主诉----单选
addItemType(6, R.layout.item_left_one_check_layout);
//中断 图文
addItemType(7, R.layout.item_left_img_url_layout);
}
......@@ -99,30 +91,6 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
break;
case 6:
convertType6(helper, item);
case 7:
helper.setText(R.id.multiple_type7_title, item.questionsBean.name);
ImageView image = helper.getView(R.id.image);
LinearLayout jumpUrlView = helper.getView(R.id.jump_url);
if (item.questionsBean.image != null) {
GlideApp.with(mContext)
.load(item.questionsBean.image)
.dontAnimate()
.into(image);
}
if (!TextUtils.isEmpty(item.questionsBean.url)) {
helper.setVisible(R.id.jump_url,true);
jumpUrlView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ActionCountUtils.Companion.count("daoyi_consult_assess_page|leave_click",item.questionsBean.questionPaperId);
NewH5Activity.start(mContext,new H5Params(item.questionsBean.url, ""));
}
});
} else {
helper.setVisible(R.id.jump_url,false);
}
break;
default:
break;
......
......@@ -15,7 +15,7 @@ public class QuestionMultiItem implements MultiItemEntity {
public String type1Text;
public String type2Text;
public String type2Other;
/***type 3 单选 type 4 多选 type 6 终止选项 type 7 */
/***type 3 单选 type 4 多选 type 6 */
public QuestionsBean questionsBean;
public boolean type3CanClick = true;
public boolean type4CanClick = true;
......
......@@ -30,10 +30,6 @@ public class QuestionsBean implements Serializable {
public String category;
public String order;
public String name;
/**结束流程图片*/
public String image;
/**结束流程跳转地址*/
public String url;
/***类型:
* radio(单选)
* /check(复选)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment