RuleStepFour.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <Row :gutter="16">
  3. <Col :span="12">
  4. <div class="modal-step2-title"><span class="modal-step2-star">* </span>基础信息&来源信息</div>
  5. <div class="modal-step2-body">
  6. <Form class="common-form common-form-modal" :model="ruleObj" :label-width="120">
  7. <FormItem label="规则名称:">
  8. <div class="common-form-detail-text">{{ruleObj.ruleName}}</div>
  9. </FormItem>
  10. <FormItem label="指标类型:">
  11. <div class="common-form-detail-text">{{ruleObj.targetName}}</div>
  12. </FormItem>
  13. <FormItem label="规则描述:">
  14. <div class="common-form-detail-text">{{ruleObj.ruleDesc}}</div>
  15. </FormItem>
  16. <FormItem label="来源应用:">
  17. <div class="common-form-detail-text">{{ruleObj.applicationName}}</div>
  18. </FormItem>
  19. <FormItem label="字段:">
  20. <div class="common-form-detail-text">{{ruleObj.field}}</div>
  21. </FormItem>
  22. </Form>
  23. </div>
  24. </Col>
  25. <Col :span="12">
  26. <div class="modal-step2-title modal-rule-detail"><span class="modal-step2-star">* </span>配置规则</div>
  27. <div class="modal-step2-body modal-step2-body-fixed common-scroll">
  28. <div v-show="ruleObj.targetName=='完整性'" class="common-form-detail-text">
  29. 不能是字符串null、NULL、无、空格,不能是空
  30. </div>
  31. <div v-show="ruleObj.targetName=='一致性'" class="common-form-detail-text">
  32. <div class="common-form-detail-row">数据处理前字段值 = 数据处理后字段</div>
  33. <div class="common-form-detail-row">数据类型为 {{ruleObj.dataType == 'all' ? '任意': ruleObj.dataType}}</div>
  34. </div>
  35. <div v-show="ruleObj.targetName=='及时性(数据采集)' || ruleObj.targetName=='及时性(数据入库)'" class="common-form-detail-text">
  36. <Row class="common-form-detail-row">
  37. <Col span="3">{{ruleObj.targetName=='及时性(数据采集)' ? '数据采集' : '数据入库'}}</Col>
  38. <Col span="1" class="timeliness-form-col timeliness-form-col-select">
  39. <=
  40. </Col>
  41. <Col span="20" class="timeliness-form-col">
  42. {{ruleObj.dataValue}}ms
  43. </Col>
  44. </Row>
  45. </div>
  46. <div v-show="ruleObj.targetName=='准确性'" class="common-form-detail-text">
  47. <Row v-for="(item, index) in ruleObj.logicalValueDTOList" :key="index" class="common-form-detail-row">
  48. <Col span="3">条件{{index+1}}:</Col>
  49. <Col span="5">{{ruleObj.field}}</Col>
  50. <Col span="1" class="timeliness-form-col timeliness-form-col-select">{{item.logical}}</Col>
  51. <Col span="14" class="timeliness-form-col">
  52. {{item.value}}
  53. </Col>
  54. </Row>
  55. <Row v-if="ruleObj.logicalValueDTOList && ruleObj.logicalValueDTOList.length>1" class="common-form-detail-row">
  56. <Col span="7">各条件间关系表达式:</Col>
  57. <Col span="17">
  58. {{ruleObj.exprDesc}}
  59. </Col>
  60. </Row>
  61. </div>
  62. </div>
  63. </Col>
  64. </Row>
  65. </template>
  66. <script>
  67. export default {
  68. name: "RuleStepFour",
  69. components:{
  70. },
  71. props: {
  72. currentObj: {
  73. type: Object,
  74. default: () => {
  75. return {};
  76. },
  77. },
  78. },
  79. data() {
  80. return {
  81. ruleObj: {},
  82. };
  83. },
  84. watch: {
  85. currentObj: {
  86.  handler(newValue) {
  87. this.ruleObj = newValue
  88. },
  89. // deep: true
  90. }
  91. },
  92. mounted() {
  93. this.ruleObj = this.currentObj
  94. },
  95. methods: {
  96. }
  97. };
  98. </script>
  99. <style scoped lang="stylus">
  100. .modal-step2-title {
  101. height: 42px;
  102. background: #0B2959;
  103. border: 1px solid #0D2853;
  104. line-height: 42px;
  105. color: #fff;
  106. font-size: 16px;
  107. }
  108. .modal-step2-star {
  109. color: #ed4014;
  110. padding-left: 6px;
  111. }
  112. .modal-step2-body {
  113. padding: 15px;
  114. border: 1px solid #204A8F;
  115. border-top: none;
  116. height: 388px;
  117. }
  118. .modal-step2-body-fixed {
  119. height: 387px;
  120. overflow: hidden;
  121. overflow-y: auto;
  122. }
  123. .common-form-detail-text {
  124. color: #fff;
  125. font-size: 14PX;
  126. }
  127. .common-form-detail-row {
  128. margin-bottom: 20px;
  129. line-height: 32px;
  130. height: 32px;
  131. padding: 0;
  132. padding-left: 20px;
  133. }
  134. </style>