管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2022-11-24 8651d299aaf1ff75353ff6a6112c8ab9260d6b8c
src/views/datamanage/domainManage.vue
@@ -19,7 +19,10 @@
      <div class="right">
        <div class="inquire">
          <el-form ref="queryForm" :model="queryForm" :inline="true">
            <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name">
            <el-form-item
              :label="$t('dataManage.domainManage.domCode')"
              prop="name"
            >
              <el-input
                v-model="queryForm.code"
                :placeholder="$t('common.pleaseInput')"
@@ -92,11 +95,11 @@
              prop="codeDesc"
              :label="$t('dataManage.domainManage.codeDesc')"
            />
            <el-table-column
            <!-- <el-table-column
              align="center"
              prop="bsm"
              :label="$t('dataManage.domainManage.bsm')"
            />
            /> -->
            <el-table-column
              align="center"
              prop="level"
@@ -198,7 +201,11 @@
    <el-dialog
      width="510px"
      top="5vh"
      :title="behavior"
      :title="
        behavior == '新增用户'
          ? `${$t('common.append')}`
          : `${$t('common.update')}`
      "
      :visible.sync="dialogFormVisible"
      :before-close="handleClose"
    >
@@ -253,20 +260,23 @@
        </el-form-item>
      </el-form>
      <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer">
        <el-button @click="cancelEdit()">重置</el-button>
        <el-button @click="cancelEdit()">{{ $t('common.reset') }}</el-button>
        <el-button
          size="medium"
          type="primary"
          class="primary"
          type="info"
          @click="sendEdit('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
          >{{ $t('common.confirm') }}</el-button
        >
      </div>
      <div v-else slot="footer" class="dialog-footer">
        <el-button @click="cancelAdd('editForm')">重置</el-button>
        <el-button type="info" @click="cancelAdd('editForm')">{{
          $t('common.reset')
        }}</el-button>
        <el-button
          size="medium"
          type="primary"
          class="primary"
          @click="sendAdd('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
          >{{ $t('common.confirm') }}</el-button
@@ -323,17 +333,17 @@
      },
      domainData: [
        {
          tabDesc: '基础数据',
          val: '基础数据',
          children: [],
        },
        {
          tabDesc: '业务数据',
          val: '业务数据',
          children: [],
        },
      ],
      defaultProps: {
        children: 'children',
        label: 'tabDesc',
        label: 'val',
      },
    };
  },
@@ -351,11 +361,18 @@
      this.fullscreenLoading = true;
      this.listData.ns = data.ns;
      this.listData.tab = data.tab;
      getSingleTab(this.listData).then((res) => {
        setTimeout(() => {
          this.tableData = res.result;
          this.count = res.count;
          this.fullscreenLoading = false;
          if (res.code == 200) {
            this.tableData = res.result;
            this.count = res.count;
            this.fullscreenLoading = false;
          } else {
            this.tableData = [];
            this.count = 0;
            this.fullscreenLoading = false;
          }
        }, 500);
      });
    },
@@ -370,6 +387,12 @@
      getDomainTabs().then((res) => {
        let bdres = res.result.filter((item) => item.ns == 'bd');
        let bsres = res.result.filter((item) => item.ns == 'bs');
        for (var i in bdres) {
          bdres[i].val = bdres[i].tabDesc + '(' + bdres[i].tab + ')';
        }
        for (var i in bsres) {
          bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')';
        }
        this.domainData[0].children = bdres;
        this.domainData[1].children = bsres;
      });
@@ -460,7 +483,6 @@
    sendAdd(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          // console.log(this.editForm);
          this.fullscreenLoading = true;
          insertDomain(this.editForm)
            .then((res) => {
@@ -484,7 +506,7 @@
              }, 500);
            })
            .catch((res) => {
              alert('修改失败,请重试!');
              alert('添加失败,请重试!');
              this.fullscreenLoading = false;
            });
        } else {