Răsfoiți Sursa

缺陷修改

贺辰国 4 ani în urmă
părinte
comite
9b66a0f30f

+ 20 - 0
.editorconfig

@@ -0,0 +1,20 @@
+# 告诉EditorConfig插件,这是根文件,不用继续往上查找
+root = true
+
+# 匹配全部文件
+[*]
+# 结尾换行符,可选"lf"、"cr"、"crlf"
+end_of_line = lf
+# 在文件结尾插入新行
+insert_final_newline = true
+# 删除一行中的前后空格
+trim_trailing_whitespace = true
+# 设置字符集
+charset = utf-8
+
+indent_size = 2
+# 空格替换tab
+indent_style = space
+tab_width = 2
+
+

+ 49 - 63
.eslintrc.js

@@ -1,65 +1,51 @@
 module.exports = {
-    //此项是用来告诉eslint找当前配置文件不能往父级查找
-    root: true,
-    //此项是用来指定eslint解析器的,解析器必须符合规则,babel-eslint解析器是对babel解析器的包装使其与ESLint解析
-    //此项是用来指定javaScript语言类型和风格,sourceType用来指定js导入的方式,默认是script,此处设置为module,指某块导入方式
-    parserOptions: {
-        parser: "babel-eslint",
-        sourceType: "module"
-    },
-    //此项指定环境的全局变量,下面的配置指定为浏览器环境
-    env: {
-        browser: true,
-        node: true
-    },
-    // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
-    extends: ["eslint:recommended", "plugin:vue/essential"],
-    // required to lint *.vue files
-    // 此项是用来提供插件的,插件名称省略了eslint-plugin-,下面这个配置是用来规范html的
-    plugins: ["vue", "prettier"],
-    // add your custom rules here
-    // 下面这些rules是用来设置从插件来的规范代码的规则,使用必须去掉前缀eslint-plugin-
-    // 主要有如下的设置规则,可以设置字符串也可以设置数字,两者效果一致
-    // "off" -> 0 关闭规则
-    // "warn" -> 1 开启警告规则
-    // "error" -> 2 开启错误规则
-    // 了解了上面这些,下面这些代码相信也看的明白了
-    rules: {
-        "require-jsdoc": 1,
-        "valid-jsdoc": 1,
-        // allow async-await
-        "generator-star-spacing": "off",
-        // allow debugger during development
-        "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0,
-        "no-console": process.env.NODE_ENV === "production" ? 0 : 0,
-        // js语句结尾必须使用分号
-        semi: ["off", "always"],
-        // 三等号
-        eqeqeq: 0,
-        // 强制在注释中 // 或 /* 使用一致的空格
-        "spaced-comment": 0,
-        // 关键字后面使用一致的空格
-        "keyword-spacing": 0,
-        // 强制在 function的左括号之前使用一致的空格
-        "space-before-function-paren": 0,
-        // 禁止出现未使用过的变量
-        // 'no-unused-vars': 0,
-        // 要求或禁止末尾逗号
-        "comma-dangle": 0,
-        "valid-jsdoc": 0,
-        // 未使用变量
-        "no-unused-vars": [1, {
-            "vars": "all",
-            "args": "after-used"
-        }],
-        // export | require 格式
-        "require-jsdoc": [0, {
-            "require": {
-                "FunctionDeclaration": true,
-                "MethodDefinition": false,
-                "ClassDeclaration": false,
-                "ArrowFunctionExpression": false
-            }
-        }]
-    }
+  //此项是用来告诉eslint找当前配置文件不能往父级查找
+  root: true,
+  //此项是用来指定eslint解析器的,解析器必须符合规则,babel-eslint解析器是对babel解析器的包装使其与ESLint解析
+  //此项是用来指定javaScript语言类型和风格,sourceType用来指定js导入的方式,默认是script,此处设置为module,指某块导入方式
+  parserOptions: {
+    parser: 'babel-eslint',
+    sourceType: 'module'
+  },
+  //此项指定环境的全局变量,下面的配置指定为浏览器环境
+  env: {
+    browser: true,
+    node: true,
+    jquery: true
+  },
+  // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
+  extends: ['eslint:recommended', 'plugin:vue/essential'],
+  // required to lint *.vue files
+  // 此项是用来提供插件的,插件名称省略了eslint-plugin-,下面这个配置是用来规范html的
+  plugins: ['vue', 'prettier'],
+  // add your custom rules here
+  // 下面这些rules是用来设置从插件来的规范代码的规则,使用必须去掉前缀eslint-plugin-
+  // 主要有如下的设置规则,可以设置字符串也可以设置数字,两者效果一致
+  // "off" -> 0 关闭规则
+  // "warn" -> 1 开启警告规则
+  //"error" -> 2 开启错误规则
+  // 了解了上面这些,下面这些代码相信也看的明白了
+  rules: {
+    'require-jsdoc': 0,
+    'valid-jsdoc': 0,
+    // allow async-await
+    'generator-star-spacing': 'off',
+    // allow debugger during development
+    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
+    'no-console': process.env.NODE_ENV === 'production' ? 0 : 0,
+    // js语句结尾必须使用分号
+    semi: ['off', 'always'],
+    // 三等号
+    eqeqeq: 0,
+    // 强制在注释中 // 或 /* 使用一致的空格
+    'spaced-comment': 1,
+    // 关键字后面使用一致的空格
+    'keyword-spacing': 1,
+    // 强制在 function的左括号之前使用一致的空格
+    'space-before-function-paren': 0,
+    // 禁止出现未使用过的变量
+    'no-unused-vars': 1,
+    // 要求或禁止末尾逗号
+    'comma-dangle': 0
+  }
 };

+ 6 - 6
.prettierrc.js

@@ -1,8 +1,8 @@
 module.exports = {
-    printWidth: 120, //一行的字符数,如果超过会进行换行,默认为80
-    tabWidth: 4, //一个tab代表几个空格数,默认为2
-    useTabs: false, //是否使用tab进行缩进,默认为false,表示用空格进行缩减
-    singleQuote: false, //字符串是否使用单引号,默认为false,使用双引号
-    trailingComma: "none", //是否使用尾逗号,有三个可选值"<none|es5|all>"
-    bracketSpacing: true //对象大括号直接是否有空格,默认为true,效果:{ foo: bar }
+  printWidth: 120, //一行的字符数,如果超过会进行换行,默认为80
+  tabWidth: 2, //一个tab代表几个空格数,默认为2
+  useTabs: false, //是否使用tab进行缩进,默认为false,表示用空格进行缩减
+  singleQuote: true, //字符串是否使用单引号,默认为false,使用双引号
+  trailingComma: 'none', //是否使用尾逗号,有三个可选值"<none|es5|all>"
+  bracketSpacing: true //对象大括号直接是否有空格,默认为true,效果:{ foo: bar }
 };

+ 188 - 190
src/pages/data-auth-module/auth-subject-manage/DataConfig.js

@@ -7,219 +7,217 @@
  */
 
 const UserTableData = [
-    {
-        label: "用户类型",
-        prop: "userType",
-        enum: "UserTypeEnum"
-    },
-    {
-        label: "姓名",
-        prop: "name"
-    },
-    {
-        label: "身份证号码",
-        prop: "idcard"
-    },
-    {
-        label: "编号",
-        prop: "policeNumber"
-    },
-    {
-        label: "所属机构",
-        // custom: true, // 如果需要自定义请加上这个属性,插槽名称为prop
-        prop: "orgName"
-    },
-    {
-        label: "人员类型",
-        prop: "manType",
-        // code: "",
-        custom: true
-    },
-    {
-        label: "警种",
-        prop: "policeCategory",
-        code: "T_MD_POLICE_TYPE"
-    }
+  {
+    label: '用户类型',
+    prop: 'userType',
+    enum: 'UserTypeEnum'
+  },
+  {
+    label: '姓名',
+    prop: 'name'
+  },
+  {
+    label: '身份证号码',
+    prop: 'idcard'
+  },
+  {
+    label: '编号',
+    prop: 'policeNumber'
+  },
+  {
+    label: '所属机构',
+    custom: true,
+    prop: 'orgName'
+  },
+  {
+    label: '人员类型',
+    prop: 'manType',
+    custom: true
+  },
+  {
+    label: '警种',
+    prop: 'policeCategory',
+    code: 'T_MD_POLICE_TYPE',
+    custom: true
+  }
 ];
 const ApplicationTableData = [
-    {
-        label: "应用系统名称",
-        prop: "applyName"
-    },
-    {
-        label: "应用系统编号",
-        prop: "applyCode"
-    },
-    {
-        label: "应用英文名称",
-        prop: "appEnglishName"
-    },
-    {
-        label: "应用系统在用标识",
-        prop: "applyStatus",
-        code: "DM_APPLY_STATUS"
-    },
-    {
-        label: "上线日期",
-        prop: "lineTime",
-        timestamp: "YYYY-MM-DD"
-    },
-    {
-        label: "应用系统运维单位名称",
-        width: "180px",
-        prop: "appOpsDepName"
-    }
+  {
+    label: '应用系统名称',
+    prop: 'applyName'
+  },
+  {
+    label: '应用系统编号',
+    prop: 'applyCode'
+  },
+  {
+    label: '应用英文名称',
+    prop: 'appEnglishName'
+  },
+  {
+    label: '应用系统在用标识',
+    prop: 'applyStatus',
+    code: 'DM_APPLY_STATUS'
+  },
+  {
+    label: '上线日期',
+    prop: 'lineTime',
+    timestamp: 'YYYY-MM-DD'
+  },
+  {
+    label: '应用系统运维单位名称',
+    width: '180px',
+    prop: 'appOpsDepName'
+  }
 ];
 const cardPersonnelList = [
-    {
-        label: "姓名",
-        prop: ""
-    },
-    {
-        label: "身份证号码",
-        prop: ""
-    },
-    {
-        label: "所属单位",
-        prop: ""
-    }
+  {
+    label: '姓名',
+    prop: ''
+  },
+  {
+    label: '身份证号码',
+    prop: ''
+  },
+  {
+    label: '所属单位',
+    prop: ''
+  }
 ];
 const cardAddPersonnelList = [
-    {
-        label: "姓名",
-        prop: ""
-    },
-    {
-        label: "身份证号码",
-        prop: ""
-    }
+  {
+    label: '姓名',
+    prop: ''
+  },
+  {
+    label: '身份证号码',
+    prop: ''
+  }
 ];
 const cardApplicationList = [
-    {
-        label: "机构名称",
-        prop: ""
-    },
-    {
-        label: "机构代码",
-        prop: ""
-    },
-    {
-        label: "行政区划",
-        prop: ""
-    } 
+  {
+    label: '机构名称',
+    prop: ''
+  },
+  {
+    label: '机构代码',
+    prop: ''
+  },
+  {
+    label: '行政区划',
+    prop: ''
+  }
 ];
 
 const cardAgencylist = [
-    {
-        label: "应用系统名称",
-        prop: "applyName"
-    },
-    {
-        label: "应用系统编号",
-        prop: "applyCode"
-    },
-    {
-        label: "应用系统在用标识",
-        prop: "applyStatus",
-        code: "DM_APPLY_STATUS"
-    }
+  {
+    label: '应用系统名称',
+    prop: 'applyName'
+  },
+  {
+    label: '应用系统编号',
+    prop: 'applyCode'
+  },
+  {
+    label: '应用系统在用标识',
+    prop: 'applyStatus',
+    code: 'DM_APPLY_STATUS'
+  }
 ];
 
 const cardFunctionList = [
-    {
-        label: "功能名称",
-        prop: ""
-    },
-    {
-        label: "功能编号",
-        prop: ""
-    },
-    {
-        label: "所属系统",
-        prop: ""
-    }
+  {
+    label: '功能名称',
+    prop: ''
+  },
+  {
+    label: '功能编号',
+    prop: ''
+  },
+  {
+    label: '所属系统',
+    prop: ''
+  }
 ];
 const cardServiceList = [
-    {
-        label: "服务资源名称",
-        prop: ""
-    },
-    {
-        label: "所属系统",
-        prop: ""
-    }
+  {
+    label: '服务资源名称',
+    prop: ''
+  },
+  {
+    label: '所属系统',
+    prop: ''
+  }
 ];
 
 const typeData = {
-    10: [
-        { label: "姓名", value: "name" },
-        { label: "性别", value: "sex", code: "DM_SEX" },
-        { label: "身份证号码", value: "idcard" },
-        { label: "省份", value: "area", code: "DM_AREA_CODE" },
-        { label: "编号", value: "policeNumber" },
-        { label: "人员类型", value: "userType", code: "DM_MAN_TYPE" },
-        { label: "职级", value: "title", code: "DM_CERT_DUTY_LEVEL" },
-        // { label: "用户类别", value: "userType", enum: "UserTypeEnum" },
-        { label: "所属机构", value: "orgName"},
-        { label: "警衔", value: "rank", code: "DM_POLICE_RANK"},
-        { label: "警种", value: "policeCategory", code: "T_MD_POLICE_TYPE" },
-        { label: "业务域", value: "policeBusiness" },
-
-    ],
-    20: [
-        { label: "姓名", value: "name" },
-        { label: "性别", value: "sex", code: "DM_SEX" },
-        { label: "身份证号码", value: "idcard" },
-        { label: "编号", value: "policeNumber" },
-        { label: "所属机构", value: "orgName" },
-        { label: "人员类型", value: "userType", code: "DM_AUXILIARY_TYPE" },
-        // { label: "用户类别", value: "userType", enum: "UserTypeEnum" },
-        { label: "业务域", value: "policeBusiness" },
-        { label: "警种", value: "policeCategory", code: "T_MD_POLICE_TYPE" }
-    ],
-    30: [
-        { label: "姓名", value: "name" },
-        { label: "性别", value: "sex", code: "DM_SEX" },
-        { label: "身份证号码", value: "idcard" },
-        { label: "编号", value: "policeNumber" },
-        // { label: "人员类型", value: "manType", code: "DM_MAN_TYPE" },
-        // { label: "用户类别", value: "userType", enum: "UserTypeEnum" }
-    ]
+  10: [
+    { label: '姓名', value: 'name' },
+    { label: '性别', value: 'sex', code: 'DM_SEX' },
+    { label: '身份证号码', value: 'idcard' },
+    { label: '省份', value: 'area', code: 'DM_AREA_CODE' },
+    { label: '编号', value: 'policeNumber' },
+    { label: '人员类型', value: 'userType', code: 'DM_MAN_TYPE' },
+    { label: '职级', value: 'title', code: 'DM_CERT_DUTY_LEVEL' },
+    // { label: "用户类别", value: "userType", enum: "UserTypeEnum" },
+    { label: '所属机构', value: 'orgName' },
+    { label: '警衔', value: 'rank', code: 'DM_POLICE_RANK' },
+    { label: '警种', value: 'policeCategory', code: 'T_MD_POLICE_TYPE' },
+    { label: '业务域', value: 'policeBusiness' }
+  ],
+  20: [
+    { label: '姓名', value: 'name' },
+    { label: '性别', value: 'sex', code: 'DM_SEX' },
+    { label: '身份证号码', value: 'idcard' },
+    { label: '编号', value: 'policeNumber' },
+    { label: '所属机构', value: 'orgName' },
+    { label: '人员类型', value: 'auxiliaryType', code: 'DM_AUXILIARY_TYPE' },
+    // { label: "用户类别", value: "userType", enum: "UserTypeEnum" },
+    { label: '业务域', value: 'policeBusiness' },
+    { label: '警种', value: 'policeCategory', code: 'T_MD_POLICE_TYPE' }
+  ],
+  30: [
+    { label: '姓名', value: 'name' },
+    { label: '性别', value: 'sex', code: 'DM_SEX' },
+    { label: '身份证号码', value: 'idcard' },
+    { label: '编号', value: 'policeNumber' }
+    // { label: "人员类型", value: "manType", code: "DM_MAN_TYPE" },
+    // { label: "用户类别", value: "userType", enum: "UserTypeEnum" }
+  ]
 };
 const institutionField = [
-    { label: "上级行政机构", value: "upGovName" },
-    { label: "机构类型", value: "orgKind", enum: "OrgKindEnum" },
-    { label: "机构名称", value: "fullName" },
-    { label: "行政区划", value: "areaCode", code: "T_MD_AREA_CODE" },
-    { label: "机构代码", value: "code" },
-    { label: "机构类别", value: "orgType", code: "T_MD_ORGTYPE" },
-    { label: "单位层级", value: "orgLevel", code: "T_MD_ORG_LEVEL" },
-    { label: "单位级别", value: "orgRank", code: "T_MD_ORG_RANK" },
-    { label: "单位类别", value: "unitClass", url: "/duacm/codeSon/v2/data/T_MD_UNIT_CLASS" }
-
+  { label: '上级行政机构', value: 'upGovName' },
+  { label: '机构类型', value: 'orgKind', enum: 'OrgKindEnum' },
+  { label: '机构名称', value: 'fullName' },
+  { label: '行政区划', value: 'areaCode', code: 'T_MD_AREA_CODE' },
+  { label: '机构代码', value: 'code' },
+  { label: '机构类别', value: 'orgType', code: 'T_MD_ORGTYPE' },
+  { label: '单位层级', value: 'orgLevel', code: 'T_MD_ORG_LEVEL' },
+  { label: '单位级别', value: 'orgRank', code: 'T_MD_ORG_RANK' },
+  { label: '单位类别', value: 'unitClass', url: '/duacm/codeSon/v2/data/T_MD_UNIT_CLASS' }
 ];
 const applicationField = [
-    { label: "应用系统名称", value: "applyName" },
-    { label: "应用系统编号", value: "applyCode" },
-    { label: "应用英文名称", value: "appEnglishName" },
-    { label: "应用系统在用标识", value: "applyStatus", code: "DM_APPLY_STATUS" },
-    { label: "上线日期", value: "lineTime" },
-    { label: "应用系统事权单位代码", value: "managerOrgCode" },
-    { label: "应用负责人", value: "fzr" },
-    { label: "应用系统运维单位名称", value: "appOpsDepName" },
-    { label: "应用系统管理单位名称", value: "managerOrgName" },
-    { label: "应用系统说明", value: "managerDescribe" }
+  { label: '应用系统名称', value: 'applyName' },
+  { label: '应用系统编号', value: 'applyCode' },
+  { label: '应用英文名称', value: 'appEnglishName' },
+  { label: '应用系统在用标识', value: 'applyStatus', code: 'DM_APPLY_STATUS' },
+  { label: '上线日期', value: 'lineTime' },
+  { label: '应用系统事权单位代码', value: 'managerOrgCode' },
+  { label: '应用负责人', value: 'fzr' },
+  { label: '应用系统运维单位名称', value: 'appOpsDepName' },
+  { label: '应用系统管理单位名称', value: 'managerOrgName' },
+  { label: '应用系统说明', value: 'managerDescribe' }
 ];
 export {
-    UserTableData,
-    typeData,
-    institutionField,
-    ApplicationTableData,
-    applicationField,
-    cardPersonnelList,
-    cardApplicationList,
-    cardAgencylist,
-    cardAddPersonnelList,
-    cardFunctionList,
-    cardServiceList
+  UserTableData,
+  typeData,
+  institutionField,
+  ApplicationTableData,
+  applicationField,
+  cardPersonnelList,
+  cardApplicationList,
+  cardAgencylist,
+  cardAddPersonnelList,
+  cardFunctionList,
+  cardServiceList
 };

+ 0 - 2
src/pages/data-auth-module/auth-subject-manage/user-prop-manage/detail.vue

@@ -46,7 +46,6 @@
 </template>
 
 <script>
-import Table from "@/pages/common/table";
 import { UserTableData, typeData } from "../DataConfig";
 import { getAuthUserDetail } from "@/api/data-auth";
 import transferBusinessTagMixin from "@/mixins/transfer-business-tag";
@@ -66,7 +65,6 @@ export default {
             detailInfo: {}
         };
     },
-    components: { Table }, // 注册局部组件
     computed: {
         showTagTree() {
            return this.tagTree.length > 0

+ 188 - 171
src/pages/data-auth-module/auth-subject-manage/user-prop-manage/index.vue

@@ -6,195 +6,212 @@
  * @Description: 
 -->
 <template>
-    <main class="user-attributes">
-        <el-form ref="ruleForm" inline :rules="rules" :model="form">
-            <el-form-item label="用户类型">
-                <dg-select v-model="form.userType.value" placeholder="请选择用户类型" enum="UserTypeEnum" clearable>
-                </dg-select>
-            </el-form-item>
-            <el-form-item label="姓名">
-                <el-input v-model="form.name.value" placeholder="请输入姓名" clearable></el-input>
-            </el-form-item>
-            <el-form-item label="身份证号码">
-                <el-input v-model="form.idcard.value" placeholder="请输入身份证号码" clearable></el-input>
-            </el-form-item>
+  <main class="user-attributes">
+    <el-form ref="ruleForm" inline :rules="rules" :model="form">
+      <el-form-item label="用户类型">
+        <dg-select v-model="form.userType.value" placeholder="请选择用户类型" enum="UserTypeEnum" clearable>
+        </dg-select>
+      </el-form-item>
+      <el-form-item label="姓名">
+        <el-input v-model="form.name.value" placeholder="请输入姓名" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="身份证号码">
+        <el-input v-model="form.idcard.value" placeholder="请输入身份证号码" clearable></el-input>
+      </el-form-item>
 
-            <el-form-item label="所属机构">
-                <select-tree ref="selectTree" api-name="getOrgTree" @submitTreeValue="getTreeValue" :key="key"></select-tree>
-            </el-form-item>
+      <el-form-item label="所属机构">
+        <select-tree ref="selectTree" api-name="getOrgTree" @submitTreeValue="getTreeValue" :key="key"></select-tree>
+      </el-form-item>
 
-            <el-form-item>
-                <dg-button type="primary" @click="handleSearch" icon="el-icon-search">查询</dg-button>
-                <dg-button type="primary" @click="handleReset" icon="el-icon-refresh-right">重置</dg-button>
-            </el-form-item>
+      <el-form-item>
+        <dg-button type="primary" @click="handleSearch" icon="el-icon-search">查询</dg-button>
+        <dg-button type="primary" @click="handleReset" icon="el-icon-refresh-right">重置</dg-button>
+      </el-form-item>
 
-            <!-- <el-form-item label="最近同步时间:" style="float: right">
+      <!-- <el-form-item label="最近同步时间:" style="float: right">
                 <span>{{ LatestSyncTime }}</span>
             </el-form-item> -->
-        </el-form>
-        <div class="buttonGroup">
-            <dg-button type="primary" @click="handleImport" icon="el-icon-upload2">导入</dg-button>
-            <dg-button type="primary" @click="handleSynchro" icon="el-icon-refresh">同步</dg-button>
-        </div>
-        <Table ref="myTable" :url="tableUrl" :headerData="UserTableData" :condition="form">
-            <!-- DM_MAN_TYPE -->
-            <template v-slot:manType="slotProps">
-                <div v-if="slotProps.row.userType == '20'" class="u-detail__text" v-translate="{ code: 'DM_AUXILIARY_TYPE' }">
-                    {{ slotProps.row.userType }}
-                </div>
-                <div v-else class="u-detail__text" v-translate="{ code: 'DM_MAN_TYPE' }">
-                    {{ slotProps.row.userType }}
-                </div>
-            </template>
-            <dg-table-column label="操作" align="center">
-                <template slot-scope="scope">
-                    <div class="u-table__operation">
-                        <el-tooltip content="详情" effect="dark" placement="top-end">
-                            <i class="el-icon-document" @click="handleViewDetail(scope.row)"></i>
-                        </el-tooltip>
-                    </div>
-                </template>
-            </dg-table-column>
-        </Table>
-    </main>
+    </el-form>
+    <div class="buttonGroup">
+      <dg-button type="primary" @click="handleImport" icon="el-icon-upload2">导入</dg-button>
+      <dg-button type="primary" @click="handleSynchro" icon="el-icon-refresh">同步</dg-button>
+    </div>
+    <Table ref="myTable" :url="tableUrl" :headerData="UserTableData" :condition="form">
+      <!-- 所属机构 -->
+      <template #orgName="{row}">
+        <span v-if="row.userType + '' === '30'"></span>
+        <span v-else>{{ row.orgName }}</span>
+      </template>
+      <!-- 人员类型 -->
+      <template #manType="slotProps">
+        <!-- 辅警 20 -->
+        <span
+          v-if="slotProps.row.userType + '' === '20'"
+          class="u-detail__text"
+          v-translate="{ code: 'DM_AUXILIARY_TYPE' }"
+        >
+          {{ slotProps.row.auxiliaryType }}
+        </span>
+        <!-- 施工人员 30 -->
+        <span v-else-if="slotProps.row.userType + '' === '30'" class="u-detail__text"></span>
+        <span v-else class="u-detail__text" v-translate="{ code: 'DM_MAN_TYPE' }">
+          {{ slotProps.row.manType }}
+        </span>
+      </template>
+      <!-- 警种 -->
+      <template #policeCategory="{ row }">
+        <span v-if="row.userType + '' === '30'"></span>
+        <span v-else class="u-detail__text" v-translate="{ code: 'T_MD_POLICE_TYPE' }">{{ row.policeCategory }}</span>
+      </template>
+      <dg-table-column label="操作" align="center">
+        <template slot-scope="scope">
+          <div class="u-table__operation">
+            <el-tooltip content="详情" effect="dark" placement="top-end">
+              <i class="el-icon-document" @click="handleViewDetail(scope.row)"></i>
+            </el-tooltip>
+          </div>
+        </template>
+      </dg-table-column>
+    </Table>
+  </main>
 </template>
 
 <script>
-import Table from "@/pages/common/table";
-import { UserTableData } from "../DataConfig";
-import { authUserTableUrl } from "@/api/data-auth";
-import { authUserSync } from "@/api/sync";
-import baseApi from "@/api/jz-base";
-import detail from "./detail";
-import importFile from "@/pages/common/import";
-import selectTree from "@/pages/common/select-tree";
-import { userImportUrl } from "@/api/import";
+import Table from '@/pages/common/table';
+import { UserTableData } from '../DataConfig';
+import { authUserTableUrl } from '@/api/data-auth';
+import { authUserSync } from '@/api/sync';
+import baseApi from '@/api/jz-base';
+import detail from './detail';
+import importFile from '@/pages/common/import';
+import selectTree from '@/pages/common/select-tree';
+import { userImportUrl } from '@/api/import';
 export default {
-    name: "user-attributes", // 组件名称
-    props: {
-        // 接收父组件的数据
+  name: 'user-attributes', // 组件名称
+  props: {
+    // 接收父组件的数据
+  },
+  data() {
+    // 组件内部参数
+    return {
+      // 参数名称及默认值
+      form: {
+        name: {
+          value: '',
+          op: 'like'
+        },
+        idcard: {
+          value: '',
+          op: 'like'
+        },
+        userType: {
+          value: '',
+          op: '='
+        },
+        orgCode: {
+          value: '',
+          op: '='
+        }
+      },
+      rules: {},
+      options: [],
+      UserTableData,
+      tableUrl: authUserTableUrl,
+      LatestSyncTime: '',
+      key: 0
+    };
+  },
+  computed: {}, // 计算属性
+  watch: {}, // 侦听器(扩展的计算属性)
+  components: { Table, selectTree }, // 注册局部组件
+  methods: {
+    /**
+     * @description:表单查询方法
+     */
+    handleSearch() {
+      this.$refs.myTable.handleSearchClick();
     },
-    data() {
-        // 组件内部参数
-        return {
-            // 参数名称及默认值
-            form: {
-                name: {
-                    value: "",
-                    op: "like"
-                },
-                idcard: {
-                    value: "",
-                    op: "like"
-                },
-                userType: {
-                    value: "",
-                    op: "="
-                },
-                orgCode: {
-                    value: "",
-                    op: "="
-                }
-            },
-            rules: {},
-            options: [],
-            UserTableData,
-            tableUrl: authUserTableUrl,
-            LatestSyncTime: "",
-            key: 0
-        };
+    /**
+     * 重置
+     */
+    handleReset() {
+      if (this.form.orgCode.value) {
+        this.key++;
+      }
+      for (const key in this.form) {
+        this.form[key].value = '';
+      }
     },
-    computed: {}, // 计算属性
-    watch: {}, // 侦听器(扩展的计算属性)
-    components: { Table, selectTree }, // 注册局部组件
-    methods: {
-        /**
-         * @description:表单查询方法
-         */
-        handleSearch() {
-            this.$refs.myTable.handleSearchClick();
+    /**
+     * @description:导入方法
+     */
+    handleImport() {
+      const vm = this;
+      const layer = this.$dgLayer({
+        title: '导入',
+        content: importFile,
+        props: {
+          temp: 'user',
+          action: userImportUrl
         },
-        /**
-         * 重置
-         */
-        handleReset() {
-            if (this.form.orgCode.value) {
-                this.key++;
-            }
-            for (const key in this.form) {
-                this.form[key].value = "";
-            }
+        on: {
+          success(params) {
+            vm.handleSearch();
+            layer.close(layer.dialogIndex);
+          }
         },
-        /**
-         * @description:导入方法
-         */
-        handleImport() {
-            const vm = this;
-            const layer = this.$dgLayer({
-                title: "导入",
-                content: importFile,
-                props: {
-                    temp: "user",
-                    action: userImportUrl
-                },
-                on: {
-                    success(params) {
-                        vm.handleSearch();
-                        layer.close(layer.dialogIndex);
-                    }
-                },
-                cancel: function (index, layero) {
-                    // 关闭对应弹窗的ID
-                    layer.close(index);
-                    return false;
-                },
-                area: ["550px", "500px"]
-            });
+        cancel: function(index, layero) {
+          // 关闭对应弹窗的ID
+          layer.close(index);
+          return false;
         },
-        /**
-         * @description:同步方法,假同步
-         */
-        handleSynchro() {
-            authUserSync().then((res) => {
-                this.$message.success("同步中,若数据量大,可能会存在延迟,请稍后自行刷新!");
-                this.handleSearch();
-            });
+        area: ['550px', '500px']
+      });
+    },
+    /**
+     * @description:同步方法,假同步
+     */
+    handleSynchro() {
+      authUserSync().then(res => {
+        this.$message.success('同步中,若数据量大,可能会存在延迟,请稍后自行刷新!');
+        this.handleSearch();
+      });
+    },
+    /**
+     * @description:详情
+     */
+    handleViewDetail(row) {
+      const userTypeName = this.userType.find(item => item.value == row.userType).label;
+      const layer = this.$dgLayer({
+        title: `${userTypeName}详情`,
+        shade: [0.4, '#FFF'],
+        content: detail,
+        props: {
+          userInfo: row
         },
-        /**
-         * @description:详情
-         */
-        handleViewDetail(row) {
-            const userTypeName = this.userType.find((item) => item.value == row.userType).label;
-            const layer = this.$dgLayer({
-                title: `${userTypeName}详情`,
-                shade: [0.4, "#FFF"],
-                content: detail,
-                props: {
-                    userInfo: row
-                },
-                on: {
-                    success() {
-                        layer.close(layer.dialogIndex);
-                    }
-                },
-                area: ["900px", "500px"]
-            });
+        on: {
+          success() {
+            layer.close(layer.dialogIndex);
+          }
         },
-        /**
-         * 接收机构树值
-         */
-
-        getTreeValue(val) {
-            this.form.orgCode.value = val;
-        }
+        area: ['900px', '500px']
+      });
     },
-    created() {
-        baseApi.fetchEnum("UserTypeEnum").then((res) => {
-            this.userType = res.data;
-        });
-    } // 组件创建完成后
+    /**
+     * 接收机构树值
+     */
+
+    getTreeValue(val) {
+      this.form.orgCode.value = val;
+    }
+  },
+  created() {
+    baseApi.fetchEnum('UserTypeEnum').then(res => {
+      this.userType = res.data;
+    });
+  } // 组件创建完成后
 };
 </script>
 <style lang="scss" scoped>
-@import "../index.scss";
+@import '../index.scss';
 </style>