dangsn
2024-12-03 f31d6505363fa191fb715976826369484c26cf16
Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue
@@ -35,7 +35,7 @@
          </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
@@ -47,7 +47,7 @@
          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>
@@ -84,10 +84,9 @@
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},
@@ -138,7 +137,8 @@
      viewData:{},
      title: '',
      visible: false,
      form:{}
      form:{},
      actionMap:{}
    }
  },
  created() {
@@ -163,12 +163,13 @@
      }
    },
    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() {
@@ -227,7 +228,6 @@
        this.checkViewData = this.checkViewDataSearch;
        return done();
      }
      ;
      this.checkViewData = this.checkViewData.filter(item => {
        return item.source && item.source.includes(source);
@@ -256,7 +256,7 @@
    },
    // 新增编辑保存
    addDialogSavaHandler() {
      saveTemplate(this.viewData).then(res => {
      saveGrand(this.viewData).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
@@ -279,7 +279,7 @@
        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();