Pārlūkot izejas kodu

2022-11-9 16:30

codeMan 3 gadi atpakaļ
vecāks
revīzija
36334c2fc3
41 mainītis faili ar 959 papildinājumiem un 306 dzēšanām
  1. 2 1
      src/Form/productMoneyOdd/productOddDetail/add.vue
  2. 2 3
      src/HDrpManagement/ProductGroupMag/modules/add.vue
  3. 2 3
      src/HDrpManagement/ProductGroupMag/modules/addGroupDetailBtn.vue
  4. 22 2
      src/HDrpManagement/productMoneyOdd/index.vue
  5. 1 1
      src/HDrpManagement/productMoneyOdd/modules/detail.vue
  6. 209 0
      src/HDrpManagement/productMoneyOdd/modules/importFile.vue
  7. 2 1
      src/HDrpManagement/productMoneyOdd/modules/productOddDetail.vue
  8. 21 16
      src/HDrpManagement/projectChange/modules/modules/andEnterprise/index.vue
  9. 2 1
      src/HDrpManagement/projectChange/modules/modules/projectSet/index.vue
  10. 2 1
      src/HDrpManagement/projectChange/modules/modules/quotation/index.vue
  11. 66 17
      src/HManagement/accountManage/index.vue
  12. 1 0
      src/HManagement/department/staff/detail/index.vue
  13. 2 0
      src/HManagement/notice/dataAnalysis/agent/index.vue
  14. 38 16
      src/HManagement/notice/index.vue
  15. 8 2
      src/HManagement/notice/list/modules/add_notice.vue
  16. 1 1
      src/HManagement/notice/list/modules/edit.vue
  17. 19 15
      src/HManagement/roleManage/index.vue
  18. 29 0
      src/HManagement/siteManage/coderule/index copy.vue
  19. 38 11
      src/HManagement/siteManage/coderule/index.vue
  20. 5 5
      src/HManagement/siteManage/coderule/modules/edit.vue
  21. 1 2
      src/HManagement/siteManage/coderule/modules/list.vue
  22. 19 1
      src/HManagement/siteManage/custom_option/index.vue
  23. 3 3
      src/HManagement/siteManage/custom_option/modules/add.vue
  24. 3 3
      src/HManagement/siteManage/custom_option/modules/edit.vue
  25. 1 0
      src/HManagement/siteManage/custom_option/modules/list.vue
  26. 71 0
      src/HManagement/siteManage/messageSendtype/index copy.vue
  27. 4 5
      src/HManagement/siteManage/messageSendtype/index.vue
  28. 21 8
      src/HManagement/siteManage/securityConfig/index.vue
  29. 33 25
      src/HManagement/siteManage/securityConfig/modules/basicinfo.vue
  30. 2 2
      src/HManagement/siteManage/securityConfig/modules/edit.vue
  31. 34 0
      src/HManagement/submit/index.vue
  32. 2 0
      src/SManagement/user/role-edit/RoleEdit.vue
  33. 114 0
      src/SManagement/user/role-manage/RoleManage copy.vue
  34. 77 96
      src/SManagement/user/role-manage/RoleManage.vue
  35. 36 0
      src/SManagement/user/role-manage/components/add.vue
  36. 36 0
      src/SManagement/user/role-manage/components/edit.vue
  37. 0 49
      src/SManagement/user/role-manage/components/removeRole.vue
  38. 2 4
      src/components/down_select/index.vue
  39. 2 2
      src/components/normal-basic-layout/index.vue
  40. 13 10
      src/router/SManagement.js
  41. 13 0
      src/style/style.css

+ 2 - 1
src/Form/productMoneyOdd/productOddDetail/add.vue

@@ -12,7 +12,8 @@
         idName="itemid" 
         :apiId="{query:20221028154004,del:''}" 
         :options="options"
-        @checkboxCallBack="checkboxCallBack">
+        @checkboxCallBack="checkboxCallBack"
+        customTitle="商品选择列表">
         <div slot="custom"></div>
         <template v-slot:tbList="scope">
           <div>

+ 2 - 3
src/HDrpManagement/ProductGroupMag/modules/add.vue

@@ -19,6 +19,8 @@
               </el-col>
               <el-col :span="24">
                 <el-form-item label="商品" prop="itemno">
+                  <el-input style="width:200px;margin-bottom:10px" size="small" placeholder="请输入商品" @clear="getProductList(params.content.pageNumber=1)"
+                    @keyup.native.enter="getProductList(params.content.pageNumber=1)" v-model="params.content.where.condition" clearable />
                   <Table ref="table" v-model="form.itemno" :layout="tablecols" :data="productList" :custom="false" height="500px" @upDateData="upDateData">
                   </Table>
                   <el-pagination
@@ -71,9 +73,6 @@ export default {
         groupname: [
           { required: true, message: '请输入商品组名称', trigger: 'blur' },
         ],
-        itemno: [
-          { required: true, message: '请选择商品', trigger: 'blur' },
-        ]
       },
       params: {
           "id": "20220923112503",

+ 2 - 3
src/HDrpManagement/ProductGroupMag/modules/addGroupDetailBtn.vue

@@ -19,6 +19,8 @@
               </el-col>
               <el-col :span="24">
                 <el-form-item label="商品" prop="itemno">
+                  <el-input style="width:200px;margin-bottom:10px" size="small" placeholder="请输入商品" @clear="getProductList(params.content.pageNumber=1)"
+                    @keyup.native.enter="getProductList(params.content.pageNumber=1)" v-model="params.content.where.condition" clearable />
                   <Table ref="table" v-model="form.itemno" :layout="tablecols" :data="productList" :custom="false" height="500px" @upDateData="upDateData">
                   </Table>
                   <el-pagination
@@ -71,9 +73,6 @@ export default {
         groupname: [
           { required: true, message: '请输入商品组名称', trigger: 'blur' },
         ],
-        itemno: [
-          { required: true, message: '请选择商品', trigger: 'blur' },
-        ]
       },
       params: {
           "id": "20220923112503",

+ 22 - 2
src/HDrpManagement/productMoneyOdd/index.vue

@@ -9,6 +9,11 @@
       :options="options"
       :detailPath="{path:'/productMoneyOddDetail'}">
       <div slot="custom"></div>
+      <div slot="titleRight">
+        <importFile v-if="tool.checkAuth($route.name,'import')" ref="import" accept=".xlsx" :folderid="folderid" :bindData="{ownertable:'sat_orderclueuploadbill',ownerid:'',usetype:'default'}" @onSuccess="uploadOrderclueuploadbillByExcel">
+          <a class="error-link" v-if="errorurl" :href="errorurl" slot="errorFile">下载错误数据</a>
+        </importFile>
+      </div>
       <template v-slot:tbList="scope">
         <div>
           {{scope.data.column.data[[scope.data.column.columnname]]}}
@@ -26,14 +31,17 @@
 <script>
 import productOddDetail from './modules/productOddDetail'
 import Check from './components/check'
+import importFile from './modules/importFile'
 export default {
-  components:{productOddDetail,Check},
+  components:{productOddDetail,Check,importFile},
   name: "index",
   data() {
     return {
       options:[],
       priceGrade:'',
-      productList:''
+      productList:'',
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+      errorurl:''
     }
   },
   provide () {
@@ -66,6 +74,18 @@ export default {
       this.productList = res.data
       console.log(this.productList);
     },
+    async uploadOrderclueuploadbillByExcel (data) {
+      let res = await this.$api.requested({
+        "id": "20221026142804",
+        "content": {
+          "attachmentid": data.data.attachmentids[0],
+          "remarks": ""
+        }
+      })     
+      this.tool.showMessage(res,() => {
+        this.$refs.import.dialogUploadVisible = false
+      })
+    }
   }
 }
 </script>

+ 1 - 1
src/HDrpManagement/productMoneyOdd/modules/detail.vue

@@ -9,7 +9,7 @@
     :turnPageId="20221024163504" 
     idname="sa_itempriceadjustid"
     @pageChange="pageChange"
-    :tabs="['商品明细']"
+    :tabs="['调整单明细']"
     @onEditSuccess="queryMainData($route.query.id)">
     <!-- 使用此插槽可不传[tags] -->
     <div slot="customOperation">

+ 209 - 0
src/HDrpManagement/productMoneyOdd/modules/importFile.vue

@@ -0,0 +1,209 @@
+<template>
+  <div>
+    <!-- 按钮类型 -->
+    <el-button type="primary" size="small" @click="dialogUploadVisible = true" style="margin-left:10px">导 入</el-button>
+    <el-dialog title="文件上传" class="import-panel" :visible.sync="dialogUploadVisible" width="500px" append-to-body :close-on-click-modal="false" :show-close="false" :before-close="clearFiles">
+      <div slot="title"></div>
+      <div style="padding:20px">
+        <el-upload
+          style="width:100%"
+          ref="my-upload"
+          class="upload-demo normal-margin"
+          :accept="accept"
+          action="#"
+          :auto-upload="false"
+          :show-file-list="false"
+          :on-change="handleChange"
+          drag
+          multiple>
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        </el-upload>
+        <div class="progress_panel" v-for="file in filelist" :key="file.uid">
+          <img v-if="file.type === 'DOC' || file.type === 'DOCX'" width="30" src="../../../assets/file_icons/word.png"
+            alt="">
+          <img v-else-if="file.type === 'PDF'" width="30" src="../../../assets/file_icons/PDF.png" alt="">
+          <img v-else-if="file.type === 'MP4' || file.type === 'AVI'" width="30" src="../../../assets/file_icons/video.png"
+            alt="">
+          <img v-else-if="file.type === 'XLS' || file.type === 'XLSX'" width="30" src="../../../assets/file_icons/excel.png"
+            alt="">
+          <img v-else-if="file.type === 'PNG' || file.type === 'JPG'|| file.type === 'JPEG'" width="30"
+            src="../../../assets/file_icons/image.png" alt="">
+          <img v-else-if="file.type === 'PPT' || file.type === 'PPTX'" width="30" src="../../../assets/file_icons/PPT.png"
+            alt="">
+          <img v-else width="30" src="../../../assets/file_icons/unknow.png" alt="">
+          <div>
+            <p v-if="file.progress === 100" style="float:right"><span style="color:#67C23A">●</span>上传成功</p>
+            <p>{{file.raw?file.raw.name:'暂无上传文件'}}</p>
+            <el-progress :percentage="file.progress" :show-text="false"></el-progress>
+          </div>
+        </div>
+        <slot name="errorFile"></slot>
+        <p class="tips">• 为保证数据导入顺利,推荐您下载并使用<a :href="modelurl">《Excel标准模板》</a></p>
+        <p class="tips">• 文件中数据不能超过5000行</p>
+        <div class="dialog-footer">
+          <el-button size="small" @click="dialogUploadVisible = false" class="normal-btn-width">取 消</el-button>
+          <el-button size="small" type="warning" @click="dialogUploadVisible = false" class="normal-btn-width btn-warning">确 定</el-button>
+        </div>
+      </div>
+      
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  /*
+    folderid:文件夹id; 必填
+    btntype:展示上传按钮的类型;
+    accept:限制上传文件类型;
+    bindData:附件上传成功后对应需要绑定的数据信息
+  */
+  props:['folderid','btntype','accept','bindData'],
+  data () {
+    return {
+      dialogUploadVisible: false,
+      params: {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "getFileName",
+        "content": {
+          "filename": '',
+          "filetype": '',
+          "parentid": ""//归属文件夹ID
+        }
+      },
+      file: {},
+      filelist: [],
+      CampaignList:[],
+      modelurl:'',
+    }
+  },
+  mounted () {
+    this.getModelUrl()
+    this.listData()
+  },
+  methods: {
+    handleChange (file, filelist) {
+      this.filelist = filelist
+      var index = file.raw.name.lastIndexOf(".");
+      var ext = file.name.substr(index + 1);
+      this.params.content.filename = file.raw.name
+      this.params.content.filetype = ext
+      this.getUploadUrl(file, ext)
+    },
+    handleClick () {
+      this.getModelUrl()
+    },
+    // 获取导入模板
+    async getModelUrl () {
+      const res = await this.$api.requested({
+        "id": "20221026152404",
+        "content":{
+
+        }
+      })
+      this.modelurl = res.msg
+    },
+    // 获取华为云上传地址
+    async getUploadUrl (file, ext) {
+      this.params.content.parentid = this.folderid
+      const res = await this.$api.requested(this.params)
+      let url = res.data.uploadurl
+      let obsfilename = res.data.serialfilename
+
+      this.upoladFileToServer(url, file, ext, obsfilename)
+    },
+    // 上传到华为云
+    async upoladFileToServer (url, file, ext, obsfilename) {      
+      let THIS = this
+      let config = {
+        headers: ext === 'pdf' ? { 'Content-Type': 'application/pdf' } : { 'Content-Type': 'application/octet-stream' },
+        onUploadProgress: function (progressEvent) {
+          let percent = progressEvent.loaded / progressEvent.total * 100
+          THIS.filelist.forEach(e => {
+            if (e.uid === file.uid) {
+              THIS.$set(e, 'type', ext.toUpperCase());
+              THIS.$set(e, 'progress', percent);
+            }
+          })
+        },
+      }
+      const res = await this.$upload.hw_upload(url, file.raw, config)
+      this.createFileRecord(obsfilename)
+    },
+
+    // 上传成功以后生成附件记录
+    async createFileRecord (obsfilename) {
+      let obj = {
+         "serialfilename": obsfilename
+      }
+      obj = Object.assign({},obj,this.bindData)
+      let param = {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "uploadSuccess",
+        "content":obj
+      }
+      
+      const res = await this.$api.requested(param)
+      console.log(this.campaignid)
+      this.$emit('onSuccess',res)
+    },
+
+    clearFiles () {
+      this.$refs['my-upload'].clearFiles()
+      this.filelist = []
+      this.dialogUploadVisible = false
+    },
+    async listData() {
+      const res = await this.$api.requested({
+        "classname":"webmanage.saletool.orderclue.ordercluecampaign",
+        "method": "queryCampaignList",
+        "content": {
+          "isAll":true,
+          "where": {
+            "status": "发布"
+          }
+        }
+      })
+      this.CampaignList = res.data
+    },
+  }
+}
+
+</script>
+<style>
+.import-panel .el-dialog__header,.import-panel .el-dialog__body{
+  padding: 0 !important;
+}
+.upload-demo > div {
+  width: 100% !important;
+}
+.upload-demo .el-upload-dragger {
+  width: 100% !important;
+}
+</style>
+<style scoped>
+.progress_panel {
+  display: flex;
+  align-items: center;
+  padding: 10px;
+  margin: 10px 0;
+  border-radius: 5px;
+  transition: linear 0.2s all;
+}
+.progress_panel:hover {
+  box-shadow: 0px 0px 5px #ccc;
+}
+.progress_panel > div {
+  flex: 1;
+  padding: 0 10px;
+}
+.progress_panel > div > p {
+  line-height: 30px;
+}
+.tips{
+  line-height: 30px;
+}
+</style>
+

+ 2 - 1
src/HDrpManagement/productMoneyOdd/modules/productOddDetail.vue

@@ -7,7 +7,8 @@
       idName="sa_itempriceadjustid" 
       :apiId="{query:20221025160904,del:20221025095404}" 
       :options="options"
-      @listCreate="list">
+      @listCreate="list"
+      customTitle="调整单明细">
       <div slot="titleRight">
         <priceHelper/>
       </div>

+ 21 - 16
src/HDrpManagement/projectChange/modules/modules/andEnterprise/index.vue

@@ -1,26 +1,31 @@
 <template>
   <div>
-    <add class="normal-margin" :data="rowData"  @insertSuccess="onSuccess" style="float: left;"></add>
-    <div style="width: 20%;float: left;margin-left:10px;margin-bottom: 10px">
-      <el-input
-          placeholder="请输入内容"
-          v-model="search"
-          clearable
-          @clear="clearData()"
-          size="mini"
-          @keyup.enter.native="queryClick()">
-        <i slot="prefix" class="el-icon-search" @click="queryClick()"></i>
-      </el-input>
-    </div>
-    <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" >
-      <template v-slot:customcol="scope">
-        <p>{{scope.column.data[scope.column.columnname]}}</p>
+    <basicLayout 
+      ref="basicLayout" 
+      formPath="projectChange/andEnterprise" 
+      tableName="andEnterpriseTable" 
+      idName="sa_project_partiesid" 
+      :apiId="{query:20221027143702,del:20221027143802}" 
+      :options="options"
+      @listCreate="list"
+      customTitle="缔约信息">
+      <div slot="custom"></div>
+      <template v-slot:tbList="scope">
+        <div v-if="!scope.data.column.data[scope.data.column.columnname]">
+          --
+        </div>
+        <div v-else-if="scope.data.column.columnname == 'province'">
+          {{`${scope.data.column.data['province']}、${scope.data.column.data['city']}、${scope.data.column.data['county']}`}}
+        </div>
+        <div v-else>
+          {{scope.data.column.data[[scope.data.column.columnname]]}}
+        </div>
       </template>
       <template v-slot:opreation="scope">
 <!--        <edit v-if="tool.checkAuth($route.name,'update')" :data="scope.data" @updateSuccess="onSuccess"></edit>
         <toVoid v-if="tool.checkAuth($route.name,'toVoid')" :data="scope.data" @toVoidSuccess="onSuccess"></toVoid>-->
       </template>
-    </tableLayout>
+    </basicLayout>
     <div style="margin-top:16px;text-align:right">
       <el-pagination
           background

+ 2 - 1
src/HDrpManagement/projectChange/modules/modules/projectSet/index.vue

@@ -8,7 +8,8 @@
       idName="sa_projectid" 
       :apiId="{query:20221021145702,del:20221021145602}"
       :options="options"
-      @listCreate="list">
+      @listCreate="list"
+      customTitle="产品配置单">
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname == 'itemclass'">
         </div>

+ 2 - 1
src/HDrpManagement/projectChange/modules/modules/quotation/index.vue

@@ -7,7 +7,8 @@
       tableName="quotationTable" 
       idName="sa_quotedpriceid" 
       :apiId="{query:20221020165103,del:20221020165503}"
-      :options="options">
+      :options="options"
+      customTitle="报价单">
       <template v-slot:tbList="scope">
         <div>
           {{scope.data.column.data[scope.data.column.columnname] || scope.data.column.columnname == 'operation' ? scope.data.column.data[[scope.data.column.columnname]] : '--'}}

+ 66 - 17
src/HManagement/accountManage/index.vue

@@ -13,21 +13,43 @@
       :detailPath="{
         path:'/account_details'
       }">
-      <div slot="custom">
-        <el-select
-          class="inline-16"
-          size="small"
-          v-model="status"
-          placeholder="请选择"
-          @change="handleSelectChange"
-        >
-          <el-option
-            v-for="item in select"
-            :label="item.remarks"
-            :value="item.value"
-            :key="item.index"
-          ></el-option>
-        </el-select>
+      <div slot="custom" style="display:flex"> 
+        <div class="label_center">
+          <span class="search_label">状态: </span>
+            <el-select
+            class="inline-16"
+            size="small"
+            v-model="status"
+            placeholder="请选择数据状态"
+            @change="handleSelectChange"
+          >
+            <el-option
+              v-for="item in select"
+              :label="item.remarks"
+              :value="item.value"
+              :key="item.index"
+            ></el-option>
+          </el-select>
+        </div>
+        <div class="label_center">
+          <span class="search_label">用户类型: </span>
+          <el-select
+            class="inline-16"
+            size="small"
+            v-model="accountType"
+            placeholder="请选择用户类型"
+            @change="typeChange"
+          >
+            <el-option
+              v-for="item in selectType"
+              :label="item.value"
+              :value="item.remarks"
+              :key="item.index"
+            ></el-option>
+          </el-select>
+        </div>
+        
+        
       </div>
       <template v-slot:tbList="scope">
         <p v-if="scope.data.column.columnname === 'status'">
@@ -53,6 +75,7 @@
 </template>
 
 <script>
+import downSelect from '@/components/down_select/index'
 import accountUse from './modules/useAccdount.vue'
 import accountUnuse from './modules/unuseAccount.vue'
 export default {
@@ -60,13 +83,16 @@ export default {
     return {
       options:[],
       select:[],
-      status:''
+      selectType:[],
+      status:'',
+      accountType:''
     }
   },
   components:{
     // accountEdit,
     accountUse,
-    accountUnuse
+    accountUnuse,
+    downSelect
   },
   methods:{
     onSuccess () {
@@ -86,17 +112,40 @@ export default {
       const res = await this.$api.requested(param);
       this.select = res.data;
     },
+    async accountTypeList() {
+      let param = {
+        classname: "sysmanage.develop.optiontype.optiontype",
+        method: "optiontypeselect",
+        content: {
+          pageNumber: 1,
+          pageSize: 20,
+          typename: "accountType",
+          parameter: {},
+        },
+      };
+      const res = await this.$api.requested(param);
+      this.selectType = res.data;
+      console.log(this.selectType);
+      
+    },
     handleSelectChange() {
       this.$refs['basicLayout'].param.content.where.status = this.status
        this.$refs['basicLayout'].param.content.pageNumber = 1
       this.$refs['basicLayout'].listData()
     },
+    typeChange() {
+      this.$refs['basicLayout'].param.content.where.usertype = this.accountType
+       this.$refs['basicLayout'].param.content.pageNumber = 1
+      this.$refs['basicLayout'].listData()
+    },
   },
   mounted () {
     this.userstatus()
+    this.accountTypeList()
   }
 }
 
 </script>
 <style>
+
 </style>

+ 1 - 0
src/HManagement/department/staff/detail/index.vue

@@ -7,6 +7,7 @@
         :editData="mainData"
         :mainAreaData="mainAreaData"
         turnPageId="20221102090303"
+        delApiId="20221102090403"
         idname="hrid"
         ownertable="sys_hr"
         tags=""

+ 2 - 0
src/HManagement/notice/dataAnalysis/agent/index.vue

@@ -73,6 +73,8 @@ export default {
         }
       })
       this.pieStudyData = [{type:'已学习',num:res.data.studyNum},{type:'未学习',num:res.data.unStudyNum}]
+      console.log(this.pieStudyData);
+      
       this.pieDownloadData = [{type:'已下载',num:res.data.downloadNum},{type:'未下载',num:res.data.unDownloadNum}]
       this.$refs.studyPie.piePlot.changeData(this.pieStudyData)
       this.$refs.downloadPie.piePlot.changeData(this.pieDownloadData)

+ 38 - 16
src/HManagement/notice/index.vue

@@ -1,14 +1,34 @@
 <template>
   <div>
     <basicLayout
-        ref="list"
-        :oldFormPath="{add:'HManagement/notice/list/modules'}"
-        tableName="noticeTable"
-        idName="sat_noticeid"
-        :apiId="{query:20221101094903,del:20221101095103}"
-        :options="options"
-        >
+      ref="list"
+      :oldFormPath="{add:'HManagement/notice/list/modules'}"
+      tableName="noticeTable"
+      idName="sat_noticeid"
+      :apiId="{query:20221101094903,del:20221101095103}"
+      :options="options"
+      >
     >
+    <div slot="custom">
+      <div class="label_center">
+        <p class="search_label">状态:</p>
+        <el-select
+          class="inline-16"
+          size="small"
+          v-model="status"
+          placeholder="请选择"
+          @change="handleSelectChange"
+          clearable
+        >
+          <el-option
+            v-for="(item,index) in statusList"
+            :label="item.label"
+            :value="item.value"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </div>
+    </div>
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname === 'status'">
           <span v-if="scope.data.column.data.isontop === 1" style="color:#FF3B30">置顶</span>
@@ -33,20 +53,18 @@
 
 import message from './list/modules/message.vue'
 import edit from './list/modules/edit'
+import { log } from '@antv/g2plot/lib/utils'
 
 
 export default {
   data(){
     return {
-      options:[
-        {
-          label:'新建',
-          value:'新建'
-        },
-        {
-          label:'发布',
-          value:'发布'
-        }
+      status:'',
+      options:[],
+      statusList:[
+        {label:'全部',value:''},
+        {label:'新建',value:'新建'},
+        {label:'发布',value:'发布'},
       ]
     }
   },
@@ -57,6 +75,10 @@ export default {
   methods:{
     onSuccess () {
       this.$refs.list.listData()
+    },
+    handleSelectChange () {
+      this.$refs.list.param.content.where.status = this.status
+      this.$refs.list.listData()
     }
   }
 }

+ 8 - 2
src/HManagement/notice/list/modules/add_notice.vue

@@ -185,12 +185,18 @@ export default {
           "method": "insertormodify_notice",
           "content": this.form
         })
-
+        console.log(res.data,'新建');
+        
         this.insertCoursewareauth()
         this.queryNoticeMain()
+        const res2 = await this.$api.requested({
+          "id":"20221101095203",
+          "content": {
+            "sat_noticeids":[res.data.sat_noticeid]
+          }
+        })
         this.drawer = false
         this.$emit("updateSuccess")
-        this.$router.go(-1)
       });
     },
     //通告详情

+ 1 - 1
src/HManagement/notice/list/modules/edit.vue

@@ -11,7 +11,7 @@
         @close="drawer = false">
       <div class="detail__panel">
         <div class="container normal-panel normal-margin sticky">
-          <el-button class="inline-16" v-if="edit" type="primary" size="small"  @click="onEdit()" >编 辑</el-button>
+          <el-button class="inline-16" v-if="edit" :disabled="form.status == '发布'" type="primary" size="small"  @click="onEdit()" >编 辑</el-button>
           <p class="inline-16" v-if="save">编辑</p>
           <release  class="inline-16" v-if="tool.checkAuth($route.name,'update') && status"  :data="form" @onSuccess="onSuccess"></release>
           <topping  class="inline-16" v-if="tool.checkAuth($route.name,'update') && status" :data="form" @onSuccess="onSuccess"></topping>

+ 19 - 15
src/HManagement/roleManage/index.vue

@@ -14,21 +14,25 @@
         path:'/roleDetail'
       }">
       <div slot="custom">
-        <el-select
-          class="inline-16"
-          size="small"
-          v-model="type"
-          placeholder="请选择"
-          @change="handleSelectChange"
-          clearable
-        >
-          <el-option
-            v-for="item in select"
-            :label="item.remarks"
-            :value="item.value"
-            :key="item.index"
-          ></el-option>
-        </el-select>
+        <div class="label_center">
+          <p class="search_label">用户类型:</p>
+          <el-select
+            class="inline-16"
+            size="small"
+            v-model="type"
+            placeholder="请选择"
+            @change="handleSelectChange"
+            clearable
+          >
+            <el-option
+              v-for="item in select"
+              :label="item.remarks"
+              :value="item.value"
+              :key="item.index"
+            ></el-option>
+          </el-select>
+        </div>
+        
       </div>
       <template v-slot:tbList="scope">
         <p> {{scope.data.column.data[[scope.data.column.columnname]]}}</p>

+ 29 - 0
src/HManagement/siteManage/coderule/index copy.vue

@@ -0,0 +1,29 @@
+<template>
+  <div>
+    <list ref="list">
+      <template v-slot:edit="scope">
+        <edit :data="scope.data" @onSuccess="onSuccess"></edit>
+      </template>
+    </list>
+  </div>
+</template>
+
+<script>
+import list from './modules/list.vue'
+import edit from './modules/edit.vue'
+
+export default {
+  components:{
+    list,
+    edit
+  },
+  methods:{
+    onSuccess () {
+      this.$refs['list'].query_coderuleList()
+    }
+  }
+}
+
+</script>
+<style>
+</style>

+ 38 - 11
src/HManagement/siteManage/coderule/index.vue

@@ -1,25 +1,52 @@
+
 <template>
   <div>
-    <list ref="list">
-      <template v-slot:edit="scope">
-        <edit :data="scope.data" @onSuccess="onSuccess"></edit>
+    <basicLayout 
+      ref="basicLayout" 
+      tableName="coderuleTable" 
+      idName="sys_coderuleid" 
+      :apiId="{query:20221109110204,del:20221031141202}"
+      :options="options"
+      @listData="listData"
+      >
+      <div slot="custom"></div>
+      <template v-slot:tbList="scope">
+        <div v-if="scope.data.column.columnname == 'numincludetime'">
+          {{scope.data.column.data[[scope.data.column.columnname]] == 1 ? '是' : '否'}}
+        </div>
+        <div v-else>
+          {{scope.data.column.data[[scope.data.column.columnname]]}}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+        <edit :data="scope.data" v-if="tool.checkAuth($route.name,'update')" @onSuccess="$refs.basicLayout.listData()"></edit>
       </template>
-    </list>
+    </basicLayout>
   </div>
 </template>
 
 <script>
-import list from './modules/list.vue'
+/**
+ * @basicLayout 提供this.$ref['basicLayout'].listData()方法查询列表信息
+ * @param {string} formPath 新建,编辑组件所在文件夹名称,以后所有列表新增修改文件统一放入Form文件夹下面,并创建与开发应用相同的名称的子文件夹
+ * @param {string} tableName 开发端配置的表格名称
+ * @param {String} idName 数据主id名称
+ * @param {object} apiId:{query:查询的接口id,del:删除的接口id} 
+ * @param {Array} options:{label:描述,value:值} 
+ */
 import edit from './modules/edit.vue'
-
 export default {
-  components:{
-    list,
-    edit
+  components:{edit},
+  data () {
+    return {
+      options:[]
+      
+    }
   },
   methods:{
-    onSuccess () {
-      this.$refs['list'].query_coderuleList()
+    listData (data) {
+      console.log(data);
+      
     }
   }
 }

+ 5 - 5
src/HManagement/siteManage/coderule/modules/edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-button type="text" size="mini" @click="onShow">编 辑</el-button>
-    <el-dialog title="编辑规则" :visible.sync="dialogFormVisible" width="500px">
+    <el-drawer append-to-body title="编辑规则" :visible.sync="dialogFormVisible" width="500px">
       <el-form size="small" :model="form" label-position="right" label-width="140px">
         <el-form-item label="编码名称">
           <span >{{form.notes}}</span>
@@ -24,11 +24,11 @@
           <span>{{form.serialnum}}</span>
         </el-form-item>
       </el-form>
-      <div class="dialog-footer">
-        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="submit" class="normal-btn-width btn-warning">确 定</el-button>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="submit" class="normal-btn-width">确 定</el-button>
       </div>
-    </el-dialog>
+    </el-drawer>
   </div>
 </template>
 

+ 1 - 2
src/HManagement/siteManage/coderule/modules/list.vue

@@ -40,8 +40,7 @@ export default {
   data () {
     return {
       param:{
-        "classname": "webmanage.coderule.coderule",
-        "method": "query_coderuleList",
+        "id":20221109110204,
         "content": {
           "pageSize":10,
           "pageNumber":1

+ 19 - 1
src/HManagement/siteManage/custom_option/index.vue

@@ -2,7 +2,7 @@
   <div >
     <div class="container normal-panel el-row" >
       <div class="borderRight el-col el-col-12">
-        <div class="container"></div>
+        <p style="font-size:26px;font-weight:300">{{acitveApp.meta.title}}&nbsp;<i @click="addToAsideBar" style="color:orange" :class="acitveApp.name === $route.name?'el-icon-star-on collection':'el-icon-star-off'"></i></p>
         <list ref="list" @rowShow="rowShow">
         </list>
       </div>
@@ -27,6 +27,8 @@
 </template>
 
 <script>
+import {mapGetters} from 'vuex'
+
 import list from './modules/list.vue'
 import edit from './modules/edit'
 import del_option from './modules/delete'
@@ -48,6 +50,11 @@ export default {
     details_list,
     add
   },
+  computed:{
+    ...mapGetters({
+      acitveApp:'acitveApp',
+    })
+  },
   methods:{
     onSuccess () {
      this.$refs.list.queryOptions()
@@ -62,6 +69,17 @@ export default {
       console.log("列表信息")
       console.log(this.list)
       this.classname = row.remarks
+    },
+    // 创建快捷应用
+    async addToAsideBar () {
+      const res = await this.$api.requested({
+        "classname": "sysmanage.develop.userauthforweb.userauth",
+        "method": "create_usershortcuts",
+        "content": {
+          "systemappid":this.acitveApp.systemappid
+        }
+      })
+      this.$store.dispatch('setAppMenu')
     }
   }
 }

+ 3 - 3
src/HManagement/siteManage/custom_option/modules/add.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="inline-16">
     <el-button type="primary" size="small" @click="show" class="el-icon-plus" :disabled="disabled"> 新增分类明细</el-button>
-    <el-dialog  :visible.sync="drawer" width="500px" >
+    <el-dialog append-to-body  :visible.sync="drawer" width="500px" >
       <div slot="title" style="font-size: 15px">
         自定义分类/
         <el-tag size="mini" >{{data.remarks}}</el-tag>
@@ -10,8 +10,8 @@
         <el-row :gutter="20">
           <el-form :model="form"   ref="form"  size="mini" label-position="right" label-width="90px">
             <el-col :span="20">
-              <el-form-item  label=":">
-                <el-input type="textarea" autosize v-model="form.value" placeholder="输入"></el-input>
+              <el-form-item  label="分类名称:">
+                <el-input type="textarea" autosize v-model="form.value" placeholder="输入分类名称"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="20">

+ 3 - 3
src/HManagement/siteManage/custom_option/modules/edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="inline-16">
     <el-button size="small" type="text" @click="show">编 辑</el-button>
-    <el-dialog  :visible.sync="drawer" width="500px" >
+    <el-dialog append-to-body  :visible.sync="drawer" width="500px" >
       <div slot="title" style="font-size: 15px">
         自定义分类/
         <el-tag size="mini" >{{classname}}</el-tag>
@@ -10,8 +10,8 @@
         <el-row :gutter="20">
           <el-form :model="form"   ref="form"  size="mini" label-position="right" label-width="90px">
             <el-col :span="20">
-              <el-form-item  label=":">
-                <el-input type="textarea" autosize v-model="form.value" placeholder="输入"></el-input>
+              <el-form-item  label="分类名称:">
+                <el-input type="textarea" autosize v-model="form.value" placeholder="输入分类名称"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="20">

+ 1 - 0
src/HManagement/siteManage/custom_option/modules/list.vue

@@ -55,6 +55,7 @@ export default {
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      this.$emit('rowShow',this.list[0])
       console.log(res)
     },
     rowShow(row){

+ 71 - 0
src/HManagement/siteManage/messageSendtype/index copy.vue

@@ -0,0 +1,71 @@
+<template>
+  <div>
+    <div class="container normal-panel normal-margin">
+      <el-button size="small" type="warning" @click="updateSite_Parameter">保 存</el-button>
+    </div>
+    <div class="container normal-panel normal-margin">
+      <p class="normal-title normal-margin">消息提醒设置</p>
+      <div class="flex-align-center">
+        <div class="flex-align-center switch-panel">
+          <small>系统弹窗提醒&emsp;</small>
+          <el-switch
+            :active-value="1"
+            :inactive-value="0"
+            v-model="form.remind_showdialog">
+          </el-switch>
+        </div>
+        <div class="flex-align-center switch-panel">
+          <small>邮件提醒&emsp;</small>
+          <el-switch
+            :active-value="1"
+            :inactive-value="0"
+            v-model="form.remind_mail">
+          </el-switch>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+
+export default {
+  data () {
+    return {
+      form:{}
+    }
+  },
+  computed:{
+  },
+  methods:{
+    async querySite_Parameter () {
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.site",
+        "method": "querySite_Parameter",
+        "content": {
+        }
+      })
+      this.form = Object.assign({},this.form,res.data)
+    },
+    async updateSite_Parameter () {
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.site",
+        "method": "updateSite_Parameter",
+        "content": this.form
+      })
+      this.tool.showMessage(res)
+    },
+  },
+  mounted () {
+    this.querySite_Parameter()
+  }
+}
+
+</script>
+<style>
+</style>
+<style scoped>
+.switch-panel{
+  width: 250px;
+}
+</style>

+ 4 - 5
src/HManagement/siteManage/messageSendtype/index.vue

@@ -1,22 +1,21 @@
 <template>
   <div>
-    <div class="container normal-panel normal-margin">
-      <el-button size="small" type="warning" @click="updateSite_Parameter">保 存</el-button>
-    </div>
     <div class="container normal-panel normal-margin">
       <p class="normal-title normal-margin">消息提醒设置</p>
-      <div class="flex-align-center">
+      <div class="flex-align-center" style="padding:50px;border-bottom:1px solid #eeeeee">
         <div class="flex-align-center switch-panel">
           <small>系统弹窗提醒&emsp;</small>
           <el-switch
             :active-value="1"
             :inactive-value="0"
-            v-model="form.remind_showdialog">
+            v-model="form.remind_showdialog"
+            @change="updateSite_Parameter">
           </el-switch>
         </div>
         <div class="flex-align-center switch-panel">
           <small>邮件提醒&emsp;</small>
           <el-switch
+            @change="updateSite_Parameter"
             :active-value="1"
             :inactive-value="0"
             v-model="form.remind_mail">

+ 21 - 8
src/HManagement/siteManage/securityConfig/index.vue

@@ -1,11 +1,14 @@
 <template>
   <div>
-    <div class="container normal-panel normal-margin flex-align-center flex-between">
-      <edit v-if="tool.checkAuth($route.name,'update')" :basicInfo="siteinfo" @onSuccess="infoData"></edit>
-      <i class="el-icon-refresh" @click="infoData"></i>
+    <div class="container normal-panel" style="padding-bottom:0">
+      <el-descriptions title="企业设置"></el-descriptions>
     </div>
-    <basicInfo></basicInfo>
-    <div class="container normal-panel">
+    <basicInfo @>onSuccess="infoData"></basicInfo>
+
+    <!--消息提示设置-->
+    <messageTips/>
+    
+    <div class="container normal-panel" style="display:flex;justify-content:space-around;border-bottom:none">
       <el-descriptions title="安全配置"></el-descriptions>
     </div>
     <div class="panel">
@@ -32,7 +35,7 @@
         <set-watermark :basicInfo="basicInfo" v-if="tool.checkAuth($route.name,'setWatermark')"></set-watermark>
       </div>
     </div>
-    <div class="panel">
+    <div class="panel" style="margin-bottom:16px">
       <div class="flex-align-center flex-between">
         <div class="flex-align-stretch">
           <img width="72" height="72" src="../../../assets/icons/login_type_3.png" alt="">
@@ -44,6 +47,12 @@
         <login-select v-if="tool.checkAuth($route.name,'loginType')"></login-select>
       </div>
     </div>
+    <div class="container normal-panel" style="display:flex;justify-content:space-around;border-bottom:none">
+      <el-descriptions title="广告位管理"></el-descriptions>
+    </div>
+    <div>
+      <advertisementMag />
+    </div>
   </div>
 </template>
 
@@ -51,11 +60,12 @@
 import {mapGetters} from 'vuex'
 
 import basicInfo from './modules/basicinfo.vue'
-import edit from './modules/edit.vue'
 
 import setPassword from './modules/password.vue'
 import setWatermark from './modules/watermark.vue'
 import loginSelect from './modules/loginSelect.vue'
+import messageTips from '../messageSendtype/index'
+import advertisementMag from '../advertisement_mag/index'
 
 export default {
   components:{
@@ -63,7 +73,8 @@ export default {
     setWatermark,
     loginSelect,
     basicInfo,
-    edit
+    messageTips,
+    advertisementMag
   },
   data () {
     return {
@@ -83,6 +94,8 @@ export default {
         "method": "querySite",
         "content": {}
       })
+      console.log(1);
+      
     }
   },
   mounted () {

+ 33 - 25
src/HManagement/siteManage/securityConfig/modules/basicinfo.vue

@@ -1,39 +1,44 @@
 <template>
-  <div class="container normal-panel normal-margin">
-    <el-descriptions title="企业信息">
-        <el-descriptions-item label="企业名称">{{siteinfo.enterprisename?siteinfo.enterprisename:'--'}}</el-descriptions-item>
-        <el-descriptions-item label="企业简称">{{siteinfo.sitename}}</el-descriptions-item>
-        <!-- <el-descriptions-item label="企业互联ID">苏州市</el-descriptions-item> -->
-    </el-descriptions>
-    <el-descriptions direction="vertical">
-      <el-descriptions-item label="企业操作页LOGO">
-        <div class="image-panel">
-          <img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="width:100%" :src="img.url" alt="">
-        </div>
-      </el-descriptions-item>
-      <!-- <el-descriptions-item label="企业登录页LOGO">
-        <br><div>
-          <el-image src="">
-            <div slot="error" class="image-slot">
-              <i class="el-icon-picture-outline"></i>
-            </div>
-          </el-image>
-        </div>
-      </el-descriptions-item> -->
-      <!-- <el-descriptions-item label="登录背景">
-      </el-descriptions-item> -->
-    </el-descriptions>
+  <div class="container normal-panel normal-margin panel" style="display:flex">
+    <div>
+      <el-descriptions>
+          <el-descriptions-item label="企业名称">{{siteinfo.enterprisename?siteinfo.enterprisename:'--'}}</el-descriptions-item>
+          <el-descriptions-item label="企业简称">{{siteinfo.sitename}}</el-descriptions-item>
+          <!-- <el-descriptions-item label="企业互联ID">苏州市</el-descriptions-item> -->
+      </el-descriptions>
+      <el-descriptions direction="vertical">
+        <el-descriptions-item label="企业操作页LOGO">
+          <div class="image-panel" style="margin-left:10px">
+            <img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="width:100%" :src="img.url" alt="">
+          </div>
+        </el-descriptions-item>
+        <!-- <el-descriptions-item label="企业登录页LOGO">
+          <br><div>
+            <el-image src="">
+              <div slot="error" class="image-slot">
+                <i class="el-icon-picture-outline"></i>
+              </div>
+            </el-image>
+          </div>
+        </el-descriptions-item> -->
+        <!-- <el-descriptions-item label="登录背景">
+        </el-descriptions-item> -->
+      </el-descriptions>
+    </div>
+    <edit v-if="tool.checkAuth($route.name,'update')" :basicInfo="siteinfo" v-on="$listeners"></edit>
   </div>
 </template>
 
 <script>
 import {mapGetters} from 'vuex'
+import edit from './edit.vue'
 
 export default {
   data () {
     return {
     }
   },
+  components:{edit},
   computed:{
     ...mapGetters({
       siteinfo:'siteinfo'
@@ -47,5 +52,8 @@ export default {
 }
 
 </script>
-<style>
+<style scoped>
+/deep/.el-descriptions:last-child .el-descriptions-row {
+  display: inline-block;
+}
 </style>

+ 2 - 2
src/HManagement/siteManage/securityConfig/modules/edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
-    <el-button icon="el-icon-edit" size="small" @click="onShow">编 辑</el-button>
-    <el-dialog title="编辑" top="30px" :visible.sync="dialogEditVisible">
+    <el-button icon="el-icon-edit" size="small" type="primary" style="width:120px" @click="onShow">编 辑</el-button>
+    <el-dialog append-to-body title="编辑" :visible.sync="dialogEditVisible">
       <el-row :gutter="16">
         <el-form  :model="form" :rules="rules" ref="form" size="small" inline class="demo-ruleForm">
           <el-col :span="12">

+ 34 - 0
src/HManagement/submit/index.vue

@@ -7,6 +7,26 @@
         idName="sat_submiteditmodelid"
         :apiId="{query:20221102093602,del:20221102094102}"
     >
+    <div slot="custom">
+      <div class="label_center">
+        <p class="search_label">状态:</p>
+        <el-select
+          class="inline-16"
+          size="small"
+          v-model="status"
+          placeholder="请选择"
+          @change="handleSelectChange"
+          clearable
+        >
+          <el-option
+            v-for="(item,index) in statusList"
+            :label="item.label"
+            :value="item.value"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </div>
+    </div>
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname === 'status'">
             <span :style="scope.data.column.data.status === '发布' ? 'color:#52C41A' : ''">{{ scope.data.column.data.status
@@ -55,6 +75,16 @@ import release from './list/modules/release.vue'
 import edit from './list/modules/submit_edit'
 
 export default {
+  data () {
+    return {
+      statusList:[
+        {label:'全部',value:''},
+        {label:'新建',value:'新建'},
+        {label:'发布',value:'发布'},
+      ],
+      status:''  
+    }
+  },
   components:{
     list,
     onDel,
@@ -64,6 +94,10 @@ export default {
   methods:{
     onSuccess () {
       this.$refs.list.listData()
+    },
+    handleSelectChange () {
+      this.$refs.list.param.content.where.status = this.status
+      this.$refs.list.listData()
     }
   }
 }

+ 2 - 0
src/SManagement/user/role-edit/RoleEdit.vue

@@ -84,6 +84,7 @@ export default {
                 }
               })
               this.tool.showMessage(res, () => {
+                this.$store.dispatch('DrawerShowChange',false)
                 this.$router.back()
               })
             }
@@ -99,6 +100,7 @@ export default {
                 }
               })
               this.tool.showMessage(res2, () => {
+                this.$store.dispatch('DrawerShowChange',false)
                 this.$router.back()
               })
             }

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

@@ -0,0 +1,114 @@
+<template>
+  <div class="role" v-if="tool.checkAuth($route.name,'read')">
+    <div class="top">
+      <p>角色管理</p>
+      <el-button type="primary" @click="addRole()" v-if="tool.checkAuth($route.name,'insert')">
+        <img src="@/assets/add.png" alt style="vertical-align:middle" />
+        新建角色
+      </el-button>
+    </div>
+    <role-item :roleData="roleData" v-if="tool.checkAuth($route.name,'read') && roleData.length != 0">
+      <template v-slot:icon="scope">
+        <img src="@/assets/edit.png" alt @click="roleEdit(scope.data)" v-if="tool.checkAuth($route.name,'update')" />
+      </template>
+      <template v-slot:remove="scope">
+        <remove-role :roleData="scope.data" v-if="tool.checkAuth($route.name,'delete')"></remove-role>
+      </template>
+    </role-item>
+    <el-empty description="暂无数据" v-else></el-empty>
+  </div>
+</template>
+
+<script>
+import RoleItem from '@/SManagement/user/role-manage/components/RoleItem'
+import removeRole from '@/SManagement/user/role-manage/components/removeRole'
+export default {
+  name: 'RoleManage',
+  data () {
+    return {
+      param: {
+        "classname": "sale.role.role",
+        "method": "query_roleList",
+        "content": {
+          "nocache": true,
+          "pageNumber": 1,
+          "pageSize": 9999999,
+          "where": {
+            "condition": ""
+          }
+        }
+      },
+      roleData: []
+    }
+  },
+  props: [],
+  components: {
+    RoleItem,
+    removeRole
+  },
+  computed: {
+  },
+  watch: {
+  },
+  created () {
+    this.getRoleData()
+  },
+  methods: {
+    getRoleData () {
+      this.$api.requested(this.param).then(res => {
+        this.roleData = res.data
+      })
+    },
+    //角色编辑
+    roleEdit (data) {
+      window.sessionStorage.setItem('currentEditRole', JSON.stringify(data))
+      this.$router.push({
+        name: 'roleEdit',
+        params: {
+          data
+        }
+      })
+    },
+    addRole () {
+      window.sessionStorage.setItem('currentEditRole', 0)
+      window.sessionStorage.setItem('currentPath', '/role_managent')
+      this.$router.push({
+        path: 'role_edit',
+        query: {
+          id: 0
+        }
+      })
+    },
+  },
+};
+</script>
+
+<style scoped>
+* {
+  box-sizing: border-box;
+}
+.role {
+  width: 100%;
+  min-height: 100%;
+  background: #ffffff;
+}
+.role .top {
+  display: flex;
+  justify-content: space-between;
+  padding: 16px 16px 9px 0;
+  margin-left: 16px;
+  border-bottom: 1px solid #dddddd;
+  align-items: center;
+}
+.role .top p {
+  font-size: 16px;
+  font-weight: bold;
+  color: #333333;
+}
+.el-empty {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%, -50%);
+}
+</style>

+ 77 - 96
src/SManagement/user/role-manage/RoleManage.vue

@@ -1,114 +1,95 @@
+
 <template>
-  <div class="role" v-if="tool.checkAuth($route.name,'read')">
-    <div class="top">
-      <p>角色管理</p>
-      <el-button type="primary" @click="addRole()" v-if="tool.checkAuth($route.name,'insert')">
-        <img src="@/assets/add.png" alt style="vertical-align:middle" />
-        新建角色
-      </el-button>
-    </div>
-    <role-item :roleData="roleData" v-if="tool.checkAuth($route.name,'read') && roleData.length != 0">
-      <template v-slot:icon="scope">
-        <img src="@/assets/edit.png" alt @click="roleEdit(scope.data)" v-if="tool.checkAuth($route.name,'update')" />
+  <div>
+    <basicLayout 
+      ref="basicLayout" 
+      tableName="roleMainTable" 
+      idName="roleid"
+      :oldFormPath="{
+        add:'SManagement/user/role-manage/components'
+      }"
+      :apiId="{query:20221109091404,del:20221109091504}"
+      :options="options"
+      @listData="listData">
+      <div slot="custom"></div>
+      <template v-slot:tbList="scope">
+        <div>
+          {{scope.data.column.data[[scope.data.column.columnname]]}}
+        </div>
       </template>
-      <template v-slot:remove="scope">
-        <remove-role :roleData="scope.data" v-if="tool.checkAuth($route.name,'delete')"></remove-role>
+      <template v-slot:tbOpreation="scope">
+        <edit class="inline-16" v-if="tool.checkAuth($route.name,'update')" :data="scope.data.data"></edit>
+        <delete-btn class="inline-16" :id="scope.data.data.roleid" nameId="20221109091504" @deleteSuccess="$refs.basicLayout.listData()" nameKey="roleids" type="list"></delete-btn>
       </template>
-    </role-item>
-    <el-empty description="暂无数据" v-else></el-empty>
+    </basicLayout>
+    <!--抽屉面板-->
+    <el-drawer
+      title="我是标题"
+      :visible.sync="drawer"
+      :with-header="false"
+      direction="rtl"
+      size="90%"
+      append-to-body
+      @close="closeDrawer">
+      <div class="detail__panel">
+        <router-view/>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
 <script>
-import RoleItem from '@/SManagement/user/role-manage/components/RoleItem'
-import removeRole from '@/SManagement/user/role-manage/components/removeRole'
+/**
+ * @basicLayout 提供this.$ref['basicLayout'].listData()方法查询列表信息
+ * @param {string} formPath 新建,编辑组件所在文件夹名称,以后所有列表新增修改文件统一放入Form文件夹下面,并创建与开发应用相同的名称的子文件夹
+ * @param {string} tableName 开发端配置的表格名称
+ * @param {String} idName 数据主id名称
+ * @param {object} apiId:{query:查询的接口id,del:删除的接口id} 
+ * @param {Array} options:{label:描述,value:值} 
+ */
+import {mapGetters} from 'vuex'
+import edit from './components/edit'
 export default {
-  name: 'RoleManage',
   data () {
     return {
-      param: {
-        "classname": "sale.role.role",
-        "method": "query_roleList",
-        "content": {
-          "nocache": true,
-          "pageNumber": 1,
-          "pageSize": 9999999,
-          "where": {
-            "condition": ""
-          }
-        }
-      },
-      roleData: []
+      options:[],
+      drawer:false
     }
   },
-  props: [],
-  components: {
-    RoleItem,
-    removeRole
-  },
-  computed: {
-  },
   watch: {
+    $route (val) {
+      if (val.path == '/role_managent') {
+        this.$refs.basicLayout.listData()
+      }
+    },
+    DrawerShow (val) {
+      console.log(val);
+      val ? this.drawer = true : this.drawer = false
+    }
   },
-  created () {
-    this.getRoleData()
+  components:{
+    edit,
   },
-  methods: {
-    getRoleData () {
-      this.$api.requested(this.param).then(res => {
-        this.roleData = res.data
-      })
-    },
-    //角色编辑
-    roleEdit (data) {
-      window.sessionStorage.setItem('currentEditRole', JSON.stringify(data))
-      this.$router.push({
-        name: 'roleEdit',
-        params: {
-          data
-        }
-      })
+  computed: {
+    ...mapGetters({
+      DrawerShow:'DrawerShow'
+    })
+  },
+  methods:{
+    closeDrawer () {
+      this.$router.push('/role_managent')
+      this.$store.dispatch('DrawerShowChange',false)
     },
-    addRole () {
-      window.sessionStorage.setItem('currentEditRole', 0)
-      window.sessionStorage.setItem('currentPath', '/role_managent')
-      this.$router.push({
-        path: 'role_edit',
-        query: {
-          id: 0
-        }
-      })
+    onSuccess () {
+      this.$refs['basicLayout'].listData()
     },
-  },
-};
-</script>
-
-<style scoped>
-* {
-  box-sizing: border-box;
-}
-.role {
-  width: 100%;
-  min-height: 100%;
-  background: #ffffff;
-}
-.role .top {
-  display: flex;
-  justify-content: space-between;
-  padding: 16px 16px 9px 0;
-  margin-left: 16px;
-  border-bottom: 1px solid #dddddd;
-  align-items: center;
-}
-.role .top p {
-  font-size: 16px;
-  font-weight: bold;
-  color: #333333;
-}
-.el-empty {
-  position: absolute;
-  left: 50%;
-  top: 50%;
-  transform: translate(-50%, -50%);
+    listData(data) {
+      console.log(data);
+      
+    }
+  }
 }
-</style>
+
+</script>
+<style>
+</style>

+ 36 - 0
src/SManagement/user/role-manage/components/add.vue

@@ -0,0 +1,36 @@
+<template>
+  <div>
+    <el-button type="primary" size="small" @click="addRole">新 建</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: '',
+  data() {
+    return {
+    };
+  },
+  computed:{
+  },
+  watch:{
+  },
+  methods: {
+    addRole () {
+      window.sessionStorage.setItem('currentEditRole', 0)
+      window.sessionStorage.setItem('currentPath', '/role_managent')
+      this.$store.dispatch('DrawerShowChange',true)
+      this.$router.push({
+        path: 'role_edit',
+        query: {
+          id: 0
+        }
+      })
+    }
+  }, 
+};
+</script>
+
+<style scoped>
+
+</style>

+ 36 - 0
src/SManagement/user/role-manage/components/edit.vue

@@ -0,0 +1,36 @@
+<template>
+  <div>
+    <el-button type="text" size="small" @click="editRole">编 辑</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: '',
+  data() {
+    return {
+    };
+  },
+  props:['data'],
+  computed:{
+  },
+  watch:{
+  },
+  methods: {
+    editRole () {
+      window.sessionStorage.setItem('currentEditRole', JSON.stringify(this.data))
+      this.$store.dispatch('DrawerShowChange',true)
+      this.$router.push({
+        name: 'roleManagent',
+        params: {
+          data:this.data
+        }
+      })
+    }
+  }, 
+};
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 49
src/SManagement/user/role-manage/components/removeRole.vue

@@ -1,49 +0,0 @@
-<template>
-  <div class="remove">
-    <img src="@/assets/remove_btn.png" alt="" @click.stop="dialogVisible=true" slot="icon">
-    <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
-      <span>该角色已授权,是否确认删除?</span>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="removeTarget()">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'removeRole',
-  data () {
-    return {
-      dialogVisible:false
-    };
-  },
-  props:['roleData'],
-  computed: {
-  },
-  watch: {
-  },
-  methods: {
-    async removeTarget() {
-      let res = await this.$api.requested({
-        "classname": "sale.role.role",
-        "method": "delete_role",
-        "content": {
-            "roleid":this.roleData.roleid
-        }
-      })
-      this.tool.showMessage(res,() => {
-        this.$parent.$parent.$parent.$parent.getRoleData()
-        this.dialogVisible = false
-      })
-    },
-    handleClose() {
-      this.dialogVisible = false
-    }
-  },
-};
-</script>
-
-<style scoped>
-</style>

+ 2 - 4
src/components/down_select/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="select1">
-    <p>{{title}}</p>
-    <el-select v-model="result" :multiple="multiple" clearable @clear="clearCatory" placeholder="请选择" size="small" @change="change" :width="width">
+    <p class="search__label">{{title}}:</p>
+    <el-select v-model="result" :multiple="multiple" clearable @clear="clearCatory" :placeholder="`请选择${title}`" size="small" @change="change" :width="width ? width : ''">
       <el-option
         v-for="item in list"
         :key="item.value"
@@ -13,7 +13,6 @@
 </template>
 
 <script>
-import { log } from '@antv/g2plot/lib/utils';
 export default {
   name: '',
   data() {
@@ -31,7 +30,6 @@ export default {
     },
     width: {
       type: String,
-      default:() => '100px'
     }
   },
   computed:{

+ 2 - 2
src/components/normal-basic-layout/index.vue

@@ -4,7 +4,7 @@
       <div class="layout-header-panel container normal-panel">
         <div class="flex-align-center flex-between">
           <div class="normal-margin flex-align-center">
-            <p style="font-size:26px;font-weight:300">{{acitveApp.meta.title}}&nbsp;<i @click="addToAsideBar" style="color:#999" :class="acitveApp.name === $route.name?'el-icon-star-on collection':'el-icon-star-off'"></i></p>
+            <p style="font-size:26px;font-weight:300">{{customTitle ? customTitle : acitveApp.meta.title}}&nbsp;<i v-if="!customTitle" @click="addToAsideBar" style="color:#999" :class="acitveApp.name === $route.name?'el-icon-star-on collection':'el-icon-star-off'"></i></p>
             <div style="margin:0 8px"><el-divider direction="vertical"></el-divider></div>
             <div class="flex-align-center">
               <cpAdd v-if="tool.checkAuth($route.name,'insert')" :formPath="formPath" :oldFormPath="oldFormPath" @onAddSuccess="listData(param.content.pageNumber = 1)"></cpAdd>
@@ -68,7 +68,7 @@
 <script>
 import {mapGetters} from 'vuex'
 export default {
-  props:['tableName','idName','tableData','apiId','formPath','oldFormPath','options','autoQuery','detailPath'],
+  props:['tableName','idName','tableData','apiId','formPath','oldFormPath','options','autoQuery','detailPath','customTitle'],
   components:{
     tableTemp: () => import('./modules/table.vue'),
     setColumn: () => import('./modules/setColumn.vue'),

+ 13 - 10
src/router/SManagement.js

@@ -127,18 +127,21 @@ const SManagement = [{
     title: '角色管理',
     ast_nav: true
   },
-  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/role-manage/RoleManage')
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/role-manage/RoleManage'),
+  children: [
+    {
+      path: '/role_edit',
+      name: 'roleManagent',
+      meta: {
+        title: '角色操作',
+        ast_nav: true,
+        keeproute: true
+      },
+      component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/role-edit/RoleEdit')
+    },
+  ]
 },
 {
-  path: '/role_edit',
-  name: 'roleEdit',
-  meta: {
-    title: '角色操作',
-    ast_nav: true,
-    keeproute: true
-  },
-  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/role-edit/RoleEdit')
-}, {
   path: '/message',
   name: 'message',
   meta: {

+ 13 - 0
src/style/style.css

@@ -186,4 +186,17 @@ ul{
 }
 .el-notification.right{
   right:70px !important;
+}
+
+.search__label{
+  display: inline-block;
+  width: 80px;
+  font-size: 14px;
+  color:rgb(163, 163, 163) !important;
+  margin-right: 10px;
+}
+
+.label_center {
+  display: flex;
+  align-items: center;
 }