| | |
| | | </template> |
| | | </avue-crud> |
| | | <div style="margin-top: 15px;"> |
| | | <data-view key="dataView" :btmNode="nodeRow" :data="viewData" :readOnly="true" :height="clientHeight-260-220"></data-view> |
| | | <data-view key="dataView" :btmNode="nodeRow" :data="viewData" :actionDic="actionMap" :readOnly="true" :height="clientHeight-260-220"></data-view> |
| | | </div> |
| | | <!-- 新增 && 编辑 --> |
| | | <el-dialog |
| | |
| | | width="70%" |
| | | @close="addDialogClose"> |
| | | <div> |
| | | <data-view key="editView" :btmNode="nodeRow" :data="viewData" :readOnly="false" :height="clientHeight-340"></data-view> |
| | | <data-view ref="editView" key="editView" :btmNode="nodeRow" :data="viewData" :actionDic="actionMap" :readOnly="false" :height="clientHeight-340"></data-view> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button size="small" type="primary" @click="addDialogSavaHandler">确 定</el-button> |
| | |
| | | import {getBizTree} from "@/api/UI/uiDefine"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import dataView from "./dataView"; |
| | | import {getTypeActionByType} from "@/api/authority/ui/typeAction"; |
| | | import {getData,saveGrand,delGrand} from "@/api/authority/ui/dataAuthor"; |
| | | import func from "@/util/func"; |
| | | import {getUsedEnumList} from "@/api/modeling/enumType/api"; |
| | | import {deleteTemplate, saveTemplate, updateTemplate} from "@/api/queryTemplate/queryDefine"; |
| | | export default { |
| | | name: "index", |
| | | components:{dataView}, |
| | |
| | | viewData:{}, |
| | | title: '', |
| | | visible: false, |
| | | form:{} |
| | | form:{}, |
| | | actionMap:{} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | } |
| | | }, |
| | | getTableList() { |
| | | getTypeActionByType({ |
| | | getData({ |
| | | 'typeName': this.nodeRow.attributes.name, |
| | | }).then(res => { |
| | | this.data = res.data.data; |
| | | this.data = res.data.obj.rowList; |
| | | this.$refs.crud.clearSelection(); |
| | | this.tableLoading = false; |
| | | this.actionMap=res.data.obj.actionMap |
| | | }) |
| | | }, |
| | | handleRefresh() { |
| | |
| | | this.checkViewData = this.checkViewDataSearch; |
| | | return done(); |
| | | } |
| | | ; |
| | | |
| | | this.checkViewData = this.checkViewData.filter(item => { |
| | | return item.source && item.source.includes(source); |
| | |
| | | }, |
| | | // 新增编辑保存 |
| | | addDialogSavaHandler() { |
| | | saveTemplate(this.viewData).then(res => { |
| | | saveGrand(this.viewData).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteTemplate({name:this.templateForm}).then(res => { |
| | | delGrand({name:this.templateForm}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |