管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-01-16 3c0bcd367dbc9aff25202d1a8ec2eb143f3e8261
src/views/datamanage/domainManage.vue
@@ -1,26 +1,30 @@
<template>
  <div class="domainBox">
    <My-bread
      :list="[
    <My-bread :list="[
        `${$t('dataManage.dataManage')}`,
        `${$t('dataManage.rangeManage')}`,
      ]"
    ></My-bread>
      ]"></My-bread>
    <el-divider />
    <div class="mainBox">
      <div class="leftTree">
        <el-tree
          :data="domainData"
          :props="defaultProps"
          :default-expand-all="true"
          @node-click="toggleTabs"
        ></el-tree>
        <div style="width:450px">
          <el-tree
            :data="domainData"
            :props="defaultProps"
            :default-expand-all="true"
            @node-click="toggleTabs"
          ></el-tree>
        </div>
      </div>
      <div class="right">
        <div class="inquire">
          <el-form ref="queryForm" :model="queryForm" :inline="true">
          <el-form
            ref="queryForm"
            :model="queryForm"
            :inline="true"
          >
            <el-form-item
              :label="$t('dataManage.domainManage.domCode')"
              :label="$t('dataManage.vmobj.keyword')"
              prop="name"
            >
              <el-input
@@ -34,31 +38,27 @@
                icon="el-icon-search"
                size="small"
                class="primary"
                >{{ $t('common.iquery') }}</el-button
              >
              >{{ $t('common.iquery') }}</el-button>
              <el-button
                @click="resetInfo('queryForm')"
                icon="el-icon-delete"
                size="small"
                type="info"
                >{{ $t('common.empty') }}</el-button
              >
              >{{ $t('common.empty') }}</el-button>
              <el-button
                v-if="btnStatus.insert"
                @click="showAddDialog"
                icon="el-icon-plus"
                size="small"
                type="success"
                >{{ $t('common.append') }}</el-button
              >
              >{{ $t('common.append') }}</el-button>
              <el-button
                v-if="btnStatus.delete"
                @click="deleteInfo"
                type="danger"
                size="small"
                icon="el-icon-delete"
                >{{ $t('common.delete') }}</el-button
              >
              >{{ $t('common.delete') }}</el-button>
            </el-form-item>
          </el-form>
        </div>
@@ -68,7 +68,10 @@
            @selection-change="handleSelectionChange"
            height="100%"
          >
            <el-table-column type="selection" width="50" />
            <el-table-column
              type="selection"
              width="50"
            />
            <el-table-column
              align="center"
              type="index"
@@ -116,26 +119,30 @@
              :label="$t('dataManage.domainManage.bak')"
            />
            <el-table-column min-width="150" :label="$t('common.operate')">
              <template slot-scope="scope"
                ><el-button
            <el-table-column
              min-width="150"
              :label="$t('common.operate')"
            >
              <template slot-scope="scope">
                <el-button
                  class="primary"
                  @click="showDetail(scope.row)"
                  size="small"
                  >{{ $t('common.details') }}</el-button
                >
                >{{ $t('common.details') }}</el-button>
                <el-button
                  v-if="btnStatus.update"
                  type="warning"
                  @click="handleEdit(scope.$index, scope.row)"
                  size="small"
                  >{{ $t('common.update') }}</el-button
                >
                >{{ $t('common.update') }}</el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div class="pagination_box" style="margin-top: 20px">
        <div
          class="pagination_box"
          style="margin-top: 20px"
        >
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
@@ -149,11 +156,20 @@
        </div>
      </div>
    </div>
    <div class="infoBox" v-show="showinfoBox">
    <div
      class="infoBox"
      v-show="showinfoBox"
    >
      <el-card class="box-card">
        <div slot="header" class="clearfix">
        <div
          slot="header"
          class="clearfix"
        >
          <span>{{ $t('common.details') }}</span>
          <div style="float: right; cursor: pointer" @click="closeDetial">
          <div
            style="float: right; cursor: pointer"
            @click="closeDetial"
          >
            <i class="el-icon-close"></i>
          </div>
        </div>
@@ -209,12 +225,18 @@
      :visible.sync="dialogFormVisible"
      :before-close="handleClose"
    >
      <el-form :model="editForm" ref="editForm">
      <el-form
        :model="editForm"
        ref="editForm"
      >
        <el-form-item
          :label="$t('dataManage.domainManage.domName')"
          :label-width="formLabelWidth"
        >
          <el-select v-model="editForm.domName" placeholder="请选择">
          <el-select
            v-model="editForm.domName"
            placeholder="请选择"
          >
            <el-option
              v-for="item in domainOptions"
              :key="item.value"
@@ -229,68 +251,102 @@
          :label="$t('dataManage.domainManage.domDesc')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.domDesc" autocomplete="off"></el-input>
          <el-input
            v-model="editForm.domDesc"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.domCode')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.domCode" autocomplete="off"></el-input>
          <el-input
            v-model="editForm.domCode"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.codeDesc')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.codeDesc" autocomplete="off"></el-input>
          <el-input
            v-model="editForm.codeDesc"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.bsm')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.bsm" autocomplete="off"></el-input>
          <el-input
            v-model="editForm.bsm"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.level')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.level" autocomplete="off"></el-input>
          <el-input
            v-model="editForm.level"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.orderid')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.orderid" autocomplete="off"></el-input>
          <el-input
            v-model="editForm.orderid"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item
          :label="$t('dataManage.domainManage.bak')"
          :label-width="formLabelWidth"
        >
          <el-input v-model="editForm.bak" autocomplete="off"></el-input>
          <el-input
            v-model="editForm.bak"
            autocomplete="off"
          ></el-input>
        </el-form-item>
      </el-form>
      <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer">
        <el-button @click="cancelEdit()">{{ $t('common.reset') }}</el-button>
      <div
        v-if="behavior == '修改信息'"
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          size="medium"
          size="small"
          @click="cancelEdit()"
        >{{ $t('common.reset') }}</el-button>
        <el-button
          size="small"
          class="primary"
          type="info"
          @click="sendEdit('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
          >{{ $t('common.confirm') }}</el-button
        >
        >{{ $t('common.confirm') }}</el-button>
      </div>
      <div v-else slot="footer" class="dialog-footer">
        <el-button type="info" @click="cancelAdd('editForm')">{{
      <div
        v-else
        slot="footer"
        class="dialog-footer"
      >
        <el-button
          type="info"
          size="small"
          @click="cancelAdd('editForm')"
        >{{
          $t('common.reset')
        }}</el-button>
        <el-button
          size="medium"
          size="small"
          class="primary"
          @click="sendAdd('editForm')"
          v-loading.fullscreen.lock="fullscreenLoading"
          >{{ $t('common.confirm') }}</el-button
        >
        >{{ $t('common.confirm') }}</el-button>
      </div>
    </el-dialog>
  </div>
@@ -375,6 +431,8 @@
      this.fullscreenLoading = true;
      this.listData.ns = data.ns;
      this.listData.tab = data.tab;
      this.listData.pageIndex = 1;
      this.listData.pageSize = 10;
      const res = await domain_selectDomainNames(data);
      if (res.code != 200) {
        this.$message.error('domain调用失败');
@@ -388,6 +446,7 @@
      }
      this.domainOptions = std;
      this.editForm.domName = res.result[0];
      getSingleTab(this.listData).then((res) => {
        setTimeout(() => {
          if (res.code == 200) {
@@ -429,7 +488,7 @@
    queryInfo() {
      let searchData = {
        code: this.queryForm.code,
        name: this.queryForm.code,
        ns: this.listData.ns,
        tab: this.listData.tab,
        pageIndex: this.listData.pageIndex,
@@ -452,7 +511,9 @@
      this.queryForm = {};
      this.$store.state.verCateNode = {};
      this.$bus.$emit('clearTressLabel', true);
      this.getAllTabelData();
      this.listData.pageIndex = 1;
      this.listData.pageSize = 10;
      this.queryInfo();
    },
    // 删除多条
    deleteInfo() {
@@ -509,7 +570,7 @@
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.fullscreenLoading = true;
          debugger;
          insertDomain(this.editForm)
            .then((res) => {
              setTimeout(() => {
@@ -547,7 +608,7 @@
          this.editForm = {};
          done();
        })
        .catch((_) => {});
        .catch((_) => { });
    },
    // 查看界面
    showDetail(row) {
@@ -641,7 +702,7 @@
  watch: {
    pathId: {
      immediate: true,
      handler(val) {},
      handler(val) { },
    },
  },
};
@@ -649,9 +710,9 @@
<style lang="less" scoped>
//@import url(); 引入公共css类
.domainBox {
  height: 80%;
  width: 97%;
  position: absolute;
  height: 98%;
  width: 98%;
  padding: 1%;
  .mainBox {
    width: 100%;
    height: 92%;
@@ -659,7 +720,7 @@
    justify-content: space-between;
    .leftTree {
      width: 15%;
      height: 96%;
      height: 91%;
      border: 1px solid white;
      border-radius: 5px;
      padding: 1%;
@@ -668,7 +729,7 @@
    }
    .right {
      width: 80%;
      height: 96%;
      height: 91%;
      border: 1px solid white;
      border-radius: 5px;
      padding: 1%;