| | |
| | | <el-card shadow="never" class="aui-card--fill"> |
| | | <div class="mod-tyProductModel-tyProductModel}"> |
| | | <zt-table-wraper :query-url=url |
| | | :paging='false' |
| | | v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | </el-form> |
| | |
| | | name: 'SelectTyModel', |
| | | data() { |
| | | return { |
| | | url:'/basicInfo/TyProductModel/page', |
| | | url: '/basicInfo/XhProductModel/page', |
| | | selectList: [], |
| | | data: '', |
| | | pageCode:'', |
| | | dataForm: { |
| | | type: 'noTree', |
| | | nodeType: '', |
| | |
| | | }, |
| | | components: {}, |
| | | methods: { |
| | | init(id,params) { |
| | | init(id, params) { |
| | | this.dataForm.nodeType = params.type |
| | | this.dataForm.pid = params.id |
| | | this.data = params.data |
| | | if (this.data ==='expect'||this.data==='assign'){ |
| | | this.url='/basicInfo/XhProductModel/page' |
| | | this.pageCode = params.pageCode |
| | | if (!this.pageCode) { |
| | | this.url = '/basicInfo/TyProductModel/page' |
| | | } |
| | | console.log(this.dataForm.pid, 'init()') |
| | | console.log(params, 'init()') |
| | | }, |
| | | changeRow(selection) { |
| | | console.log(selection, ' changeRow(selection)') |
| | |
| | | item.pid = this.dataForm.pid |
| | | } |
| | | this.selectList = selection |
| | | this.selectList.forEach( item => { |
| | | item.pageCode = this.pageCode |
| | | }) |
| | | }, |
| | | async formSubmit() { |
| | | let res |
| | | if (this.data && this.data === 'expect'){ |
| | | res = await this.$http.post('/basicInfo/ParamDataExpect/get', this.selectList) |
| | | }else if(this.data && this.data === 'assign') { |
| | | res = await this.$http.post('/basicInfo/ParamDataAssign/get', this.selectList) |
| | | }else |
| | | { |
| | | res = await this.$http.post('/basicInfo/XhProductModel/get', this.selectList) |
| | | } |
| | | |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('refreshDataList') |
| | | if (this.pageCode) { |
| | | if (this.pageCode === 'expect' || this.pageCode === 'assign') { |
| | | res = await this.$http.post('/basicInfo/ParamData/get', this.selectList) |
| | | } |
| | | } else { |
| | | res = await this.$http.post('/basicInfo/XhProductModel/get', this.selectList) |
| | | } |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('refreshDataList') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |