| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="19"> |
| | | <div class="mod-basicInfo-paramDataExpect}"> |
| | | <div class="mod-basicInfo-paramData}"> |
| | | <zt-table-wraper ref="tableObj" :query-url=queryUrl |
| | | :delete-url=deleteUrl |
| | | @dataLoaded="dataLoaded" |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | queryUrl: '/basicInfo/ParamDataExpect/page', |
| | | deleteUrl: '/basicInfo/ParamDataExpect', |
| | | queryUrl: '/basicInfo/ParamData/page', |
| | | deleteUrl: '/basicInfo/ParamData', |
| | | pageCode: '', |
| | | key: '', |
| | | typeS: '', |
| | |
| | | mounted() { |
| | | this.pageCode = this.$route.query.pageCode |
| | | this.dataForm.pageCode = this.$route.query.pageCode |
| | | if (this.pageCode === 'assign') { |
| | | this.queryUrl = '/basicInfo/ParamDataAssign/page' |
| | | this.deleteUrl = '/basicInfo/ParamDataAssign' |
| | | } |
| | | console.log(this.pageCode, 'this.pageCode this.pageCode') |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.$refs.SelectTyModel.$refs.dialog.init(null, { |
| | | type: this.dataForm.nodeType - 1, |
| | | id: this.dataForm.id, |
| | | id: this.dataForm.srcId, |
| | | pageCode: this.pageCode |
| | | }) |
| | | console.log(this.dataForm.srcId, 'add') |
| | | }, |
| | | //批量保存 |
| | | async handleSaveRows() { |
| | | this.dataForm.dataThreeList = this.$refs.tableObj.dataList |
| | | console.log(this.dataForm, 'this.dataForm this.dataForm') |
| | | let res |
| | | if (this.pageCode === 'Expect') { |
| | | res = await this.$http.post('/basicInfo/ParamDataExpect/save', this.dataForm) |
| | | } else { |
| | | res = await this.$http.post('/basicInfo/ParamDataAssign/save', this.dataForm) |
| | | } |
| | | let res = await this.$http.post('/basicInfo/ParamData/save', this.dataForm) |
| | | if (res.success) { |
| | | console.log(res.data) |
| | | await this.$tip.success() |
| | |
| | | // }, |
| | | onProductSelected(data) { |
| | | this.dataForm.srcId = data.id |
| | | this.dataForm.nodeType = data.nodeType |
| | | this.dataForm.nodeType = data.productType |
| | | console.log(data, 'onProductSelected(data)') |
| | | this.$refs.tableObj.query() |
| | | }, |