stateDetails.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <div class="sample-scan">
  3. <el-input
  4. v-model="facilityId"
  5. ref="redarInput"
  6. style="z-index: -999;">
  7. </el-input>
  8. <div class="popContainer" v-if="redar" @click="remRedar">
  9. <dv-decoration-12 style="width:150px;height:150px;margin:0 auto;top: 35%;">
  10. <span style=" color: #66D9EF;"></span>
  11. </dv-decoration-12>
  12. </div>
  13. <el-dialog
  14. @click="getData"
  15. title='内审阶段'
  16. ref="dialog_ref"
  17. :visible.sync="scanVisible"
  18. :before-close="handleClose">
  19. <div class="stepsContent">
  20. <el-steps :active="active" finish-status="success" process-status="wait" space="18%">
  21. <el-step title="开始" ></el-step>
  22. <el-step title="实施计划" process-status="finish"></el-step>
  23. <el-step title="首次会议" process-status="wait"></el-step>
  24. <el-step title="内审核查"></el-step>
  25. <el-step title="末次会议"></el-step>
  26. <el-step title="内审不符合项整改"></el-step>
  27. <el-step title="内审报告"></el-step>
  28. <el-step title="结束"></el-step>
  29. </el-steps>
  30. <!-- <el-button style="margin-top: 12px;" @click="next">下一步</el-button> -->
  31. </div>
  32. <!-- <div slot="footer" class="dialog-footer">
  33. <el-button @click="centerDialogVisible = false">取消</el-button>
  34. <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  35. </div> -->
  36. </el-dialog>
  37. </div>
  38. </template>
  39. <script>
  40. import repostCurd from '@/business/platform/form/utils/custom/joinCURD.js'
  41. export default {
  42. props: {
  43. obj: {
  44. default: [],
  45. type: Array
  46. },
  47. scanVisible:{
  48. type:Boolean,
  49. default: false
  50. },
  51. },
  52. data () {
  53. return {
  54. facilityId:'',
  55. updateNum:1,
  56. visible:false,
  57. redar:false,
  58. listData:[],
  59. dialogVisible: false,
  60. //默认第几个节点完成
  61. active:2,
  62. status:''
  63. }
  64. },
  65. watch:{
  66. listData: {
  67. handler(val, oldName) {
  68. if(val.length>0){
  69. this.visible = true
  70. this.redar = false // 扫描后就让扫描组件隐藏
  71. }
  72. },
  73. deep: true,
  74. immediate: true
  75. },
  76. scanVisible:{
  77. handler(val, oldName) {
  78. if(val){
  79. this.redar = false // 扫码的组件 一开始先展示
  80. this.visible = true // 结果列表 一开始没扫描就不展示
  81. this.$nextTick(() => {
  82. this.$refs.redarInput.focus(); //聚焦input
  83. })
  84. this.listData = [] //清空列表
  85. }else{
  86. this.remRedar()
  87. }
  88. },
  89. deep: true,
  90. immediate: true
  91. }
  92. },
  93. created() {
  94. },
  95. mounted(){
  96. this.getData()
  97. this.open()
  98. },
  99. methods:{
  100. // open(){
  101. // console.log('123',this.$refs.dialog_ref)
  102. // },
  103. // 确认关闭弹框
  104. handleClose(done) {
  105. this.$confirm('确认关闭?')
  106. .then(_ => {
  107. done();
  108. })
  109. .catch(_ => {});
  110. },
  111. getData(){
  112. let id = '',name='',host='',status='';
  113. console.log('脚本对象',this.obj,this.obj[0],this.obj[1].shi_fou_guo_shen_,this.obj[1].nei_shen_zu_zu_ch)
  114. // id = this.obj[0],
  115. //获取当前id,查内审阶段数据表 内审名称="" && 内审状态="已完成"
  116. },
  117. //
  118. //步骤i条
  119. next() {
  120. if (this.active++ > 7) {
  121. // 节点超过7之后回到初始状态
  122. this.active = 2;
  123. }
  124. },
  125. //改变步骤条状态
  126. stepStatus(step){
  127. switch(step){
  128. case 0:
  129. this.status ='';
  130. break;
  131. case 1:
  132. this.status = '内审核查'
  133. break;
  134. }
  135. },
  136. }
  137. }
  138. </script>
  139. <style lang="less" scoped>
  140. .stateDetails{
  141. position: fixed;
  142. width: 1000px;
  143. height: 600px;
  144. top: 0;
  145. left: 0;
  146. right: 0;
  147. bottom: 0;
  148. z-index: 100;
  149. background-color: white;
  150. border: 2px solid rebeccapurple;
  151. .stepsContent{
  152. width: 100%;
  153. height: calc(100% - 20px);
  154. margin: 10px 0px;
  155. }
  156. }
  157. </style>