renameConversation.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div class="responseDialog">
  3. <el-dialog title="重命名会话" :visible.sync="showDialog" width="500px" :close-on-click-modal="false" :before-close="handleClose" append-to-body>
  4. <div>
  5. <p>会话名称</p>
  6. <el-input v-model="form.conversationName" placeholder="请输入会话名称"></el-input>
  7. </div>
  8. <span slot="footer" class="dialog-footer">
  9. <el-button @click="handleClose">取 消</el-button>
  10. <el-button type="primary" @click="updateConfessionSession" >确 定</el-button>
  11. </span>
  12. </el-dialog>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. props:{},
  18. data() {
  19. return {
  20. showDialog:false,
  21. form:{}
  22. }
  23. },
  24. watch: {
  25. },
  26. mounted() {
  27. },
  28. methods: {
  29. open(row){
  30. this.form = JSON.parse(JSON.stringify(row))
  31. this.showDialog = true
  32. },
  33. handleClose(){
  34. this.showDialog = false
  35. },
  36. //更新技术交底书会话记录
  37. updateConfessionSession(){
  38. var params = {
  39. confessionSessionId:this.form.id,
  40. inventionPoint:this.form.inventionPoint,
  41. conversationName:this.form.conversationName
  42. }
  43. this.$api.updateConfessionSession(params).then(response=>{
  44. if(response.code == 200){
  45. this.$emit('rename',this.form)
  46. this.handleClose()
  47. }
  48. }).catch(error=>{
  49. this.$message.error('更新失败')
  50. })
  51. },
  52. },
  53. }
  54. </script>
  55. <style lang="scss">
  56. .responseDialog{
  57. .el-dialog__body{
  58. padding-bottom: 0px;
  59. }
  60. }
  61. </style>