index.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <div>
  3. <basicLayout
  4. style="padding-top:0 !important"
  5. ref="basicLayout"
  6. formPath="codeManage"
  7. tableName="codesTable"
  8. idName="plm_technicalinfo_codeids"
  9. :apiId="{query:2025082513210302,del:2025082513211502}">
  10. <template v-slot:tbList="scope">
  11. <div v-if="scope.data.column.columnname == 'codeImg'" >
  12. <div @click="codeClick(scope.data.column.data.code)">
  13. <vue-qr :text="url + '?code=' + scope.data.column.data.code" :size="36" @callback="callback"></vue-qr>
  14. </div>
  15. </div>
  16. <div>
  17. {{scope.data.column.data[scope.data.column.columnname]}}
  18. </div>
  19. </template>
  20. <template v-slot:tbOpreation="scope">
  21. <edit :data="scope.data.data" @onSuccess="onSuccess" class="inline-16"></edit>
  22. <darwerPanel :id="scope.data.data.plm_technicalinfo_codeid" :title="$t(`关联商品`)" :detailPath="{path:'/relationCode'}" class="inline-16" @closeDrawer="onSuccess"/>
  23. <btnDelete class="inline-16" paramID="2025082513211502" nameKey="plm_technicalinfo_codeids" :id="scope.data.data.plm_technicalinfo_codeid"
  24. message="确认是否删除,确定删除则删除该二维码id及其所有关联商品信息" @onSuccess="onSuccess" btnTitle="删除"></btnDelete>
  25. </template>
  26. </basicLayout>
  27. <el-dialog
  28. append-to-body
  29. :visible.sync="dialogVisible"
  30. width="700px"
  31. >
  32. <vue-qr :text="bigUrl" :size="600" @click="codeClick" @callback="callback"></vue-qr>
  33. </el-dialog>
  34. </div>
  35. </template>
  36. <script>
  37. import edit from '@/Form/codeManage/edit'
  38. import darwerPanel from '@/HManagement/archives_sc/components/Rpanel'
  39. import btnDelete from '@/components/btn-popconfirm/index'
  40. import vueQr from 'vue-qr'
  41. export default {
  42. name: "index",
  43. components:{edit,darwerPanel,btnDelete,vueQr},
  44. data(){
  45. return {
  46. dialogVisible:false,
  47. url:'http://61.164.207.46:8000/yosweb/codeToFile.html',
  48. // url:'http://192.168.3.146:8000/yosweb/codeToFile.html',
  49. bigUrl:''
  50. }
  51. },
  52. methods:{
  53. onSuccess(){
  54. this.$refs.basicLayout.listData()
  55. },
  56. async codeClick(code){
  57. console.log(code,'code')
  58. this.dialogVisible = true
  59. this.bigUrl = this.url + '?code=' + code
  60. const res = await this.$api.requested({
  61. "id": 2025082515112802,
  62. "content": {
  63. "code": code
  64. },
  65. })
  66. console.log(res.data)
  67. // this.bigUrl = this.url + '?data=' + res.data
  68. },
  69. callback(){
  70. console.log('测试内容1111')
  71. }
  72. }
  73. }
  74. </script>
  75. <style scoped>
  76. </style>