inputMeetingReport.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <div class="tv-container">
  3. <div class="container-box">
  4. <div>
  5. <div class="el-label"><i class="el-icon-collection-tag"></i>基本信息</div>
  6. <div class="el-line"></div>
  7. <baseTable v-if="woNo" :woNo="woNo" step="8" @callBack="callBack" ref="uploadComponet"/>
  8. <div class="el-line"></div>
  9. <div class="el-label"><i class="el-icon-collection-tag"></i>会议结果录入</div>
  10. <div class="el-line"></div>
  11. <div>
  12. <el-row>
  13. <el-col :span="6">&nbsp;</el-col>
  14. <el-col :span="12">
  15. <el-form ref="form" :model="form" label-width="80px">
  16. <el-form-item label="备注信息">
  17. <el-input type="textarea" v-model="form.note"></el-input>
  18. </el-form-item>
  19. </el-form>
  20. </el-col>
  21. <el-col :span="6">&nbsp;</el-col>
  22. </el-row>
  23. </div>
  24. <div class="el-line"></div>
  25. <div class="el-label"></div>
  26. <div class="el-line"></div>
  27. <div style="text-align:right">
  28. <el-button type="primary" @click="handleAudit">确定</el-button>
  29. </div>
  30. </div>
  31. </div>
  32. <!--<fullscreen :fullscreen.sync="fullscreen" class="container"></fullscreen>-->
  33. <el-dialog
  34. title="请选择"
  35. :visible.sync="userDlgVisual"
  36. width="30%"
  37. :modal-append-to-body="false"
  38. :close-on-click-modal="false"
  39. :before-close="handleClose">
  40. <div>
  41. <el-radio v-for="user in userList " v-model="assigneeNo" :key="user.loginNoStr" :label="user.loginNoStr">{{user.loginNameStr}}</el-radio>
  42. </div>
  43. <span slot="footer" class="dialog-footer">
  44. <el-button @click="userDlgVisual = false">取 消</el-button>
  45. <el-button type="primary" @click="checkSelectUser">确 定</el-button>
  46. </span>
  47. </el-dialog>
  48. </div>
  49. </template>
  50. <script>
  51. import baseTable from "./basePeerReview"
  52. export default {
  53. components:{ baseTable },
  54. data(){
  55. return{
  56. woNo:'',
  57. itemId:'',
  58. fullscreen:true,
  59. form:{note:""},
  60. assigneeNo:'',
  61. assigneeName:'',
  62. bpmInfo:{},
  63. inputFiles:[],
  64. userDlgVisual:false,
  65. userList:[]
  66. }
  67. },
  68. methods:{
  69. callBack(itemId){
  70. this.itemId = itemId
  71. },
  72. completeTask(){
  73. if(this.assigneeNo===""){
  74. this.$message({ showClose: true, message:"数据异常",type: 'error'});
  75. return
  76. }
  77. //拼装参数
  78. let info={}
  79. info.params={
  80. "note":this.form.note,
  81. "itemId":this.itemId,
  82. "woNo":this.woNo,
  83. "assigneeNo":this.assigneeNo,
  84. "assigneeName":this.assigneeName,
  85. "extendInfo":JSON.stringify(this.inputFiles)
  86. },
  87. info.taskId = this.bpmInfo.taskId
  88. info.woNo = this.bpmInfo.woNo
  89. info.stepId = this.bpmInfo.stepId
  90. info.procId = this.bpmInfo.procId
  91. info.procVersion = this.bpmInfo.procVersion
  92. //POST请求
  93. this.$http({
  94. url: "/bpm/api/submitTask",
  95. method: "post",
  96. headers: {"Content-Type": "application/json"},
  97. data:info
  98. }).then((res) => {
  99. if(res.data.result==0){
  100. this.$router.push({ path: '/tvIntroduction'});
  101. }else{
  102. this.$message({ showClose: true, message: res.data.desc,type: 'error'});
  103. }
  104. });
  105. },
  106. handleAudit(){
  107. //
  108. let fileList = this.$refs.uploadComponet.getInputFileUploadList()
  109. if(fileList.length===0){
  110. this.$message({ showClose: true, message: "请上传会议记录",type: 'error'});
  111. return false
  112. }
  113. this.inputFiles = fileList
  114. // -
  115. let userInfo = window.sessionStorage.userInfo;
  116. if(null === userInfo){
  117. this.$message({ showClose: true, message: "数据异常",type: 'error'});
  118. return
  119. }
  120. // -
  121. userInfo = JSON.parse(userInfo);
  122. let loginNoStr = userInfo.loginNoStr;
  123. this.$http({
  124. url: "/market/api/user/info/leader2",
  125. method: "post",
  126. headers: {"Content-Type": "application/json"},
  127. data:{"loginNoStr":loginNoStr,"level":"1","type":"1"}//室主任审批
  128. }).then((res) => {
  129. if(res.data.result==0){
  130. let user = res.data.body
  131. if(null==user || user.length==0){
  132. this.$message({ showClose: true, message: "数据异常",type: 'error'});
  133. }else{
  134. if(user.length==1){
  135. this.assigneeNo = user[0].loginNoStr
  136. this.assigneeName = user[0].loginNameStr
  137. this.completeTask()
  138. }else{
  139. this.userList = user;
  140. this.userDlgVisual = true;
  141. }
  142. }
  143. }else{
  144. this.$message({ showClose: true, message: res.data.desc,type: 'error'});
  145. }
  146. });
  147. },
  148. handleClose(){
  149. this.userList = [];
  150. this.userDlgVisual = false;
  151. },
  152. checkSelectUser(){
  153. if(this.assigneeNo===''){
  154. this.$message.error('请选择下一步处理人');
  155. return
  156. }
  157. //
  158. this.userList.forEach((e)=>{
  159. if(e.loginNoStr === this.assigneeNo){
  160. this.assigneeName = e.loginNameStr
  161. }
  162. });
  163. //
  164. this.userDlgVisual = false
  165. this.completeTask()
  166. },
  167. },
  168. mounted(){
  169. this.woNo = this.$route.query.woNo
  170. this.bpmInfo.taskId = this.$route.query.taskId
  171. this.bpmInfo.woNo = this.woNo
  172. this.bpmInfo.stepId = this.$route.query.stepId
  173. this.bpmInfo.procId = this.$route.query.procId
  174. this.bpmInfo.procVersion = this.$route.query.procVersion
  175. }
  176. }
  177. </script>
  178. <style lang="scss" scoped>
  179. .tv-container{
  180. background-color: white;
  181. margin:15px 15px 15px 15px;
  182. padding:20px ;
  183. }
  184. .el-label{
  185. /*border-left:5px solid #0b82ff;*/
  186. /*padding-left:5px;*/
  187. color: #606266;
  188. border-bottom:1px dotted #bfc1c5;
  189. padding-bottom:5px;
  190. }
  191. .el-line{
  192. margin: 0px 0px 20px 0px;
  193. }
  194. </style>