codeMan 3 лет назад
Родитель
Сommit
d2271b21ce

+ 3 - 0
src/HManagement/roleManage/modules/auth_list.vue

@@ -185,6 +185,8 @@ export default {
         }
       }).then(res=>{
         this.fun_list = res.data
+        console.log(this.fun_list);
+        
       })
     },
     query_field_list (row) {
@@ -197,6 +199,7 @@ export default {
         }
       }).then(res=>{
         this.hide_field_list = res.data
+        console.log(this.hide_field_list);
       })
     },
     onFuncSelection (selection) {

+ 0 - 2
src/SManagement/archives_ad/components/Edit.vue

@@ -16,8 +16,6 @@ export default {
   },
   methods: {
     edit () {
-      console.log(this.fileData.type);
-      
       window.sessionStorage.setItem('uploadType',this.fileData.type)      
       this.$router.push({
         name: 'upload',

+ 1 - 2
src/SManagement/archives_admag/index.vue

@@ -22,11 +22,10 @@
       <!--素材列表-->
       <list :fileData="fileData" 
             @listItemClick="listItemClick"
-            @itemEdit="itemEdit"
             :isHandle="true"
             v-if="tool.checkAuth($route.name,'read')">
             <template v-slot:edit="scope">
-              <Edit :fileData="scope.data" v-if="tool.checkAuth($route.name,'update')"></Edit>
+              <Edit :fileData="scope.data"  v-if="tool.checkAuth($route.name,'update')"></Edit>
             </template>
             <template v-slot:delete="scope">
               <Delete :data="scope.data" @removeSuccess="getFileList" v-if="tool.checkAuth($route.name,'delete')"></Delete>

+ 8 - 10
src/SManagement/archives_upload/index.vue

@@ -2,22 +2,22 @@
   <div class="upload">
     <!--头部操作-->
     <Header>
-      <save slot="save" @btnClick="save()" v-if="tool.checkAuth($route.name,'update')"></save>
+      <save slot="save" @btnClick="save()"></save>
     </Header>
     <!--标题 分类-->
-    <Set ref="set" v-if="tool.checkAuth($route.name,'read')"></Set>
+    <Set ref="set"></Set>
     <!--文件列表-->
-    <file-list :attinfos="uploadCacheData.attinfos" v-if="uploadType == '1' || uploadType == '2' && tool.checkAuth($route.name,'read')">
-      <upload slot="upload" @onSuccess="onSuccess" target="archives" :classType="uploadType" v-if="tool.checkAuth($route.name,'update')"></upload>
+    <file-list :attinfos="uploadCacheData.attinfos" v-if="uploadType == '1' || uploadType == '2'">
+      <upload slot="upload" @onSuccess="onSuccess" target="archives" :classType="uploadType"></upload>
       <template v-slot:delete="scope">
-        <delete1 :data="scope.data" v-if="tool.checkAuth($route.name,'delete')"></delete1>
+        <delete1 :data="scope.data"></delete1>
       </template>
       <template v-slot:download="scope">
-        <download :data="scope.data" v-if="tool.checkAuth($route.name,'download')"></download>
+        <download :data="scope.data"></download>
       </template>
     </file-list>
     <!--富文本-->
-    <file-text ref="text" v-if="uploadType == '3'&& tool.checkAuth($route.name,'update')">
+    <file-text ref="text" v-if="uploadType == '3'">
       <Editor ref="editor" slot="editor" :content="cacheInfo.content.content" :id="uploadCacheData.sat_sharematerialid">
       </Editor>
     </file-text>
@@ -112,9 +112,7 @@ export default {
                   message: '上传成功',
                   type: 'success'
                 })
-                this.$router.push({
-                  path: '/archives_ad_list'
-                })
+                this.$router.go(-1)
               }
             })
           })

+ 1 - 1
src/SManagement/submitedit_details/components/SubmiteditItemInfo.vue

@@ -32,8 +32,8 @@
           <file-item :isDownLoad="true" :itemStyle="itemDrawerStyle" :fileData="currentFile.attinfos">
           </file-item>
         </div>
-        <el-button type="warning" @click="submitEdit" size="small" v-if="currentFile.status == '退回'">重新提交</el-button>
       </div>
+        <el-button type="warning" @click="submitEdit" size="small" style="margin:16px 0 0 16px" v-if="currentFile.status == '退回'">重新提交</el-button>
     </el-drawer>
   </div>
 

+ 7 - 2
src/SManagement/submitedit_details/index.vue

@@ -2,7 +2,12 @@
   <div class="index" v-if="detailData">
     <div class="normal-card">
       <!--提报上传-->
-      <submit-action ref="submitAction" :detailData="detailData" :editData="editData" :disabled="$route.query.history != 1"></submit-action>
+      <submit-action 
+                    ref="submitAction" 
+                    :detailData="detailData" 
+                    :editData="editData" 
+                    :disabled="$route.query.history != 1"
+                    v-if="tool.checkAuth($route.name,'insert')"></submit-action>
       <img src="@/assets/refresh.png" alt="" style="cursor:pointer" @click="$router.go(0)">
     </div>
     <div class="normal-card">
@@ -16,7 +21,7 @@
         </file-item>
     </div>
     <!--提报明细详情-->
-    <submit-item-info ref="submitDetail" :fileData="calcList(detailData.submitedit)" @submitEdit="submitEdit">
+    <submit-item-info ref="submitDetail" :fileData="calcList(detailData.submitedit)" @submitEdit="submitEdit" v-if="tool.checkAuth($route.name,'read')">
       <pagination v-if="detailData.submitedit && $route.query.type == 'more'" :total="detailData.submitedit.length"
                   :pageSize="pageSize"
                   :currentPage="currentIndex"

+ 56 - 132
src/SManagement/user/role-edit/RoleEdit.vue

@@ -4,56 +4,20 @@
       <save slot="btn" @click.native="save()"></save>
     </handle-top>
     <role-info-handle ref="info"></role-info-handle>
-    <el-row class="power1">
-      <el-col :span="24" class="title-box">
-        <p class="title">角色授权</p>
-      </el-col>
-      <el-col :span="10">
-        <role-power-left :roleData="power" @currentItemChange="currentItemChange">
-          <search @searchActive="searchActive()" @clearData="clearData()" slot="search"></search>
-          <!-- <pagination :total="6"
-                      slot="page"
-                      :pageSize="3"
-                      :currentPage="1"
-                      @pageChange="pageChange">
-          </pagination> -->
-        </role-power-left>
-      </el-col>
-      <el-col :span="14">
-        <role-power-right :roleData="currentItem" @powerChange="powerChange"></role-power-right>
-      </el-col>
-    </el-row>
+    <role-power-select ref="power"></role-power-select>
   </div>
 </template>
 
 <script>
 import HandleTop from '@/components/handle-top/HandleTop'
 import roleInfoHandle from '@/SManagement/user/role-edit/components/roleInfoHandle'
-import RolePowerLeft from '@/SManagement/user/role-edit/components/RolePowerLeft'
-import RolePowerRight from '@/SManagement/user/role-edit/components/RolePowerRight'
-import search from '@/components/search/index'
-import Pagination from '@/components/pagination/Pagination'
-
+import RolePowerSelect from '@/SManagement/user/role-edit/components/RolePowerSelect'
 import save from '@/SManagement/archives_upload/components/save'
-import { log } from '@antv/g2plot/lib/utils'
 export default {
   name: 'roleEdit',
   data () {
     return {
-      auth:{
-          "classname": "sale.role.role",
-          "method": "add_appauth",
-          "content": {
-              "roleid": '',
-              "systemapps": [
-                  {
-                      "systemappid": '',
-                      "optionids": []
-                  }
-              ]
-          }
-      },
-      //角色新增
+      //角色新建
       add: {
         "classname": "sale.role.role",
         "method": "insertormodify_role",
@@ -63,95 +27,90 @@ export default {
             "remarks":""
         }
       },
-      pullPower: {
-        "classname": "sale.role.role",
-        "method": "query_appselect",
-        "content": {
-          "roleid": this.roleid,
-        }
-      },
-      roleid: this.$route.params.data ? this.$route.params.data.roleid :  this.$route.query.id,
-      //拉取的权限列表
-      power: [],
-      //编辑逻辑时数据储存
-      editData:'',
-      //选中的模块数据
-      currentItem:0,
-      currentApp:[],
-      //授权数据
-      systemapps:[]
+      roleid: parseInt(window.sessionStorage.getItem('currentEditRole')) == 0 ? 0 : JSON.parse(window.sessionStorage.getItem('currentEditRole')).roleid,
+      editData: parseInt(window.sessionStorage.getItem('currentEditRole')) == 0 ? 0 : JSON.parse(window.sessionStorage.getItem('currentEditRole')),
+      allPower:[]
     };
   },
-  components: { HandleTop, save, roleInfoHandle, search, RolePowerLeft, RolePowerRight ,Pagination},
+  components: {roleInfoHandle,HandleTop,save,RolePowerSelect},
   computed: {
   },
   watch: {
   },
   created () {
-    this.roleEdit()
-    this.getRoleAdd()
+    this.init()
   },
   methods: {
-    //编辑角色
-    roleEdit() {
-      this.editData = this.$route.params.data
-      if(this.$route.params.data) {
-        this.add.content.roleid = this.$route.params.data.roleid
-        this.add.content.rolename = this.$route.params.data.rolename
-        this.add.content.remarks = this.$route.params.data.remarks
+    //初始化
+    init() {
+      if(this.editData) {
         this.$nextTick(() => {
-          this.$refs.info.ruleForm.name = this.$route.params.data.rolename
-          this.$refs.info.ruleForm.descript = this.$route.params.data.remarks
+          this.$refs.info.ruleForm.name = this.editData.rolename
+          this.$refs.info.ruleForm.descript = this.editData.remarks
         })
       }
     },
-    //获取功能列表
-    getRoleAdd () {
-      if(this.editData) this.pullPower.content.roleid = this.editData.roleid
-      this.$api.requested(this.pullPower).then(res => {
-        this.power = res.data
-        this.currentItem = res.data[0]
-        console.log(res);
+    //计算选中的所有权限
+    getAllPower() {
+      this.$refs.power.tempPowerList.forEach(item => {
+        if(item.optionids.length < 1) return
+        let result = this.allPower.find(item2 => item2.systemappid == item.systemappid)
+        if(result == undefined) {
+          let obj = {}
+          obj.systemappid = item.systemappid
+          obj.optionids = item.optionids
+          this.allPower.push(obj)
+        } else {
+          result.optionids = result.optionids
+        }
       })
+      console.log(this.allPower);
+      
     },
-    currentItemChange(data) {
-      this.currentItem = data
-      console.log(data);
-    },
-    save () {
-      this.$refs.info.$refs.ruleForm.validate((val) => {
+    save() {
+      this.add.content.rolename = this.$refs.info.ruleForm.name
+      this.add.content.remarks = this.$refs.info.ruleForm.descript
+      this.getAllPower()
+      this.$refs.info.$refs.ruleForm.validate(val => {
         if(val) {
-          if(this.$route.params.data) {
-            this.auth.content.roleid = this.roleid
-            this.auth.content.systemapps = this.systemapps
-            this.$api.requested(this.auth).then( res => {
-              console.log(res);
-              
+          if(this.editData != 0) {
+            console.log(11111111);
+            
+            this.$api.requested({
+              "classname": "sale.role.role",
+              "method": "add_appauth",
+              "content": {
+                  "roleid": this.roleid,
+                  "systemapps": this.allPower
+              }
+            }).then( res => {
               if(res.code == 1) {
                 this.$notify({
                   title:'提示',
-                  message:'修改成功',
+                  message:'编辑成功',
                   type:'success'
                 })
                 this.$router.back()
               } else {
                 this.$notify({
                   title:'提示',
-                  message:'修改失败',
+                  message:'编辑失败',
                   type:'warning'
                 })
               }
             })
           } else {
-            this.add.content.rolename = this.$refs.info.ruleForm.name
-            this.add.content.remarks = this.$refs.info.ruleForm.descript
+            console.log(22222222222221);
             this.$api.requested(this.add).then( res => {
               if(res.code == 1) {
-                this.auth.content.roleid = res.data.roleid
-                this.auth.content.systemapps = this.systemapps
-                console.log(this.auth);
-                
-                this.$api.requested(this.auth).then( res => {
+                this.$api.requested({
+                  "classname": "sale.role.role",
+                  "method": "add_appauth",
+                  "content": {
+                      "roleid": res.data.roleid,
+                      "systemapps": this.allPower
+                  }
+                }).then( res => {
                   if(res.code == 1) {
                     this.$notify({
                       title:'提示',
@@ -170,43 +129,8 @@ export default {
               }
             })
           }
-        }
+        }        
       })
-    },
-    //获取所有需要授权数据
-    getAllPower() {
-      let is
-      this.currentApp.apps.forEach(item => {
-        is = this.systemapps.find(item2 => item2.systemappid == item.systemappid)
-        if(is == undefined) {
-          let obj = {}
-          obj.systemappid = item.systemappid
-          obj.optionids = item.optionids
-          this.systemapps.push(obj)
-        } else {
-          is.systemappid = item.systemappid
-          is.optionids = item.optionids
-        }
-      })
-      
-    },
-    searchActive (data) {
-
-    },
-    clearData () {
-
-    },
-    pageChange() {
-
-    },
-    powerChange(data) {
-      this.currentItem.clients[0].modules.forEach(item => {
-        if(item.systemmoduleid == data.systemmoduleid) {
-          item = data
-        }
-      })
-      this.currentApp = data
-      this.getAllPower()
     }
   },
 };

+ 0 - 73
src/SManagement/user/role-edit/components/RolePowerLeft.vue

@@ -1,73 +0,0 @@
-<template>
-  <div class="role-power-left" v-if="roleData">
-    <slot name="search"></slot>
-    <el-table ref="multipleTable" :data="roleData" 
-                                  @selection-change="handleSelectionChange" 
-                                  size="small"
-                                  border
-                                  :header-cell-style="{background:'#EEEEEE'}"
-                                  highlight-current-row
-                                  @row-click="rowClick">
-      <el-table-column label="应用" width="120">
-        <template slot-scope="scope">{{ scope.row.clients[0].modules[0].apps[0].systemappname }}</template>
-      </el-table-column>
-      <!-- <el-table-column label="模块">
-        <template slot-scope="scope">{{ scope.row.clients[0].modules[0].systemmodulename }}</template>
-      </el-table-column> -->
-      <el-table-column label="端口">
-        <template slot-scope="scope">{{ scope.row.clients[0].systemclientname }}</template>
-      </el-table-column>
-      <el-table-column label="系统">
-        <template slot-scope="scope">{{ scope.row.systemname }}</template>
-      </el-table-column>
-    </el-table>
-    <div class="page">
-      <slot name="page"></slot>
-    </div>
-  </div>
-</template>
-
-<script>
-export default {
-  name: '',
-  data () {
-    return {
-      currentItem:0
-    };
-  },
-  props: ['roleData'],
-  components: {},
-  computed: {
-  },
-  watch: {
-  },
-  methods: {
-    handleSelectionChange (data) {
-      this.$emit('checkList',data)
-    },
-    rowClick(data) {
-      if(this.currentItem == data) return
-      this.currentItem = data  
-      this.$emit('currentItemChange',data)
-    }
-  },
-};
-</script>
-
-<style scoped>
-.role-power-left {
-  padding: 16px;
-  height: 100%;
-}
-.search {
-  margin-bottom: 16px;
-}
-.el-table {
-  min-height: 100%;
-}
-.page {
-  display: flex;
-  flex-direction: row-reverse;
-  margin-top: 16px;
-}
-</style>

+ 0 - 139
src/SManagement/user/role-edit/components/RolePowerRight.vue

@@ -1,139 +0,0 @@
-<template>
-  <div class="role-power-right">
-    <el-row>
-      <el-col :span="8">
-        <div class="power-block">
-          <p class="title">模块</p>
-          <el-row :gutter="50" v-if="roleData">
-            <el-col :span="24" v-for="(item,index) in roleData.clients[0].modules" :key="index"
-              style="margin-bottom:6px">
-              <span class="block" :class="{'active':currentIndex==index}"
-                @click="blockClick(index,item)">{{item.systemmodulename}}</span>
-            </el-col>
-          </el-row>
-        </div>
-      </el-col>
-      <el-col :span="8">
-        <div class="power-block">
-          <p class="title">功能</p>
-            <el-tree :data="currentBlock.apps" 
-                     show-checkbox 
-                     node-key="optionid" 
-                     :props="defaultProps" 
-                     default-expand-all
-                     :default-checked-keys="defaultActive"
-                     @check="itemClick"
-                     ref="tree">
-            </el-tree>
-        </div>
-      </el-col>
-      <el-col :span="8">
-        <div class="power-block">
-          <p class="title">字段</p>
-
-        </div>
-      </el-col>
-    </el-row>
-
-  </div>
-</template>
-
-<script>
-export default {
-  name: '',
-  data () {
-    return {
-      powerResult: [],
-      //当前选中的模块
-      currentBlock: [],
-      //当前选中的模块
-      currentIndex: -1,
-      defaultProps: {
-        children: 'options',
-        label: 'optionname'
-      },
-      defaultActive: []
-    };
-  },
-  props: ['roleData'],
-  computed: {
-  },
-  watch: {
-    powerResult: {
-      handler (val) {
-        this.$emit('checkChange', val)
-      }
-    }
-  },
-  created () {
-  },
-  methods: {
-    blockClick (index, item) {
-      this.currentIndex = index
-      item.apps.forEach((item,index) => {
-        item.optionname = item.systemappname
-      })
-      this.currentBlock = item
-
-      this.getDefaultActive()
-    },
-    //节点单击事件
-    itemClick() {
-      this.emitPowerParent()
-    },
-    //同步授权item到父组件
-    emitPowerParent() {
-      let arr = this.$refs.tree.getCheckedNodes()
-      this.currentBlock.apps.forEach(item1 => {
-        item1.optionids = []
-        arr.forEach(item2 => {
-          if(item2.optionids) return 
-          if(item2.systemappid == item1.systemappid) {
-            item1.optionids.push(item2.optionid)
-          }
-        })
-      })
-      this.$emit('powerChange',this.currentBlock)
-    },
-    //获取默认显示id
-    getDefaultActive() {
-      this.defaultActive = []
-      this.currentBlock.apps.forEach(item => {
-        this.defaultActive.push(...item.optionids.map(item => item))
-      })      
-    }
-  },
-};
-</script>
-
-<style scoped>
-* {
-  box-sizing: border-box;
-}
-.role-power-right {
-  width: 100%;
-}
-.role-power-right .power-block {
-  height: calc(100vh - 320px);
-  border-left: 1px solid #cccccc;
-}
-.role-power-right .power-block .title {
-  height: 20px;
-  line-height: 20px;
-  border-left: 4px solid #3874f6;
-  padding-left: 7px;
-  font-size: 14px;
-  font-weight: bold;
-  color: #333333;
-  margin-bottom: 16px;
-}
-.block {
-  display: block;
-  height: 32px;
-  line-height: 32px;
-  padding-left: 16px;
-}
-.active {
-  background: #eaf1fe;
-}
-</style>

+ 281 - 0
src/SManagement/user/role-edit/components/RolePowerSelect.vue

@@ -0,0 +1,281 @@
+<template>
+  <div class="role-power-select">
+    <el-row>
+      <el-col :span="24">
+        <p class="title">角色授权</p>
+      </el-col>
+      <el-col :span="11" style="margin-right:16px">
+        <search @searchActive="searchActive" @clearData="clearData"></search>
+        <table-layout :layout="tablecols" :data="powerList" @rowClick="rowClick"></table-layout>
+        <div class="page">
+          <pagination :total="total" :pageSize="power.content.pageSize" :currentPage="power.content.pageNumber"
+            @pageChange="pageChange">
+          </pagination>
+        </div>
+      </el-col>
+      <el-col :span="12">
+        <el-row>
+          <el-col :span="8">
+            <div class="power-block">
+              <div class="title" @click="aaa = true">功能</div>
+              <el-checkbox-group v-model="checkList" @change="groupChange" class="padd">
+                <template v-if="aaa">
+                  <el-checkbox :label="item.optionid" v-for="(item,index) in currentItem.options"
+                    :checked="isCheck(item)" :key="index">
+                    {{item.optionname}}
+                  </el-checkbox>
+                </template>
+              </el-checkbox-group>
+              <!-- <div class="footer padd">
+                <el-checkbox label="" :checked="allCheck"  v-if="bbb">{{checkAll}}</el-checkbox>
+              </div> -->
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="power-block">
+              <p class="title">隐藏字段</p>
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="power-block">
+              <p class="title">基础数据</p>
+            </div>
+          </el-col>
+        </el-row>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import search from '@/components/search/index'
+import pagination from '@/components/pagination/Pagination'
+import tableLayout from '@/components/dynamic-table/index'
+import { log } from '@antv/g2plot/lib/utils';
+export default {
+  name: 'RolePowerSelect',
+  data () {
+    return {
+      aaa: true,
+      bbb:true,
+      power: {
+        "classname": "sale.role.role",
+        "method": "query_appselect_web",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 10,
+          "roleid": parseInt(window.sessionStorage.getItem('currentEditRole')) == 0 ? 0 : JSON.parse(window.sessionStorage.getItem('currentEditRole')).roleid,
+          "where": {
+            "condition": ""
+          }
+        }
+      },
+      //当前选中的row
+      currentItem: 0,
+      total: 2,
+      //应用表数据
+      powerList: [],
+      //存储上一次临时应用表数据
+      tempPowerList:[],
+      //注册表
+      tablecols: [],
+      //当前选中权限
+      checkList: [],
+      //选中权限集合
+      systemapps: [],
+      currentItem: [],
+      allCheck:false
+    };
+  },
+  props: [],
+  components: { search, pagination, tableLayout },
+  computed: {
+    //是否选中
+    isCheck () {
+      return (data) => {
+        let result
+        if (result = this.currentItem.optionids.find(item => item == data.optionid)) {
+          return true
+        } else {
+          return false
+        }
+      }
+    },
+    checkAll() {
+      let count = this.currentItem.optionids ? this.currentItem.optionids.length : 0
+      let all = this.currentItem.options ? this.currentItem.options.length : 0
+      return count + '/' + all
+    }
+  },
+  watch: {
+  },
+  created () {
+    this.getAllHavePower()
+  },
+  mounted () {
+    this.tablecols = this.tool.tabelCol('roleManagent').roleTable.tablecols
+
+  },
+  methods: {
+    //当编辑逻辑时 拉取所有数据 储存所有已授权数据
+    getAllHavePower() {
+      if(parseInt(window.sessionStorage.getItem('currentEditRole')) != 0) {
+        this.$api.requested({
+          "classname": "sale.role.role",
+          "method": "query_appselect_web",
+          "content": {
+            "roleid": JSON.parse(window.sessionStorage.getItem('currentEditRole')).roleid,
+            "where": {
+              "condition": ""
+            }
+          }
+        }).then( res => {
+          let data = res.data.filter(item => item.optionids.length > 0)
+          let result
+          this.tempPowerList.forEach((item,index) => {
+            result = data.find(item2 => item2.systemappid == item.systemappid)
+            this.tempPowerList.push(result)
+          }) 
+          this.getPowerList()         
+        })
+      } else {
+        this.getPowerList()
+      }
+    },
+    //获取授权列表
+    getPowerList () {
+      this.$api.requested(this.power).then(res => {
+        this.powerList = res.data
+        this.handleHavePower()
+        this.calcHavePower(this.powerList)
+        this.currentItem = this.powerList[0]
+        this.total = res.total
+      })
+    },
+    //抓取所有操作过的数据
+    handleHavePower() {
+      if(this.tempPowerList.length == 0) {
+        this.tempPowerList.push(...this.powerList)
+      } else {
+        let result
+        for(let i=0;i<this.powerList.length;i++) {
+          let result = this.tempPowerList.find(item => item.systemappid == this.powerList[i].systemappid)
+          if(result != undefined) {
+            continue
+          } else {
+            this.tempPowerList.push(this.powerList[i])
+          }
+        }
+      }
+    },
+    //同步上一次获取的选中数据信息
+    calcHavePower(data) {
+      if(this.tempPowerList.length > 0) {
+        let result
+        for (let i = 0; i < data.length; i++) {
+          result = this.tempPowerList.find(item2 => item2.systemappid == data[i].systemappid)
+          if(result != undefined) {
+            data[i] = result
+          }
+        }
+        this.powerList = data
+      }
+    },
+    //列表单击事件
+    rowClick (data) {
+      this.checkList = []
+      this.currentItem = data
+      //解决数据刷新 视图不刷新
+      this.aaa = false
+      setTimeout(() => {
+        this.aaa = true
+        this.allCheck = this.currentItem.options.length == this.currentItem.optionids.length       
+      }, 100)
+    },
+    //group值发生改变时
+    groupChange () {
+      this.currentItem.optionids = this.checkList
+    },
+    clearData () {
+      this.power.content.where.condition = ''
+      this.power.content.pageNumber = 1
+      this.getPowerList()
+    },
+    searchActive (data) {
+      this.power.content.where.condition = data
+      this.power.content.pageNumber = 1
+      this.getPowerList()
+    },
+    pageChange (n) {
+      this.power.content.pageNumber = n
+      this.getPowerList()
+    },
+    // allCheckClick() {
+    //   this.allCheck = !this.allCheck
+    //   this.allCheck ? this.currentItem.optionids = [] : this.currentItem.optionids = this.currentItem.options
+    //   this.aaa = false
+    //   setTimeout(() => {
+    //     this.aaa = true
+    //   }, 100)
+    //   console.log(this.currentItem.optionids);
+      
+    // },
+  },
+};
+</script>
+
+<style scoped>
+*{
+  box-sizing: border-box;
+}
+.role-power-select {
+  padding: 16px 16px 0 16px;
+  height: calc(100vh);
+  background: #ffffff;
+  height: 100%;
+}
+.role-power-select .title {
+  font-size: 14px;
+  font-weight: bold;
+  color: #333333;
+  margin-bottom: 30px;
+}
+.search {
+  margin-bottom: 16px;
+}
+.role-power-select .power-block {
+  border-left: 1px solid #cccccc;
+  min-height: calc(100vh - 300px);
+  position: relative;
+}
+.role-power-select .power-block .footer {
+  position: absolute;
+  bottom: 24px;
+  border-top: 1px solid #cccccc;
+  width: 100%;
+}
+.role-power-select .power-block .el-checkbox-group {
+  display: flex;
+  flex-direction: column;
+}
+.role-power-select .power-block .el-checkbox-group .el-checkbox {
+  margin-bottom: 12px;
+}
+.role-power-select .power-block .title {
+  padding-left: 7px;
+  margin-left: 16px;
+  border-left: 4px solid #3874f6;
+  display: block;
+}
+.role-power-select .page {
+  display: flex;
+  flex-direction: row-reverse;
+  margin-top: 16px;
+}
+.role-power-select .page .el-pagination {
+  margin-bottom: 10;
+}
+.padd {
+  padding-left: 16px;
+}
+</style>

+ 2 - 0
src/SManagement/user/role-manage/RoleManage.vue

@@ -61,6 +61,7 @@ export default {
     },
     //角色编辑
     roleEdit (data) {
+      window.sessionStorage.setItem('currentEditRole',JSON.stringify(data))
       this.$router.push({
         name: 'roleEdit',
         params: {
@@ -69,6 +70,7 @@ export default {
       })
     },
     addRole () {
+      window.sessionStorage.setItem('currentEditRole',0)
       window.sessionStorage.setItem('currentPath','/role_managent')
       this.$router.push({
         path:'role_edit',

+ 17 - 9
src/SManagement/user/team-manage/components/AddUser.vue

@@ -21,8 +21,8 @@
           <el-form-item label="角色配置:" label-width="102px" prop="roleids">
             <el-select v-model="param.content.roleids" multiple placeholder="请选择" size="small">
               <el-option
-                v-for="item in checkList"
-                :key="item.rolename"
+                v-for="(item,index) in checkList"
+                :key="index"
                 :label="item.rolename"
                 :value="item.roleid">
               </el-option>
@@ -46,6 +46,13 @@
 export default {
   name: 'AddUser',
   data () {
+    let checkPhone = (rule,value,callback) => {
+      if(!this.tool.checkPhoneFun(value)) {
+        return callback(new Error('请填写正确的手机号'))
+      } else {
+        callback()
+      }
+    }
     return {
       param: {
           "classname": "sale.team.team",
@@ -61,11 +68,12 @@ export default {
       },
       dialogVisible: false,
       rules: {
-          name: [
-            { required: true, message: '请输入名称', trigger: 'blur' },
-          ],
+        name: [
+          { required: true, message: '请输入名称', trigger: 'blur' },
+        ],
         phonenumber: [
-          { min: 11, max: 11, message: '请输入正确的电话号', trigger: 'blur' }
+          { required: true, message: '请输入手机号', trigger: 'blur' },
+          { validator: checkPhone , trigger: 'blur' }
         ],
       },
       checkList: []
@@ -103,15 +111,15 @@ export default {
             "sa_agent_hrid": 0
         }
       }).then( res => {
-        console.log(res);
-        
         this.checkList = res.data
-        console.log(this.checkList);
       })
     },
     //提交
     submitTeam() {
+      
       this.$refs.formInfo.validate((val) => {
+        console.log(val);
+        
         if(val) {
           console.log(this.param);
           this.$api.requested(this.param).then( res => {

+ 0 - 5
src/SManagement/user/user-info/UserInfo.vue

@@ -13,10 +13,6 @@
 
       <wx-bind :userInfo="userInfo">
       </wx-bind>
-
-      <div class="logout">
-        <!-- <log-out></log-out> -->
-      </div>
     </div>
 </template>
 
@@ -69,7 +65,6 @@ export default {
     getUserInfo() {
       this.$api.requested(this.param).then( res => {
         this.userInfo = res.data
-        console.log(this.userInfo);
       })
     },
     //上传头像成功

+ 0 - 28
src/SManagement/user/user-info/components/NameEdit.vue

@@ -1,28 +0,0 @@
-<template>
-
-</template>
-
-<script>
-export default {
-  name: 'NameEdit',
-  data () {
-    return {
-      
-      status:false
-    };
-  },
-  props:[],
-  computed: {
-  },
-  watch: {
-
-  },
-  methods: {
-    
-  },
-};
-</script>
-
-<style scoped>
-
-</style>

+ 1 - 0
src/SManagement/user/user-info/components/baseInfo.vue

@@ -65,6 +65,7 @@ export default {
       bind(el,node,vm) {
         let handle = (e) => {
           if(!el.contains(e.target)) {
+            vm.context.ruleForm.name = vm.context.userInfo.name
             vm.context.status = true            
           }
         }

+ 54 - 0
src/SManagement/user/user-info/components/wxBind.vue

@@ -7,6 +7,16 @@
         <span>未绑定</span>
       </div>
     </div>
+    <!-- <div class="userInfo">
+      <div class="left">
+        <img src="@/assets/avatar.png" alt="">
+        <div class="info">
+          <p>微信昵称</p>
+          <p>微信号:111111</p>
+        </div>
+      </div>
+      <div class="right">解绑</div>
+    </div> -->
   </div>
 </template>
 
@@ -27,6 +37,9 @@ export default {
 </script>
 
 <style scoped>
+*{
+  box-sizing: border-box;
+}
   .wx {
 
   }
@@ -48,4 +61,45 @@ export default {
     font-weight: 400;
     color: #666666;
   }
+  .userInfo {
+    width: 400px;
+    height: 88px;
+    background: #F8F8F8;
+    border-radius: 4px 4px 4px 4px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 20px;
+  }
+  .userInfo .left {
+    display: flex;
+    justify-content: space-between;
+    align-content: center;
+  }
+  .userInfo .left img{
+    width: 48px;
+    height: 48px;
+    border-radius: 50%;
+    margin-right: 10px;
+  }
+  .userInfo .left .info{
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+  }
+  .userInfo .left .info p:first-child{
+    font-size: 14px;
+    color: #333333;
+  }
+  .userInfo .left .info p:last-child{
+    font-size: 12px;
+    color: #666666;
+  }
+  .userInfo .right {
+    font-size: 14px;
+    font-weight: 400;
+    color: #3874F6;
+    cursor: pointer;
+  }
+
 </style>

+ 1 - 2
src/components/file-block/index.vue

@@ -14,7 +14,6 @@
         <p class="see" @click="seeClick(item)" v-if="tool.checkAuth($route.name,'read')">预览</p>
         <p @click="deleteFile(item)" v-if="isDelete && tool.checkAuth($route.name,'delete')" class="delete">删除</p>
         <button @click="downLoad(item)" v-if="isDownLoad && tool.checkAuth($route.name,'download')">下载</button>
-        <!-- v-if="tool.checkAuth($route.path,'aaaa') && isDownLoad" -->
       </div>
     </div>
     <see-File ref="seeFile" :fileData="seeFile"></see-File>
@@ -92,7 +91,7 @@ export default {
           "classname": "saletool.notice.notice",
           "method": "updateDownloadRecord",
           "content": {
-                  "sat_noticeid":this.sat_noticeid
+            "sat_noticeid":this.sat_noticeid
           }
         }).then(res => {
         })

+ 1 - 0
src/main.js

@@ -14,6 +14,7 @@ import './style/style.css'
 import './style/theme/index.css'
 import tableLayout from './components/dynamic-table'
 import sort from './components/sort'
+import '@/style/theme/font-icon/iconfont.css'
 
 Vue.prototype.$api = api
 

+ 95 - 95
src/router/SManagement.js

@@ -1,99 +1,99 @@
 const SManagement = [{
-path: '/notice_mag_list',
-name: 'noticemag',
-meta: {
-  title: '通报',
-  ast_nav:false
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/notice/index.vue')
-},{
-path: '/notice_detail',
-name: 'noticemag',
-meta: {
-  title: '通告详情',
-  ast_nav:false
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/notice/notice_detail/NoticeDetail')
-},{
-path: '/archives_list',
-name: 'archives',
-meta: {
-  title: ' 营销物料列表',
-  ast_nav:true
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives/index.vue')
-},{
-path: '/archivesmag_list',
-name: 'archivesmag',
-meta: {
-  title: ' 营销物料收藏',
-  ast_nav:true
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archivesmag/index.vue')
-},{
-path: '/archives_ad_list',
-name: 'archives_ad',
-meta: {
-  title: ' 素材推广',
-  ast_nav:true,
-  upload:true
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives_ad/index.vue')
-},{
-path: '/archives_admag',
-name: 'archives_admag',
-meta: {
-  title: ' 我的素材',
-  ast_nav:true,
-  upload:true
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives_admag/index.vue')
-},{
-path: '/upload_archives',
-name: 'archives_admag',
-meta: {
-  title: '上传素材',
-  ast_nav:true,
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives_upload/index.vue')
-},{
-path: '/archives_scmag',
-name: 'archives_scmag',
-meta: {
-  title: '商学院',
-  ast_nav:false
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives_sc/index.vue')
-},{
-path: '/submitedit_one',
-name: 'submitedit',
-meta: {
-  title: '提报',
-  ast_nav:true
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedit_one/index')
-},{
-path: '/submitedit_more',
-name: 'submiteditmag',
-meta: {
-  title: '提报',
-  ast_nav:true
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedit_more/index')
-},{
-path: '/submiteditmag_detail',
-name: 'submiteditmag',
-meta: {
-  title: '提报详情',
-  ast_nav: true
-},
-component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedit_details/index')
-},{
+  path: '/notice_mag_list',
+  name: 'noticemag',
+  meta: {
+    title: '通报',
+    ast_nav: false
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/notice/index.vue')
+}, {
+  path: '/notice_detail',
+  name: 'noticemag',
+  meta: {
+    title: '通告详情',
+    ast_nav: false
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/notice/notice_detail/NoticeDetail')
+}, {
+  path: '/archives_list',
+  name: 'archives',
+  meta: {
+    title: ' 营销物料列表',
+    ast_nav: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives/index.vue')
+}, {
+  path: '/archivesmag_list',
+  name: 'archivesmag',
+  meta: {
+    title: ' 营销物料收藏',
+    ast_nav: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archivesmag/index.vue')
+}, {
+  path: '/archives_ad_list',
+  name: 'archives_ad',
+  meta: {
+    title: ' 素材推广',
+    ast_nav: true,
+    upload: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives_ad/index.vue')
+}, {
+  path: '/upload_archives',
+  name: 'upload',
+  meta: {
+    title: '上传素材',
+    ast_nav: true,
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives_upload/index.vue')
+}, {
+  path: '/archives_admag',
+  name: 'archives_admag',
+  meta: {
+    title: ' 我的素材',
+    ast_nav: true,
+    upload: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives_admag/index.vue')
+}, {
+  path: '/archives_scmag',
+  name: 'archives_scmag',
+  meta: {
+    title: '商学院',
+    ast_nav: false
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/archives_sc/index.vue')
+}, {
+  path: '/submitedit_one',
+  name: 'submitedit',
+  meta: {
+    title: '提报',
+    ast_nav: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedit_one/index')
+}, {
+  path: '/submitedit_more',
+  name: 'submiteditmag',
+  meta: {
+    title: '提报',
+    ast_nav: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedit_more/index')
+}, {
+  path: '/submiteditmag_detail',
+  name: 'submiteditmag',
+  meta: {
+    title: '提报详情',
+    ast_nav: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedit_details/index')
+}, {
   path: '/refresh',
   name: 'refresh',
   meta: {
     title: '刷新',
-    ast_nav:true
+    ast_nav: true
   },
 },
 {
@@ -101,7 +101,7 @@ component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedi
   name: 'usercenter',
   meta: {
     title: '个人中心',
-    ast_nav:true
+    ast_nav: true
   },
   component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/user-info/UserInfo')
 },
@@ -110,7 +110,7 @@ component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedi
   name: 'teamManagent',
   meta: {
     title: '团队管理',
-    ast_nav:true
+    ast_nav: true
   },
   component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/team-manage/TeamManage')
 },
@@ -119,7 +119,7 @@ component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedi
   name: 'roleManagent',
   meta: {
     title: '角色管理',
-    ast_nav:true
+    ast_nav: true
   },
   component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/role-manage/RoleManage')
 },
@@ -128,7 +128,7 @@ component: () => import(/* webpackChunkName: "about" */ '@/SManagement/submitedi
   name: 'roleEdit',
   meta: {
     title: '角色操作',
-    ast_nav:true
+    ast_nav: true
   },
   component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/role-edit/RoleEdit')
 }

+ 1 - 1
src/utils/matchingFeilType.js

@@ -1,7 +1,7 @@
 export default {
     fileList (list) {
         let suffixList = {
-            image: ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'svg', 'tiff'],
+            image: ['png', 'jpg', 'jpeg', 'bmp', 'gif','JPG', 'webp', 'svg', 'tiff'],
             video: ['mp4', 'ogg', 'webm'],
             word: ['doc', 'docx'],
             excel: ['xls', 'xlsx'],

+ 0 - 2
src/utils/tool.js

@@ -22,8 +22,6 @@ export default {
   // 获取应用表格
   tabelCol (appname) {
     // 获取应用数据
-    console.log(appname);
-    
     let apps = JSON.parse(sessionStorage.getItem('active_modules'))
     
     let module_list =  apps.apps