管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-08 6c33f9c50792c03e55549f82c17405552ecff540
IFME主题切换效果优化,角色管理,资源管理主题切换界面优化
已添加1个文件
已修改11个文件
555 ■■■■ 文件已修改
src/assets/css/config.css 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/index.css 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/navMenu.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Archive/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/AuthorizationManagement/roleMenuAuthorization.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/PackageTwo/WareInspection.vue 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/PackageTwo/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/maintenance/userManagement.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/userManage/resourceManage.vue 169 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/userManage/roleManage.vue 228 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/config.css
@@ -2,6 +2,10 @@
    color: white;
}
.Black_theme .secondMenuDiv {
    background: rgba(48, 48, 48, 0.85);
}
.Black_theme .box_div {
    background: #303030;
}
@@ -183,6 +187,7 @@
.Black_theme .el-cascader__panel {
    background: #303030 !important;
}
.Black_theme .el-icon-close {
    color: #FFF !important;
}
@@ -190,7 +195,16 @@
.Black_theme .el-icon-plus {
    color: #FFF !important;
}
.Black_theme .el-icon-upload2 {
    color: #FFF !important;
}
.confirm {
    background: #303030;
}
.confirm p {
    color: white !important;
}
src/assets/css/index.css
@@ -215,13 +215,7 @@
    color: white;
}
.secondMenuDiv {
    position: absolute;
    z-index: 1024;
    margin-top: 10px;
    border: 1px solid gray;
    border-radius: 5px;
}
.topUser .el-link--default:hover {
    color: #409eff !important;
@@ -239,7 +233,7 @@
    position: absolute;
    z-index: 1024;
    margin-top: 15px;
background: rgba(244,248,255, 0.85);
     background: rgba(244,248,255, 0.85);
    border-radius: 5px;
}
src/components/navMenu.vue
@@ -60,13 +60,13 @@
              class="elLink"
            >{{$t("common.language")}}</el-link>
          </div>
            <!-- <div class="TextLanguage">
          <div class="TextLanguage">
            <el-link
              @click="themeChange"
              :underline="false"
              class="elLink"
            > ä¸»é¢˜åˆ‡æ¢</el-link>
          </div>    -->
          </div>
        </div>
      </div>
@@ -122,12 +122,14 @@
  },
  created() { },
  mounted() {
    this.$store.state.themeflag = false;
    $("#app").removeClass("Black_theme");
    this.getMenuTree();
  },
  computed: {},
  methods: {
    themeChange() {
          this.$store.state.themeflag = !this.$store.state.themeflag;
      this.$store.state.themeflag = !this.$store.state.themeflag;
      if (this.$store.state.themeflag == true) {
        $("#app").addClass("Black_theme");
@@ -256,7 +258,7 @@
        res[i].show = false; //控制显隐
        if (res[i].perms == null) {
          const result = await selectMenuRecursive({ id: res[i].id });
          if (result.code == 200) {
            res[i].children = result.result.filter((value) => {
              return value.pid == res[i].id;
@@ -325,6 +327,7 @@
        //语言换成zh
        this.lang = 'zh';
        this.language = true;
        this.$store.state.language = true;
        //菜单换为zh
        this.$store.commit('changeLang', 'zh');
        //i18换成zh
@@ -334,6 +337,7 @@
      else {
        this.lang = 'en';
        this.language = false;
        this.$store.state.language = false;
        this.$i18n.locale = this.lang;
        this.$store.commit('changeLang', 'en'); //传递点击的节点
      }
src/router/index.js
@@ -49,7 +49,7 @@
//包二
import WareInspection from '@/views/PackageTwo/WareInspection.vue'; //数据质检-入库质检
import QualityInspection from '@/views/PackageTwo/index.vue'; //数据质检-入库质检
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
@@ -69,7 +69,7 @@
    path: '/Thematic',
    name: 'Thematic',
    component: Thematic,
  },
  {
    path: '/',
@@ -81,6 +81,15 @@
        path: '/WareInspection',
        component: WareInspection,
        name: 'WareInspection',
        meta: {
          title: '入库质检',
          requireAuth: true, // æ ‡è¯†è¯¥è·¯ç”±æ˜¯å¦éœ€è¦ç™»å½•
        },
      },
      {
        path: '/QualityInspection',
        component: QualityInspection,
        name: 'QualityInspection',
        meta: {
          title: '入库质检',
          requireAuth: true, // æ ‡è¯†è¯¥è·¯ç”±æ˜¯å¦éœ€è¦ç™»å½•
@@ -131,7 +140,7 @@
          requireAuth: true, // æ ‡è¯†è¯¥è·¯ç”±æ˜¯å¦éœ€è¦ç™»å½•
        },
      },
      {
        path: '/Archive',
        name: 'Archive',
src/store/index.js
@@ -53,6 +53,7 @@
    reporturl: null,
    layerMnage: false,
    themeflag:false,
    language: true,
  },
  mutations: {
    //获取权限合集
src/views/Archive/index.vue
@@ -1949,7 +1949,7 @@
    height: auto;
    margin: 5px 30px;
    padding-bottom:5px ;
 border-bottom: 1px solid #dcdfe6;
    border-bottom: 1px solid #dcdfe6;
    align-items: center;
    display: flex;
    float: left;
src/views/AuthorizationManagement/roleMenuAuthorization.vue
@@ -14,6 +14,7 @@
        >
          <el-form-item label="单位">
            <el-select
            :popper-append-to-body="false"
              ref="multiSelect"
              style="width: 300px;"
              v-model="selFrom.name"
src/views/PackageTwo/WareInspection.vue
@@ -2,6 +2,7 @@
<template>
  <div class="wareBox">
    <iframe
      id="ifream"
      style="border:none"
      width="100%"
      height="100%"
@@ -15,15 +16,83 @@
export default {
  data() {
    return {
      reportUrl: ''
      reportUrl: '',
      url: '',
    }
  },
  computed: {
    Obj() {
      return this.$store.state.themeflag
    },
    lang() {
      return this.$store.state.language
    }
  },
  watch: {
    Obj(newVal, oldVal) {
      //可以对数据执行相应的操作
      this.refreash(newVal)
    },
    lang(newVal, oldVal) {
      this.langreash(newVal)
    }
  },
  methods: {
    langreash(res) {
      if (this.url == '') return
      this.reportUrl = ''
      if (res == true) {
        if (this.url.indexOf('theme=white') != -1) {
          this.url = this.url.replace('theme=white', 'theme=dark');
        }
      } else if (res == false) {
        if (this.url.indexOf('theme=dark') != -1) {
          this.url = this.url.replace('theme=dark', 'theme=white');
        }
      }
      this.reportUrl = this.url;
      this.$store.state.reporturl = this.url;
      this.$router.push('/QualityInspection')
    },
    refreash(res) {
      if (this.url == '') return
      this.reportUrl = ''
      if (res == true) {
        if (this.url.indexOf('lang=en') != -1) {
          this.url = this.url.replace('lang=en', 'lang=zh');
        }
      } else if (res == false) {
        if (this.url.indexOf('lang=zh') != -1) {
          this.url = this.url.replace('lang=zh', 'lang=en');
        }
      }
      this.reportUrl = this.url;
      this.$store.state.reporturl = this.url;
      this.$router.push('/QualityInspection')
    },
    showChangeIfream(res) {
      if (this.$store.state.themeflag == true) {
        if (res.indexOf('theme=white') != -1) {
          res = res.replace('theme=white', 'theme=dark');
        }
      } else if (this.$store.state.themeflag == false) {
        if (res.indexOf('theme=dark') != -1) {
          res = res.replace('theme=dark', 'theme=white');
        }
      }
      if (this.$store.state.language == true) {
        if (res.indexOf('lang=en') != -1) {
          res = res.replace('lang=en', 'lang=zh');
        }
      } else if (this.$store.state.language == false) {
        if (res.indexOf('lang=zh') != -1) {
          res = res.replace('lang=zh', 'lang=en');
        }
      }
      if (res.indexOf('{fmeHost}') != -1) {
        res = res.replace('{fmeHost}',fmeHost )
        res = res.replace('{fmeHost}', fmeHost)
      }
      if (res.indexOf('token=') != -1) {
@@ -32,12 +101,13 @@
      this.$store.state.reporturl = res;
      this.reportUrl = res;
      this.url = res
      // console.log("2", this.reportUrl)
    }
  },
  mounted() {
    this.showChangeIfream(this.$store.reporturl)
    // console.log("1", this.reportUrl)
    this.$bus.$on('changeNaveUrl', (res) => {
      this.showChangeIfream(res)
    });
src/views/PackageTwo/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
<template>
</template>
<script>
export default {
mounted(){
    // this.$router.push('/QualityInspection')
    this.$router.push('/WareInspection')
}
}
</script>
<style>
</style>
src/views/maintenance/userManagement.vue
@@ -939,7 +939,6 @@
    handleNodeClickto(data, node, nodeData) {
      this.queryForm.depid = data.id
      this.queryForm.depName = data.name;
    },
    //搜索按钮
@@ -955,7 +954,7 @@
          this.tableData = res.result;
          this.count = res.count;
        } else {
          console.log('查询接口报错');
          this.$notify.error({
            title: res.code,
            message: res.result,
@@ -1004,11 +1003,11 @@
              }, 500);
            })
            .catch((res) => {
              alert('修改失败,请重试!');
              this.fullscreenLoading = false;
            });
        } else {
          console.log('error submit!!');
          return false;
        }
      });
src/views/userManage/resourceManage.vue
@@ -30,7 +30,7 @@
          >{{ $t('common.empty') }}</el-button>
          <el-button
            v-if="menuStatus.insert"
            @click="InsertFormdialog = true"
            @click="setInsertFormdialog"
            icon="el-icon-edit"
            type="success"
            size="small"
@@ -144,7 +144,6 @@
      class="infoBox box_div "
      v-show="showinfoBox"
    >
      <div
        slot="header"
        class="clearfix"
@@ -296,7 +295,27 @@
          :label="$t('userManage.resManageObj.depid')"
          :label-width="formLabelWidth"
        >
          <el-input
          <el-select
            :popper-append-to-body="false"
            v-model="insertform.depValue"
            placeholder="请选择"
            style="width:92.5%"
          >
            <el-option
              :value="insertform.depid"
              :label="insertform.depValue"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="depList"
                node-key="id"
                :props="props"
                @node-click="handleDepList"
              />
            </el-option>
          </el-select>
          <!-- <el-input
            v-model="insertform.depValue"
            disabled
            autocomplete="off"
@@ -305,22 +324,33 @@
            :underline="false"
            @click="showDepTree(0)"
            style="margin-left: 10px"
          ><i class="el-icon-plus"></i></el-link>
          ><i class="el-icon-plus"></i></el-link> -->
        </el-form-item>
        <el-form-item
          :label="$t('userManage.resManageObj.dirid')"
          :label-width="formLabelWidth"
        >
          <el-input
          <el-select
            :popper-append-to-body="false"
            v-model="insertform.dirValue"
            disabled
            autocomplete="off"
          ></el-input>
          <el-link
            :underline="false"
            @click="showDirTree(0)"
            style="margin-left: 10px"
          ><i class="el-icon-plus"></i></el-link>
            placeholder="请选择"
            style="width:92.5%"
          >
            <el-option
              :value="insertform.dirid"
              :label="insertform.dirValue"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="dirList"
                node-key="id"
                :props="props"
                @node-click="handleDirList"
              />
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item
          :label="$t('userManage.resManageObj.descr')"
@@ -430,7 +460,27 @@
          :label="$t('userManage.resManageObj.depid')"
          :label-width="formLabelWidth"
        >
          <el-input
          <el-select
            :popper-append-to-body="false"
            v-model="upform.depValue"
            placeholder="请选择"
            style="width:92.5%"
          >
            <el-option
              :value="upform.depid"
              :label="upform.depValue"
              style=" height:auto"
            >
              <el-tree
                ref="tree1"
                :data="dirList"
                node-key="id"
                :props="props"
                @node-click="handleEditDepList"
              />
            </el-option>
          </el-select>
          <!-- <el-input
            v-model="upform.depValue"
            disabled
            autocomplete="off"
@@ -439,13 +489,34 @@
            :underline="false"
            @click="showDepTree(1)"
            style="margin-left: 10px"
          ><i class="el-icon-plus"></i></el-link>
          ><i class="el-icon-plus"></i></el-link> -->
        </el-form-item>
        <el-form-item
          :label="$t('userManage.resManageObj.dirid')"
          :label-width="formLabelWidth"
        >
          <el-input
          <el-select
            :popper-append-to-body="false"
            v-model="upform.dirValue"
            placeholder="请选择"
            style="width:92.5%"
          >
            <el-option
              :value="upform.dirid"
              :label="upform.dirValue"
              style=" height:auto"
            >
              <el-tree
                ref="tree1"
                :data="dirList"
                node-key="id"
                :props="props"
                :default-expand-all="defaultExpand"
                @node-click="handleEditDirList"
              />
            </el-option>
          </el-select>
          <!-- <el-input
            v-model="upform.dirValue"
            disabled
            autocomplete="off"
@@ -454,7 +525,7 @@
            :underline="false"
            @click="showDirTree(1)"
            style="margin-left: 10px"
          ><i class="el-icon-plus"></i></el-link>
          ><i class="el-icon-plus"></i></el-link> -->
        </el-form-item>
        <el-form-item
          :label="$t('userManage.resManageObj.descr')"
@@ -587,6 +658,8 @@
  updateRes,
  deleteRess,
  upload_res,
  selectdirTab,
  selectdepTab,
} from '../../api/api.js';
import styleDirTree from '../datamanage/styleDirTree.vue';
import styleDepTree from '../datamanage/styleDepTree.vue';
@@ -594,6 +667,15 @@
  components: { MyBread, styleDirTree, styleDepTree },
  data() {
    return {
      props: {
        label: 'name',
        value: 'id',
        children: 'children',
        checkStrictly: true,
        emitPath: false,
      },
      depList: [],
      dirList: [],
      menuStatus: {
        delete: false,
        insert: false,
@@ -616,6 +698,8 @@
      uploadFile: null,
      insertform: {
        img: '',
        depValue: '',
        dirValue: ''
      },
      tableData: [],
      itemdetail: {},
@@ -645,6 +729,53 @@
    this.getRoleTabelData();
  },
  methods: {
    handleEditDepList(data, node, nodeData) {
      this.upform.depid = data.id
      this.upform.depValue = data.name;
    },
    handleEditDirList(data, node, nodeData) {
      this.upform.dirid = data.id
      this.upform.dirValue = data.name;
    },
    handleDepList(data, node, nodeData) {
      this.insertform.depid = data.id
      this.insertform.depValue = data.name;
    },
    handleDirList(data, node, nodeData) {
      this.insertform.dirid = data.id
      this.insertform.dirValue = data.name;
    },
    treeData(source) {
      let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ•°æ®æ·±åº¦å…‹éš†
      return cloneData.filter((father) => {
        // å¾ªçŽ¯æ‰€æœ‰é¡¹
        let branchArr = cloneData.filter((child) => father.id == child.pid); // å¯¹æ¯”ID,分别上下级菜单,并返回数据
        branchArr.length > 0 ? (father.children = branchArr) : ''; // ç»™çˆ¶çº§æ·»åŠ ä¸€ä¸ªchildren属性,并赋值
        // å±žäºŽåŒä¸€å¯¹è±¡é—®é¢˜ï¼Œä¾‹å¦‚:令 a=b、c=1 ï¼Œç„¶åŽå†ä»¤ b.c=c ï¼Œ é‚£ä¹ˆ a.c=b.c=c=1 ï¼›åŒç†ï¼ŒåŽç»­ä»¤ c.d=2 ,那么 a.c.d ä¹Ÿæ˜¯=2;
        // ç”±æ­¤å¾ªçŽ¯å¤šæ¬¡åŽï¼Œå°±èƒ½å½¢æˆç›¸åº”çš„æ ‘å½¢æ•°æ®ç»“æž„
        return father.pid == 0; // è¿”回一级菜单
      });
    },
    async getDepList() {
      const data = await selectdepTab();
      if (data.code != 200) {
        return this.$message.error('单位列表调用失败');
      }
      this.depList = this.treeData(data.result)
    },
    async getDirList() {
      const data = await selectdirTab();
      if (data.code != 200) {
        return this.$message.error('目录列表调用失败');
      }
      this.dirList = this.treeData(data.result)
    },
    setInsertFormdialog() {
      this.getDepList();
      this.getDirList();
      this.InsertFormdialog = true;
    },
    showPermsMenu(res) {
      switch (res.tag) {
        case '/delete':
@@ -808,6 +939,8 @@
      console.log(this.itemdetail.imageFile)
    },
    handleEdit(index, row) {
      this.getDepList();
      this.getDirList();
      this.EditFormdialog = true;
      this.upform = row;
      this.upform.depValue = row.depName;
@@ -931,9 +1064,7 @@
      margin: 10px auto 0;
      // background-color: red;
    }
  }
}
</style>
 
src/views/userManage/roleManage.vue
@@ -21,25 +21,45 @@
          :label="$t('userManage.RM.ownedSystem')"
          prop="ownedSystem"
        >
          <el-input
        <el-select
            :popper-append-to-body="false"
            v-model="roleForm.depValue"
            placeholder="请选择"
            style="width:93%"
          >
            <el-option
              :value="roleForm.depid"
              :label="roleForm.depValue"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="depList"
                node-key="id"
                :props="props"
                @node-click="handleRouleDepList"
              />
            </el-option>
          </el-select>
          <!-- <el-input
            v-model="roleForm.value"
            :disabled="true"
            :placeholder="$t('common.pleaseInput')"
          />
          /> -->
        </el-form-item>
        <el-form-item>
        <!-- <el-form-item>
          <el-button
            size="small"
            type="primary"
            @click="showDepTree(1)"
          >{{ $t('common.choose') }}</el-button>
        </el-form-item>
        </el-form-item> -->
        <el-form-item>
          <el-button
            type="success"
            size="small"
            @click="InsertFormdialog = true"
            @click="setInsertFormdialog "
            v-if="menuStatus.insert"
          ><i class="el-icon-circle-plus-outline"></i> &nbsp;{{
              $t('userManage.RM.add')
@@ -191,7 +211,7 @@
    <el-dialog
      :title="$t('userManage.RM.insertRole')"
      top="15vh"
      width="80vh"
      width="50vh"
      style="overflow: hidden"
      :visible.sync="InsertFormdialog"
    >
@@ -211,7 +231,27 @@
          :prop="insertform.depValue"
          :rules="[{ required: true, message: '不能为空' }]"
        >
          <el-input
          <el-select
            :popper-append-to-body="false"
            v-model="insertform.depValue"
            placeholder="请选择"
            style="width:93%"
          >
            <el-option
              :value="insertform.depid"
              :label="insertform.depValue"
              style=" height:auto"
            >
              <el-tree
                ref="tree"
                :data="depList"
                node-key="id"
                :props="props"
                @node-click="handleDepList"
              />
            </el-option>
          </el-select>
          <!-- <el-input
            v-model="insertform.depValue"
            :disabled="true"
            :placeholder="$t('common.pleaseInput')"
@@ -221,7 +261,7 @@
            type="primary"
            style="margin-left:10px"
            @click="showDepTree(2)"
          >{{ $t('common.choose') }}</el-button>
          >{{ $t('common.choose') }}</el-button> -->
        </el-form-item>
        <el-form-item
          :label="$t('userManage.RM.describe')"
@@ -377,70 +417,71 @@
      class="infoBox box_div subpage_Div"
      v-show="showinfoBox"
    >
      <el-card>
      <div
        slot="header"
        class="clearfix"
      >
        <span>{{ $t('dataManage.styleObj.deInformation') }}</span>
        <div
          slot="header"
          class="clearfix"
          style="float: right; cursor: pointer"
          @click="closeDetial"
        >
          <span>{{ $t('dataManage.styleObj.deInformation') }}</span>
          <div
            style="float: right; cursor: pointer"
            @click="closeDetial"
          >
            <i class="el-icon-close"></i>
          </div>
          <i class="el-icon-close"></i>
        </div>
        <div class="contentBox">
          <p>
            <label> {{ $t('userManage.RM.roleName') }}:</label>
            <label class="boxlabel">{{ itemdetail.name }}</label>
          </p>
          <el-divider></el-divider>
      </div>
      <el-divider></el-divider>
      <div class="contentBox">
        <p>
          <label> {{ $t('userManage.RM.roleName') }}:</label>
          <label class="boxlabel">{{ itemdetail.name }}</label>
        </p>
        <el-divider></el-divider>
          <p>
            <label> {{ $t('userManage.RM.ownedSystem') }}:</label>
            <label class="boxlabel">{{ itemdetail.depName }}</label>
          </p>
          <el-divider></el-divider>
        <p>
          <label> {{ $t('userManage.RM.ownedSystem') }}:</label>
          <label class="boxlabel">{{ itemdetail.depName }}</label>
        </p>
        <el-divider></el-divider>
          <p>
            <label> {{ $t('userManage.RM.isAdmin') }}:</label>
            <label class="boxlabel">{{ itemdetail.admin }}</label>
          </p>
          <el-divider></el-divider>
          <p>
            <label> {{ $t('userManage.RM.describe') }}:</label>
            <label class="boxlabel">{{ itemdetail.descr }}</label>
          </p>
          <el-divider></el-divider>
          <p>
            <label> {{ $t('userManage.RM.creationuser') }}:</label>
            <label class="boxlabel">{{ itemdetail.createUser }}</label>
          </p>
          <el-divider></el-divider>
          <p>
            <label> {{ $t('userManage.RM.creationtime') }}:</label>
            <label class="boxlabel">{{ itemdetail.createTime }}</label>
          </p>
          <el-divider></el-divider>
          <p>
            <label> {{ $t('userManage.RM.updateonuser') }}:</label>
            <label class="boxlabel">{{ itemdetail.UpdateUser }}</label>
          </p>
          <el-divider></el-divider>
        <p>
          <label> {{ $t('userManage.RM.isAdmin') }}:</label>
          <label class="boxlabel">{{ itemdetail.admin }}</label>
        </p>
        <el-divider></el-divider>
        <p>
          <label> {{ $t('userManage.RM.describe') }}:</label>
          <label class="boxlabel">{{ itemdetail.descr }}</label>
        </p>
        <el-divider></el-divider>
        <p>
          <label> {{ $t('userManage.RM.creationuser') }}:</label>
          <label class="boxlabel">{{ itemdetail.createUser }}</label>
        </p>
        <el-divider></el-divider>
        <p>
          <label> {{ $t('userManage.RM.creationtime') }}:</label>
          <label class="boxlabel">{{ itemdetail.createTime }}</label>
        </p>
        <el-divider></el-divider>
        <p>
          <label> {{ $t('userManage.RM.updateonuser') }}:</label>
          <label class="boxlabel">{{ itemdetail.UpdateUser }}</label>
        </p>
        <el-divider></el-divider>
          <p>
            <label> {{ $t('userManage.RM.updateontime') }}:</label>
            <label class="boxlabel">{{ itemdetail.updateTime }}</label>
          </p>
          <el-divider></el-divider>
          <p>
            <label> {{ $t('userManage.RM.remarks') }}:</label>
            <label class="boxlabel">{{ itemdetail.bak }}</label>
          </p>
          <el-divider></el-divider>
        </div>
      </el-card>
        <p>
          <label> {{ $t('userManage.RM.updateontime') }}:</label>
          <label class="boxlabel">{{ itemdetail.updateTime }}</label>
        </p>
        <el-divider></el-divider>
        <p>
          <label> {{ $t('userManage.RM.remarks') }}:</label>
          <label class="boxlabel">{{ itemdetail.bak }}</label>
        </p>
        <el-divider></el-divider>
      </div>
    </div>
  </div>
</template>
@@ -456,6 +497,7 @@
  deleteRoles,
  selectDep,
  updateRole,
} from '../../api/api';
export default {
  //import引入的组件需要注入到对象中才能使用
@@ -465,18 +507,32 @@
  },
  data() {
    return {
      props: {
        label: 'name',
        value: 'id',
        children: 'children',
        checkStrictly: true,
        emitPath: false,
      },
      depList: [],
      showinfoBox: false,
      showCata: false,
      formLabelWidth: '120px',
      InsertFormdialog: false,
      UpdateFormdialog: false,
      roleForm: {},
      roleForm: {
        depid:'',
        depValue:'',
      },
      cataName: '',
      depValue: '',
      elTreeFlag: 0,
      path_id: '',
      tableData: [],
      insertform: {},
      insertform: {
        depValue: '',
        depid: ''
      },
      updateform: {},
      count: 0,
      selData: [],
@@ -497,6 +553,36 @@
    };
  },
  methods: {
    handleRouleDepList(data, node, nodeData){
    this.roleForm.depid = data.id
      this.roleForm.depValue = data.name;
    },
    handleDepList(data, node, nodeData) {
      this.insertform.depid = data.id
      this.insertform.depValue = data.name;
    },
    setInsertFormdialog() {
      this.InsertFormdialog = true;
    },
    treeData(source) {
      let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ•°æ®æ·±åº¦å…‹éš†
      return cloneData.filter((father) => {
        // å¾ªçŽ¯æ‰€æœ‰é¡¹
        let branchArr = cloneData.filter((child) => father.id == child.pid); // å¯¹æ¯”ID,分别上下级菜单,并返回数据
        branchArr.length > 0 ? (father.children = branchArr) : ''; // ç»™çˆ¶çº§æ·»åŠ ä¸€ä¸ªchildren属性,并赋值
        // å±žäºŽåŒä¸€å¯¹è±¡é—®é¢˜ï¼Œä¾‹å¦‚:令 a=b、c=1 ï¼Œç„¶åŽå†ä»¤ b.c=c ï¼Œ é‚£ä¹ˆ a.c=b.c=c=1 ï¼›åŒç†ï¼ŒåŽç»­ä»¤ c.d=2 ,那么 a.c.d ä¹Ÿæ˜¯=2;
        // ç”±æ­¤å¾ªçŽ¯å¤šæ¬¡åŽï¼Œå°±èƒ½å½¢æˆç›¸åº”çš„æ ‘å½¢æ•°æ®ç»“æž„
        return father.pid == 0; // è¿”回一级菜单
      });
    },
    async getDepList() {
      const data = await selectdepTab();
      if (data.code != 200) {
        return this.$message.error('单位列表调用失败');
      }
      this.depList = this.treeData(data.result)
    },
    closeDetial() {
      this.showinfoBox = false;
      this.itemdetail = {};
@@ -563,7 +649,7 @@
        delete this.listData.tab;
      }
      this.listData.name = this.roleForm.username;
      this.listData.depName = this.roleForm.value;
      this.listData.depid = this.roleForm.depid;
      const data = await select_Role_ByPageAndCount(this.listData);
      if (data.code != 200) {
        this.$message.error('列表调用失败');
@@ -711,7 +797,7 @@
      }
    }
    this.getRoleTabelData();
    this.getSelectDepTab();
    this.getDepList();
  },
};
</script>
@@ -745,7 +831,7 @@
  }
  .inquire {
    height: auto;
    overflow: auto;
    padding: 10px;
    margin-top: 10px;
    margin-top: 10px;