按钮级别的新版本,多级别的组织架构
loulijun2021
2023-08-09 1ec6e15f8a7d351ce8537567cf6e956e99d4167f
src/views/systemSetting/encodingRules.vue
@@ -2,7 +2,13 @@
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div class="bodyTopButtonGroup">
        <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button
          v-waves
          :style="{visibility:$buttoncode.includes('Add')?'':'hidden'}"
          type="primary"
          icon="el-icon-circle-plus-outline"
          @click="add('add')"
        >新增</el-button>
      </div>
      <div class="bodyTopFormGroup">
@@ -82,7 +88,7 @@
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div>{{ dateType.find(i=>i.code===row.filingdate).name }}</div>
              <div>{{ dateType.find(i => i.code === row.filingdate).name }}</div>
            </template>
          </el-table-column>
          <el-table-column
@@ -97,6 +103,7 @@
            sortable="custom"
          />
          <el-table-column
            v-if="$buttoncode.toString().length"
            label="操作"
            width="120"
            fixed="right"
@@ -106,12 +113,16 @@
                <el-tooltip class="item" effect="dark" content="编辑" placement="top">
                  <i
                    class="el-icon-edit-outline"
                    :style="{color:$store.state.settings.theme}"
                    :style="{color:$store.state.settings.theme,display:$buttoncode.includes('Update')?'':'none'}"
                    @click="edit('edit',row)"
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" />
                  <i
                    class="el-icon-delete"
                    :style="{color:$store.state.settings.theme,display:$buttoncode.includes('Delete')?'':'none'}"
                    @click="del(row)"
                  />
                </el-tooltip>
              </div>
            </template>
@@ -219,7 +230,6 @@
  directives: { elDragDialog, waves },
  data() {
    return {
      mouseHoverType: 'mouseout',
      isExpandForm: false,
      mainHeight: 0,
      tableHeight: 0,
@@ -299,6 +309,7 @@
    this.getHeight()
    this.getCodeMenuSelect()
    console.log(this.$buttoncode)
  },
  methods: {
    async getCodeMenuSelect() {
@@ -309,7 +320,6 @@
        childrenProperty: 'children'
      })
      this.menuOptions = this.menuOptionsAll.filter(i => i.type === this.dialogForm.type)
      // console.log(this.menuOptions, 2)
    },
    radioChange() {
      this.menuOptions = this.menuOptionsAll.filter(i => i.type === this.dialogForm.type)
@@ -407,7 +417,6 @@
    dialogVisibleConfirm() {
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          // console.log(this.$refs.cascader.checkedValue, 1)
          const rightcode = this.$refs.cascader.checkedValue[this.$refs.cascader.checkedValue.length - 1]
          this.dialogForm.rightcode = rightcode
          this.dialogForm.rightname = this.menuOptions[this.menuOptions.findIndex(i => i.menucode === this.$refs.cascader.checkedValue[0])].children.find(i => i.menucode === rightcode).menuname