Browse Source

Merge branch 'develop' of http://git.chelingzhu.com/chelingzhu-web/storeCheck-admin-html into develop

lilei 4 years ago
parent
commit
0cd8eb4690

+ 1 - 1
src/api/evaluationItem.js

@@ -74,7 +74,7 @@ export const itemIndexDelete = (params) => {
 // 考评指标详情
 export const itemIndexDetail = (params) => {
   return axios({
-    url: `/assess/target/delete/${params.id}`,
+    url: `/assess/target/find/${params.id}`,
     data: {},
     method: 'get'
   })

+ 0 - 0
src/api/card-voucher-role.js → src/api/supervision-role.js


+ 0 - 0
src/api/card-voucher-user.js → src/api/supervision-user.js


+ 26 - 23
src/config/router.config.js

@@ -51,7 +51,8 @@ export const asyncRouterMap = [{
     component: PageView,
     meta: {
       title: '考评管理',
-      icon: 'block'
+      icon: 'block',
+	  permission: 'M_evaluation_0'
     },
     children: [{
       path: '/evaluation/evaluationItem',
@@ -60,7 +61,8 @@ export const asyncRouterMap = [{
         '@/views/evaluation/evaluationItem/EvaluationItem.vue'),
       meta: {
         title: '考评项目',
-        icon: 'save'
+        icon: 'save',
+        permission: 'M_evaluationItem_list'
       }
     }, {
       path: '/evaluation/evaluationPlan',
@@ -69,7 +71,8 @@ export const asyncRouterMap = [{
         '@/views/evaluation/evaluationPlan/EvaluationPlan.vue'),
       meta: {
         title: '考评方案',
-        icon: 'switcher'
+        icon: 'switcher',
+        permission: 'M_evaluationPlan_list'
       }
     }]
   },
@@ -111,8 +114,8 @@ export const asyncRouterMap = [{
     component: PageView,
     meta: {
       title: '运营权限管理',
-      icon: 'apartment'
-      // permission: 'M_yyAuth_0'
+      icon: 'wallet',
+      permission: 'M_power_0'
     },
     children: [{
       path: '/auth/userList',
@@ -120,8 +123,8 @@ export const asyncRouterMap = [{
       component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
       meta: {
         title: '用户管理',
-        icon: 'user'
-        // permission: 'M_auth_yyUser'
+        icon: 'user',
+        permission: 'M_power_user'
       }
     },
     {
@@ -130,39 +133,39 @@ export const asyncRouterMap = [{
       component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
       meta: {
         title: '角色管理',
-        icon: 'solution'
-        // permission: 'M_auth_yyRole'
+        icon: 'solution',
+        permission: 'M_power_role'
       }
     }
     ]
   },
   {
-    path: '/CardVoucherAuth',
-    redirect: '/CardVoucherAuth/userList',
+    path: '/SupervisionAuth',
+    redirect: '/SupervisionAuth/userList',
     component: PageView,
     meta: {
       title: '督导权限管理',
-      icon: 'wallet'
-      // permission: 'M_kqAuth_0'
+      icon: 'wallet',
+      permission: 'M_supervision_0'
     },
     children: [{
-      path: '/CardVoucherAuth/userList',
-      name: 'CardUserList',
-      component: () => import(/* webpackChunkName: "CardVoucherAuth" */ '@/views/CardVoucherAuth/user/userList.vue'),
+      path: '/SupervisionAuth/userList',
+      name: 'SupervisionUserList',
+      component: () => import(/* webpackChunkName: "CardVoucherAuth" */ '@/views/SupervisionAuth/user/userList.vue'),
       meta: {
         title: '用户管理',
-        icon: 'user'
-        // permission: 'M_auth_kqUser'
+        icon: 'user',
+        permission: 'M_supervision_user'
       }
     },
     {
-      path: '/CardVoucherAuth/roleList',
-      name: 'CardRoleList',
-      component: () => import(/* webpackChunkName: "CardVoucherAuth" */ '@/views/CardVoucherAuth/role/roleList.vue'),
+      path: '/SupervisionAuth/roleList',
+      name: 'SupervisionRoleList',
+      component: () => import(/* webpackChunkName: "CardVoucherAuth" */ '@/views/SupervisionAuth/role/roleList.vue'),
       meta: {
         title: '角色管理',
-        icon: 'solution'
-        // permission: 'M_auth_kqRole'
+        icon: 'solution',
+        permission: 'M_supervision_role'
       }
     }
     ]

+ 10 - 6
src/views/BasicSettings/Organization.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card class="organization-wrap" :bordered="false">
     <!-- 新建 -->
-    <div class="table-operator"><a-button id="organization-add" type="primary" icon="plus" @click="addOrg()">添加最高级</a-button></div>
+    <div class="table-operator"><a-button id="organization-add" type="primary" icon="plus" @click="addOrg()" v-hasPermission="'B_basicSettings_organization_add'">添加最高级</a-button></div>
     <!-- 表格列表 -->
     <s-table
       class="s-table"
@@ -21,26 +21,29 @@
           icon="plus"
           class="btn-add-s"
           id="organization-addSubItem"
-          @click="addOrg(text)">添加子级</a-button>
+          @click="addOrg(text)"
+          v-hasPermission="'B_basicSettings_organization_add_child'">添加子级</a-button>
         <a-button
           type="link"
           size="small"
           icon="edit"
           class="btn-edit-s"
           id="organization-edit"
-          @click="editOrg(text)">编辑</a-button>
+          @click="editOrg(text)"
+          v-hasPermission="'B_basicSettings_organization_edit'">编辑</a-button>
         <a-button
           type="link"
           size="small"
           icon="delete"
           class="btn-del-s"
           id="organization-del"
-          @click="delOrg(text)">删除</a-button>
+          @click="delOrg(text)"
+          v-hasPermission="'B_basicSettings_organization_del'">删除</a-button>
       </template>
     </s-table>
     <!-- 添加子级 -->
     <a-modal
-      class="modal"
+      class="organization-modal"
       :title="title"
       :visible="visible"
       :footer="null"
@@ -138,6 +141,7 @@ export default {
     },
     //  关闭对话框
     onCancel () {
+      this.$refs.ruleForm.resetFields()
       this.visible = false
     },
     //  删除
@@ -197,7 +201,7 @@ export default {
     }
   }
   // 弹框
-  .modal{
+  .organization-modal{
     .btn-cont{
       text-align: center;
       .cancel {

+ 10 - 3
src/views/BasicSettings/StoreAssociatedEquipmentModal.vue

@@ -28,7 +28,8 @@
             type="primary"
             ghost
             size="small"
-            @click="onBundling(resultData)">立即绑定</a-button>
+            @click="onBundling(resultData)"
+            v-hasPermission="'B_store_device_bind'">立即绑定</a-button>
           <a-button v-else disabled type="link">已绑定</a-button>
         </div>
       </a-card>
@@ -56,12 +57,18 @@
           :data-source="passagewayData"
           :pagination="false">
           <template slot="action" slot-scope="record">
-            <a-button type="link" id="equipment-edit" @click="onEdit(record)">编辑</a-button>
+            <a-button type="link" id="equipment-edit" @click="onEdit(record)" v-hasPermission="'B_store_deviceTd_edit'">编辑</a-button>
           </template>
         </a-table>
       </div>
       <template slot="action" slot-scope="record">
-        <a-button type="primary" ghost size="small" id="equipment-unBind" @click="onUnbundling(record)">解绑</a-button>
+        <a-button
+          type="primary"
+          ghost
+          size="small"
+          id="equipment-unBind"
+          @click="onUnbundling(record)"
+          v-hasPermission="'B_store_device_unbind'">解绑</a-button>
       </template>
     </a-table>
     <!-- 编辑  通道/机位名称 -->

+ 14 - 2
src/views/BasicSettings/StoreManagement.vue

@@ -72,8 +72,20 @@
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-icon type="edit" title="编辑" id="store-edit" @click="edit(record)" :style="{ fontSize: '20px', color: '#1890FF', padding: '0 10px' }" />
-        <a-icon type="link" title="设置" id="store-set" @click="setEquipment(record)" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" />
+        <a-icon
+          type="edit"
+          title="编辑"
+          id="store-edit"
+          @click="edit(record)"
+          :style="{ fontSize: '20px', color: '#1890FF', padding: '0 10px' }"
+          v-hasPermission="'B_basicSettings_store_edit'" />
+        <a-icon
+          type="link"
+          title="设置"
+          id="store-set"
+          @click="setEquipment(record)"
+          :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }"
+          v-hasPermission="'M_store_device'" />
       </template>
     </s-table>
 

+ 1 - 3
src/views/CardVoucherAuth/role/menuModal.vue → src/views/SupervisionAuth/role/menuModal.vue

@@ -26,7 +26,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { addMenuPower } from '@/api/card-voucher-role.js'
+import { addMenuPower } from '@/api/supervision-role.js'
 export default {
   name: 'RoleModal',
   components: {
@@ -60,8 +60,6 @@ export default {
   },
   methods: {
     onExpand (expandedKeys) {
-      // if not set autoExpandParent to false, if children expanded, parent can not collapse.
-      // or, you can remove all expanded children keys.
       this.expandedKeys = expandedKeys
       this.autoExpandParent = false
     },

+ 8 - 13
src/views/CardVoucherAuth/role/roleList.vue → src/views/SupervisionAuth/role/roleList.vue

@@ -13,8 +13,8 @@
               <v-select code="ENABLE_FLAG" v-model="queryParam.isEnable" allowClear placeholder="请选择状态" ></v-select>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24" class="flex-sp">
-            <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+          <a-col :md="4" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" style="margin-right: 10px;">查询</a-button>
             <a-button @click="reset">重置</a-button>
           </a-col>
         </a-row>
@@ -22,7 +22,7 @@
     </div>
     <a-divider/>
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal">新建</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" v-hasPermission="'B_supervision_role_add'">新建</a-button>
     </div>
 
     <s-table
@@ -34,12 +34,12 @@
       bordered
     >
       <span slot="status" slot-scope="text, record">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.isEnable" @change="changeFlagHandle(text, record)"/>
+        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.isEnable" @change="changeFlagHandle(text, record)" v-hasPermission="'B_power_role_del'"/>
       </span>
       <span slot="action" slot-scope="text, record">
-        <a class="action-button menu-text" @click="openMenuModal(record)">菜单权限</a>
-        <a class="action-button" @click="handleEdit(record)">修改</a>
-        <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)">删除</a>
+        <a class="action-button menu-text" @click="openMenuModal(record)" v-hasPermission="'M_power_role_menu'">菜单权限</a>
+        <a class="action-button" @click="handleEdit(record)" v-hasPermission="'B_supervision_role_edit'">修改</a>
+        <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)" v-hasPermission="'B_supervision_role_del'">删除</a>
       </span>
     </s-table>
     <!-- 新增、编辑角色弹窗 -->
@@ -53,7 +53,7 @@
 import { STable, VSelect } from '@/components'
 import roleModal from './roleModal.vue'
 import menuModal from './menuModal.vue'
-import { getPowerRoleList, updateEnableStatus, delectRolePower, getMenuList } from '@/api/card-voucher-role.js'
+import { getPowerRoleList, updateEnableStatus, delectRolePower, getMenuList } from '@/api/supervision-role.js'
 export default {
   name: 'RoleList',
   components: {
@@ -204,11 +204,6 @@ export default {
   .table-page-search-wrapper .ant-form-inline .ant-form-item{
     margin-bottom: 0;
   }
-  .flex-sp{
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-  }
   .action-button{
     line-height: 40px;
     white-space: nowrap;

+ 6 - 5
src/views/CardVoucherAuth/role/roleModal.vue → src/views/SupervisionAuth/role/roleModal.vue

@@ -5,13 +5,13 @@
         <!-- 用户名称 -->
         <a-form-item label="角色名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
-            placeholder="请输入角色名称"
+            placeholder="请输入角色名称30个字以内"
+            :maxLength="30"
             v-decorator="['formData.name', {
               initialValue: formData.name,
-              rules: [{ required: true, message: '请输入角色名称!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多20个字符'}] }]"
+              rules: [{ required: true, message: '请输入角色名称30个字以内!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
           />
         </a-form-item>
-
         <!-- 状态 -->
         <a-form-item label="状态" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-radio-group
@@ -36,7 +36,8 @@
                 rules: [] },
             ]"
             style="min-height: 60px;"
-            placeholder=""
+            placeholder="输入内容512个字以内"
+            :maxLength="512"
             autosize />
         </a-form-item>
 
@@ -56,7 +57,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { saveRolePower } from '@/api/card-voucher-role.js'
+import { saveRolePower } from '@/api/supervision-role.js'
 export default {
   name: 'RoleModal',
   components: {

+ 52 - 60
src/views/CardVoucherAuth/user/newStoreModal.vue → src/views/SupervisionAuth/user/newStoreModal.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-modal v-model="isShow" @cancel="cancel" title="选择关联门店" width="60%">
+  <a-modal v-model="isShow" @cancel="cancel" title="选择关联门店" width="60%" :footer="null">
     <a-row :gutter="24">
       <a-form class="form-box" :form="form" @submit="handleSubmit">
         <a-col :span="10">
@@ -10,17 +10,11 @@
             :expandedKeys="expandedKeys"
             :autoExpandParent="autoExpandParent"
             v-model="checkedKeys"
-            :treeData="treeData"
-          />
+            :treeData="treeData" />
         </a-col>
         <a-col :span="14">
-          <a-table
-            :columns="columns"
-            :data-source="loadData"
-            :pagination="false"
-            bordered
-          >
-            <template slot="title" >
+          <a-table :columns="columns" :data-source="loadData" :pagination="false" bordered>
+            <template slot="title">
               选择门店
             </template>
             <span slot="action" slot-scope="text, record">
@@ -29,25 +23,23 @@
             </span>
           </a-table>
         </a-col>
-        <!-- <a-col :span="24">
-          <a-form-item class="footer" :wrapper-col="{ span: 24, offset: 12 }">
-            <a-button type="primary" @click="handleSubmit()">
-              保存
-            </a-button>
-            <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
-              取消
-            </a-button>
-          </a-form-item>
-        </a-col> -->
       </a-form>
     </a-row>
   </a-modal>
 </template>
 
 <script>
-import { findOrgTree } from '@/api/atorg.js'
-import { STable } from '@/components'
-import { getOrgUsedStoreList, saveNewUserStore, deleteUsedStore } from '@/api/card-voucher-user.js'
+import {
+  findOrgTree
+} from '@/api/atorg.js'
+import {
+  STable
+} from '@/components'
+import {
+  getOrgUsedStoreList,
+  saveNewUserStore,
+  deleteUsedStore
+} from '@/api/supervision-user.js'
 export default {
   name: 'NewStoreModal',
   components: {
@@ -67,35 +59,34 @@ export default {
   data () {
     return {
       isShow: this.visible,
-      loadData: [],	// 列表数据
-      expandedKeys: [],	// 树节点
-      autoExpandParent: true,	// 自动展开父节点
-      checkedKeys: [],	// 选中的key值
-      checkedData: [],	// 选中的数据
-      treeData: [],		// 组织机构
-      orgId: '',	// 组织机构id
+      loadData: [], // 列表数据
+      expandedKeys: [], // 树节点
+      autoExpandParent: true, // 自动展开父节点
+      checkedKeys: [], // 选中的key值
+      checkedData: [], // 选中的数据
+      treeData: [], // 组织机构
+      orgId: '', // 组织机构id
       storeId: '', // 门店id
-      columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          minWidth: '100',
-          align: 'center'
-        },
-        {
-          title: '门店名称',
-          dataIndex: 'storeName',
-          minWidth: '100',
-          align: 'center'
-        },
-        {
-          title: '操作',
-          minWidth: '100',
-          align: 'center',
-          scopedSlots: {
-            customRender: 'action'
-          }
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        minWidth: '100',
+        align: 'center'
+      },
+      {
+        title: '门店名称',
+        dataIndex: 'storeName',
+        minWidth: '100',
+        align: 'center'
+      },
+      {
+        title: '操作',
+        minWidth: '100',
+        align: 'center',
+        scopedSlots: {
+          customRender: 'action'
         }
+      }
       ]
     }
   },
@@ -123,8 +114,6 @@ export default {
       this.$emit('close')
     },
     onExpand (expandedKeys) {
-      // if not set autoExpandParent to false, if children expanded, parent can not collapse.
-      // or, you can remove all expanded children keys.
       this.expandedKeys = expandedKeys
       this.autoExpandParent = false
     },
@@ -142,7 +131,9 @@ export default {
     },
     // 获取列表数据
     getListData () {
-      getOrgUsedStoreList({ orgId: this.orgId }).then(res => {
+      getOrgUsedStoreList({
+        orgId: this.orgId
+      }).then(res => {
         if (res.status == 200) {
           res.data.map((item, index) => {
             item.no = index + 1
@@ -162,7 +153,10 @@ export default {
         okText: '确定',
         cancelText: '取消',
         onOk () {
-          saveNewUserStore({ userId: _this.ddId, storeId: record.storeId }).then(res => {
+          saveNewUserStore({
+            userId: _this.ddId,
+            storeId: record.storeId
+          }).then(res => {
             if (res.status == 200) {
               _this.getListData()
               _this.$message.success(res.message)
@@ -177,7 +171,7 @@ export default {
     delect (row) {
       const _this = this
       this.$confirm({
-        title: '警告',
+        title: '提示',
         content: '解绑后数据无法恢复,确认解绑?',
         okText: '确定',
         cancelText: '取消',
@@ -197,7 +191,9 @@ export default {
     }
   },
   beforeCreate () {
-    this.form = this.$form.createForm(this, { name: 'NewStoreModal' })
+    this.form = this.$form.createForm(this, {
+      name: 'NewStoreModal'
+    })
   },
   watch: {
     checkedKeys (val) {
@@ -210,7 +206,6 @@ export default {
       if (newValue) {
         // 获取组织机构树的数据
         findOrgTree().then(res => {
-          console.log(res, '---------------组织机构')
           if (res.status == 200) {
             this.treeData = this.recursionFun(res.data)
             this.getListData()
@@ -225,6 +220,3 @@ export default {
   }
 }
 </script>
-
-<style scoped>
-</style>

+ 38 - 30
src/views/CardVoucherAuth/user/usedStoreModal.vue → src/views/SupervisionAuth/user/usedStoreModal.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <a-modal v-model="isShow" @cancel="cancel" title="点检关联门店" width="45%">
+    <a-modal v-model="isShow" @cancel="cancel" title="点检关联门店" width="45%" :footer="null">
       <!-- 新增点检门店按钮 -->
       <a-button type="primary" icon="plus" @click="openModal" style="margin-bottom: 20px;">新增门店</a-button>
       <!-- 列表 -->
       <a-table :columns="columns" :data-source="loadData" :pagination="false" bordered>
-        <template slot="title" >
+        <template slot="title">
           已选门店
         </template>
         <span slot="action" slot-scope="text, record">
@@ -20,9 +20,14 @@
 </template>
 
 <script>
-import { STable } from '@/components'
+import {
+  STable
+} from '@/components'
 import newStoreModal from './newStoreModal.vue'
-import { getUsedStoreList, deleteUsedStore } from '@/api/card-voucher-user.js'
+import {
+  getUsedStoreList,
+  deleteUsedStore
+} from '@/api/supervision-user.js'
 export default {
   name: 'StoreModal',
   components: {
@@ -45,38 +50,41 @@ export default {
       showAllStoreModal: false,
       ddId: '',
       loadData: [],
-      columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          minWidth: '100',
-          align: 'center'
-        },
-        {
-          title: '门店名称',
-          dataIndex: 'storeName',
-          minWidth: '100',
-          align: 'center'
-        },
-        {
-          title: '操作',
-          key: '操作',
-          minWidth: '100',
-          align: 'center',
-          scopedSlots: { customRender: 'action' }
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        minWidth: '100',
+        align: 'center'
+      },
+      {
+        title: '门店名称',
+        dataIndex: 'storeName',
+        minWidth: '100',
+        align: 'center'
+      },
+      {
+        title: '操作',
+        key: '操作',
+        minWidth: '100',
+        align: 'center',
+        scopedSlots: {
+          customRender: 'action'
         }
+      }
       ]
     }
   },
   methods: {
-	  // 关闭弹窗事件
-	  closeModal () {
+    // 关闭弹窗事件
+    closeModal () {
       this.showAllStoreModal = false
-	  this.getListData(this.userId)
-	  },
+      this.getListData(this.userId)
+    },
     // 获取已选列表数据
     getListData (id) {
-      getUsedStoreList({ userId: id }).then(res => {
+      getUsedStoreList({
+        userId: id
+      }).then(res => {
         if (res.status == 200) {
           res.data.map((item, index) => {
             item.no = index + 1
@@ -85,8 +93,8 @@ export default {
         }
       })
     },
+    // 关闭弹窗
     cancel (e) {
-      // this.clear()
       this.$emit('close')
     },
     // 新增点检门店
@@ -98,7 +106,7 @@ export default {
     delect (row) {
       const _this = this
       this.$confirm({
-        title: '警告',
+        title: '提示',
         content: '删除后无法恢复,确认删除?',
         okText: '确定',
         cancelText: '取消',

+ 29 - 38
src/views/CardVoucherAuth/user/userList.vue → src/views/SupervisionAuth/user/userList.vue

@@ -5,26 +5,31 @@
         <a-row :gutter="48">
           <a-col :md="6" :sm="24">
             <a-form-item label="员工姓名">
-              <a-input allowClear v-model.trim="queryParam.name" id="userList-name" @pressEnter="$refs.table.refresh(true)" placeholder="请输入员工姓名" />
+              <a-input
+                allowClear
+                v-model.trim="queryParam.name"
+                id="userList-name"
+                @pressEnter="$refs.table.refresh(true)"
+                placeholder="请输入员工姓名" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="手机号码">
-              <a-input allowClear v-model.trim="queryParam.phone" id="userList-phone" @pressEnter="$refs.table.refresh(true)" placeholder="请输入手机号码" />
+              <a-input
+                allowClear
+                v-model.trim="queryParam.phone"
+                id="userList-phone"
+                @pressEnter="$refs.table.refresh(true)"
+                placeholder="请输入手机号码" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="状态">
-              <v-select
-                code="ENABLE_FLAG"
-                id="userList-loginFlag"
-                v-model="queryParam.loginFlag"
-                allowClear
-                placeholder="请选择状态"></v-select>
+              <v-select code="ENABLE_FLAG" id="userList-loginFlag" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态"></v-select>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24" class="flex-sp">
-            <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" style="margin-right: 10px;">查询</a-button>
             <a-button @click="reset">重置</a-button>
           </a-col>
         </a-row>
@@ -32,7 +37,7 @@
     </div>
     <a-divider />
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal">新建</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" v-hasPermission="'B_supervision_user_add'">新建</a-button>
     </div>
     <s-table
       :columns="columns"
@@ -50,25 +55,25 @@
           <template slot="title">
             <span>编辑</span>
           </template>
-          <a-icon type="edit" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="handleEdit(record)" />
+          <a-icon type="edit" style="font-size: 20px;color: #1890FF;padding: 0 10px;" @click="handleEdit(record)" v-hasPermission="'B_supervision_user_edit'"/>
         </a-tooltip>
         <a-tooltip placement="bottom" v-if="record.storeSetFlag==1">
           <template slot="title">
             <span>关联点检门店</span>
           </template>
-          <a-icon type="apartment" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="selectStore(record)" />
+          <a-icon type="apartment" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="selectStore(record)" v-hasPermission="'M_supervision_user_spotCheckStore'"/>
         </a-tooltip>
-        <a-tooltip placement="bottom">
+        <a-tooltip placement="bottom" v-if="record.loginFlag==1">
           <template slot="title">
             <span>重置密码</span>
           </template>
-          <a-icon type="unlock" style="font-size: 20px;color: #08c0de;padding: 0 10px;"	@click="resetPassword(record)" />
+          <a-icon type="unlock" style="font-size: 20px;color: #08c0de;padding: 0 10px;" @click="resetPassword(record)" v-hasPermission="'B_supervision_user_restPwd'"/>
         </a-tooltip>
         <a-tooltip placement="bottom">
           <template slot="title">
             <span>删除</span>
           </template>
-          <a-icon type="delete" style="font-size: 20px;color: red;padding: 0 10px;" @click="delect(record)" />
+          <a-icon type="delete" style="font-size: 20px;color: red;padding: 0 10px;" @click="delect(record)" v-hasPermission="'B_supervision_user_delete'"/>
         </a-tooltip>
       </span>
     </s-table>
@@ -90,7 +95,7 @@ import {
   resetPSD,
   getPowerUserList,
   delectUserPower
-} from '@/api/card-voucher-user.js'
+} from '@/api/supervision-user.js'
 export default {
   name: 'UserList',
   components: {
@@ -103,12 +108,12 @@ export default {
     return {
       // 查询参数
       queryParam: {
-        name: '',
-        phone: '',
-        loginFlag: ''
+        name: '', // 员工姓名
+        phone: '',	// 手机号码
+        loginFlag: ''	// 状态
       },
-      showModal: false,
-      showStoreModal: false,
+      showModal: false, // 新增弹框showModal控制打开或关闭  false--默认关闭  true--打开
+      showStoreModal: false,	// 点检门店弹框showStoreModal控制打开或关闭  false--默认关闭  true--打开
       itemData: {}, // 编辑行数据
       userId: '', // 用户id
       columns: [{
@@ -147,7 +152,7 @@ export default {
         minWidth: '100',
         align: 'center',
         scopedSlots: {
-		  customRender: 'loginFlag'
+          customRender: 'loginFlag'
         }
       },
       {
@@ -168,7 +173,6 @@ export default {
             const _item = res.data.list[i]
             _item.no = no + i + 1
           }
-          res.data.count = Number(res.data.count)
           return res.data
         })
       },
@@ -215,7 +219,7 @@ export default {
     delect (row) {
       const _this = this
       this.$confirm({
-        title: '警告',
+        title: '提示',
         content: '删除后数据无法恢复,确认删除?',
         okText: '确定',
         cancelText: '取消',
@@ -233,13 +237,6 @@ export default {
         }
       })
     },
-    getBizStr (storeBizList) {
-      const str = []
-      storeBizList.forEach(item => {
-        str.push(item.bizTypeName)
-      })
-      return str.join(',')
-    },
     // 编辑
     handleEdit (row) {
       this.itemData = row
@@ -254,12 +251,6 @@ export default {
 		margin-bottom: 0;
 	}
 
-	.flex-sp {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-	}
-
 	.action-button {
 		line-height: 40px;
 		white-space: nowrap;

+ 54 - 48
src/views/CardVoucherAuth/user/userModal.vue → src/views/SupervisionAuth/user/userModal.vue

@@ -1,6 +1,12 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel" width="35%">
+    <a-modal
+      class="modalBox"
+      :title="titleText"
+      v-model="isshow"
+      @cancle="cancel"
+      width="35%"
+      :footer="null">
       <a-form :form="form" @submit="handleSubmit">
         <a-row :gutter="24">
           <a-col :span="12">
@@ -8,11 +14,12 @@
             <a-form-item label="员工姓名" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-input
                 placeholder="请输入员工姓名30个字以内"
+                :maxLength="30"
                 id="userModal-name"
                 v-decorator="['formData.name', {
                   initialValue: formData.name,
-                  rules: [{ required: true, message: '请输入员工姓名!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
-                allowClear/>
+                  rules: [{ required: true, message: '请输入员工姓名30个字以内!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
+                allowClear />
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -25,7 +32,7 @@
                 v-decorator="['formData.phone', {
                   initialValue: formData.phone,
                   rules: [{ required: true, message: '请输入手机号码!' },{pattern:/^[1][0-9]{10}$/, message: '请输入正确的手机号码!'}] }]"
-                allowClear/>
+                allowClear />
             </a-form-item>
           </a-col>
         </a-row>
@@ -60,14 +67,8 @@
                 ]"
                 style="width: 100%"
                 placeholder="请选择角色"
-                mode="multiple"
-              >
-                <a-select-option
-                  v-for="item in roleList"
-                  :key="item.id"
-                  :disabled="item.isEnable == '0' ? true : false"
-                >{{ item.name }}</a-select-option
-                >
+                mode="multiple">
+                <a-select-option v-for="item in roleList" :key="item.id" :disabled="item.isEnable == '0' ? true : false">{{ item.name }}</a-select-option>
               </a-select>
 
             </a-form-item>
@@ -75,7 +76,7 @@
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item class="form-label" label="所属机构" prop="orgCode" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+            <a-form-item class="form-label" label="所属机构" prop="orgCode" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
               <a-tree-select
                 id="userModal-orgCode"
                 allowClear
@@ -92,7 +93,7 @@
                     rules: [{ required: true, message: '请选择所属机构!' }] },
                 ]">
               </a-tree-select>
-            </a-form-model-item>
+            </a-form-item>
           </a-col>
           <!-- 状态 -->
           <a-col :span="12">
@@ -106,8 +107,8 @@
                     initialValue: formData.loginFlag,
                     rules: [{ required: true, message: '请选择状态!' }] },
                 ]">
-                <a-radio :value="1" id="userModal-loginFlag">是</a-radio>
-                <a-radio :value="0" id="userModal-loginFlag">否</a-radio>
+                <a-radio :value="1" >是</a-radio>
+                <a-radio :value="0" >否</a-radio>
               </a-radio-group>
 
             </a-form-item>
@@ -130,12 +131,17 @@
 import {
   STable,
   VSelect,
-  Tree } from '@/components'
+  Tree
+} from '@/components'
 import {
   saveUserPower
-} from '@/api/card-voucher-user.js'
-import { getAllRole } from '@/api/card-voucher-role.js'
-import { findOrgTree } from '@/api/atorg.js'
+} from '@/api/supervision-user.js'
+import {
+  getAllRole
+} from '@/api/supervision-role.js'
+import {
+  findOrgTree
+} from '@/api/atorg.js'
 export default {
   name: 'UserModal',
   components: {
@@ -165,15 +171,15 @@ export default {
       form: this.$form.createForm(this, {
         name: 'miniForm'
       }),
-      roleList: [],	// 角色
-	  parentCodePaths: '', // 组织机构父路径
+      roleList: [], // 角色
+      parentCodePaths: '', // 组织机构父路径
       formData: {
-        orgCode: null,	// 组织机构
-        name: '',	// 员工姓名
+        orgCode: null, // 组织机构
+        name: '', // 员工姓名
         loginFlag: '', // 状态
-        phone: '',	// 手机号码
-        sex: '',	// 性别
-        roleNames: undefined	// 角色
+        phone: '', // 手机号码
+        sex: '', // 性别
+        roleNames: undefined // 角色
       },
       treeData: []
 
@@ -196,7 +202,7 @@ export default {
     },
     //  组织归属  change
     treeChange (value, label, extra) {
-	  this.parentCodePaths = extra.triggerNode.$options.propsData.dataRef.parentCodePaths
+      this.parentCodePaths = extra.triggerNode.$options.propsData.dataRef.parentCodePaths
     },
     //  递归函数
     recursionFun (data) {
@@ -222,10 +228,11 @@ export default {
       this.form.validateFields((err, values) => {
         if (!err) {
           values.formData.roleNames = values.formData.roleNames.join(',')
-          // values.formData.org.id = values.orgCode
-		  const formData = JSON.parse(JSON.stringify(values.formData))
-		  formData.org = { id: formData.orgCode }
-		  delete formData.orgCode
+          const formData = JSON.parse(JSON.stringify(values.formData))
+          formData.org = {
+            id: formData.orgCode
+          }
+          delete formData.orgCode
           saveUserPower(Object.assign({
             id: this.data.id ? this.data.id : ''
           }, formData)).then(res => {
@@ -260,11 +267,11 @@ export default {
       this.form.resetFields()
       delete this.formData.id
       this.formData.orgCode = null // 所属机构
-      this.formData.name = ''	// 员工姓名
-      this.formData.loginFlag = ''	// 状态
-      this.formData.phone = ''	// 手机号码
-      this.formData.sex = ''	// 性别
-      this.formData.roleNames = undefined	// 角色
+      this.formData.name = '' // 员工姓名
+      this.formData.loginFlag = '' // 状态
+      this.formData.phone = '' // 手机号码
+      this.formData.sex = '' // 性别
+      this.formData.roleNames = undefined // 角色
     },
     // 获取角色列表接口
     getRoleData () {
@@ -276,14 +283,15 @@ export default {
         }
       })
     },
+    // 编辑赋值
     pageInitData () {
       const _this = this
       this.titleText = '编辑用户'
-      this.formData.orgCode = this.data.org.id	// 组织机构
-      this.formData.name = this.data.name	// 员工姓名
-      this.formData.loginFlag = Number(this.data.loginFlag)	// 状态
-      this.formData.phone = this.data.phone	// 手机号码
-      this.formData.sex = this.data.sex	// 性别
+      this.formData.orgCode = this.data.org.id // 组织机构
+      this.formData.name = this.data.name // 员工姓名
+      this.formData.loginFlag = Number(this.data.loginFlag) // 状态
+      this.formData.phone = this.data.phone // 手机号码
+      this.formData.sex = this.data.sex // 性别
       let roleNames = this.data.roleNames
       if (roleNames) {
         roleNames = roleNames.split(',')
@@ -291,8 +299,7 @@ export default {
           const arr = []
           roleNames.map(item => {
             console.log(item)
-            const row = this.roleList.find(a => a.name == item)
-            console.log(row, '------------juese')
+            const row = _this.roleList.find(a => a.name == item)
             if (row) {
               arr.push(row.id)
             }
@@ -315,9 +322,8 @@ export default {
     },
     isshow (newValue, oldValue) {
       if (newValue) {
-        this.getOrgData()	// 打开弹窗获取组织机构数据
-        this.getRoleData()	// 打开弹窗获取角色列表数据
-        console.log(this.data, '===shuju')
+        this.getOrgData() // 打开弹窗获取组织机构数据
+        this.getRoleData() // 打开弹窗获取角色列表数据
         if (this.data.id) { // 编辑
           this.pageInitData()
         } else {
@@ -331,7 +337,7 @@ export default {
 }
 </script>
 
-<style >
+<style scoped>
 	.ant-modal-footer {
 		display: none;
 	}

+ 10 - 17
src/views/evaluation/evaluationItem/AddEvaIndexModal.vue

@@ -1,6 +1,12 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel" :width="600">
+    <a-modal
+      class="modalBox"
+      :footer="null"
+      :title="titleText"
+      v-model="isshow"
+      @cancle="cancel"
+      :width="600">
       <a-form :form="form" ref="form" @submit="handleSubmit">
         <a-row :gutter="24">
           <a-col :span="20">
@@ -23,7 +29,7 @@
           <a-button :loading="loading" id="addEvaIndexModal-submit" type="primary" @click="handleSubmit()">
             确定
           </a-button>
-          <a-button id="addEvaIndexModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button id="addEvaIndexModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
             取消
           </a-button>
         </a-form-item>
@@ -129,20 +135,7 @@ export default {
         }
       })
     },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.clear()
-          _this.cancel()
-        }
-      })
-    },
+
     clear () {
       this.form.resetFields()
     }
@@ -157,7 +150,7 @@ export default {
 }
 </script>
 
-<style>
+<style scoped>
 	.modalBox {}
 
 	.ant-modal-footer {

+ 9 - 20
src/views/evaluation/evaluationItem/AddEvaItemModal.vue

@@ -1,6 +1,12 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel" :width="600">
+    <a-modal
+      class="modalBox"
+      :footer="null"
+      :title="titleText"
+      v-model="isshow"
+      @cancle="cancel"
+      :width="600">
       <a-form :form="form" ref="form" @submit="handleSubmit">
         <a-row :gutter="24">
           <a-col :span="20">
@@ -41,7 +47,7 @@
           <a-button :loading="loading" id="addEvaItemModal-submit" type="primary" @click="handleSubmit()">
             确定
           </a-button>
-          <a-button id="addEvaItemModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button id="addEvaItemModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
             取消
           </a-button>
         </a-form-item>
@@ -155,24 +161,7 @@ export default {
           })
         }
       })
-    },
-    // 取消
-    handleCancel () {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定取消吗?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          _this.cancel()
-        }
-      })
-    },
-    clear () {
-      this.form.resetFields()
     }
-
   },
   beforeCreate () {
     this.form = this.$form.createForm(this, {
@@ -183,7 +172,7 @@ export default {
 }
 </script>
 
-<style>
+<style scoped>
 	.modalBox {}
 
 	.ant-modal-footer {

+ 15 - 7
src/views/evaluation/evaluationItem/EvaluationItem.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card :bordered="false">
     <div class="table-page-search-wrapper">
-      <a-form layout="inline">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="48">
           <a-col :span="6">
             <a-form-item label="考评项目名称">
@@ -28,7 +28,7 @@
     </div>
     <a-divider />
     <div class="table-operator">
-      <a-button id="evaluationItem-add" type="primary" icon="plus" @click="openModal">新</a-button>
+      <a-button v-hasPermission="'B_evaluationItem_add'" id="evaluationItem-add" type="primary" icon="plus" @click="openModal">新</a-button>
     </div>
     <s-table
       ref="table"
@@ -39,13 +39,21 @@
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-icon id="evaluationItem-edit" type="edit" class="actionBtn blue" v-if="record.status == '0'" @click="openModal(record)" />
-        <a-icon id="evaluationItem-delete" type="delete" class="actionBtn red" v-if="record.status == '0'" @click="delect(record)" />
-        <a-icon id="evaluationItem-setting" type="setting" class="actionBtn orange" @click="handleSet(record)" />
+        <a-icon id="evaluationItem-edit" type="edit" class="actionBtn blue" v-if="record.status == '0'&& $hasPermissions('B_evaluation_edit')" @click="openModal(record)" />
+        <a-icon id="evaluationItem-delete" type="delete" class="actionBtn red" v-if="record.status == '0'&& $hasPermissions('B_evaluationItem_del')" @click="delect(record)" />
+        <a-icon v-hasPermission="'M_evaluationItem_set'" id="evaluationItem-setting" type="setting" class="actionBtn orange" @click="handleSet(record)" />
+        <span v-if="(!$hasPermissions('B_evaluation_edit') && !$hasPermissions('B_evaluationItem_del') && !$hasPermissions('M_evaluationItem_set'))||(record.status == '1'&& !$hasPermissions('M_evaluationItem_set'))">-</span>
       </template>
       <!-- 启用禁用 -->
       <template slot="enable" slot-scope="text, row">
-        <a-switch id="evaluationItem-enableStatus" checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)"/>
+        <a-switch
+          v-if="$hasPermissions('B_evaluationItem_enable')"
+          id="evaluationItem-enableStatus"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          v-model="row.status"
+          @change="changeFlagHandle(row)"/>
+        <span v-else :class="[text==1 ? 'green' : 'red']">{{ text==1 ? '已启用' : '已禁用' }}</span>
       </template>
     </s-table>
     <!-- 新增/编辑 弹窗 -->
@@ -209,7 +217,7 @@ export default {
   }
 }
 </script>
-<style>
+<style scoped>
 	.table-page-search-wrapper,
 	.addButton {
 		margin-bottom: 0;

+ 11 - 4
src/views/evaluation/evaluationItem/SetEvaItemModal.vue

@@ -1,9 +1,15 @@
 <template>
   <div>
-    <a-modal class="modalBox" title="设置考评指标" v-model="isshow" @cancle="cancel" :width="'60%'">
+    <a-modal
+      class="modalBox"
+      :footer="null"
+      title="设置考评指标"
+      v-model="isshow"
+      @cancle="cancel"
+      :width="'60%'">
       <a-row :gutter="24" class="header">
         <span>请给考评项目为【{{ itemName }}】设置考评指标</span>
-        <a-button id="setEvaItemModal-add" type="primary" @click="openModal">新增</a-button>
+        <a-button v-hasPermission="'B_target_add'" id="setEvaItemModal-add" type="primary" @click="openModal">新增</a-button>
       </a-row>
       <a-table
         ref="table"
@@ -15,8 +21,9 @@
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-icon id="setEvaItemModal-edit" type="edit" class="actionBtn blue" @click="openModal(record)" />
-          <a-icon id="setEvaItemModal-delete" type="delete" class="actionBtn red" @click="delect(record)" />
+          <a-icon v-hasPermission="'B_target_edit'" id="setEvaItemModal-edit" type="edit" class="actionBtn blue" @click="openModal(record)" />
+          <a-icon v-hasPermission="'B_target_del'" id="setEvaItemModal-delete" type="delete" class="actionBtn red" @click="delect(record)" />
+          <span v-if="!$hasPermissions('B_target_edit') && !$hasPermissions('B_target_del')">-</span>
         </template>
       </a-table>
       <!-- 新增/编辑 弹窗 -->

+ 3 - 3
src/views/evaluation/evaluationPlan/AddEvaModal.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel" :width="600">
+    <a-modal class="modalBox" :footer="null" :title="titleText" v-model="isshow" @cancle="cancel" :width="600">
       <a-form :form="form" :model="formData" ref="form" @submit="handleSubmit">
         <a-row :gutter="24">
           <a-col :span="20">
@@ -61,7 +61,7 @@
           <a-button :loading="loading" id="addEvaModal-submit" type="primary" @click="handleSubmit()">
             确定
           </a-button>
-          <a-button id="addEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button id="addEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
             取消
           </a-button>
         </a-form-item>
@@ -223,7 +223,7 @@ export default {
 }
 </script>
 
-<style>
+<style scoped>
 	.modalBox {}
 
 	.ant-modal-footer {

+ 15 - 7
src/views/evaluation/evaluationPlan/EvaluationPlan.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card :bordered="false">
     <div class="table-page-search-wrapper">
-      <a-form layout="inline">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="48">
           <a-col :span="6">
             <a-form-item label="方案名称">
@@ -28,8 +28,8 @@
     </div>
     <a-divider />
     <a-row class="add-btn" type="flex" justify="space-between">
-      <a-button id="evaluationPlan-add" type="primary" icon="plus" @click="openModal">新</a-button>
-      <a-col id="evaluationPlan-setDefaultPlan" @click="handleDefaultSet">
+      <a-button v-hasPermission="'B_evaluationPlan_add'" id="evaluationPlan-add" type="primary" icon="plus" @click="openModal">新</a-button>
+      <a-col v-hasPermission="'M_evaluationPlan_default'" id="evaluationPlan-setDefaultPlan" @click="handleDefaultSet">
         <a-icon type="setting" class="setting-icon" />
         <span class="setting">默认方案设置</span>
       </a-col>
@@ -43,13 +43,21 @@
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-icon id="evaluationPlan-edit" type="edit" class="actionBtn blue" v-if="record.status == '0'" @click="openModal(record)" />
-        <a-icon id="evaluationPlan-delete" type="delete" class="actionBtn red" v-if="record.status == '0'" @click="delect(record)" />
-        <a-icon id="evaluationPlan-setting" type="setting" class="actionBtn orange" @click="handleSet(record)" />
+        <a-icon id="evaluationPlan-edit" type="edit" class="actionBtn blue" v-if="record.status == '0' && $hasPermissions('M_evaluationPlan_edit')" @click="openModal(record)" />
+        <a-icon id="evaluationPlan-delete" type="delete" class="actionBtn red" v-if="record.status == '0' && $hasPermissions('B_evaluationPlan_del')" @click="delect(record)" />
+        <a-icon v-hasPermission="'M_evaluationPlan_setItem'" id="evaluationPlan-setting" type="setting" class="actionBtn orange" @click="handleSet(record)" />
+        <span v-if="(!$hasPermissions('M_evaluationPlan_edit') && !$hasPermissions('B_evaluationPlan_del') && !$hasPermissions('M_evaluationPlan_setItem'))||(record.status == '1' && !$hasPermissions('M_evaluationPlan_setItem'))">-</span>
       </template>
       <!-- 启用禁用 -->
       <template slot="enable" slot-scope="text, row">
-        <a-switch id="evaluationPlan-enableStatus" checkedChildren="启用" unCheckedChildren="禁用" v-model="row.status" @change="changeFlagHandle(row)" />
+        <a-switch
+          v-if="$hasPermissions('B_evaluationPlan_enable')"
+          id="evaluationPlan-enableStatus"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          v-model="row.status"
+          @change="changeFlagHandle(row)" />
+        <span v-else :class="[text==1 ? 'green' : 'red']">{{ text==1 ? '已启用' : '已禁用' }}</span>
       </template>
     </s-table>
     <!-- 新增/编辑 弹窗 -->

+ 9 - 3
src/views/evaluation/evaluationPlan/SetEvaDefaultModal.vue

@@ -1,6 +1,12 @@
 <template>
   <div>
-    <a-modal class="modalBox" title="默认方案设置" v-model="isshow" @cancle="cancel" :width="600">
+    <a-modal
+      class="modalBox"
+      :footer="null"
+      title="默认方案设置"
+      v-model="isshow"
+      @cancle="cancel"
+      :width="600">
       <a-form :form="form" ref="form" @submit="handleSubmit">
         <a-row :gutter="24">
           <a-col :span="24">
@@ -52,7 +58,7 @@
           <a-button :loading="loading" id="setEvaDefaultModal-submit" type="primary" @click="handleSubmit()">
             确定
           </a-button>
-          <a-button id="setEvaDefaultModal-cancle" :style="{ marginLeft: '8px' }" @click="handleCancel()">
+          <a-button id="setEvaDefaultModal-cancle" :style="{ marginLeft: '8px' }" @click="cancel()">
             取消
           </a-button>
         </a-form-item>
@@ -215,7 +221,7 @@ export default {
 }
 </script>
 
-<style>
+<style scoped>
 	.modalBox {}
 
 	.ant-modal-footer {

+ 8 - 5
src/views/evaluation/evaluationPlan/SetEvaModal.vue

@@ -1,6 +1,12 @@
 <template>
   <div>
-    <a-modal class="modalBox" title="选择考评项" v-model="isshow" @cancle="cancel" :width="'80%'">
+    <a-modal
+      class="modalBox"
+      :footer="null"
+      title="选择考评项"
+      v-model="isshow"
+      @cancle="cancel"
+      :width="'80%'">
       <a-row :gutter="24">
         <a-col class="title" :span="20">
           <!-- 考评方案名称 -->
@@ -89,7 +95,7 @@
             <a-button :loading="loading" id="setEvaModal-submit" type="primary" @click="handleSubmit()">
               保存
             </a-button>
-            <a-button id="setEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
+            <a-button id="setEvaModal-cancel" :style="{ marginLeft: '8px' }" @click="cancel()">
               取消
             </a-button>
           </a-form-item>
@@ -195,9 +201,6 @@ export default {
       loadItemData: parameter => {
         return getItemList().then(res => {
           if (res.status == 200) {
-            //       res.data.map((item, index) => {
-			   // res.data.no = index + 1
-            //       })
             return res.data
           }
         })

+ 7 - 12
src/views/power/role/roleList.vue

@@ -13,8 +13,8 @@
               <v-select code="ENABLE_FLAG" v-model="queryParam.isEnable" @pressEnter="$refs.table.refresh(true)" allowClear placeholder="请选择状态" ></v-select>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24" class="flex-sp">
-            <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" style="margin-right: 10px;">查询</a-button>
             <a-button @click="reset">重置</a-button>
           </a-col>
         </a-row>
@@ -22,7 +22,7 @@
     </div>
     <a-divider/>
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal">新建</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" v-hasPermission="'B_power_role_add'">新建</a-button>
     </div>
 
     <s-table
@@ -34,14 +34,14 @@
       bordered
     >
       <span slot="status" slot-scope="text, record">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.isEnable" @change="changeFlagHandle(text, record)"/>
+        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.isEnable" @change="changeFlagHandle(text, record)" v-hasPermission="'B_power_role_enable'"/>
       </span>
 
       <span slot="action" slot-scope="text, record">
         <template>
-          <a class="action-button menu-text" @click="openMenuModal(record)">菜单权限</a>
-          <a class="action-button" @click="handleEdit(record)">修改</a>
-          <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)">删除</a>
+          <a class="action-button menu-text" @click="openMenuModal(record)" v-hasPermission="'M_power_role_menu'">菜单权限</a>
+          <a class="action-button" @click="handleEdit(record)" v-hasPermission="'B_power_role_edit'">修改</a>
+          <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)" v-hasPermission="'B_power_role_del'">删除</a>
         </template>
       </span>
     </s-table>
@@ -212,11 +212,6 @@ export default {
   .table-page-search-wrapper .ant-form-inline .ant-form-item{
     margin-bottom: 0;
   }
-  .flex-sp{
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-  }
   .action-button{
     line-height: 40px;
     white-space: nowrap;

+ 6 - 6
src/views/power/role/roleModal.vue

@@ -1,17 +1,17 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
+    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel" width="35%">
       <a-form :form="form" @submit="handleSubmit">
         <!-- 用户名称 -->
         <a-form-item label="角色名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-input
-            placeholder="请输入角色名称"
+            placeholder="请输入角色名称30个字以内"
+            :maxLength="30"
             v-decorator="['formData.name', {
               initialValue: formData.name,
-              rules: [{ required: true, message: '请输入角色名称!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多20个字符'}] }]"
+              rules: [{ required: true, message: '请输入角色名称30个字以内!' },{pattern:'^[^<|>]{1,20}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
           />
         </a-form-item>
-
         <!-- 状态 -->
         <a-form-item label="状态" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-radio-group
@@ -27,7 +27,6 @@
             <a-radio :value="0">禁用</a-radio>
           </a-radio-group>
         </a-form-item>
-
         <a-form-item label="角色描述" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
           <a-textarea
             v-decorator="[
@@ -36,7 +35,8 @@
                 rules: [] },
             ]"
             style="min-height: 60px;"
-            placeholder=""
+            placeholder="输入内容512个字以内"
+            :maxLength="512"
             autosize />
         </a-form-item>
 

+ 7 - 13
src/views/power/user/userList.vue

@@ -18,8 +18,8 @@
               <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" @pressEnter="$refs.table.refresh(true)" allowClear placeholder="请选择状态"></v-select>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24" class="flex-sp">
-            <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" style="margin-right: 10px;">查询</a-button>
             <a-button @click="reset">重置</a-button>
           </a-col>
         </a-row>
@@ -27,9 +27,8 @@
     </div>
     <a-divider/>
     <div class="table-operator">
-      <a-button type="primary" icon="plus" @click="openModal">新建</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" v-hasPermission="'B_power_user_add'">新建</a-button>
     </div>
-
     <s-table
       ref="table"
       size="default"
@@ -39,7 +38,7 @@
       bordered
     >
       <span slot="status" slot-scope="text, record">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
+        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)" v-hasPermission="'B_power_user_enable'"/>
       </span>
       <div slot="roleNames" slot-scope="text, record" :title="record.roleNames">
         <span v-if="record.roleNames">{{ record.roleNames.substr(0,12) + '...' }}</span>
@@ -48,9 +47,9 @@
       <span slot="action" slot-scope="text, record">
         <template>
           <div >
-            <a class="action-button" @click="handleEdit(record)">修改</a>
-            <a v-if="record.loginFlag" class="action-button reset-text" @click="resetPassword(record)">重置密码</a>
-            <a v-if="!record.loginFlag" class="action-button red-text" @click="delect(record)">删除</a>
+            <a class="action-button" @click="handleEdit(record)" v-hasPermission="'B_power_user_edit'">修改</a>
+            <a v-if="record.loginFlag" class="action-button reset-text" @click="resetPassword(record)" v-hasPermission="'B_power_user_resetPsd'">重置密码</a>
+            <a v-if="!record.loginFlag" class="action-button red-text" @click="delect(record)" v-hasPermission="'B_power_user_del'">删除</a>
           </div>
         </template>
       </span>
@@ -233,11 +232,6 @@ export default {
   .table-page-search-wrapper .ant-form-inline .ant-form-item{
     margin-bottom: 0;
   }
-  .flex-sp{
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-  }
   .action-button{
    line-height: 40px;
    white-space: nowrap;