MoreService.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. <!-- 用户更多服务 By_liucf -->
  2. <template>
  3. <div class="more-container">
  4. <MiniTitle>
  5. <div slot="mini" class="miniTit">更多服务</div>
  6. </MiniTitle>
  7. <!-- 用户未认证时展示 -->
  8. <p v-show="userStatus==0" class="trial">账号认证通过后,可开通产品! <span @click="authen">立即认证</span></p>
  9. <el-row :gutter="20">
  10. <el-col :span="8" v-for="(item,index) in notOpenProduct" :key="item.id">
  11. <!-- <div :class="['grid-content bg-purple',{'add-border':item.choose}]"> -->
  12. <div :class="['grid-content bg-purple',{'add-border':item.choose},{'grayCol':item.serviceStatus==0}]">
  13. <h2>{{item.name}}</h2>
  14. <h4>产品介绍</h4>
  15. <p>{{item.decription}}</p>
  16. <!-- <p>Diagbot是以智能决策引擎和医学知识库为核心,遵循疾病发生、发展的本质原理,以新一代人工智能基础理论体系为指导,采用基于本体的语义网络、人工智能、深度学习神经网络算法等前沿技术对涉及疾病诊疗本质的指南、文献、医疗病历等数据进行“学习”,自我完善知识库、规则库以及决策引擎模型,实现精准、高效地智能综合分析与判断、为医生诊疗过程中所涉及的基本检、诊、治服务提供精准的解决方案推送。http://192.168.2.164:3000/?patientNo=1600&doctorNo=0033S&deptId=N016&recordId=333&hospitalId=A001</p> -->
  17. <h4>接入模式</h4>
  18. <div v-for="i in item.accessType">
  19. <p>{{i}}</p>
  20. <p>{{accessDesc[i]}}</p>
  21. </div>
  22. <h4>收费模式</h4>
  23. <div v-for="k in item.chargeType">
  24. <p>{{k}}</p>
  25. <p>{{chargeDesc[k]}}</p>
  26. </div>
  27. <img v-show="item.serviceStatus==0" src="../../images/stop.png" height="54" width="54">
  28. <div class="btns clearfix">
  29. <div :class="['btn btn-cancel',{'show':item.choose}]" @click="cancel(index,item.id)">取消</div>
  30. <div v-if="item.productAudit==0 && item.serviceStatus !=0" :class="['btn',{'hide':item.choose}]" @click="selectProduct(index,item.id)">选定</div>
  31. <div v-else-if="item.productAudit==2" class="btn btnIng">开通中</div>
  32. <div v-else-if="item.serviceStatus==0" class="btn btnIng">停用</div>
  33. </div>
  34. </div>
  35. </el-col>
  36. </el-row>
  37. <div class="count">
  38. <span class="selec">已经选择开通产品:</span>
  39. <span class="selecNum">{{count}}</span>
  40. <div class="btn count-btn" @click="open">立即开通</div>
  41. </div>
  42. <!-- 弹窗 -->
  43. <div :class="[{'hide':toast},'mark']">
  44. <div class="toast">
  45. <i class="el-icon-close" @click="close"></i>
  46. <p>{{ text }}</p>
  47. <div class="btn toast-btn" @click="confirn(type)">确定</div>
  48. </div>
  49. </div>
  50. </div>
  51. </template>
  52. <script>
  53. import MiniTitle from '../common/MiniTile.vue'
  54. import api from '../../api/user.js';
  55. export default {
  56. name: 'MoreSeervice',
  57. data(){
  58. return {
  59. notOpenProduct:[],
  60. accessType:{
  61. '1':'嵌入式',
  62. '2':'数据服务模式',
  63. '3':'线上服务模式',
  64. },
  65. accessDesc:{
  66. '嵌入式':'Diagbot整体嵌入合作方软件,从合作方软件中获取主诉,既往史等信息,由Diagbot后端统一处理并推送产生的业务记录,通过接口返回给系统协同作业。',
  67. '数据服务模式':'始终隐匿于后台,合作方通过接口形式向Diagbot输入信息,经过Diagbot计算后将分析结果推送给合作方软件并在其界面展示,前端灵活多变',
  68. '线上模式':'用户在线上购买产品和服务后,通过登陆云平台使用授权的产品和服务',
  69. },
  70. chargeType:{
  71. '1':'按流程计费',
  72. '2':'按机构计费',
  73. '3':'按用户计费',
  74. },
  75. chargeDesc:{
  76. '按流程计费':'按接口成功调用次数进行计数,请求成功计一次调用次数,当超出免费限额流量后,按成功调用次数进行计费。',
  77. '按机构计费':'一次性给机构及其下属机构开通服务,包括用户数和年限以及其他服务,统一由顶层机构支付费用。',
  78. '按用户计费':'根据终端实际使用用户数量进行收费。',
  79. },
  80. count:0,
  81. hide:false,
  82. selectedId:[],
  83. toast:true,
  84. text:'',
  85. type:'',
  86. userStatus:null
  87. }
  88. },
  89. created(){
  90. this.getProduct();
  91. },
  92. components:{
  93. MiniTitle
  94. },
  95. methods:{
  96. getProduct(){
  97. api.getTrialProduct().then((res)=>{
  98. let result = res.data;
  99. if(+result.code == 0){
  100. let data = result.data[0];
  101. let userAuStatus = result.data[1];
  102. this.userStatus = userAuStatus.userAuStatus;
  103. const key = "choose";
  104. const value = false;
  105. for(var i in data){
  106. data[i][key] = value;
  107. // 只展示未开通0 和开通中2
  108. if(+data[i].productAudit==0 || +data[i].productAudit==2){
  109. this.notOpenProduct.push(data[i]);
  110. }
  111. }
  112. }else{
  113. // this.$message.error(result.msg);
  114. console.log(result.msg);
  115. }
  116. })
  117. },
  118. selectProduct(index,id){
  119. this.notOpenProduct[index].choose = true;
  120. this.count = this.count + 1;
  121. this.selectedId.push(id);
  122. },
  123. cancel(index,id){
  124. this.notOpenProduct[index].choose = false;
  125. this.count = this.count - 1;
  126. const idList = this.selectedId;
  127. for(let j=0; j<idList.length;j++ ){
  128. if(idList[j] == id){
  129. idList.splice(j,1);
  130. }
  131. }
  132. },
  133. authen(){//立即认证
  134. this.$router.push({path:'YH-JGZX-ZHXX'});
  135. },
  136. open(){//立即开通
  137. const params = {
  138. 'idList':this.selectedId
  139. }
  140. if(this.count == 0){
  141. this.$message({
  142. message: '请选择产品',
  143. type: 'warning',
  144. });
  145. return
  146. } else {
  147. //判断认证状态
  148. api.getUserAuthStatus().then((res)=>{
  149. let result = res.data;
  150. if(+result.code == 0){
  151. if(+result.data.authStatus == 1){//已认证
  152. //生成订单接口
  153. api.open(params).then((res)=>{
  154. let info = res.data;
  155. if(+info.code == 0){
  156. //显示弹窗
  157. this.toast = false;
  158. this.type = 1;
  159. this.text = "提交成功!24小时内会有专人与您联系。若想了解更多产品信息,请致电:0571-666666";
  160. }else{
  161. this.$message.error(info.msg);
  162. }
  163. })
  164. }else if(+result.data.authStatus == 0){//未认证
  165. this.toast = false;
  166. this.type = 2;
  167. this.text = "感谢您申请开通产品,为提供优质的服务,还需完善账号信息。如想了解更多产品信息,可致电:0571-666666";
  168. }else if(+result.data.authStatus == 2){//认证中
  169. this.toast = false;
  170. this.type = 1;
  171. this.text = "感谢您申请开通产品,您的账号信息正在认证中,请耐心等候。如想了解更多产品信息,可致电:0571-666666";
  172. }
  173. } else {
  174. console.log(result.msg);
  175. }
  176. })
  177. }
  178. },
  179. confirn(type){//点击确定
  180. if(type == 1){//已认证、认证中
  181. this.toast = true;
  182. this.$router.push({path:'YH-KZT'});//跳转控制台
  183. }else if(type == 2){//未认证
  184. this.toast = true;
  185. this.$router.push({path:'YH-JGZX-ZHXX'});//跳转到账号认证
  186. }
  187. },
  188. close(){
  189. this.toast = true;
  190. if(this.type == 1){//已认证、认证中-复原
  191. this.count = 0;
  192. this.notOpenProduct = [];
  193. this.selectedId = [];
  194. this.getProduct();
  195. }
  196. },
  197. }
  198. }
  199. </script>
  200. <style lang="less">
  201. @import '../../less/base.less';
  202. @import '../../less/user.less';
  203. .more-container{
  204. .base;
  205. width: 100%;
  206. height:100%;
  207. box-sizing: border-box;
  208. position: relative;
  209. min-width: 840px;
  210. .miniTit{
  211. .miniTitle;
  212. }
  213. .el-row {
  214. .contents;
  215. width: 100%;
  216. margin: 15px 0 20px;
  217. height:74%;
  218. overflow-y: auto;
  219. &:last-child {
  220. margin-bottom: 0;
  221. }
  222. }
  223. .el-col {
  224. position: relative;
  225. border-radius: 4px;
  226. min-width: 260px;
  227. .btns{
  228. width: 80%;
  229. height:45px;
  230. position: absolute;
  231. bottom:20px;
  232. /*right: 25px;*/
  233. text-align: right;
  234. background-color: #fff;
  235. }
  236. }
  237. .bg-purple-dark {
  238. background: #99a9bf;
  239. }
  240. .bg-purple {
  241. /*background: #d3dce6;*/
  242. background: #fff;
  243. }
  244. .bg-purple-light {
  245. background: #e5e9f2;
  246. }
  247. .grid-content {
  248. /*position: relative;*/
  249. border-radius: 2px;
  250. /*min-height: 36px;*/
  251. height: 460px;
  252. overflow-y: auto;
  253. padding: 20px 15px 50px;
  254. margin-bottom: 19px;
  255. border:1px solid #fff;
  256. box-shadow: 0 0 5px rgba(151, 149, 151, 0.44);
  257. img{
  258. position: absolute;
  259. top: 8px;
  260. right: 30px;
  261. }
  262. }
  263. .add-border{
  264. border:1px dashed #1774f0;
  265. }
  266. .row-bg {
  267. padding: 10px 0;
  268. background-color: #f9fafc;
  269. }
  270. .trial{
  271. margin: 15px 10px 0 20px;
  272. >span{
  273. color: red;
  274. cursor: pointer;
  275. }
  276. }
  277. h2{
  278. font-size: 16px;
  279. font-weight: bold;
  280. text-align: center;
  281. margin-bottom: 25px;
  282. }
  283. h4{
  284. font-size: 14px;
  285. margin: 5px 0;
  286. padding-left: 15px;
  287. background: url(../../images/dot.png) no-repeat left;
  288. }
  289. p{
  290. word-wrap: break-word;
  291. /*line-height: 20px;*/
  292. }
  293. .btn{
  294. width: 80px;
  295. height: 30px;
  296. line-height: 30px;
  297. color: #fff;
  298. background: #1774f0;
  299. text-align: center;
  300. border-radius: 2px;
  301. /*position: absolute;
  302. bottom: 20px;
  303. right: 25px;*/
  304. cursor: pointer;
  305. margin-top: 8px;
  306. display:inline-block;
  307. }
  308. .btn-cancel{
  309. color: #1774f0;
  310. background: #fff;
  311. border: 1px solid #1774f0;
  312. display:none;
  313. }
  314. .btnIng{
  315. background-color:#c9c9c9;
  316. cursor: auto;
  317. }
  318. .show{
  319. display:block;
  320. }
  321. .hide{
  322. display:none;
  323. }
  324. .count{
  325. width: 100%;
  326. height: 60px;
  327. line-height: 60px;
  328. background: #fff;
  329. text-align: right;
  330. box-shadow: 0 0 5px rgba(151, 149, 151, 0.44);
  331. .selec{
  332. font-size: 14px;
  333. font-weight: bold;
  334. }
  335. .selecNum{
  336. display: inline-block;
  337. width: 50px;
  338. height: 30px;
  339. line-height: 30px;
  340. text-align: center;
  341. border-bottom: 1px solid #c9c9c9;
  342. vertical-align: middle;
  343. }
  344. .count-btn{
  345. display: inline-block;
  346. position: static;
  347. margin: 0 36px 0 15px;
  348. }
  349. }
  350. .mark{
  351. width: 100%;
  352. height:100%;
  353. position: fixed;
  354. top: 0;
  355. left:0;
  356. background-color:rgba(0,0,0,0.4);
  357. z-index: 55;
  358. }
  359. .toast{
  360. width: 280px;
  361. height:150px;
  362. background:#fff;
  363. border-radius:2px;
  364. position: absolute;
  365. top: 50%;
  366. left:50%;
  367. transform:translate(-50%,-50%);
  368. z-index: 56;
  369. padding:35px;
  370. text-align: center;
  371. p{
  372. margin-top: 40px;
  373. }
  374. }
  375. .el-icon-close{
  376. font-size: 16px;
  377. cursor: pointer;
  378. position: absolute;
  379. top: 16px;
  380. right: 16px;
  381. }
  382. .toast-btn{
  383. width: 90px;
  384. bottom:35px;
  385. right:130px;
  386. }
  387. }
  388. </style>