Parcourir la source

主体环境修改

ljr-395181403 il y a 1 an
Parent
commit
bf26dbec2b

+ 26 - 28
config/btn-icon-config.js

@@ -1,32 +1,30 @@
 /** 页面按钮图标配置 */
 const btnAttr = [
-    ['修改', 'el-icon-edit'],
-    ['详情', 'el-icon-document'],
-    ['删除', 'el-icon-delete'],
-    ['功能配置', 'el-icon-menu'],
-    ['导入', 'el-icon-upload2'],
-    ['新增', 'el-icon-circle-plus-outline'],
-    ['同步,同步数据资源', 'el-icon-refresh'],
-    ['权限变更申请', 'el-icon-circle-plus-outline'],
-    ['批量添加', 'el-icon-circle-plus-outline'],
-    ['批量设置名单级别', 'el-icon-setting'],
-    ['查询', 'el-icon-search'],
-    ['重置', 'el-icon-refresh-right'],
-    ['撤回', 'icon icon-return2'],
-    ['用户信息', 'el-icon-document'],
-    ['管理范围', 'el-icon-edit'],
-    ['资源获取', 'el-icon-refresh'],
-    ['资源同步', 'el-icon-refresh'],
-    ['查看列权限清单', 'el-icon-document'],
-    ['批量删除', 'el-icon-delete'],
-    ['分局应用授权情况', 'el-icon-document'],
-    ['权限配置', 'el-icon-setting'],
-    ['配置', 'el-icon-setting'],
-    ['保存', 'el-icon-receiving'],
-    ['添加属性值', 'el-icon-circle-plus-outline']
+    ["修改", "el-icon-edit"],
+    ["详情", "el-icon-document"],
+    ["删除", "el-icon-delete"],
+    ["功能配置", "el-icon-menu"],
+    ["导入", "el-icon-upload2"],
+    ["新增", "el-icon-circle-plus-outline"],
+    ["同步,同步数据资源", "el-icon-refresh"],
+    ["权限变更申请", "el-icon-circle-plus-outline"],
+    ["批量添加", "el-icon-circle-plus-outline"],
+    ["批量设置名单级别", "el-icon-setting"],
+    ["查询", "el-icon-search"],
+    ["重置", "el-icon-refresh-right"],
+    ["撤回", "icon icon-return2"],
+    ["用户信息", "el-icon-document"],
+    ["管理范围", "el-icon-edit"],
+    ["资源获取", "el-icon-refresh"],
+    ["资源同步", "el-icon-refresh"],
+    ["查看列权限清单", "el-icon-document"],
+    ["批量删除", "el-icon-delete"],
+    ["分局应用授权情况", "el-icon-document"],
+    ["权限配置", "el-icon-setting"],
+    ["配置", "el-icon-setting"],
+    ["保存", "el-icon-receiving"],
+    ["添加属性值", "el-icon-circle-plus-outline"],
+    ["关联用户, 添加用户, 添加人员", "el-icon-user-solid"]
 ]
-let iconMap = new Map(btnAttr);
+let iconMap = new Map(btnAttr)
 export default iconMap
-
-
-

+ 38 - 37
config/dev.env.js

@@ -1,43 +1,44 @@
-'use strict';
-const merge = require('webpack-merge');
-const prodEnv = require('./prod.env');
+"use strict"
+const merge = require("webpack-merge")
+const prodEnv = require("./prod.env")
 module.exports = merge(prodEnv, {
-  NODE_ENV: '"development"',
-  IS_BASE_PACKAGE: 'true',
-  FILE_BASE_PATH: '"http://192.168.10.14:1665"',
-  //以上配置一般不需要修改
+    NODE_ENV: '"development"',
+    IS_BASE_PACKAGE: "true",
+    FILE_BASE_PATH: '"http://192.168.10.14:1665"',
+    //以上配置一般不需要修改
 
-  //使用easymock时,请将BASE_API设置为'"/easy-mock"'
-  // BASE_API: '"/easy-mock"',
-  BASE_API: '"/dcucauth"',
-  QQQ: '"/easy-mock2"',
+    //使用easymock时,请将BASE_API设置为'"/easy-mock"'
+    // BASE_API: '"/easy-mock"',
+    BASE_API: '"/dcucauth"',
+    QQQ: '"/easy-mock2"',
 
-  //是否需要登录验证
-  NEED_LOGIN: 'false',
+    //是否需要登录验证
+    NEED_LOGIN: "false",
 
-  //需要依赖的系统名称
-  // INSTALLED_PROJECT: "'zfba,demo2,cross-env'",
+    //需要依赖的系统名称
+    // INSTALLED_PROJECT: "'zfba,demo2,cross-env'",
 
-  //当使用Oauth2方式登录时需要配置CLIENT_ID和CLIENT_SECRET
-  IS_OAUTH2: 'false',
-  // CLIENT_ID: '"apigw91419331"',
-  // CLIENT_SECRET: '"apigw94003010"',
-  // APP_CODE: '"apigw10000003"',
-  //LOGIN_PAGE:'"bjscLogin.jsp"',//是否自定义登录页
+    //当使用Oauth2方式登录时需要配置CLIENT_ID和CLIENT_SECRET
+    IS_OAUTH2: "false",
+    // CLIENT_ID: '"apigw91419331"',
+    // CLIENT_SECRET: '"apigw94003010"',
+    // APP_CODE: '"apigw10000003"',
+    //LOGIN_PAGE:'"bjscLogin.jsp"',//是否自定义登录页
 
-  // 布局结构配置,可选项包含 `layout-menu-top`, `layout`
-  LAYOUT: '"layout"',
-  PORT: '8871',
-  //是否启用本地mock
-  IS_MOCK: 'false',
-  PROXY_TABLE: JSON.stringify({
-    '/dcucauth': {
-      target: 'http://10.11.1.237:8861' // 马志强
-      // target: "http://10.254.11.203:8861"
-      //  target: "http://192.168.10.2:8871"
-      //  target: "http://192.168.6.133:3471"
-      // target: 'http://192.168.6.131:3561'
-      // target: "http://10.201.1.50:8871"
-    }
-  })
-});
+    // 布局结构配置,可选项包含 `layout-menu-top`, `layout`
+    LAYOUT: '"layout"',
+    PORT: "8871",
+    //是否启用本地mock
+    IS_MOCK: "false",
+    PROXY_TABLE: JSON.stringify({
+        "/dcucauth": {
+            // target: 'http://10.11.1.237:8861' // 马志强
+            target: "http://10.11.0.240:8861" // 陈炳煌
+            // target: "http://10.254.11.203:8861"
+            //  target: "http://192.168.10.2:8871"
+            //  target: "http://192.168.6.133:3471"
+            // target: 'http://192.168.6.131:3561'
+            // target: "http://10.201.1.50:8871"
+        }
+    })
+})

+ 40 - 26
src/api/environment-manage.js

@@ -4,34 +4,48 @@
  @Date:20221-08-25
  */
 
- import request from '@/utils/request';
- const baseUrl = '/envElement';
- 
+import request from "@/utils/request"
+const baseUrl = "/envElement"
+
 export const tableUrl = `${baseUrl}/search`
- 
- // 新增
- export function saveEnvElement(data) {
-   return request({
-     url: `${baseUrl}/save`,
-     method: 'POST',
-     data
-   });
- }
-
- // 更新
- export function updateEnvElement(data) {
+
+// 新增
+export function saveEnvElement(data) {
+    return request({
+        url: `${baseUrl}/save`,
+        method: "POST",
+        data
+    })
+}
+
+// 更新
+export function updateEnvElement(data) {
     return request({
-      url: `${baseUrl}/update`,
-      method: 'POST',
-      data
-    });
-  }
-  // 删除
-  export function deleteEnvElement(id) {
+        url: `${baseUrl}/update`,
+        method: "POST",
+        data
+    })
+}
+// 删除
+export function deleteEnvElement(id) {
     return request({
-      url: `${baseUrl}/deleteById/${id}`,
-      method: 'DELETE',
-    });
-  }
+        url: `${baseUrl}/deleteById/${id}`,
+        method: "DELETE"
+    })
+}
+
+// 已关联用户列表
+export const relUserTableUrl = `${baseUrl}/userRelPage`
+
+// 未关联用户列表
+export const notRelUserTableUrl = `${baseUrl}/notInUserRelPage`
 
+// 关联关系添加
+export function batchSetUser(data) {
+    return request.post(`${baseUrl}/userRelSave`, data)
+}
 
+// 删除用户关联关系
+export function deleteUserRel(id) {
+    return request.delete(`${baseUrl}/deleteUserRel/${id}`)
+}

+ 255 - 260
src/components/new-table/index.vue

@@ -4,280 +4,275 @@
 @Date: 2021-07-07 17:11
 -->
 <template>
-  <div>
-    <!-- 列表 -->
-    <dg-table
-      border
-      ref="baseTable"
-      :url="tableUrl"
-      :condition="condition"
-      :data="data"
-      highlight-current-row
-      :row-key="rowKey"
-      :lazyLoad="lazyLoad"
-      :load="load"
-      :before-quest="handleBeforeQuest"
-      :before-search="handleBeforeSearch"
-      @selection-change="handleSelectionChange"
-      @select="handleSelect"
-      @select-all="handleCheckAll"
-      @row-click="handleRowClick"
-      v-bind="$attrs"
-      v-on="$listeners"
-    >
-      <dg-table-column v-if="selection" type="selection" reserve-selection width="55" align="center" />
-      <dg-table-column type="index" label="序号" width="75" align="center" />
-      <template v-for="item in tableHeader" >
-        <dg-table-column :key="item[rowKey]" v-bind="item" align="center">
-          <template slot-scope="{ row }">
-            <span v-if="item.dateFormat">{{ row[item.prop] | dateFormatter(item.dateFormat) }}</span>
-            <slot v-if="item.custom" v-bind:row="row" :name="item.prop"></slot>
-          </template>
-        </dg-table-column>
-      </template>
-      <slot></slot>
-      <!--操作栏-->
-      <dg-table-column label="操作" align="center" v-if="tableOptList.length" :width="optColumnWidth">
-        <template slot-scope="{ row }">
-          <div class="u-table__operation">
-            <el-tooltip
-              v-for="(item, index) in tableOptList"
-              :key="index"
-              :content="item"
-              effect="dark"
-              placement="top-end"
-            >
-              <i :class="item | optIcon" @click="handleEvent(item, row)"></i>
-            </el-tooltip>
-          </div>
-        </template>
-      </dg-table-column>
-    </dg-table>
-  </div>
+    <div>
+        <!-- 列表 -->
+        <dg-table
+            border
+            ref="baseTable"
+            :url="tableUrl"
+            :condition="condition"
+            :data="data"
+            highlight-current-row
+            :row-key="rowKey"
+            :lazyLoad="lazyLoad"
+            :load="load"
+            :before-quest="handleBeforeQuest"
+            :before-search="handleBeforeSearch"
+            @selection-change="handleSelectionChange"
+            @select="handleSelect"
+            @select-all="handleCheckAll"
+            @row-click="handleRowClick"
+            v-bind="$attrs"
+            v-on="$listeners"
+        >
+            <dg-table-column v-if="selection" type="selection" reserve-selection width="55" align="center" />
+            <dg-table-column type="index" label="序号" width="75" align="center" />
+            <template v-for="item in tableHeader">
+                <dg-table-column :key="item[rowKey]" v-bind="item" align="center">
+                    <template slot-scope="{ row }">
+                        <span v-if="item.dateFormat">{{ row[item.prop] | dateFormatter(item.dateFormat) }}</span>
+                        <slot v-if="item.custom" v-bind:row="row" :name="item.prop"></slot>
+                    </template>
+                </dg-table-column>
+            </template>
+            <slot></slot>
+            <!--操作栏-->
+            <dg-table-column label="操作" align="center" v-if="tableOptList.length" :width="optColumnWidth">
+                <template slot-scope="{ row }">
+                    <div class="u-table__operation">
+                        <el-tooltip
+                            v-for="(item, index) in tableOptList"
+                            :key="index"
+                            :content="item"
+                            effect="dark"
+                            placement="top-end"
+                        >
+                            <i :class="item | optIcon" @click="handleEvent(item, row)"></i>
+                        </el-tooltip>
+                    </div>
+                </template>
+            </dg-table-column>
+        </dg-table>
+    </div>
 </template>
 
 <script>
-import _ from 'lodash';
-import DgTable from '@srcPath/components/jz-base/table';
+import _ from "lodash"
+import DgTable from "@srcPath/components/jz-base/table"
 
 export default {
-  mixins: [DgTable],
-  props: {
-    tableUrl: String,
-    tableHeader: Array,
-    condition: {
-      type: Object,
-      default: () => {}
+    mixins: [DgTable],
+    props: {
+        tableUrl: String,
+        tableHeader: Array,
+        condition: {
+            type: Object,
+            default: () => {}
+        },
+        lazyLoad: {
+            type: Boolean,
+            default: false
+        },
+        load: {
+            type: Function,
+            default: conditions => conditions
+        },
+        rowKey: {
+            type: String,
+            default: "id"
+        },
+        selection: {
+            type: Boolean,
+            default: false
+        },
+        // 列表操作
+        tableOptList: {
+            type: Array,
+            default: () => []
+        },
+        // 操作列宽度
+        optColumnWidth: {
+            type: [String, Number],
+            default: "120"
+        },
+        // 默认选中的数据
+        defaultSelectRows: {
+            type: Array,
+            default: () => []
+        },
+        // 设置合并行根据的key
+        rowSpanKey: String
     },
-    lazyLoad: {
-      type: Boolean,
-      default: false
-    },
-    load: {
-      type: Function,
-      default: (conditions) => conditions
-    },
-    rowKey: {
-      type: String,
-      default: 'id'
-    },
-    selection: {
-      type: Boolean,
-      default: false
-    },
-    // 列表操作
-    tableOptList: {
-      type: Array,
-      default: () => []
-    },
-    // 操作列宽度
-    optColumnWidth: {
-      type: [String, Number],
-      default: '120'
-    },
-    // 默认选中的数据
-    defaultSelectRows: {
-      type: Array,
-      default: () => []
-    },
-    // 设置合并行根据的key
-    rowSpanKey: String
-  },
-  components: {},
-  data() {
-    return {
-      newChooseArr: []
-    };
-  },
-  computed: {
-      
-  },
-  watch: {
-     defaultSelectRows: {
-       immediate: true,
-       deep: true,
-       handler(val) {
-         this.newChooseArr = this.$lodash.cloneDeep(val);
-       }
-     }
-  },
-  methods: {
-    /**
-     * 查询
-     */
-    handleSearch() {
-      this.$refs.baseTable.searchForm();
-    },
-    /**
-     * 清除复选框选中的数据
-     */
-    handleClearSelection() {
-      this.$refs.baseTable.clearAll();
-      // this.newChooseArr = [];
-    },
-    toggleRowSelection(row, selected) {
-      this.$refs.baseTable.toggleRowSelection(row, selected);
-    },
-    handleSelectionChange(data) {
-      this.$emit('handleSelectionChange', data);
+    components: {},
+    data() {
+        return {
+            newChooseArr: []
+        }
     },
-    //  getReqSearchCondition() {
-    //   return this.$refs.baseTable.getReqSearchCondition();
-    // },
-
-    handleBeforeSearch(conditions) {
-      let searchConditionObj = JSON.parse(conditions.searchCondition);
-      let result = [];
-      for (let i = 0; i < searchConditionObj.length; i++) {
-        const { op, value } = searchConditionObj[i];
-        if (op == 'between' && value[0]) {
-          result.push({ ...searchConditionObj[i], op: '>=', value: value[0] });
-          result.push({ ...searchConditionObj[i], op: '<=', value: value[1] });
-        } else {
-          result.push(searchConditionObj[i]);
+    computed: {},
+    watch: {
+        defaultSelectRows: {
+            immediate: true,
+            deep: true,
+            handler(val) {
+                this.newChooseArr = this.$lodash.cloneDeep(val)
+            }
         }
-      }
-      conditions.searchCondition = JSON.stringify(result);
-      conditions.sort = JSON.stringify(this.sortProps);
-      return conditions;
     },
+    methods: {
+        /**
+         * 查询
+         */
+        handleSearch() {
+            this.$refs.baseTable.searchForm()
+        },
+        /**
+         * 清除复选框选中的数据
+         */
+        handleClearSelection() {
+            this.$refs.baseTable.clearAll()
+            // this.newChooseArr = [];
+        },
+        toggleRowSelection(row, selected) {
+            this.$refs.baseTable.toggleRowSelection(row, selected)
+        },
+        handleSelectionChange(data) {
+            this.$emit("handleSelectionChange", data)
+        },
+        //  getReqSearchCondition() {
+        //   return this.$refs.baseTable.getReqSearchCondition();
+        // },
 
-    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
-      if (columnIndex === 0) {
-        return {
-          rowspan: row.rowspan,
-          colspan: 1
-        };
-      }
-    },
+        handleBeforeSearch(conditions) {
+            let searchConditionObj = JSON.parse(conditions.searchCondition)
+            let result = []
+            for (let i = 0; i < searchConditionObj.length; i++) {
+                const { op, value } = searchConditionObj[i]
+                if (op == "between" && value[0]) {
+                    result.push({ ...searchConditionObj[i], op: ">=", value: value[0] })
+                    result.push({ ...searchConditionObj[i], op: "<=", value: value[1] })
+                } else {
+                    result.push(searchConditionObj[i])
+                }
+            }
+            conditions.searchCondition = JSON.stringify(result)
+            conditions.sort = JSON.stringify(this.sortProps)
+            return conditions
+        },
 
-    setRowSpans(tableData) {
-      // 先给所有的数据都加一个v.rowspan = 1
-      tableData.forEach((v) => {
-        v.rowspan = 1;
-      });
-      // 双层循环
-      for (let i = 0; i < tableData.length; i++) {
-        // 内层循环,上面已经给所有的行都加了v.rowspan = 1
-        // 这里进行判断
-        // 如果当前行的id和下一行的id相等
-        // 就把当前v.rowspan + 1
-        // 下一行的v.rowspan - 1
-        for (let j = i + 1; j < tableData.length; j++) {
-          //此处可根据相同字段进行合并,此处是根据的id
-          if (tableData[i][this.rowSpanKey] === tableData[i][this.rowSpanKey]) {
-            tableData[i].rowspan++;
-            tableData[j].rowspan--;
-          }
-        }
-        // 这里跳过已经重复的数据
-        i = i + tableData[i].rowspan - 1;
-      }
-      return tableData;
-    },
+        objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+            if (columnIndex === 0) {
+                return {
+                    rowspan: row.rowspan,
+                    colspan: 1
+                }
+            }
+        },
 
-    /**
-     * 进入页面默认选中设置
-     */
-    handleBeforeQuest(res) {
-      const { content, totalElements } = res.data;
-      this.currentPageContent = content;
-      if (this.newChooseArr.length > 0) {
-        let rowKeys = [];
-        for (let j = 0; j < content.length; j++) {
-          const cItem = content[j];
-          const index = this.newChooseArr.findIndex((item) => (item[this.rowKey] || item) == cItem[this.rowKey]);
-          if (index > -1) {
-            rowKeys.push(this.newChooseArr[index][this.rowKey] || this.newChooseArr[index]);
-          }
-        }
-        setTimeout(() => {
-          this.$refs.baseTable.setCheck(rowKeys);
-        }, 500);
-      }
+        setRowSpans(tableData) {
+            // 先给所有的数据都加一个v.rowspan = 1
+            tableData.forEach(v => {
+                v.rowspan = 1
+            })
+            // 双层循环
+            for (let i = 0; i < tableData.length; i++) {
+                // 内层循环,上面已经给所有的行都加了v.rowspan = 1
+                // 这里进行判断
+                // 如果当前行的id和下一行的id相等
+                // 就把当前v.rowspan + 1
+                // 下一行的v.rowspan - 1
+                for (let j = i + 1; j < tableData.length; j++) {
+                    // 此处可根据相同字段进行合并,此处是根据的id
+                    if (tableData[i][this.rowSpanKey] === tableData[i][this.rowSpanKey]) {
+                        tableData[i].rowspan++
+                        tableData[j].rowspan--
+                    }
+                }
+                // 这里跳过已经重复的数据
+                i = i + tableData[i].rowspan - 1
+            }
+            return tableData
+        },
 
-      const result = {
-        data: {
-          content: this.rowSpanKey ? this.setRowSpans(content) : content,
-          totalElements
-        }
-      };
-      return result;
-    },
-    /**
-     * 选中某条数据
-     */
-    handleSelect(selection, row) {
-      let copyAttr = _.cloneDeep(this.newChooseArr);
-      const index = this.newChooseArr.findIndex((item) => (item[this.rowKey] || item) == row[this.rowKey]);
-      if (index > -1) {
-        copyAttr.splice(index, 1);
-      } else {
-        copyAttr.push(row);
-      }
-      this.newChooseArr = copyAttr;
-      console.log(this.newChooseArr);
-    },
-    /**
-     * 选中/取消选中
-     */
-    handleCheckAll(selection) {
-      const checked = selection.length == 0 ? false : true;
-      this.currentPageContent.forEach((row) => {
-        // this.handleSelect([], element);
-        let copyAttr = _.cloneDeep(this.newChooseArr);
-        const index = this.newChooseArr.findIndex((item) => (item[this.rowKey] || item) == row[this.rowKey]);
-        if (checked) {
-          if (index < 0) {
-            copyAttr.push(row);
-          }
-        } else {
-          if (index > -1) {
-            copyAttr.splice(index, 1);
-          }
+        /**
+         * 进入页面默认选中设置
+         */
+        handleBeforeQuest(res) {
+            const { content, totalElements } = res.data
+            this.currentPageContent = content
+            if (this.newChooseArr.length > 0) {
+                let rowKeys = []
+                for (let j = 0; j < content.length; j++) {
+                    const cItem = content[j]
+                    const index = this.newChooseArr.findIndex(item => (item[this.rowKey] || item) == cItem[this.rowKey])
+                    if (index > -1) {
+                        rowKeys.push(this.newChooseArr[index][this.rowKey] || this.newChooseArr[index])
+                    }
+                }
+                setTimeout(() => {
+                    this.$refs.baseTable.setCheck(rowKeys)
+                }, 500)
+            }
+
+            const result = {
+                data: {
+                    content: this.rowSpanKey ? this.setRowSpans(content) : content,
+                    totalElements
+                }
+            }
+            return result
+        },
+        /**
+         * 选中某条数据
+         */
+        handleSelect(selection, row) {
+            let copyAttr = _.cloneDeep(this.newChooseArr)
+            const index = this.newChooseArr.findIndex(item => (item[this.rowKey] || item) == row[this.rowKey])
+            if (index > -1) {
+                copyAttr.splice(index, 1)
+            } else {
+                copyAttr.push(row)
+            }
+            this.newChooseArr = copyAttr
+            console.log(this.newChooseArr)
+        },
+        /**
+         * 选中/取消选中
+         */
+        handleCheckAll(selection) {
+            const checked = selection.length == 0 ? false : true
+            this.currentPageContent.forEach(row => {
+                // this.handleSelect([], element);
+                let copyAttr = _.cloneDeep(this.newChooseArr)
+                const index = this.newChooseArr.findIndex(item => (item[this.rowKey] || item) == row[this.rowKey])
+                if (checked) {
+                    if (index < 0) {
+                        copyAttr.push(row)
+                    }
+                } else {
+                    if (index > -1) {
+                        copyAttr.splice(index, 1)
+                    }
+                }
+                this.newChooseArr = copyAttr
+            })
+            console.log(this.newChooseArr)
+        },
+        // 发送操作事件类型
+        handleEvent(type, row) {
+            this.$emit("submitTableOpt", type, row)
+        },
+        /**
+         * 表格某行被点击
+         * */
+        handleRowClick(row) {
+            this.$refs.baseTable.setCurrentRow(row)
+            this.$emit("handleRowClick", row)
         }
-        this.newChooseArr = copyAttr;
-      });
-      console.log(this.newChooseArr);
-    },
-    // 发送操作事件类型
-    handleEvent(type, row) {
-      this.$emit('submitTableOpt', type, row);
     },
-    /**
-     * 表格某行被点击
-     * */
-    handleRowClick(row) {
-      this.$refs.baseTable.setCurrentRow(row);
-      this.$emit('handleRowClick', row);
-    }
-  },
-  created() {
-   
-  },
-  mounted() {}
-};
+    created() {},
+    mounted() {}
+}
 </script>
 
-<style lang='scss'>
-</style>
+<style lang="scss"></style>

+ 160 - 165
src/components/search-bar/index.vue

@@ -1,179 +1,174 @@
-<!--
-搜索栏组件
-@Author: linqian
-@Date: 2021-07-28 15:50
--->
 <template>
-  <div class="search-bar">
-    <el-form :inline="true">
-      <el-form-item v-for="(item, index) in form" :key="index" :label="item.label">
-        <template
-          v-if="
-            item.component &&
-            item.component !== 'SelectOrgTree' &&
-            item.component !== 'DgDatePicker' &&
-            item.component !== 'SelectApp'
-          "
-        >
-          <component
-            :is="item.component"
-            v-model="item.value"
-            v-bind="item.attr"
-            :placeholder="setPlaceHolder(item)"
-            clearable
-          />
-        </template>
-        <!-- 下拉机构树 -->
-        <template v-else-if="item.component == 'SelectOrgTree'">
-          <select-org-tree
-            ref="orgTree"
-            :api-name="item.apiName || 'getOrgTree'"
-            :nodeKey="item.nodeKey || 'id'"
-            :type="item.type || 'APP'"
-            :defaultSelectRoot="item.defaultSelectRoot"
-            @orgTreeValue="getOrgTreeValue"
-            @orgRootValue="getOrgRootValue"
-          ></select-org-tree>
-        </template>
-        <!-- 应用系统下拉列表 -->
-        <template v-else-if="item.component == 'SelectApp'">
-          <select-app
-            ref="app"
-            :api-url="item.apiUrl"
-            :tableSearchName="item.name"
-            :valueName="item.valueName"
-            :labelName="item.labelName"
-            :placeholder="item.placeholder"
-            @submitAppValue="getAppValue"
-            @submitCurrentApp="getCurrentApp"
-          ></select-app>
-        </template>
-        <!-- 时间 -->
-        <template v-else-if="item.component == 'DgDatePicker'">
-          <dg-date-picker
-            v-model="item.value"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            :clearable="item.clearable === false ? false : true"
-            :value-format="item.valueFormat || 'yyyy-MM-dd HH:mm:ss'"
-            :unlink-panels="true"
-            :default-time="['00:00:00', '23:59:59']"
-            v-bind="item.attr"
-          >
-          </dg-date-picker>
-        </template>
-      </el-form-item>
-      <el-form-item>
-        <dg-button type="primary" @click="handleSearch" :icon="'查询' | optIcon">查询</dg-button>
-        <dg-button @click="handleReset" :icon="'重置' | optIcon">重置</dg-button>
-      </el-form-item>
-    </el-form>
-  </div>
+    <div class="search-bar">
+        <el-form :inline="true">
+            <el-form-item v-for="(item, index) in form" :key="index" :label="item.label">
+                <template
+                    v-if="
+                        item.component &&
+                            item.component !== 'SelectOrgTree' &&
+                            item.component !== 'DgDatePicker' &&
+                            item.component !== 'SelectApp'
+                    "
+                >
+                    <component
+                        :is="item.component"
+                        v-model="item.value"
+                        v-bind="item.attr"
+                        :placeholder="setPlaceHolder(item)"
+                        clearable
+                    />
+                </template>
+                <!-- 下拉机构树 -->
+                <template v-else-if="item.component == 'SelectOrgTree'">
+                    <select-org-tree
+                        ref="orgTree"
+                        :api-name="item.apiName || 'getOrgTree'"
+                        :nodeKey="item.nodeKey || 'id'"
+                        :type="item.type || 'APP'"
+                        :defaultSelectRoot="item.defaultSelectRoot"
+                        @orgTreeValue="getOrgTreeValue"
+                        @orgRootValue="getOrgRootValue"
+                    ></select-org-tree>
+                </template>
+                <!-- 应用系统下拉列表 -->
+                <template v-else-if="item.component == 'SelectApp'">
+                    <select-app
+                        ref="app"
+                        :api-url="item.apiUrl"
+                        :tableSearchName="item.name"
+                        :valueName="item.valueName"
+                        :labelName="item.labelName"
+                        :placeholder="item.placeholder"
+                        @submitAppValue="getAppValue"
+                        @submitCurrentApp="getCurrentApp"
+                    ></select-app>
+                </template>
+                <!-- 时间 -->
+                <template v-else-if="item.component == 'DgDatePicker'">
+                    <dg-date-picker
+                        v-model="item.value"
+                        type="daterange"
+                        range-separator="至"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期"
+                        :clearable="item.clearable === false ? false : true"
+                        :value-format="item.valueFormat || 'yyyy-MM-dd HH:mm:ss'"
+                        :unlink-panels="true"
+                        :default-time="['00:00:00', '23:59:59']"
+                        v-bind="item.attr"
+                    >
+                    </dg-date-picker>
+                </template>
+            </el-form-item>
+            <el-form-item>
+                <dg-button type="primary" @click="handleSearch" :icon="'查询' | optIcon">查询</dg-button>
+                <dg-button @click="handleReset" :icon="'重置' | optIcon">重置</dg-button>
+            </el-form-item>
+        </el-form>
+    </div>
 </template>
 
 <script>
-import selectOrgTree from '@/components/select-org-tree';
-import selectApp from '@/components/select-app';
-import _ from 'lodash';
+import selectOrgTree from "@/components/select-org-tree"
+import selectApp from "@/components/select-app"
+import _ from "lodash"
 export default {
-  props: {
-    conditionForm: {
-      type: Array
-    },
-    resetable: {
-      type: Boolean,
-      default: true
-    }
-  },
-  components: { selectOrgTree, selectApp },
-  data() {
-    return {
-      form: []
-    };
-  },
-  computed: {},
-  watch: {
-    conditionForm: {
-      immediate: true,
-      handler(val) {
-        this.form = val;
-      }
-    }
-  },
-  methods: {
-    setCondition() {
-      let condition = {};
-      this.form.forEach((item) => {
-        const { name, value, op, format, type } = item;
-        condition[name] = {
-          value,
-          op,
-          format,
-          type
-        };
-      });
-      return condition;
-    },
-    handleSearch() {
-      this.$emit('submitSearch', this.setCondition());
-    },
-    handleReset() {
-      const vm = this;
-      let form = _.cloneDeep(this.form);
-      form.forEach((item) => {
-        if (item.component) {
-          item.value = '';
-          if (item.component == 'SelectOrgTree') {
-            vm.$refs.orgTree[0].handleClearSelect();
-          } else if (item.component == 'SelectApp') {
-            vm.$refs.app[0].handleClearSelect();
-          }
+    props: {
+        conditionForm: {
+            type: Array
+        },
+        resetable: {
+            type: Boolean,
+            default: true
         }
-      });
-      this.form = form;
-    },
-    // 获取机构树选中值
-    getOrgTreeValue(val, key = 'id') {
-      const name = key == 'id' ? 'orgId' : 'orgCode';
-      this.form.find((item) => item.name == name).value = val;
-    },
-    getOrgRootValue(val, key) {
-      this.getOrgTreeValue(val, key);
-      this.$emit('submitDefaultSearch', this.setCondition());
     },
-    // 获取应用系统选中值
-    getAppValue(val, name) {
-      this.form.find((item) => item.name == name).value = val;
+    components: { selectOrgTree, selectApp },
+    data() {
+        return {
+            form: []
+        }
     },
-    // 获取选中应用
-    getCurrentApp(item) {
-      this.$emit('submitCurrentApp', item);
+    computed: {},
+    watch: {
+        conditionForm: {
+            immediate: true,
+            handler(val) {
+                this.form = val
+            }
+        }
     },
-    setPlaceHolder(item) {
-      const { component, label } = item;
-      const inputType = ['ElInput, DgInput'];
-      const selectType = ['ElSelect', 'DgSelect', 'DgDatePicker'];
-      let prefix;
-      if (inputType.includes(component)) {
-        prefix = '请输入';
-      } else if (selectType.includes(component)) {
-        prefix = '请选择';
-      } else {
-        prefix = '请输入';
-      }
+    methods: {
+        setCondition() {
+            let condition = {}
+            this.form.forEach(item => {
+                const { name, value, op, format, type } = item
+                condition[name] = {
+                    value,
+                    op,
+                    format,
+                    type
+                }
+            })
+            return condition
+        },
+        handleSearch() {
+            this.$emit("submitSearch", this.setCondition())
+        },
+        handleReset() {
+            const vm = this
+            let form = _.cloneDeep(this.form)
+            form.forEach(item => {
+                if (item.component) {
+                    item.value = ""
+                    if (item.component == "SelectOrgTree") {
+                        vm.$refs.orgTree[0].handleClearSelect()
+                    } else if (item.component == "SelectApp") {
+                        vm.$refs.app[0].handleClearSelect()
+                    }
+                }
+            })
+            this.form = form
+        },
+        // 获取机构树选中值
+        getOrgTreeValue(val, key = "id") {
+            const name = key == "id" ? "orgId" : "orgCode"
+            this.form.find(item => item.name == name).value = val
+        },
+        getOrgRootValue(val, key) {
+            this.getOrgTreeValue(val, key)
+            this.$emit("submitDefaultSearch", this.setCondition())
+        },
+        // 获取应用系统选中值
+        getAppValue(val, name) {
+            this.form.find(item => item.name == name).value = val
+        },
+        // 获取选中应用
+        getCurrentApp(item) {
+            this.$emit("submitCurrentApp", item)
+        },
+        setPlaceHolder(item) {
+            const { component, label } = item
+            const inputType = ["ElInput, DgInput"]
+            const selectType = ["ElSelect", "DgSelect", "DgDatePicker"]
+            let prefix
+            if (inputType.includes(component)) {
+                prefix = "请输入"
+            } else if (selectType.includes(component)) {
+                prefix = "请选择"
+            } else {
+                prefix = "请输入"
+            }
 
-      return prefix + label;
-    }
-  },
-  created() {},
-  mounted() {}
-};
+            return prefix + label
+        }
+    },
+    created() {},
+    mounted() {}
+}
 </script>
 
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 /deep/ .el-button--small {
-  min-width: 90px;
+    min-width: 90px;
 }
-</style>
+</style>

+ 108 - 0
src/pages/auth-subject-manage/environment-element/add-user-form.vue

@@ -0,0 +1,108 @@
+<template>
+    <div>
+        <!-- 搜索项 -->
+        <search-bar ref="searchbar" :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
+        <new-table
+            ref="table"
+            rowKey="id"
+            :tableUrl="tableUrl"
+            :condition="condition"
+            :tableHeader="tableHeader"
+            :pagination-props="paginationProps"
+            :selection="true"
+            lazyLoad
+        ></new-table>
+        <div v-footer>
+            <dg-button @click="$emit('close')">取消</dg-button>
+            <dg-button type="primary" @click="handleAdd()">添加</dg-button>
+        </div>
+    </div>
+</template>
+<script>
+import { notRelUserTableUrl, batchSetUser } from "@/api/environment-manage"
+import { searchOpt } from "@/mixins/page-opt"
+import newTable from "@/components/new-table"
+import searchBar from "@/components/search-bar"
+export default {
+    props: {
+        elementId: String
+    },
+    components: { newTable, searchBar },
+    mixins: [searchOpt],
+    data() {
+        return {
+            conditionForm: [
+                {
+                    label: "单位名称",
+                    name: "orgId",
+                    op: "=",
+                    value: "",
+                    nodeKey: "id",
+                    type: "USER",
+                    component: "SelectOrgTree",
+                    placeholder: "请选择单位名称",
+                    filterable: true
+                },
+                {
+                    label: "姓名",
+                    name: "name",
+                    op: "like",
+                    value: "",
+                    component: "ElInput"
+                },
+                {
+                    name: "elementId",
+                    value: this.elementId,
+                    clearable: false,
+                    op: "="
+                }
+            ],
+            condition: {
+                elementId: {
+                    value: this.elementId,
+                    op: "="
+                }
+            },
+            tableUrl: notRelUserTableUrl,
+            tableHeader: [
+                { label: "姓名", prop: "name" },
+                { label: "警号", prop: "policeNumber" },
+                { label: "身份证号码", prop: "idcard" },
+                { label: "单位名称", prop: "orgName" }
+            ],
+            paginationProps: {
+                currentPage: 1,
+                pageSizes: [50, 100, 150],
+                pageSize: 50,
+                layout: "total, sizes, prev, pager, next, jumper"
+            }
+        }
+    },
+    methods: {
+        handleAdd() {
+            const userList = this.$refs.table.newChooseArr
+            if (userList.length == 0) {
+                this.$message.warning("请至少选择一个用户!")
+                return
+            }
+            const params = {
+                elementId: this.elementId,
+                userIds: userList.map(item => item.id)
+            }
+            batchSetUser(params).then(res => {
+                this.$message.success("操作成功!")
+                this.$emit("success")
+            })
+        },
+        receiveSearch(value) {
+            this.condition = value
+            if (this.$refs.table) {
+                this.$refs.table.handleClearSelection()
+            }
+            this.handleSearch()
+        }
+    }
+}
+</script>
+
+<style lang="scss"></style>

+ 167 - 150
src/pages/auth-subject-manage/environment-element/index.vue

@@ -1,163 +1,180 @@
-<!--
-主体环境要素管理
-@Author: linqian
-@Date: 2021-11-08 14:12
--->
 <template>
-  <div>
-    <!-- 搜索项 -->
-    <search-bar ref="searchbar" :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
-    <!-- 操作栏 -->
-    <operate-bar :pageOptList="pageOptList" @submitPageOpt="receviceOpt"></operate-bar>
-    <!-- 表格 -->
-    <new-table
-      ref="table"
-      :tableUrl="tableUrl"
-      :tableHeader="tableHeader"
-      :condition="condition"
-      :tableOptList="tableOptList"
-      @submitTableOpt="receviceOpt"
-    >
-    </new-table>
-  </div>
+    <div>
+        <!-- 搜索项 -->
+        <search-bar ref="searchbar" :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
+        <!-- 操作栏 -->
+        <operate-bar :pageOptList="pageOptList" @submitPageOpt="receviceOpt"></operate-bar>
+        <!-- 表格 -->
+        <new-table
+            ref="table"
+            :tableUrl="tableUrl"
+            :tableHeader="tableHeader"
+            :condition="condition"
+            :tableOptList="tableOptList"
+            @submitTableOpt="receviceOpt"
+        >
+        </new-table>
+    </div>
 </template>
 
 <script>
-import newTable from '@/components/new-table';
-import searchBar from '@/components/search-bar';
-import operateBar from '@/components/operate-bar';
-import { searchOpt, addEditOpt } from '@/mixins/page-opt';
-import * as Api from '@/api/environment-manage';
-const labelWidth = '120px';
-const area = ['500px', '400px'];
+import newTable from "@/components/new-table"
+import searchBar from "@/components/search-bar"
+import operateBar from "@/components/operate-bar"
+import { searchOpt, addEditOpt } from "@/mixins/page-opt"
+import * as Api from "@/api/environment-manage"
+const labelWidth = "120px"
+const area = ["500px", "400px"]
 export default {
-  components: {
-    newTable,
-    searchBar,
-    operateBar
-  },
-  mixins: [searchOpt, addEditOpt],
-  data() {
-    return {
-      tableUrl: Api.tableUrl,
-      tableHeader: [
-        {
-          prop: 'envElementType',
-          label: '环境要素类型',
-          code: "DM_ENV_ELE_TYPE"
+    components: {
+        newTable,
+        searchBar,
+        operateBar
+    },
+    mixins: [searchOpt, addEditOpt],
+    data() {
+        return {
+            tableUrl: Api.tableUrl,
+            tableHeader: [
+                {
+                    prop: "envElementType",
+                    label: "环境要素类型",
+                    code: "DM_ENV_ELE_TYPE"
+                },
+                {
+                    prop: "envElementName",
+                    label: "环境要素名称"
+                },
+                {
+                    prop: "createTime",
+                    label: "创建时间"
+                }
+            ],
+            pageOptList: ["新增"],
+            tableOptList: ["修改", "删除", "关联用户"],
+            conditionForm: [
+                {
+                    label: "环境要素类型",
+                    name: "envElementType",
+                    op: "=",
+                    component: "DgSelect",
+                    attr: {
+                        code: "DM_ENV_ELE_TYPE"
+                    }
+                },
+                {
+                    label: "环境要素名称",
+                    name: "envElementName",
+                    op: "like",
+                    component: "ElInput"
+                }
+            ],
+            editForm: [
+                {
+                    label: "环境要素类型",
+                    prop: "envElementType",
+                    component: "DgSelect",
+                    value: "",
+                    rules: [{ required: true, message: "请选择环境要素类型", trigger: "change" }],
+                    attr: {
+                        code: "DM_ENV_ELE_TYPE"
+                    },
+                    code: "DM_ENV_ELE_TYPE",
+                    span: 24
+                },
+                {
+                    label: "环境要素名称",
+                    prop: "envElementName",
+                    component: "ElInput",
+                    value: "",
+                    rules: [{ required: true, message: "请输入环境要素名称", trigger: "change" }],
+                    span: 24
+                }
+            ]
+        }
+    },
+    computed: {},
+    methods: {
+        receviceOpt(opt, row) {
+            const otherParams = {
+                config: this.editForm,
+                labelWidth,
+                area
+            }
+            if (opt == "新增") {
+                this.handleOpenEditForm("新增", "add", otherParams)
+            }
+            if (opt == "修改") {
+                this.handleOpenEditForm("修改", "update", { ...otherParams, detailInfo: row })
+            }
+            if (opt == "删除") {
+                this.handleDelete(row)
+            }
+            if (opt == "关联用户") {
+                this.handleRelUsers(row)
+            }
         },
-        {
-          prop: 'envElementName',
-          label: '环境要素名称'
+        handleDelete(row) {
+            this.$dgConfirm(`是否确定删除这条数据!`, "提示", {}).then(() => {
+                Api.deleteEnvElement(row.id).then(res => {
+                    this.$message.success("删除成功!")
+                    this.handleSearch()
+                })
+            })
         },
-        {
-          prop: 'createTime',
-          label: '创建时间'
-        }
-      ],
-      pageOptList: ['新增'],
-      tableOptList: ['修改', '删除'],
-      conditionForm: [
-        {
-          label: '环境要素类型',
-          name: 'envElementType',
-          op: '=',
-          component: 'DgSelect',
-          attr: {
-            code: "DM_ENV_ELE_TYPE"
-          }
+        /**
+         * @description: 保存表单
+         * @param { 表单数据 } form
+         * @param { 新增还是编辑 } type
+         * @param { 弹框 } layer
+         */
+        async saveForm(form, type, layer) {
+            const res = type == "update" ? await this.update(form) : await this.add(form)
+            if (res.data.result == "200") {
+                this.$message.success("保存成功")
+                layer.close(layer.dialogIndex)
+                this.handleSearch()
+            } else {
+                this.$message.warning(res.data.msg)
+            }
         },
-        {
-          label: '环境要素名称',
-          name: 'envElementName',
-          op: 'like',
-          component: 'ElInput'
-        }
-      ],
-      editForm: [
-        {
-          label: '环境要素类型',
-          prop: 'envElementType',
-          component: 'DgSelect',
-          value: '',
-          rules: [{ required: true, message: '请选择环境要素类型', trigger: 'change' }],
-          attr: {
-            code: 'DM_ENV_ELE_TYPE'
-          },
-          code: 'DM_ENV_ELE_TYPE',
-          span: 24
+        add(form) {
+            return new Promise(resolve => {
+                Api.saveEnvElement(form).then(res => {
+                    resolve(res)
+                })
+            })
         },
-        {
-          label: '环境要素名称',
-          prop: 'envElementName',
-          component: 'ElInput',
-          value: '',
-          rules: [{ required: true, message: '请输入环境要素名称', trigger: 'change' }],
-          span: 24
+        update(form) {
+            return new Promise(resolve => {
+                const { createTime, ...otherInfo } = form
+                Api.updateEnvElement({ ...otherInfo }).then(res => {
+                    resolve(res)
+                })
+            })
+        },
+        // 关联用户
+        handleRelUsers({ id }) {
+            const vm = this
+            const layer = this.$dgLayer({
+                title: "关联用户",
+                content: require("./related-user.vue"),
+                props: {
+                    elementId: id
+                },
+                on: {
+                    success() {
+                        vm.hendleSearch()
+                        layer.close(layer.dialogIndex)
+                    }
+                },
+                area: ["1100px", "700px"]
+            })
         }
-      ]
-    };
-  },
-  computed: {},
-  methods: {
-    receviceOpt(opt, row) {
-      const otherParams = {
-        config: this.editForm,
-        labelWidth,
-        area
-      };
-      if (opt == '新增') {
-        this.handleOpenEditForm('新增', 'add', otherParams);
-      } else if (opt == '修改') {
-        this.handleOpenEditForm('修改', 'update', { ...otherParams, detailInfo: row });
-      } else if (opt == '删除') {
-        this.handleDelete(row);
-      }
-    },
-    handleDelete(row) {
-      this.$dgConfirm(`是否确定删除这条数据!`, '提示', {}).then(() => {
-        Api.deleteEnvElement(row.id).then((res) => {
-          this.$message.success('删除成功!');
-          this.handleSearch();
-        });
-      });
-    },
-    /**
-     * @description: 保存表单
-     * @param { 表单数据 } form
-     * @param { 新增还是编辑 } type
-     * @param { 弹框 } layer
-     */
-    async saveForm(form, type, layer) {
-      const res = type == 'update' ? await this.update(form) : await this.add(form);
-      if (res.data.result == '200') {
-        this.$message.success('保存成功');
-        layer.close(layer.dialogIndex);
-        this.handleSearch();
-      } else {
-        this.$message.warning(res.data.msg);
-      }
-    },
-    add(form) {
-      return new Promise((resolve) => {
-        Api.saveEnvElement(form).then((res) => {
-          resolve(res);
-        });
-      });
     },
-    update(form) {
-      return new Promise((resolve) => {
-        const { createTime, ...otherInfo } = form;
-        Api.updateEnvElement({ ...otherInfo }).then((res) => {
-          resolve(res);
-        });
-      });
-    }
-  },
-  created() {},
-  mounted() {}
-};
+    created() {},
+    mounted() {}
+}
 </script>
 
-<style lang='scss'>
-</style>
+<style lang="scss"></style>

+ 86 - 0
src/pages/auth-subject-manage/environment-element/related-user.vue

@@ -0,0 +1,86 @@
+<template>
+    <div>
+        <dg-row>
+            <el-col>
+                <dg-button type="primary" icon="el-icon-plus" size="middle" @click="handleAddUser()"
+                    >添加关联用户</dg-button
+                >
+            </el-col>
+        </dg-row>
+        <dg-tag style="margin-top: 10px" effect="plain" type="primary"> 已关联用户 </dg-tag>
+
+        <dg-row style="margin-top: 10px">
+            <new-table
+                ref="table"
+                :tableUrl="relUserTableUrl"
+                :tableHeader="tableHeader"
+                :condition="condition"
+                :tableOptList="tableOptList"
+                @submitTableOpt="handleRemove"
+            >
+            </new-table>
+        </dg-row>
+        <div v-footer>
+            <dg-button @click="$emit('close')">关闭</dg-button>
+        </div>
+    </div>
+</template>
+
+<script>
+import { relUserTableUrl, deleteUserRel } from "@/api/environment-manage"
+import newTable from "@/components/new-table"
+export default {
+    props: {
+        elementId: String
+    },
+    components: { newTable },
+    data() {
+        return {
+            relUserTableUrl,
+            tableHeader: [
+                { label: "姓名", prop: "userName" },
+                { label: "警号", prop: "policeNumber" },
+                { label: "身份证号码", prop: "idcard" },
+                { label: "单位名称", prop: "orgName" }
+            ],
+            tableOptList: ["移除"],
+            condition: {
+                elementId: {
+                    value: this.elementId,
+                    op: "="
+                }
+            }
+        }
+    },
+    methods: {
+        // 添加关联用户
+        handleAddUser() {
+            const vm = this
+            const layer = this.$dgLayer({
+                title: "添加关联用户",
+                content: require("./add-user-form.vue"),
+                props: {
+                    elementId: this.elementId
+                },
+                on: {
+                    success() {
+                        vm.$refs.table.handleSearch()
+                        layer.close(layer.dialogIndex)
+                    }
+                },
+                area: ["1100px", "700px"]
+            })
+        },
+        // 移除用户
+        handleRemove(opt, row) {
+            this.$dgConfirm("是否确定移除这条数据!", "提示").then(() => {
+                deleteUserRel(row.id).then(res => {
+                    this.$refs.table.handleSearch()
+                })
+            })
+        }
+    }
+}
+</script>
+
+<style lang="scss"></style>

+ 35 - 36
src/router/modules/auth-subject-manage.js

@@ -3,51 +3,50 @@
  * @Author: linqian
  * @Date:   2021-09-07 14:20
  */
-import Layout from '@/pages/layout/layout';
-const componentsRouter = 
-    {
-      path: '/auth-subject-manage',
-      component: Layout,
-      redirect: '/auth-subject-manage',
-      meta: { title: '授权主体管理', icon: 'icon-boxopen', noCache: true, permission: ['QXGL_SQGL_ZTGL'] },
-      alwaysShow: true,
-      children: [
+import Layout from "@/pages/layout/layout"
+const componentsRouter = {
+    path: "/auth-subject-manage",
+    component: Layout,
+    redirect: "/auth-subject-manage",
+    meta: { title: "授权主体管理", icon: "icon-boxopen", noCache: true, permission: ["QXGL_SQGL_ZTGL"] },
+    alwaysShow: true,
+    children: [
         {
-          path: 'user-prop-manage',
-          component: () => import('@/pages/auth-subject-manage/user-prop-manage'),
-          name: 'user-prop-manage',
-          meta: { title: '用户管理', noCache: true, permission: ['QXGL_SQGL_ZTGL_YHSXGL'] }
+            path: "user-prop-manage",
+            component: () => import("@/pages/auth-subject-manage/user-prop-manage"),
+            name: "user-prop-manage",
+            meta: { title: "用户管理", noCache: true, permission: ["QXGL_SQGL_ZTGL_YHSXGL"] }
         },
         {
-          path: 'org-prop-manage',
-          component: () => import('@/pages/auth-subject-manage/org-prop-manage'),
-          name: 'org-prop-manage',
-          meta: { title: '机构管理', noCache: true, permission: ['QXGL_SQGL_ZTGL_JGSXGL'], layout: "page" }
+            path: "org-prop-manage",
+            component: () => import("@/pages/auth-subject-manage/org-prop-manage"),
+            name: "org-prop-manage",
+            meta: { title: "机构管理", noCache: true, permission: ["QXGL_SQGL_ZTGL_JGSXGL"], layout: "page" }
         },
         {
-          path: 'app-prop-manage',
-          component: () => import('@/pages/auth-subject-manage/app-prop-manage'),
-          name: 'app-prop-manage',
-          meta: { title: '应用管理', noCache: true, permission: ['QXGL_SQGL_ZTGL_YYSXGL'] }
+            path: "app-prop-manage",
+            component: () => import("@/pages/auth-subject-manage/app-prop-manage"),
+            name: "app-prop-manage",
+            meta: { title: "应用管理", noCache: true, permission: ["QXGL_SQGL_ZTGL_YYSXGL"] }
         },
         {
-          path: 'subject-prop-manage',
-          component: () => import('@/pages/auth-subject-manage/subject-prop-manage'),
-          name: 'subject-prop-manage',
-          meta: { title: '主体属性管理', noCache: true, permission: ['QXGL_SQGL_ZTGL_ZTSXLGL'],layout: 'page' }
+            path: "subject-prop-manage",
+            component: () => import("@/pages/auth-subject-manage/subject-prop-manage"),
+            name: "subject-prop-manage",
+            meta: { title: "主体属性管理", noCache: true, permission: ["QXGL_SQGL_ZTGL_ZTSXLGL"], layout: "page" }
         },
         {
-          path: 'environment-element',
-          component: () => import('@/pages/auth-subject-manage/environment-element'),
-          name: 'environment-element',
-          meta: { title: '主体环境要素管理', noCache: true, permission: ['QXGL_SQGL_ZTGL_ZTHJYSGL'] }
+            path: "environment-element",
+            component: () => import("@/pages/auth-subject-manage/environment-element"),
+            name: "environment-element",
+            meta: { title: "主体环境要素管理", noCache: true }
         },
         {
-          path: 'statistics',
-          component: () => import('@/pages/auth-subject-manage/statistics/index.vue'),
-          name: 'auth-subject-manage-statistics',
-          meta: { title: '统计', noCache: true, permission: ['QXGL_SQGL_ZTGL_TJ'] }
+            path: "statistics",
+            component: () => import("@/pages/auth-subject-manage/statistics/index.vue"),
+            name: "auth-subject-manage-statistics",
+            meta: { title: "统计", noCache: true, permission: ["QXGL_SQGL_ZTGL_TJ"] }
         }
-      ]
-    }
-export default componentsRouter;
+    ]
+}
+export default componentsRouter