|
@@ -11,6 +11,7 @@ const api={
|
|
|
textPush:'/push/pushText',
|
|
|
getTableList:'/scale/getList', //获取量表列表
|
|
|
getTableInfo:'/scale/getContent', //获取量表明细
|
|
|
+ getConceptDetail:'/conceptDetail/getConceptDetail', //获取静态提示信息
|
|
|
}
|
|
|
|
|
|
//获取右侧推送信息
|
|
@@ -97,50 +98,66 @@ export const billing = (mdata,boxMark) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- export const getTips = (diagItem) =>{
|
|
|
- return (dispatch, getState) =>{
|
|
|
+//获取提示信息(静态信息)
|
|
|
+export const getConceptDetail = (item) => {
|
|
|
+ return(dispatch, getState) => {
|
|
|
dispatch({
|
|
|
type: SET_CLICK_DIAG,
|
|
|
- clickDiag: diagItem
|
|
|
+ clickDiag: item
|
|
|
})
|
|
|
- const url = '/introduceInfo/getByQuestionId';
|
|
|
- const params = {
|
|
|
- questionId: diagItem.id,
|
|
|
- type: diagItem.type,
|
|
|
- position: 1
|
|
|
+ const params ={
|
|
|
+ name: item.name,
|
|
|
+ position: item.position,
|
|
|
+ type: item.type
|
|
|
}
|
|
|
- json(url, params)
|
|
|
- .then((data)=>{
|
|
|
- dispatch({
|
|
|
- type: SET_TIPS,
|
|
|
- tips: data.data.data
|
|
|
- })
|
|
|
- }).catch((e) => {
|
|
|
- console.log(e)
|
|
|
- })
|
|
|
|
|
|
+ json(api.getConceptDetail, params).then((res) => {
|
|
|
+ if(res.data.code == '0') {
|
|
|
+ if(item.position == '1') {
|
|
|
+ if(item.type == '5' || item.type == '6') {
|
|
|
+ dispatch({
|
|
|
+ type: SET_TIPS,
|
|
|
+ tips: res.data.data,
|
|
|
+ tmpFlg:'midPart'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ dispatch({
|
|
|
+ type: SET_TIPS,
|
|
|
+ tips: res.data.data,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ } else if(item.position == '2'){
|
|
|
+
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Notify.info('提示信息未维护')
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-export const getTipsDetails = () => {
|
|
|
+export const getAllConceptDetail = () => {
|
|
|
return(dispatch, getState) => {
|
|
|
const state = getState();
|
|
|
- // 诊断指南新窗口展示
|
|
|
- // window.open(`/static/pages/information.html?type=7&&questionId=${state.diagnosticList.clickDiag.id}`);
|
|
|
-
|
|
|
- //弹窗显示
|
|
|
- const url ='/introduceInfo/getByQuestionId'
|
|
|
+ const clickItem = state.diagnosticList.clickDiag
|
|
|
const params = {
|
|
|
- type: state.diagnosticList.clickDiag.type,
|
|
|
- questionId: state.diagnosticList.clickDiag.id,
|
|
|
+ type: clickItem.type,
|
|
|
+ name: clickItem.name,
|
|
|
position:2
|
|
|
}
|
|
|
- json(url, params)
|
|
|
- .then((data)=>{
|
|
|
+ json(api.getConceptDetail, params)
|
|
|
+ .then((res)=>{
|
|
|
+ if(res.data.code == '0') {
|
|
|
dispatch({
|
|
|
type: SET_TIPS_DETAILS,
|
|
|
- tipsDetails: data.data.data
|
|
|
+ tipsDetails: res.data.data
|
|
|
})
|
|
|
+ } else {
|
|
|
+ Notify.info('提示信息未维护')
|
|
|
+ }
|
|
|
+
|
|
|
}).catch((e) => {
|
|
|
console.log(e)
|
|
|
})
|