Authored by 王涛

Merge branch 'master-v32-lushangqing' into 'master'

【#1162】 变更负责人相关业务-角色权限无搜索,导出功能 #1



See merge request !629
@@ -306,7 +306,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', @@ -306,7 +306,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
306 let title=` 306 let title=`
307 <div style="display: flex;justify-content: space-between; align-items: center;"> 307 <div style="display: flex;justify-content: space-between; align-items: center;">
308 <span>"`+$(this).data('nickname')+`"相关业务批量变更</span> 308 <span>"`+$(this).data('nickname')+`"相关业务批量变更</span>
309 - <button id="exportBtn" type="button" class="layui-btn layui-btn-sm layui-btn-normal exportBtn">导出</button> 309 +<!-- <button id="exportBtn" type="button" class="layui-btn layui-btn-sm layui-btn-normal exportBtn">导出</button>-->
310 </div> 310 </div>
311 `; 311 `;
312 layer.open({ 312 layer.open({
@@ -317,57 +317,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', @@ -317,57 +317,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
317 id: 'batch_change_leaders', 317 id: 'batch_change_leaders',
318 content: ['/vue3/index.html#/vue3/batchChangeLeaders?'+urlParams, 'no'], 318 content: ['/vue3/index.html#/vue3/batchChangeLeaders?'+urlParams, 'no'],
319 success:function (layero,index){ 319 success:function (layero,index){
320 - console.log("112233",$("#exportBtn"))  
321 -  
322 - $(".exportBtn").unbind('click').on('click', function () {  
323 - console.log("669")  
324 - debugger  
325 - layer.open({  
326 - id:'exportChange',  
327 - content:'<div id="batch_change_select">123</div>',  
328 - btn: ['确定','取消'],  
329 - title:'导出相关业务',  
330 - type:'1',  
331 - area:['320px','170px'],  
332 - success:function (){  
333 - debugger  
334 - //获取字典中的变更相关业务选项卡  
335 - admin.req({  
336 - url: domainName + '/api-web/manage/ddic/findSucDdics/batch_change_leaders'  
337 - , method: 'POST'  
338 - , async: false  
339 - , success: function (res) {  
340 - if(res && res.data){  
341 - let content= xmSelect.render({  
342 - el: '#batch_change_select',  
343 - name: 'batchChangeTab',  
344 - // tips: '=服务商=',  
345 - // radio: true,  
346 - // clickClose: true,  
347 - filterable: true,  
348 - data:res.data,  
349 - prop: {  
350 - name: 'ddicName',  
351 - value: 'ddicCode'  
352 - },  
353 - on: function(data){  
354 - // setTimeout(function () {  
355 - // reloadTable();  
356 - // },500)  
357 - },  
358 - });  
359 - }  
360 - }  
361 - });  
362 - },  
363 - yes:function (index,layero) {  
364 - layer.msg('导出成功', {icon: 7});  
365 - layer.close(index)  
366 - }  
367 - })  
368 - })  
369 -  
370 -  
371 }, 320 },
372 cancel: function () { 321 cancel: function () {
373 // clearTimeout(obj.lineTimer); 322 // clearTimeout(obj.lineTimer);
1 <div class="batchChange-container" style="padding:10px;"> 1 <div class="batchChange-container" style="padding:10px;">
2 <el-row > 2 <el-row >
3 - <el-col :span="24"> 3 + <el-col :span="22">
4 <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> 4 <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
5 <el-tab-pane v-for="(item,index) in tabData" :key="index" :label="item.ddicName" :name="item.ddicCode"> 5 <el-tab-pane v-for="(item,index) in tabData" :key="index" :label="item.ddicName" :name="item.ddicCode">
6 6
@@ -37,10 +37,55 @@ @@ -37,10 +37,55 @@
37 </div> 37 </div>
38 <div class="table-container" v-else>暂无数据</div>--> 38 <div class="table-container" v-else>暂无数据</div>-->
39 </el-tab-pane> 39 </el-tab-pane>
40 - <component :is="activeName" ref="roomDetail" /> 40 +
41 41
42 </el-tabs> 42 </el-tabs>
43 43
44 </el-col> 44 </el-col>
  45 + <el-col :span="2">
  46 + <div style="padding:0 10px 6px;border-bottom: 2px solid var(--el-border-color-light);">
  47 + <el-button type="primary" @click="exportClick()" size="small" style="margin-left: 6px">导出</el-button>
  48 +
  49 + </div>
  50 +
  51 + </el-col>
45 </el-row> 52 </el-row>
46 -</div>  
  53 + <el-row>
  54 + <el-col :span="24">
  55 + <component :is="activeName" ref="roomDetail" />
  56 + </el-col>
  57 + </el-row>
  58 +</div>
  59 +<cm-dialog :title="title" width="500px" :showDialogVisible="show" @hidedialog="hidedialog" @okfunc="okExport">
  60 + <template v-slot>
  61 + <el-row>
  62 + <el-col :span="24">
  63 + <el-radio-group v-model="isAll">
  64 + <el-radio :label="1">导出全部</el-radio>
  65 + <el-radio :label="0">导出部分</el-radio>
  66 + </el-radio-group>
  67 + </el-col>
  68 + </el-row>
  69 + <el-row v-if="isAll==0">
  70 + <el-col :span="24" class="table-height">
  71 +<!-- <span style="margin-right:6px;"><el-button type="primary" @click="clickAll">全部</el-button></span>-->
  72 + <el-select
  73 + v-model="selectModel"
  74 + placeholder="请选择需要导出的页签"
  75 + multiple
  76 + style="width:80%"
  77 + clearable
  78 + filterable
  79 + >
  80 + <el-option
  81 + v-for="item in tabData"
  82 + :key="item.ddicCode"
  83 + :label="item.ddicName"
  84 + :value="item.ddicCode"
  85 + />
  86 + </el-select>
  87 + </el-col>
  88 + </el-row>
  89 +
  90 + </template>
  91 +</cm-dialog>
@@ -40,12 +40,49 @@ export default { @@ -40,12 +40,49 @@ export default {
40 }, 40 },
41 setup: function (props, {attrs, slots, emit}) { 41 setup: function (props, {attrs, slots, emit}) {
42 const {proxy} = Vue.getCurrentInstance(); 42 const {proxy} = Vue.getCurrentInstance();
43 - const tabData=Vue.ref()  
44 - const activeName = Vue.ref('') 43 + const tabData=Vue.ref();//页签列表数据
  44 + const activeName = Vue.ref('');//标签页显示的页签名称
  45 + let selectModel=Vue.ref([]);//导出列表选中的数据
  46 + let title=Vue.ref('导出列表');//导出列表弹框名称
  47 + let show=Vue.ref(false);//导出列表弹框是否显示
  48 + let isAll=Vue.ref(1);//导出全部或者部分
  49 + //页签点击事件
45 const handleClick = (tab, event) => { 50 const handleClick = (tab, event) => {
46 console.log(tab, event) 51 console.log(tab, event)
47 } 52 }
48 - 53 + //导出点击事件
  54 + const exportClick=()=>{
  55 + show.value=true;
  56 + }
  57 + //导出全部按钮点击事件
  58 + const clickAll=()=>{
  59 + let arr=[];
  60 + tabData.value.map(item=>{
  61 + arr.push(item.ddicCode)
  62 + })
  63 + selectModel.value=arr;
  64 + }
  65 + //导出弹框关闭事件
  66 + let hidedialog=(flag)=>{
  67 + show.value=flag;
  68 + }
  69 + //导出弹框确认事件
  70 + let okExport=()=>{
  71 + let params={
  72 + userName:proxy.$route.query.username,
  73 + }
  74 + if(isAll.value==0){
  75 + if(selectModel.value && selectModel.value.length>0){
  76 + params.code=selectModel.value.join(',');
  77 + }else{
  78 + proxy.$global.showMsg('请选择导出所需列表','warning');
  79 + return;
  80 + }
  81 + }else{
  82 + params.code='';
  83 + }
  84 + proxy.$http.downloadFile("/api-web/personnelChange/export", params);
  85 + }
49 //获取需变更的选项卡数据 86 //获取需变更的选项卡数据
50 let getBatchChangeData=()=>{ 87 let getBatchChangeData=()=>{
51 proxy.$http.post("/api-web/manage/ddic/findSucDdics/batch_change_leaders", {}, function (res) { 88 proxy.$http.post("/api-web/manage/ddic/findSucDdics/batch_change_leaders", {}, function (res) {
@@ -64,6 +101,14 @@ export default { @@ -64,6 +101,14 @@ export default {
64 activeName, 101 activeName,
65 handleClick, 102 handleClick,
66 tabData, 103 tabData,
  104 + selectModel,
  105 + title,
  106 + show,
  107 + exportClick,
  108 + hidedialog,
  109 + okExport,
  110 + clickAll,
  111 + isAll
67 } 112 }
68 } 113 }
69 } 114 }
@@ -193,10 +193,7 @@ export default { @@ -193,10 +193,7 @@ export default {
193 }) 193 })
194 resTypeId.value=arr.join(",");//选中的值 194 resTypeId.value=arr.join(",");//选中的值
195 } 195 }
196 - //勾选数据行的checked  
197 - let handleSelect=(selection)=>{  
198 - console.log("selection",selection)  
199 - } 196 +
200 //获取资源类型数据 197 //获取资源类型数据
201 let getResourceTypoe=()=>{ 198 let getResourceTypoe=()=>{
202 proxy.$http.get(`/api-web/manage/restype/list`, {}, function (res) { 199 proxy.$http.get(`/api-web/manage/restype/list`, {}, function (res) {
@@ -324,7 +321,6 @@ export default { @@ -324,7 +321,6 @@ export default {
324 321
325 getListData, 322 getListData,
326 loadTableDataList, 323 loadTableDataList,
327 - handleSelect  
328 } 324 }
329 } 325 }
330 } 326 }
1 -<el-row> 1 +<!--<el-row>
2 <el-col :span="24" class="search"> 2 <el-col :span="24" class="search">
3 <div class="condition" > 3 <div class="condition" >
4 <el-form ref=“form” style="display: flex;"> 4 <el-form ref=“form” style="display: flex;">
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </el-form> 11 </el-form>
12 </div> 12 </div>
13 </el-col> 13 </el-col>
14 -</el-row> 14 +</el-row>-->
15 <el-row style="margin-bottom: 10px;"> 15 <el-row style="margin-bottom: 10px;">
16 <div class="flex-div-start"> 16 <div class="flex-div-start">
17 <el-button type="primary" @click="changeCancel()" size="small">取消</el-button> 17 <el-button type="primary" @click="changeCancel()" size="small">取消</el-button>