approve.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <div>
  3. <el-dialog
  4. :title="`核查计划进度情况(核查计划编号:${generalList[0].bian_hao_})`"
  5. :visible.sync="generalShow"
  6. width="80%"
  7. top="0"
  8. append-to-body
  9. custom-class="customClass"
  10. @close="close"
  11. >
  12. <div>
  13. <div class="step">
  14. <el-steps :active="activeIndex" finish-status="success" align-center>
  15. <el-step v-for="(item,index) in stepList" :key="index" :title="item.title" :description="item.post" @click.native="activeClick(index + 1)" />
  16. </el-steps>
  17. </div>
  18. <div class="stopCenter">
  19. <div>
  20. <div class="tableTop">
  21. <el-alert
  22. title="核查完成进度仪表"
  23. type="success"
  24. :description="description"
  25. :closable="false"
  26. />
  27. </div>
  28. <div style="display: flex;justify-content: space-between;width: 100%;">
  29. <!-- <div v-if="activeIndex != 5" style="width: 100%">
  30. <div ref="Echart" class="chart" />
  31. </div>
  32. <div v-if="activeIndex == 5" style="width:40%;position: relative;">
  33. <div ref="Echart" class="chart" />
  34. </div>
  35. <div v-if="activeIndex == 5" style="width: 60%;position: relative;">
  36. <div ref="Echart2" class="chart" />
  37. </div> -->
  38. <div style="width:30%;position: relative;">
  39. <div ref="Echart" class="chart" />
  40. </div>
  41. <div style="width: 70%;position: relative;">
  42. <div ref="Echart2" class="chart" />
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <div v-if="activeIndex == 5" class="tableLin">
  48. <div class="tableTop">
  49. <el-alert
  50. title="不符合条款清单"
  51. type="success"
  52. :closable="false"
  53. />
  54. </div>
  55. <div>
  56. <appComOne ref="appBuCom" :click-index="7" :table-data="buTableData" :type="false" />
  57. </div>
  58. </div>
  59. <div class="tableLin">
  60. <div class="tableTop">
  61. <el-alert
  62. :title="getIndexName(clickIndex)"
  63. type="success"
  64. :closable="false"
  65. />
  66. </div>
  67. <div>
  68. <appComOne ref="appCom" :type="true" :general-list="generalList" :click-index="clickIndex" :active-index="activeIndex" :table-data="tableData" />
  69. </div>
  70. </div>
  71. <div v-if="activeIndex != 5" class="tyongj">
  72. 暂无不符合项统计,请等待本次认可准则条款确认结束后统计
  73. </div>
  74. </div>
  75. </el-dialog>
  76. </div>
  77. </template>
  78. <script>
  79. import approveJS from './approveJS'
  80. import appComOne from './compnent/appComOne'
  81. export default {
  82. components: { appComOne },
  83. mixins: [approveJS],
  84. props: {
  85. show: {
  86. type: Boolean,
  87. default: false
  88. },
  89. generalList: {
  90. type: Array,
  91. default: () => {
  92. return []
  93. }
  94. }
  95. },
  96. data () {
  97. return {
  98. generalShow: this.show,
  99. id: '',
  100. clickIndex: 2,
  101. activeIndex: 5,
  102. stepList: [
  103. {
  104. stepIndex: 11,
  105. title: '计划编制',
  106. post: '质量负责人'
  107. },
  108. {
  109. stepIndex: 22,
  110. title: '实施计划编制',
  111. post: '组长'
  112. },
  113. {
  114. stepIndex: 33,
  115. title: '条款核查',
  116. post: '组员'
  117. },
  118. {
  119. stepIndex: 44,
  120. title: '实施计划审核',
  121. post: '组长'
  122. },
  123. {
  124. stepIndex: 55,
  125. title: '结果确认',
  126. post: '质量负责人'
  127. }
  128. ],
  129. tableData: [],
  130. description: `核查计划项目进度计分:'待分配'计1分, '待核查'计2分, '待审核'计3分, '待确认'计4分, '已结束'计5分,核查进度率 = 各项计划项目进度计分之和 / 计划项目总数 / 5 * 100`,
  131. buTableData: [],
  132. show1: false,
  133. show2: false,
  134. innerWidth
  135. }
  136. },
  137. watch: {
  138. show: {
  139. handler () {
  140. // this.generalShow = this.show
  141. },
  142. deep: true,
  143. immediate: true
  144. }
  145. },
  146. created () {
  147. this.getPosition()
  148. this.id = this.generalList[0].id_
  149. this.getJiHuaZhuangTai(this.id)
  150. this.innerWidth = window.innerWidth / 2
  151. },
  152. methods: {
  153. close () {
  154. this.$emit('generalClose', false)
  155. },
  156. activeClick (index) {
  157. if (this.activeIndex < index - 1) {
  158. return this.$message.error('任务进度没到,请点击其他节点切换')
  159. }
  160. this.getShiShiData(this.id)
  161. this.$refs.appCom.switchWatch(index)
  162. this.clickIndex = index
  163. },
  164. getIndexName (index) {
  165. const name = this.stepList[this.clickIndex - 1 === 5 ? 4 : this.clickIndex - 1].title || ''
  166. return name
  167. }
  168. }
  169. }
  170. </script>
  171. <style lang="less" scoped>
  172. /deep/ .customClass .el-dialog__header{
  173. border-bottom: none;
  174. }
  175. /deep/ .customClass .el-dialog__footer{
  176. border-top: none;
  177. }
  178. .step{
  179. position: relative;
  180. margin: 20px 30px;
  181. }
  182. .tableLin{
  183. margin: 0 30px 20px 30px;
  184. }
  185. .stopCenter{
  186. margin: 0 30px 20px 30px;
  187. }
  188. .tableTop{
  189. margin-bottom: 10px;
  190. }
  191. .chart{
  192. width: 100%;
  193. height: 300px;
  194. }
  195. .tyongj{
  196. color: #606266;
  197. margin: 20px auto;
  198. text-align: center;
  199. font-size: 16px;
  200. }
  201. .buFuHu{
  202. display: flex;
  203. justify-content: space-between;
  204. margin: 20px 30px;
  205. .buLeft{
  206. width: 100%;
  207. .textLeft{
  208. color: #606266;
  209. margin-bottom: 20px;
  210. }
  211. }
  212. }
  213. </style>