Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-insurance
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.frontend
pica-insurance
提交
48e8273e
提交
48e8273e
编写于
2月 14, 2023
作者:
张磊
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/zl2' into 'develop'
auto commit See merge request
!11
上级
989c5cc4
173b5882
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
215 行增加
和
27 行删除
+215
-27
detection.js
src/api/detection.js
+35
-0
loading.js
src/components/loading/loading.js
+0
-2
main.js
src/main.js
+3
-7
vue-components.js
src/plugins/vue-components.js
+7
-1
insurance-bind-code.vue
src/views/insurance-bind-code/insurance-bind-code.vue
+170
-17
未找到文件。
src/api/detection.js
浏览文件 @
48e8273e
...
...
@@ -53,3 +53,38 @@ export const operationSubmit = (data) => {
withCredentials
:
true
,
});
};
// 签署协议
export
const
signDetection
=
(
data
)
=>
{
return
request
({
method
:
'post'
,
url
:
'/smartcontract/protocol/sign/detection'
,
data
:
data
});
};
// 获取协议名称
export
const
getProtocolContent
=
(
data
)
=>
{
return
request
({
url
:
`/smartcontract/protocol/content?type=
${
data
.
id
}
`
,
method
:
'get'
,
});
};
// 获取协议内容
export
const
getProtocolName
=
(
data
)
=>
{
return
request
({
url
:
`/smartcontract/protocol/name?type=
${
data
.
id
}
`
,
method
:
'GET'
,
});
};
// 绑定条码
export
const
sampleCodeValidate
=
(
data
)
=>
{
return
request
({
method
:
'post'
,
url
:
'/trade/detection/sampleCode/validate'
,
data
:
data
,
withCredentials
:
true
,
});
};
src/components/loading/loading.js
浏览文件 @
48e8273e
...
...
@@ -16,11 +16,9 @@ const loading = {
Vue
.
prototype
.
$loading
=
{
show
:
()
=>
{
console
.
log
(
'show'
);
instance
.
show
=
true
;
},
hide
:
()
=>
{
console
.
log
(
'hide'
);
instance
.
show
=
false
;
},
};
...
...
src/main.js
浏览文件 @
48e8273e
import
{
router
,
store
,
vueApp
}
from
'@pica-cli/vue-cli-plugin-pica-cli-plugin/auto'
;
import
'@/router'
;
import
{
PicaArea
}
from
'pica-area'
;
console
.
log
(
'router, store, vueApp: '
,
router
,
store
,
vueApp
);
const
{
Vue
}
=
window
;
import
Loading
from
'@/components/loading/loading.js'
;
import
commonJs
from
'@/utils/common'
;
import
'@/assets/js/flexible'
;
Vue
.
use
(
Loading
);
Vue
.
use
(
PicaArea
);
Vue
.
prototype
.
$commonJs
=
commonJs
;
import
{
PicaArea
}
from
'pica-area'
;
console
.
log
(
'PicaArea'
,
PicaArea
);
// 禁用双指放大
var
lastTouchEnd
=
0
;
document
.
addEventListener
(
'touchstart'
,
function
(
event
)
{
...
...
@@ -40,5 +35,6 @@ document.documentElement.addEventListener(
);
vueApp
.
$rocNative
.
appInit
();
window
.
Vue
.
use
(
PicaArea
);
console
.
log
(
'router, store, vueApp: '
,
router
,
store
,
vueApp
);
console
.
log
(
'window :>> '
,
window
);
src/plugins/vue-components.js
浏览文件 @
48e8273e
import
Vue
from
'vue'
;
import
picaGuideApp
from
'@pica-kit/pica-ui-component/lib/pica-guide-app'
;
import
PageModel
from
'@pica-kit/page-model'
;
import
{
Dialog
,
Field
}
from
'vant'
;
import
{
Dialog
,
Field
,
Overlay
,
Button
}
from
'vant'
;
import
Loading
from
'@/components/loading/loading'
;
Vue
.
use
(
Loading
);
// Vue.use(PicaArea);
Vue
.
use
(
picaGuideApp
);
Vue
.
use
(
PageModel
);
Vue
.
use
(
Dialog
);
Vue
.
use
(
Field
);
Vue
.
use
(
Overlay
);
Vue
.
use
(
Button
);
src/views/insurance-bind-code/insurance-bind-code.vue
浏览文件 @
48e8273e
...
...
@@ -15,7 +15,7 @@
type=
"text"
class=
"code"
>
{{
checkName
||
''
}}
{{
detectionData
.
checkName
||
''
}}
</div>
<div
class=
"code-input-item-r"
>
<div
...
...
@@ -56,7 +56,7 @@
<img
class=
"clear-img"
src=
"https://files.yunqueyi.com/icon/2022/clear.png"
/
>
>
</div>
<div
class=
"scan-qr-img-container-code"
...
...
@@ -65,7 +65,7 @@
<img
class=
"scan-qr-img"
src=
"https://files.yunqueyi.com/image/png/common/20221128114549858.png"
/
>
>
<span>
扫码识别
</span>
</div>
</div>
...
...
@@ -90,13 +90,13 @@
class=
"check-area"
src=
"https://files.yunqueyi.com/h5/detection/is-check.png"
@
click=
"setSignDetection()"
/
>
>
<img
v-else
class=
"check-area"
src=
"https://files.yunqueyi.com/h5/detection/check.png"
@
click=
"setSignDetection()"
/
>
>
<span
class=
"notification-text1"
>
我已阅读并同意
</span>
<span
class=
"notification-text2"
...
...
@@ -114,11 +114,32 @@
提交
</div>
</div>
<van-overlay
z-index=
"11"
:show=
"showProtocol"
@
click=
"showProtocol = false"
>
<div
class=
"protocol-content"
>
<div
class=
"block70"
>
知情同意书
</div>
<div
class=
"protocol-text"
v-html=
"agreeText"
/>
<van-button
class=
"btn"
@
click=
"subProtocol"
>
知情并提交
</van-button>
</div>
</van-overlay>
</div>
</
template
>
<
script
>
import
{
signDetection
,
getProtocolContent
,
getProtocolName
,
sampleCodeValidate
}
from
'@/api/detection.js'
;
export
default
{
data
()
{
return
{
...
...
@@ -136,13 +157,6 @@ export default {
protocolName
:
''
,
prototypeId
:
''
,
prototypeLogId
:
''
,
isLoading
:
false
,
recordInfo
:
{
name
:
''
,
sex
:
''
,
date
:
''
,
checkName
:
''
},
goodsId
:
''
,
status
:
''
,
errorMessage
:
''
,
...
...
@@ -155,6 +169,23 @@ export default {
computed
:
{
},
created
()
{
// 11073
const
mock
=
{
checkName
:
'博厚检测2'
,
doctorId
:
0
,
equipmentVariety
:
null
,
examQuestionnaireId
:
0
,
goodsId
:
23911
,
goodsName
:
null
,
hospitalId
:
439487
,
hospitalProjectId
:
678
,
pprotocolType
:
31
,
projectId
:
9
,
serviceCheckType
:
1
,
validateIdNo
:
0
,
};
this
.
detectionData
=
mock
;
this
.
getProtocolName
();
},
methods
:
{
triggerEditModal
()
{
...
...
@@ -179,16 +210,93 @@ export default {
this
.
barCode
=
''
;
},
scanCode
()
{},
toggleBindingInfo
()
{},
setSignDetection
()
{},
goProtocol
()
{}
toggleBindingInfo
()
{
if
(
!
this
.
isCheck
&&
this
.
detectionData
.
pprotocolType
)
{
this
.
goProtocol
();
}
else
{
const
o
=
{
projectId
:
this
.
detectionData
.
projectId
,
sampleCode
:
this
.
barCode
,
hospitalId
:
this
.
detectionData
.
hospitalId
};
this
.
$loading
.
show
();
sampleCodeValidate
(
o
).
then
(
res
=>
{
const
{
code
,
message
}
=
res
.
data
;
if
(
code
!==
'000000'
)
{
this
.
errorMessage
=
message
;
return
;
}
this
.
errorMessage
=
''
;
}).
finally
(()
=>
{
this
.
$loading
.
hide
();
});
}
},
setSignDetection
()
{
const
obj
=
{
protocolType
:
this
.
detectionData
.
pprotocolType
,
patientId
:
212773027
};
signDetection
(
obj
).
then
(
res
=>
{
if
(
res
.
code
!==
'000000'
)
{
return
this
.
$toast
(
res
.
message
);
}
this
.
prototypeLogId
=
res
.
data
;
this
.
isCheck
=
!
this
.
isCheck
;
});
},
goProtocol
()
{
const
obj
=
{
// id: this.detectionData.pprotocolType,
id
:
31
,
};
getProtocolContent
(
obj
).
then
(
res
=>
{
if
(
res
.
code
!==
'000000'
)
{
return
this
.
$toast
(
res
.
message
);
}
this
.
showProtocol
=
true
;
const
protoData
=
res
.
data
;
this
.
agreeText
=
protoData
;
this
.
agreeText
=
this
.
agreeText
.
replace
(
'【'
,
'['
);
this
.
agreeText
=
this
.
agreeText
.
replace
(
'】'
,
']'
);
this
.
agreeText
=
this
.
agreeText
.
substr
(
this
.
agreeText
.
indexOf
(
'<p'
),
this
.
agreeText
.
lastIndexOf
(
'</p>'
)
-
this
.
agreeText
.
indexOf
(
'<p'
)
);
});
},
getProtocolName
()
{
const
d
=
{
id
:
this
.
detectionData
.
pprotocolType
};
getProtocolName
(
d
).
then
(
res
=>
{
if
(
res
.
code
!==
'000000'
)
{
return
this
.
$toast
(
res
.
message
);
}
this
.
protocolName
=
res
.
data
;
});
},
subProtocol
()
{
const
obj
=
{
protocolType
:
this
.
detectionData
.
pprotocolType
,
patientId
:
212773027
};
signDetection
(
obj
).
then
(
res
=>
{
if
(
res
.
code
!==
'000000'
)
{
return
this
.
$toast
(
res
.
message
);
}
this
.
prototypeLogId
=
res
.
data
;
this
.
isCheck
=
true
;
this
.
showProtocol
=
false
;
this
.
toggleBindingInfo
();
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.insurance-binding-code-container
{
width
:
100%
;
background-color
:
#F5F6F8
;
...
...
@@ -220,6 +328,13 @@ export default {
align-items
:
center
;
border-radius
:
6px
;
}
.code-input-item
{
padding
:
0
10px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
border-radius
:
6px
;
}
.code-input-item-l
{
display
:
flex
;
flex-flow
:
column
;
...
...
@@ -265,6 +380,9 @@ export default {
padding
:
0
;
height
:
31px
;
line-height
:
31px
;
&
:
:
after
{
border
:
none
;
}
}
}
.code
{
...
...
@@ -374,6 +492,41 @@ export default {
margin-top
:
7px
;
}
}
.protocol-content
{
width
:
100%
;
height
:
500
PX
;
background-color
:
#ffffff
;
position
:
fixed
;
bottom
:
0
;
font-size
:
12px
;
color
:
#676869
;
.block70
{
height
:
40px
;
line-height
:
30px
;
text-align
:
center
;
font-size
:
15px
;
font-weight
:
bold
;
}
.protocol-text
{
height
:
400
PX
;
overflow
:
scroll
;
line-height
:
2
;
padding
:
0px
4px
;
}
.btn
{
background-color
:
#00BDA5
;
color
:
#ffffff
;
width
:
300px
;
height
:
40px
;
border-radius
:
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-weight
:
500
;
margin
:
0
auto
;
margin-top
:
10px
;
}
}
}
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录