GLRefreshFailDetail.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <el-dialog
  3. :title="$t('DataReportManage.GlStatisticTable.update_fail_title')"
  4. :visible.sync="show"
  5. :close-on-click-modal="false"
  6. :append-to-body="true"
  7. :center="true"
  8. v-dialogDrag
  9. width="645px"
  10. @close="handleClose"
  11. >
  12. <div class="gl-refresh-fail-detail-wrap">
  13. <div style="margin-bottom:20px">
  14. <span>{{$t('DataReportManage.GlStatisticTable.terminal_name')}}:{{info.Name}}</span>
  15. <span style="display:inline-block;margin-left:20px">{{$t('DataReportManage.GlStatisticTable.dir_path')}}:{{info.DirPath}}</span>
  16. </div>
  17. <div style="display:flex;justify-content: space-between;">
  18. <div>
  19. <span>{{$t('DataReportManage.GlStatisticTable.update_success_num')}}:{{info.UpdateSuccessNum}}</span>
  20. <span>{{$t('DataReportManage.GlStatisticTable.update_fail_num')}}:{{info.UpdateFailedNum}}</span>
  21. </div>
  22. <div style="display:flex;align-items:center;color:#409EFF;cursor: pointer;" @click="showBZ=true">
  23. <img src="~@/assets/img/data_m/icon01.png" alt="">
  24. <span>{{$t('DataReportManage.GlStatisticTable.inspection_step')}}</span>
  25. </div>
  26. </div>
  27. <el-table
  28. :data="info.List"
  29. border
  30. height="500"
  31. >
  32. <el-table-column
  33. :label="$t('DataReportManage.GlStatisticTable.frequency')"
  34. prop="Frequency"
  35. align="center"
  36. >
  37. </el-table-column>
  38. <el-table-column
  39. :label="$t('DataReportManage.GlStatisticTable.num')"
  40. prop="Num"
  41. align="center"
  42. >
  43. <template slot-scope="scope">
  44. <span style="color:#409EFF;cursor: pointer;" @click="handleShowFailDetail(scope.row)">{{scope.row.Num}}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column
  48. :label="$t('DataReportManage.GlStatisticTable.reason')"
  49. prop="SourceUpdateFailedReason"
  50. align="center"
  51. >
  52. </el-table-column>
  53. <div slot="empty">
  54. <tableNoData :text="$t('Confirm.prompt_slogan')"/>
  55. </div>
  56. </el-table>
  57. </div>
  58. <!-- 排查步骤说明 -->
  59. <el-dialog
  60. :title="$t('DataReportManage.GlStatisticTable.inspection_step')"
  61. :visible.sync="showBZ"
  62. :close-on-click-modal="false"
  63. :center="true"
  64. v-dialogDrag
  65. :append-to-body="true"
  66. width="500px"
  67. >
  68. <div style="padding-bottom:30px;line-height:2;color:#333" :v-html="$t('DataReportManage.GlStatisticTable.reason_html')">
  69. </div>
  70. </el-dialog>
  71. <!-- 失败详情 -->
  72. <el-dialog
  73. :title="$t('DataReportManage.GlStatisticTable.edb_detail_title')"
  74. :visible.sync="showEDBList"
  75. :close-on-click-modal="false"
  76. :center="true"
  77. v-dialogDrag
  78. :append-to-body="true"
  79. width="80vw"
  80. >
  81. <div class="gl-refresh-fail-edb-list-wrap">
  82. <p class="info">
  83. <span>{{$t('DataReportManage.GlStatisticTable.terminal_name')}}:{{info.Name}} </span>
  84. <span>{{$t('DataReportManage.GlStatisticTable.dir_path')}}:{{info.DirPath}} </span>
  85. <span>{{$t('DataReportManage.GlStatisticTable.frequency')}}:{{activeFrequency}} </span>
  86. <span>{{$t('DataReportManage.GlStatisticTable.reason')}}:{{activeReason}} </span>
  87. </p>
  88. <el-table
  89. :data="edbList"
  90. border
  91. height="700"
  92. >
  93. <el-table-column
  94. v-for="col in edbListTableCol"
  95. :key="col.key"
  96. :label="col.label"
  97. :prop="col.key"
  98. align="center"
  99. />
  100. <div slot="empty">
  101. <tableNoData :text="$t('Confirm.prompt_slogan')"/>
  102. </div>
  103. </el-table>
  104. <el-pagination
  105. layout="total,prev,pager,next,jumper"
  106. background
  107. @current-change="handleCurrentChange"
  108. :page-size="pageSize"
  109. :total="total"
  110. style="float: right;margin-top:20px"
  111. />
  112. </div>
  113. </el-dialog>
  114. </el-dialog>
  115. </template>
  116. <script>
  117. import {apiDataSource} from '@/api/modules/dataSource.js'
  118. export default {
  119. model:{
  120. prop:"show",
  121. event:'close'
  122. },
  123. props:{
  124. show:{
  125. type:Boolean,
  126. default:false
  127. },
  128. TerminalCode:{
  129. type:String,
  130. default:''
  131. },
  132. date:{
  133. type:String,
  134. default:''
  135. }
  136. },
  137. watch: {
  138. show(n){
  139. if(n){
  140. this.getDetail()
  141. }
  142. }
  143. },
  144. computed:{
  145. edbListTableCol(){
  146. return [
  147. {
  148. label:this.$t('Edb.Detail.e_name')||'指标全称',
  149. key:'EdbName'
  150. },
  151. {
  152. label:this.$t('Edb.Detail.e_code')||'指标编码',
  153. key:'EdbCode'
  154. },
  155. {
  156. label:this.$t('Edb.Detail.e_start_time')||'起始时间',
  157. key:'StartDate'
  158. },
  159. {
  160. label:this.$t('Edb.Detail.e_latest_date')||'最新日期',
  161. key:'LatestDate'
  162. },
  163. {
  164. label:this.$t('Edb.Detail.e_latest_value')||'最新值',
  165. key:'LatestValue'
  166. },
  167. {
  168. label:this.$t('DataReportManage.GlStatisticTable.placeholder01')||'终端编码',
  169. key:'TerminalCode'
  170. },
  171. {
  172. label:this.$t('DataReportManage.GlStatisticTable.placeholder02')||'创建人',
  173. key:'SysUserRealName'
  174. },
  175. {
  176. label:this.$t('Edb.Detail.e_fre')||'频度',
  177. key:'Frequency'
  178. },
  179. {
  180. label:this.$t('Edb.Detail.e_unit')||'单位',
  181. key:'Unit'
  182. },
  183. ]
  184. }
  185. },
  186. data() {
  187. return {
  188. info:{},
  189. showBZ:false,
  190. showEDBList:false,
  191. edbList:[],
  192. activeFrequency:'',
  193. activeReason:'',
  194. page:1,
  195. pageSize:10,
  196. total:0
  197. }
  198. },
  199. methods: {
  200. handleClose(){
  201. this.$emit('close', false)
  202. },
  203. getDetail(){
  204. apiDataSource.GLRefreshFailDetail({
  205. TerminalCode:this.TerminalCode,
  206. CreateTime:this.date
  207. }).then(res=>{
  208. if(res.Ret===200){
  209. this.info=res.Data
  210. }
  211. })
  212. },
  213. handleShowFailDetail(e){
  214. this.page=1
  215. this.edbList=[]
  216. this.activeFrequency=e.Frequency
  217. this.activeReason=e.SourceUpdateFailedReason
  218. this.getFailDetailList()
  219. this.showEDBList=true
  220. },
  221. async getFailDetailList(){
  222. const res=await apiDataSource.updateFailDetailList({
  223. CreateTime:this.date,
  224. TerminalCode:this.TerminalCode,
  225. Frequency:this.activeFrequency,
  226. SourceUpdateFailedReason:this.activeReason,
  227. CurrentIndex:this.page,
  228. PageSize:this.pageSize,
  229. })
  230. if(res.Ret===200){
  231. const arr=res.Data.List||[]
  232. this.edbList=arr
  233. this.total=res.Data.Paging.Totals
  234. }
  235. },
  236. handleCurrentChange(e){
  237. this.page=e
  238. this.getFailDetailList()
  239. },
  240. },
  241. }
  242. </script>
  243. <style lang='scss'>
  244. .gl-refresh-fail-detail-wrap{
  245. color: #333;
  246. padding-bottom: 30px;
  247. }
  248. .gl-refresh-fail-edb-list-wrap{
  249. padding-bottom: 80px;
  250. .info{
  251. color: #000;
  252. margin-bottom: 20px;
  253. span{
  254. display: inline-block;
  255. margin-right: 20px;
  256. }
  257. }
  258. }
  259. </style>