| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getAllOrderbyAttributeByLink} from "@/api/modeling/linkType/api"; |
| | | import {linkSave} from "@/api/queryTemplate/linkTypeQuery"; |
| | | import {linkSave,getBizTypeQTDs} from "@/api/queryTemplate/businessTypeQuery"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {queryTemplateListByAttr} from "@/api/queryTemplate/queryDefine"; |
| | | import formQueryDialog from "./formQueryDialog.vue"; |
| | |
| | | prop: 'orderField' |
| | | }, { |
| | | label: '排序方式', |
| | | prop: 'orderMode' |
| | | prop: 'orderMode', |
| | | formatter:function (row, value) { |
| | | if (row.orderMode == 'ASC') { |
| | | return '升序' |
| | | }else{ |
| | | return '降序' |
| | | } |
| | | } |
| | | }, { |
| | | label: '优先级', |
| | | prop: 'level' |
| | |
| | | }; |
| | | } |
| | | this.dialog.showDialog = true; |
| | | this.getTemp(data.treeData.label, true) |
| | | this.getTemp(data.treeData.label) |
| | | this.getAllAttr(); |
| | | }, |
| | | cancelDialog() { |
| | | this.dialog.loading = false; |
| | |
| | | }, |
| | | // 行删除 |
| | | rowDeleteHandler(data) { |
| | | debugger; |
| | | this.orderInfoList.splice(data.index,1); |
| | | this.orderFieldList.unshift({ |
| | | id: data.row.orderField |
| | |
| | | }, |
| | | //获取排序设置中所有排序字段 |
| | | getAllAttr() { |
| | | getAllOrderbyAttributeByLink({ |
| | | name: this.treeData.label, |
| | | btmType: this.form.btmType, |
| | | direction: this.form.direction |
| | | getBizTypeQTDs({ |
| | | btmName: this.treeData.label |
| | | }).then(res => { |
| | | const orderInfoStr = JSON.stringify(this.orderInfoList); |
| | | const dicData = []; |
| | | res.data.data.forEach(item => { |
| | | if (orderInfoStr.indexOf('"orderField":"' + item + '"') == -1) { |
| | | dicData.push({id: item}); |
| | | if (orderInfoStr.indexOf('"orderField":"' + item.id + '"') == -1) { |
| | | dicData.push(item); |
| | | } |
| | | }) |
| | | this.tableFormOption.column[0].dicData=dicData; |
| | |
| | | }) |
| | | }, |
| | | //获取查询模板定义下拉 |
| | | getTemp(btmName,linkFlag) { |
| | | getTemp(btmName) { |
| | | if (btmName) { |
| | | queryTemplateListByAttr({btmName: btmName}).then(res => { |
| | | const data = res.data.data.map(item => { |