zhangdan 4 anos atrás
pai
commit
bad0191f86

+ 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


+ 9 - 9
src/config/router.config.js

@@ -111,7 +111,7 @@ export const asyncRouterMap = [{
     component: PageView,
     meta: {
       title: '运营权限管理',
-      icon: 'apartment'
+      icon: 'wallet'
       // permission: 'M_yyAuth_0'
     },
     children: [{
@@ -137,8 +137,8 @@ export const asyncRouterMap = [{
     ]
   },
   {
-    path: '/CardVoucherAuth',
-    redirect: '/CardVoucherAuth/userList',
+    path: '/SupervisionAuth',
+    redirect: '/SupervisionAuth/userList',
     component: PageView,
     meta: {
       title: '督导权限管理',
@@ -146,9 +146,9 @@ export const asyncRouterMap = [{
       // permission: 'M_kqAuth_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'
@@ -156,9 +156,9 @@ export const asyncRouterMap = [{
       }
     },
     {
-      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'

+ 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
     },

+ 3 - 8
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>
@@ -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: '取消',

+ 24 - 33
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>
@@ -62,7 +67,7 @@
           <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)" />
         </a-tooltip>
         <a-tooltip placement="bottom">
           <template slot="title">
@@ -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;
 	}

+ 2 - 7
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>
@@ -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 - 4
src/views/power/role/roleModal.vue

@@ -1,14 +1,15 @@
 <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>
 
@@ -36,7 +37,8 @@
                 rules: [] },
             ]"
             style="min-height: 60px;"
-            placeholder=""
+            placeholder="输入内容512个字以内"
+            :maxLength="512"
             autosize />
         </a-form-item>
 

+ 2 - 7
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>
@@ -233,11 +233,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;