s2manYiDuPro.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <el-dialog
  3. :visible.sync="visible"
  4. ref="dialog"
  5. :title="title+'详情'"
  6. width="100%"
  7. lock-scroll
  8. append-to-body
  9. fullscreen
  10. close-on-press-escape
  11. destroy-on-close
  12. v-if="visible"
  13. @close="handleClose">
  14. <div>
  15. <el-container>
  16. <el-aside style="border:0px;width: 13%;"></el-aside>
  17. <!-- 放统计内容-->
  18. <el-aside style="border:0px;width: 50%;">
  19. <s2manYiDuItem
  20. :data="data"
  21. width="95%"
  22. :height="height"
  23. id="s2manYiDuPro"
  24. click="false"
  25. />
  26. </el-aside>
  27. <!-- 参数页面列 -->
  28. <el-aside style="border:0px;width: 37%;">
  29. <div class="dataCont" style="font-size: 14px;">
  30. <el-divider content-position="left">{{data.t_khmydtjbNum.date}} 年度</el-divider>
  31. 调查表满意份数 :<el-tag>{{data.t_khmydtjbNum.number[0]}} 次</el-tag>
  32. <br>
  33. 收回调查表有效总份数 :<el-tag>{{data.t_khmydtjbNum.numberAll[0]}} 次</el-tag>
  34. <br>
  35. 客户满意度 :<el-tag>{{data.t_khmydtjbNum.res[0]}} %</el-tag>
  36. <br>
  37. </div>
  38. <!-- <div v-for="(item,i) in data.t_khmydtjbNum.date" :key="i">
  39. <el-divider content-position="left">{{data.t_khmydtjbNum.date[i]}} 年度</el-divider>
  40. 调查表满意份数 :<el-tag>{{data.t_khmydtjbNum.number[i]}} 次</el-tag>
  41. <br>
  42. 收回调查表有效总份数 :<el-tag>{{data.t_khmydtjbNum.numberAll[i]}} 次</el-tag>
  43. <br>
  44. 客户满意度 :<el-tag>{{data.t_khmydtjbNum.res[i]}} %</el-tag>
  45. <br>
  46. </div> -->
  47. </el-aside>
  48. </el-container>
  49. </div>
  50. </el-dialog>
  51. </template>
  52. <script>
  53. export default {
  54. props:{
  55. dialogOff:{ //当前表单示例
  56. type: Boolean,
  57. default:false,
  58. },
  59. title:{ type:String},
  60. data:{
  61. type:Object
  62. },
  63. height:{
  64. type:String,
  65. default:window.screen.height * 0.75 +'px'
  66. }
  67. },
  68. beforeCreate: function () {
  69. // 官方文档给出的是require
  70. this.$options.components.s2manYiDuItem = () => import('../item/s2manYiDuPro.vue')
  71. },
  72. watch:{
  73. dialogOff: {
  74. handler: function(val, oldVal) {
  75. this.visible = JSON.parse(JSON.stringify(val));
  76. this.itemShow = true
  77. },
  78. immediate: true
  79. }
  80. },
  81. drawLine(){
  82. let s2manYiDu = echarts.init(document.getElementById("s2manYiDuPro"))
  83. // let beginInof = GetPercent(Number(this.data.t_myddcBegin.number),Number(this.data.t_myddc2Begin.number))
  84. // let endInof = GetPercent(Number(this.data.t_myddcEnd.number),Number(this.data.t_myddc2End.number))
  85. let data1 = [];
  86. data1.push(this.data.t_myddc1Begin.number);
  87. data1.push(this.data.t_myddc1End.number);
  88. data1.push(this.data.t_myddc2Begin.number);
  89. data1.push(this.data.t_myddc2End.number);
  90. data1.push(this.data.t_myddc3Begin.number);
  91. data1.push(this.data.t_myddc3End.number);
  92. data1.push(this.data.t_myddc4Begin.number);
  93. data1.push(this.data.t_myddc4End.number);
  94. data1.push(this.data.t_myddc5Begin.number);
  95. data1.push(this.data.t_myddc5End.number);
  96. data1.push(this.data.t_myddc6Begin.number);
  97. data1.push(this.data.t_myddc6End.number);
  98. let data3 = [];
  99. data3.push(this.data.t_myddcBegin.date+"技术水平");
  100. data3.push(this.data.t_myddcEnd.date+"技术水平");
  101. data3.push(this.data.t_myddcBegin.date+"检测效率满意度");
  102. data3.push(this.data.t_myddcEnd.date+"检测效率满意度");
  103. data3.push(this.data.t_myddcBegin.date+"工作态度");
  104. data3.push(this.data.t_myddcEnd.date+"工作态度");
  105. data3.push(this.data.t_myddcBegin.date+"检测准确性");
  106. data3.push(this.data.t_myddcEnd.date+"检测准确性");
  107. data3.push(this.data.t_myddcBegin.date+"报告完成率");
  108. data3.push(this.data.t_myddcEnd.date+"报告完成率");
  109. data3.push(this.data.t_myddcBegin.date+"检测效率");
  110. data3.push(this.data.t_myddcEnd.date+"检测效率");
  111. var option = {
  112. grid: {
  113. top: '20%',
  114. left: '3%',
  115. right: '4%',
  116. bottom: '10%',
  117. containLabel: true
  118. },
  119. title: [
  120. {
  121. text: this.title,
  122. subtext: this.data.t_myddcEnd.date+"年数据统计"
  123. }
  124. ],
  125. polar: {
  126. radius: [15, '90%']
  127. },
  128. angleAxis: {
  129. max: GetMax(data1)+0.1,
  130. startAngle: 75
  131. },
  132. radiusAxis: {
  133. type: 'category',
  134. data: data3
  135. },
  136. tooltip: {
  137. formatter: function (datas) {
  138. var res=datas.name+': '+((datas.value-0.01)*100).toFixed(2)+"%"
  139. return res
  140. }
  141. },
  142. series: {
  143. itemStyle:{
  144. normal:{
  145. color:function(params){
  146. var colorList = [
  147. '#FE8463','#9BCA63','#FCCE10','#E87C25','#27727B',
  148. '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
  149. '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
  150. ];
  151. return colorList[params.dataIndex%4];
  152. }
  153. }
  154. },
  155. type: 'bar',
  156. data: data1,
  157. coordinateSystem: 'polar',
  158. label: {
  159. show: true,
  160. position: 'middle',
  161. formatter: function(a,b,c){
  162. return '{b}: {c}'
  163. }
  164. }
  165. }
  166. };
  167. option && s2manYiDu.setOption(option);
  168. },
  169. data() {
  170. return {
  171. visible:false,
  172. itemShow:false,
  173. }
  174. },
  175. methods:{
  176. // 关闭窗口
  177. handleClose(){
  178. this.$emit('close', false)
  179. }
  180. }
  181. }
  182. </script>
  183. <style scoped>
  184. .dataCont{
  185. border:0px;
  186. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  187. height: calc(100vh * 0.85);
  188. padding:20px;
  189. }
  190. </style>