liukangdong
2024-09-29 b2d360d9113b6955287108ca9e90d76a1f3c1419
admin/src/components/system/dict/DictDataManagerWindow.vue
@@ -1,7 +1,7 @@
<template>
  <GlobalWindow
    :title="dictName + '数据管理'"
    width="78%"
    width="100%"
    :visible.sync="visible"
    :with-footer="false"
  >
@@ -19,8 +19,15 @@
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="55"></el-table-column>
          <el-table-column prop="label" label="数据标签" min-width="100px"></el-table-column>
          <el-table-column prop="code" label="数据值" min-width="100px" show-overflow-tooltip></el-table-column>
          <el-table-column prop="label" label="数据标签" min-width="200px"></el-table-column>
          <el-table-column prop="code" label="数据值" min-width="100px">
            <template slot-scope="{row}">
              <div v-if="row.code || row.code.length>500" >
                <el-button type="text" @click="showCode(row)" >点击查看</el-button>
              </div>
              <div v-else>{{row.code}}</div>
            </template>
          </el-table-column>
          <el-table-column prop="disabled" label="状态" min-width="100px">
            <template slot-scope="{row}">{{row.disabled | disabledText}}</template>
          </el-table-column>
@@ -30,6 +37,7 @@
          <el-table-column prop="updateUser" label="更新人" min-width="100px">
            <template slot-scope="{row}">{{row.updateUserInfo == null ? '' : row.updateUserInfo.username}}</template>
          </el-table-column>
          <el-table-column prop="remark" label="说明" min-width="150px"></el-table-column>
          <el-table-column prop="createTime" label="创建时间" min-width="100px"></el-table-column>
          <el-table-column prop="updateTime" label="更新时间" min-width="100px"></el-table-column>
          <el-table-column
@@ -38,7 +46,7 @@
            fixed="right"
          >
            <template slot-scope="{row}">
              <el-button type="text" @click="$refs.operaDictDataWindow.open('编辑字典数据', dictId, row)" icon="el-icon-edit">编辑</el-button>
              <el-button type="text" @click="$refs.operaDictDataWindow.open('编辑字典数据', searchForm.dictId, row)" icon="el-icon-edit">编辑</el-button>
              <el-button type="text" @click="deleteById(row)" icon="el-icon-delete">删除</el-button>
            </template>
          </el-table-column>
@@ -51,6 +59,22 @@
      </template>
      <!-- 新建/修改 -->
      <OperaDictDataWindow ref="operaDictDataWindow" @success="handlePageChange(tableData.pagination.pageIndex)"/>
      <el-dialog
          class="center-title"
          title="字典值"
          width="70%"
          height="70%"
          text="字典值"
          :visible.sync="visible1"
          append-to-body
      >
        <div class="agree-list"  v-html="agreement">
        </div>
        <template  v-slot:footer>
          <el-button @click="visible1=false">返回</el-button>
        </template>
      </el-dialog>
    </TableLayout>
  </GlobalWindow>
</template>
@@ -68,6 +92,8 @@
  data () {
    return {
      visible: false,
      visible1: false,
      agreement: '',
      searchForm: {
        // 字典ID
        dictId: null
@@ -83,6 +109,10 @@
      this.dictName = dictName
      this.visible = true
      this.search()
    },
    showCode(row){
      this.agreement=row.code
      this.visible1=true
    }
  },
  created () {
@@ -95,6 +125,12 @@
</script>
<style scoped lang="scss">
.agree-list{
  height: 550px;
  //max-height: 50%;
  overflow: auto;
}
/deep/ .window__body {
  .table-content {
    padding: 0;
@@ -102,5 +138,6 @@
      padding-top: 0;
    }
  }
}
</style>