edit.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div>
  3. <el-button size="mini" type="text" @click="onShow">编 辑</el-button>
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: "edit",
  9. props:['data'],
  10. data(){
  11. return {
  12. drawer:false,
  13. mainAreaData:'',
  14. mainData:"",
  15. listqueryid:''
  16. }
  17. },
  18. methods:{
  19. onShow(){
  20. this.drawer = true
  21. this.listqueryid = sessionStorage.getItem('listqueryid')
  22. let query = {id:this.data.sa_salesforecastbillid,rowindex:this.data.rowindex,listqueryid:this.listqueryid,
  23. fieldname:'sa_salesforecastbillid'}
  24. this.$router.push({path:'/projectManageDetail',query:query})
  25. this.$store.dispatch('changeDetailDrawer',true)
  26. /*this.queryMainData()*/
  27. },
  28. async queryMainData () {
  29. const res = await this.$api.requested({
  30. "id": 20230705144704,
  31. "content": {
  32. "sa_salesforecastbillid":37
  33. }
  34. })
  35. console.log(res.data,'1111')
  36. this.mainData = res.data
  37. this.changeDataStructure()
  38. },
  39. changeDataStructure () {
  40. this.mainAreaData = [
  41. {
  42. label:'标题',
  43. value: this.mainData.title
  44. },
  45. ]
  46. }
  47. },
  48. mounted() {
  49. }
  50. }
  51. </script>
  52. <style scoped>
  53. </style>