index.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <div id="MyDiv" v-if="errorList.length!=0">
  3. <div class="cont-reight">
  4. <div class="cont-reight-top">
  5. <div class="cont-reight-btn">{{ titleName }}</div>
  6. </div>
  7. <!-- 评分 -->
  8. <!-- <div class="storeBox">
  9. <div class="text">{{ score }}</div>
  10. <div class="spa">
  11. <div class="spaview" v-if="score > 90">优</div>
  12. <div class="spaview" v-else-if="score >= 70 && score == 90">良</div>
  13. <div class="spaview" v-else>差</div>
  14. </div>
  15. </div> -->
  16. <!-- end -->
  17. <!-- 强制 -->
  18. <!-- <div class="flexNox">
  19. <div class="Yradio">
  20. <div class="Yradiobox"></div>
  21. 强制
  22. </div>
  23. <div class="Rradio">
  24. <div class="Rradiobox"></div>
  25. 建议
  26. </div>
  27. </div> -->
  28. <!-- end -->
  29. <div v-for="(item,index) in errorList" :key="index" class="errorcase">
  30. <span class="errorcase-zi">{{ index+1}}.</span>
  31. <span class="errorcase-zi1">{{ item.notice }}</span>
  32. </div>
  33. </div>
  34. </div>
  35. </template>
  36. <script>
  37. // import OtherComponent from '@/components/OtherComponent'
  38. export default {
  39. name: 'm-cont-reight',
  40. components: {
  41. // OtherComponent
  42. },
  43. directives: {},
  44. filters: {
  45. },
  46. extends: {},
  47. mixins: {},
  48. props: {
  49. titleName: {
  50. type: null,
  51. default: false,
  52. },
  53. errorList: {
  54. type: null,
  55. default: false,
  56. },
  57. },
  58. data() {
  59. return {
  60. // errorList: [],
  61. score: 0,
  62. };
  63. },
  64. computed: {},
  65. watch: {},
  66. beforeCreate() {
  67. // 生命周期钩子:组件实例刚被创建,组件属性计算之前,如 data 属性等
  68. },
  69. created() {
  70. // 生命周期钩子:组件实例创建完成,属性已绑定,但 DOM 还未生成,el 属性还不存在
  71. // 初始化渲染页面
  72. },
  73. beforeMount() {
  74. // 生命周期钩子:模板编译/挂载之前
  75. },
  76. mounted() {
  77. // 生命周期钩子:模板编译、挂载之后(此时不保证已在 document 中)
  78. },
  79. beforeUpate() {
  80. // 生命周期钩子:组件更新之前
  81. },
  82. updated() {
  83. // 生命周期钩子:组件更新之后
  84. },
  85. activated() {
  86. // 生命周期钩子:keep-alive 组件激活时调用
  87. },
  88. deactivated() {
  89. // 生命周期钩子:keep-alive 组件停用时调用
  90. },
  91. beforeDestroy() {
  92. // 生命周期钩子:实例销毁前调用
  93. },
  94. destroyed() {
  95. // 生命周期钩子:实例销毁后调用
  96. },
  97. errorCaptured(err, vm, info) {
  98. // 生命周期钩子:当捕获一个来自子孙组件的错误时被调用。此钩子会收到三个参数:错误对象、发生错误的组件实例以及一个包含错误来源信息的字符串。
  99. console.log(err, vm, info);
  100. },
  101. methods: {
  102. /**
  103. * 跳转对应病历首页
  104. */
  105. getBlankIndex(item) {
  106. let eleClass = document.querySelectorAll('.choose-twinkle');
  107. console.log(eleClass);
  108. // const tb = this.$refs.tables.value;
  109. console.log(item.error_field);
  110. // this.$refs[item.error_field]
  111. console.log(this.$refs[item.error_field]);
  112. for (let item = 0; item < eleClass.length; item++) {
  113. console.log(eleClass[item]);
  114. eleClass[item].className = 'table-label';
  115. }
  116. // return;
  117. // document
  118. // this.$refs[item.error_field].classList.value + ' choose-twinkle';
  119. this.$refs[item.error_field].className = 'choose-twinkle';
  120. this.$refs[item.error_field].scrollIntoView({ block: 'start', behavior: 'smooth' });
  121. // .getElementById("agentTitle")
  122. // .scrollIntoView({ block: "start", behavior: "smooth" });
  123. // 跳转到指定位置并且平滑滚动
  124. // this.$el.querySelector('.table-labelon1').scrollIntoView({ behavior: 'smooth' });
  125. // this.$el.querySelector('.table-labelon1').style.color = 'red';
  126. },
  127. },
  128. };
  129. </script>
  130. <style lang='scss' scoped>
  131. #MyDiv {
  132. margin: 0;
  133. padding: 0;
  134. }
  135. .choose-twinkle {
  136. // background: red;
  137. font-size: 20px;
  138. color: red;
  139. font-weight: 600;
  140. background: yellow;
  141. }
  142. .el-menu-vertical-demo {
  143. width: 200px;
  144. }
  145. .flexNox {
  146. width: 200px;
  147. display: flex;
  148. margin: 0 auto;
  149. justify-content: center;
  150. align-items: center;
  151. .Yradiobox {
  152. width: 10px;
  153. background: red;
  154. margin-right: 5px;
  155. height: 10px;
  156. border-radius: 50%;
  157. }
  158. .Rradiobox {
  159. width: 10px;
  160. background: #fa6400;
  161. height: 10px;
  162. margin-right: 5px;
  163. border-radius: 50%;
  164. }
  165. .Yradio {
  166. width: 80px;
  167. display: flex;
  168. align-items: center;
  169. text-align: center;
  170. }
  171. .Rradio {
  172. width: 80px;
  173. display: flex;
  174. align-items: center;
  175. text-align: center;
  176. }
  177. }
  178. .cont-reight-btn {
  179. margin-top: 20px;
  180. width: 100%;
  181. height: 43px;
  182. background: #d3e3ff;
  183. border-radius: 8px;
  184. font-size: 14px;
  185. font-weight: bold;
  186. color: #333333;
  187. text-align: center;
  188. line-height: 43px;
  189. }
  190. .cont-reight-bottom {
  191. width: 100%;
  192. margin: 24px 7px;
  193. display: flex;
  194. }
  195. .cont-reight-bottom-title {
  196. width: 60px;
  197. height: 70px;
  198. background: #ffdfdf;
  199. border-right: 3px solid #ff0000;
  200. text-align: center;
  201. line-height: 88px;
  202. font-size: 24px;
  203. font-weight: bold;
  204. color: #da1515;
  205. position: relative;
  206. }
  207. .cont-reight-bottom-title-zi {
  208. // height: 10px;
  209. position: absolute;
  210. top: 23px;
  211. left: 15px;
  212. font-size: 18px;
  213. color: #da1515;
  214. line-height: 0px;
  215. }
  216. .cont-reight-bottom-title-null {
  217. width: 60px;
  218. height: 70px;
  219. background: #fffbec;
  220. border-right: 3px solid #fa6400;
  221. text-align: center;
  222. line-height: 88px;
  223. font-size: 24px;
  224. font-weight: bold;
  225. color: #ff5700;
  226. position: relative;
  227. }
  228. .cont-reight-bottom-title-null-zi {
  229. position: absolute;
  230. top: 23px;
  231. left: 15px;
  232. font-size: 18px;
  233. color: #ff5700;
  234. line-height: 0px;
  235. }
  236. .cont-reight-bottom-conter {
  237. margin-left: 8px;
  238. height: 70px;
  239. display: flex;
  240. justify-content: space-around;
  241. flex-direction: column;
  242. p {
  243. font-size: 8px;
  244. color: #333333;
  245. }
  246. }
  247. .cont-reight-top-cont {
  248. margin: 8px 0 0 20px;
  249. p {
  250. font-size: 12px;
  251. font-weight: bold;
  252. color: #333333;
  253. padding: 3px 0;
  254. }
  255. }
  256. //
  257. .storeBox {
  258. width: 200px;
  259. height: 80px;
  260. line-height: 80px;
  261. font-size: 30px;
  262. text-align: center;
  263. align-items: center;
  264. position: relative;
  265. margin: 30px auto;
  266. border: 1px solid #ccc;
  267. .text {
  268. font-size: 30px;
  269. }
  270. .spa::before {
  271. content: '';
  272. width: 0;
  273. height: 0;
  274. border: 30px solid transparent;
  275. border-right: 30px solid red;
  276. -webkit-transform: rotate(135deg);
  277. transform: rotate(135deg);
  278. color: #fff;
  279. position: absolute;
  280. right: -30px;
  281. top: -30px;
  282. cursor: pointer;
  283. }
  284. .flexTable {
  285. display: flex;
  286. align-items: center;
  287. }
  288. .spaview {
  289. position: absolute;
  290. right: 5px;
  291. top: -1px;
  292. font-size: 13px;
  293. text-align: right;
  294. height: 30px;
  295. line-height: 30px;
  296. width: 100px;
  297. color: #fff;
  298. }
  299. }
  300. .errorcase{
  301. padding: 10px 5px;
  302. // overflow: scroll;
  303. }
  304. .errorcase-zi{
  305. padding-right:5px;
  306. font-size: 16px;
  307. // color:#ff0000;
  308. }
  309. .errorcase-zi1{
  310. // color:#ff0000;
  311. }
  312. </style>