Selaa lähdekoodia

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-tenant-frontend

# Conflicts:
#	src/views/room/modules/checkIn/AgreementUnitModal.vue
gqx 2 vuotta sitten
vanhempi
commit
71772a7652

+ 1 - 1
src/components/tools/HeaderNotice.vue

@@ -272,7 +272,7 @@ export default {
       let token = Vue.ls.get(ACCESS_TOKEN);
       // this.websock = new WebSocket(url, [token]);
       this.websock = new WebSocket(
-        "ws://localhost:8080/jeecg-boot/websocket/" + userId,
+        "ws://118.195.195.200:8080/jeecg-boot/websocket/" + userId,
         [token]
       );
       //update-end-author:taoyan date:2022-4-22 for:  v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278

+ 1 - 0
src/views/hotel/entry.vue

@@ -301,6 +301,7 @@ export default {
 .img-hotel img {
     width: 100%;
     height: auto;
+    max-height:100%;
 }
 
 .hotel-name {

+ 1 - 1
src/views/pos/diandan.vue

@@ -69,7 +69,7 @@
                   <a-input v-if="!isSaoma" placeholder="输入名称、简拼、条码"></a-input>
                   <a-input v-else placeholder="请扫描条码"></a-input>
                   <a-button v-if="!isSaoma">查询</a-button>
-                  <a-button @click="isSaoma=!isSaoma">切换为扫码模式</a-button>
+                  <a-button @click="isSaoma=!isSaoma">切换为{{isSaoma?'查询':'扫码'}}模式</a-button>
                 </a-space>
             </a-row>
         </a-card>

+ 18 - 11
src/views/room/forwardfangtai.vue

@@ -60,17 +60,13 @@
         class="j-table-force-nowrap"
         @change="handleTableChange"
       >
-        <template
+        <!-- <template
           :slot="item.dataIndex"
           slot-scope="text, record, index"
           v-for="item in columns"
         >
-          <!-- <editable-cell
-            :text="text"
-            @change="onCellChange(item.dataIndex, index, $event)"
-          /> -->
           0/0/{{ text }}
-        </template>
+        </template> -->
 
         <template :slot="'long'" slot-scope="text, record">
           <!-- {{text.leaveCount}}/{{text.livingCount}} -->
@@ -133,13 +129,13 @@
 
 
 
-        <template slot="footer" slot-scope="currentPageData" v-if="dataList.length>0">
+        <!-- <template slot="footer" slot-scope="currentPageData" v-if="dataList.length>0">
           <a-table size="middle" :scroll="{ x: true }" bordered rowKey="id" :showHeader="false" :pagination="false" :columns="columns" :dataSource="dataList">
               <template slot="action" slot-scope="text, record">
                   {{record}}
               </template>
           </a-table>
-        </template>
+        </template> -->
       </a-table>
     </div>
 
@@ -357,13 +353,11 @@ export default {
               })
               // brr = res.result.dateList.filter(item => item.layoutId == ele.layoutId)
             })
-            // console.log(brr);
             brr.forEach(ele=>{
               ele.data.forEach(item=>{
                 ele[item.date] = item
               })
             })
-            console.log(brr);
             let arr = []
             brr[0].data.forEach(ele=>{
               arr.push({
@@ -376,9 +370,22 @@ export default {
                     },
               })
             })
+            let arrayKeys = Object.keys(brr[0])
+            arrayKeys = arrayKeys.filter(item => item != 'layout_name' && item != 'flag' && item != 'data' && item!='count')
+            let obj = {}
+            arrayKeys.forEach(ele=>{
+              obj[ele] = {
+                data:ele,
+                leaveCount:brr.reduce((pre, cur)=> pre + cur[ele].leaveCount,0 ),
+                livingCount:brr.reduce((pre, cur)=> pre + cur[ele].livingCount,0 ),
+                leaveOrders:brr.map(item=>item[ele].leaveOrders).flat(),
+                livingOrders:brr.map(item=>item[ele].livingOrders).flat()
+              }
+            })
+            obj=Object.assign({}, obj, {layout_name: '合计'}, {count: brr.reduce((a, b) => a + b.count*1, 0)});
+            brr.push(obj)
             this.dataSource = brr
             this.columns = this.columns.concat(arr)
-            console.log('1111111111111111',arr);
           }
           if (res.result.total) {
             this.ipagination.total = res.result.total;

+ 28 - 0
src/views/room/modules/checkIn/AgreementUnitModal.vue

@@ -8,12 +8,17 @@
     :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     @cancel="handleCancel"
     cancelText="关闭">
+<<<<<<< HEAD
     <bus-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-card-form>
+=======
+    <refund :agreementId="agreementId" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></refund>
+>>>>>>> cefd92a69aeaf6e6bb384d753b109db267c49e3b
   </j-modal>
 </template>
 
 <script>
 
+<<<<<<< HEAD
   import BusMemberCardForm from './AgreementUnitInfo'
   export default {
     name: 'BusMemberCardModal',
@@ -23,16 +28,39 @@
     data () {
       return {
         title:'',
+=======
+  import Refund from './AgreementUnitTable.vue'
+  export default {
+    name: 'RefundModal',
+    components: {
+      Refund
+    },
+    props:{
+        agreementId:{
+            default:''
+        }
+    },
+    data () {
+      return {
+        title:'协议',
+>>>>>>> cefd92a69aeaf6e6bb384d753b109db267c49e3b
         width:800,
         visible: false,
         disableSubmit: false
       }
     },
     methods: {
+<<<<<<< HEAD
       add (livingOrderId,roomId) {
         this.visible=true
         this.$nextTick(()=>{
           this.$refs.realForm.add(livingOrderId,roomId);
+=======
+      add (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(record);
+>>>>>>> cefd92a69aeaf6e6bb384d753b109db267c49e3b
         })
       },
       edit (record) {

+ 402 - 0
src/views/room/modules/checkIn/AgreementUnitTable.vue

@@ -0,0 +1,402 @@
+<template>
+    <div class="back">
+        <div class="" style="">
+            <a-card :bordered="false">
+                <!-- 查询区域 -->
+                <!-- <div class="table-page-search-wrapper">
+                    <a-form layout="inline" @keyup.enter.native="searchQuery">
+                        <a-row :gutter="24">
+                            <a-col :span="4">
+                                <a-form-item label="">
+                                    <j-input placeholder="商品名称" v-model="queryParam.name" style="width: 200px"></j-input>
+                                </a-form-item>
+                            </a-col>
+                            <a-col :md="13" :sm="8" style="display: flex; justify-content: space-around;">
+                                <span style="float:left; overflow: hidden" class="table-page-search-submitButtons">
+                                    <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                                </span>
+                            </a-col>
+                        </a-row>
+                    </a-form>
+                </div> -->
+                <!-- 查询区域-END -->
+                <div>
+                    <a-table ref="table" size="middle" :scroll="{ x: '100%' }" bordered rowKey="id" :columns="columns"
+                        :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
+                            selectedRowKeys: selectedRowKeys,
+                            onChange: onSelectChange,
+                        }" class="j-table-force-nowrap" @change="handleTableChange">
+                        <span slot="state" slot-scope="record">
+                            {{record?'启用':'停用'}}
+                            <!-- {{record}} -->
+                        </span>
+                        <span slot="action" slot-scope="text, record">
+                            <!-- <a @click="handleEdit(record)">修改</a> -->
+                            <!-- <a-divider type="vertical" /> -->
+                            <a @click="moreSet(record)">选择</a>
+                            <!-- <a-divider type="vertical" />
+                            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                                <a>删除</a>
+                            </a-popconfirm> -->
+                        </span>
+                    </a-table>
+                </div>
+            </a-card>
+        </div>
+        <!-- 单位设置区域 -->
+        <!-- <SetUnit :unitVisible="unitVisible" @center="handleCancel" /> -->
+    </div>
+
+</template>
+<script>
+import { tree, delTree, goodBatchDel, goodSet } from '@/api/good'
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import roomLayoutForm from './goodStock/goods'
+// import index from '/src/index.vue'
+// import stockTypeModel from './stockTypeModel.vue'
+// import Commodity from './moreSet/commodity.vue'
+// import GoodImg from './moreSet/goodImg.vue';
+// import moreSet from './moreSet/moreModal.vue'
+import { computed } from 'vue';
+// import SetUnit from './setUnit/index.vue'
+
+
+const tabListNoTitle=[
+        {
+          key: 'commodity',
+          tab: '商品小程序设置',
+        },
+        {
+          key: 'goodImg',
+          tab: '商品图片',
+        },
+        {
+          key: 'project',
+          tab: '餐饮设置',
+        },
+        {
+          key: 'game',
+          tab: '娱乐设置',
+        },
+      ]
+export default {
+    name: "goodList",
+    mixins: [JeecgListMixin],
+    components: {
+        // stockTypeModel,
+        // roomLayoutForm,
+        // SetUnit,
+        // moreSet,
+        // index
+        // Commodity,
+        // GoodImg
+      },
+    props:{
+        agreementId:{},
+    },
+    data() {
+        return {
+            key: 'tab1',
+            noTitleKey: 'commodity',
+
+            checkedKeys: [''],
+            tabListNoTitle,
+            selectedKeys: [],
+            queryParam: {},
+            //单位对话框
+            unitVisible:false,
+            // 分页参数
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                pageSizeOptions: ["10", "20", "30"],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条";
+                },
+                showQuickJumper: true,
+                showSizeChanger: true,
+                total: 0,
+            },
+            // 表头
+            columns: [
+                {
+                    title: "协议类型",
+                    align: "center",
+                    dataIndex: "type",
+                    customCell:() => {
+                        return {
+                        style: {
+                            wordWrap:'break-word',
+                            wordBreak:'break-all',
+                            whiteSpace:'normal',
+                            minHeight:'50px',
+                            width: '50px',
+                        }
+                        }
+                    }
+                },
+                {
+                    title: "协议主题",
+                    align: "center",
+                    dataIndex: "name",
+                    // customCell:() => {
+                    //     return {
+                    //     style: {
+                    //         wordWrap:'break-word',
+                    //         wordBreak:'break-all',
+                    //         whiteSpace:'normal',
+                    //         minHeight:'50px',
+                    //         width: '50px',
+                    //     }
+                    //     }
+                    // }
+                },
+                {
+                    title: "协议单号",
+                    align: "center",
+                    dataIndex: "number",
+                    // customCell:() => {
+                    //     return {
+                    //     style: {
+                    //         wordWrap:'break-word',
+                    //         wordBreak:'break-all',
+                    //         whiteSpace:'normal',
+                    //         minHeight:'50px',
+                    //         width: '50px',
+                    //     }
+                    //     }
+                    // }
+                },
+                {
+                    title: "签约时间",
+                    align: "center",
+                    dataIndex: "signTime",
+                },
+                {
+                    title: "折扣值",
+                    align: "center",
+                    dataIndex: "discount",
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'action',
+                    key: 'action',
+                    scopedSlots: { customRender: "action" },
+                    align:'center',
+                    // fixed: "right",
+                    // width: 200,
+                }
+            ],
+            url: {
+                // list: 'org.jeecg.modules.business/busMarketMember/list',
+                list:'/business/busMarketAgreementCustomer/list?agreementId=' + this.agreementId,
+                // list: "/rooms/cesRoomLayout/list?hotelId",
+                // delete: "/rooms/cesRoomLayout/remove",
+                delete:'/rooms/cesGoods/delete',
+                // deleteBatch: "/rooms/cesRoomLayout/deleteBatch",
+                deleteBatch:'/rooms/cesGoods/delBatch',
+                exportXlsUrl: "/rooms/cesRoomLayout/exportXls",
+                importExcelUrl:"rooms/cesRoomLayout/importExcel",
+            },
+            dictOptions: {},
+            superFieldList: [],
+            selectedRowKeys: [],
+            isorter: {
+                column: "createTime",
+                order: "desc",
+            },
+            stockTypeVisible:false,
+            // 选中的数据
+            beforeTree:null,
+            goodsSetVisible:false,//进退货弹窗
+            moreSetVisible:false,//更多设置弹窗
+            goodsSetData:{
+                number:0,
+                type:1
+            }
+        };
+    },
+    computed: {
+
+    },
+    watch: {
+
+    },
+    created() {
+        this.loadTree();
+    },
+    provide(){
+        return {
+            beforeTree:computed(() => this.beforeTree?this.beforeTree:{id:'0'}),
+            treeData:computed(()=> this.treeData),
+            dataSource:computed(()=> this.dataSource)
+        }
+    },
+    methods: {
+        // handleStockTypeModelManager(item,type) {
+        //     this.$refs.indexTable.visible = true
+        //     return
+        //     console.log(item, type)
+        //     this.beforeTree = null
+        //     if (item!='-1') {
+        //         this.beforeTree = item
+        //         this.beforeTree.editData = type ===2?true:false
+        //     }
+        //     console.log(this.beforeTree);
+        //     this.$refs.stockTypeModel.title = type === 1 ?"新增":"修改"
+        //     this.$refs.stockTypeModel.visible = true
+        // },
+        loadTree() {
+            var that = this
+            tree().then((res) => {
+                if (res.success) {
+                    this.treeData = res.result;
+                }
+            })
+        },
+        onExpand(expandedKeys) {
+            console.log('onExpand', expandedKeys);
+            // if not set autoExpandParent to false, if children expanded, parent can not collapse.
+            // or, you can remove all expanded children keys.
+        },
+        onSelect(selectedKeys, info) {
+            console.log('onSelect', info);
+            this.selectedKeys = selectedKeys;
+        },
+        /**
+         * 保存成功
+         */
+        onSave(){
+            this.loadTree()
+        },
+        /**
+         * 删除
+         */
+        confirmDel(id){
+            delTree({id:id}).then(res=>{
+                if (res.code && res.code==200) {
+                    this.$message.success('删除成功')
+                    this.loadTree()
+                }
+            })
+        },
+        //批量删除
+        goodBatchDel(){
+            console.log(this.selectedRowKeys);
+            if (this.selectedRowKeys.length==0) {
+                this.$message.info('请先选择要删除的数据')
+                return
+            }
+            this.$confirm({
+                title: '提示',
+                content: '确认要删除吗',
+                okText: '确认',
+                cancelText: '取消',
+                onOk:(e)=>{
+                    return goodBatchDel({idStr:this.selectedRowKeys.toString()}).then(res=>{
+                        if (res.code && res.code==200) {
+                            this.$message.success(res.message)
+                            this.loadData();
+                        }else{
+                            this.$message.error(res.message)
+                        }
+                    })
+                }
+            });
+        },
+        //单位设置区域
+        handleOk(e) {
+            // this.confirmLoading = true;
+            // setTimeout(() => {
+            //     this.visible = false;
+            //     this.confirmLoading = false;
+            // }, 2000);
+            this.unitVisible=false
+        },
+        handleCancel(e) {
+            console.log('Clicked cancel button',e);
+            this.unitVisible = false;
+        },
+        /**
+         * 进退货
+         */
+        goodsSet(){
+            this.goodsSetData = this.dataSource.filter(item=> item.id==this.selectedRowKeys.toString() )[0]
+            console.log(this.goodsSetData);
+            this.goodsSetVisible = true
+        },
+        goodChange(e){
+            console.log(e);
+            this.goodsSetData.type = e.target.value
+        },
+        //更多设置
+        moreSet(record){
+            console.log(this.$refs.modalSet);
+            this.$refs.modalSet.edit(record)
+            this.$refs.modalForm.disableSubmit = false;
+            // this.moreSetVisible = true
+        },
+        //更多设置确认
+        handleMoreSetOk(){
+
+        },
+        //更多设置切换卡片
+        onTabChange(key, type) {
+            console.log(key, type);
+            this[type] = key;
+        },
+
+        //进退货确认事件
+        handleGoodOk(){
+            console.log(this.goodsSetData);
+            if (!this.goodsSetData.type) {
+                this.goodsSetData.type = 1
+            }
+            let obj = {
+                hotelId:this.goodsSetData.hotelId,
+                goodId:this.goodsSetData.id,
+                type:this.goodsSetData.type,
+                goodNum:this.goodsSetData.goodNum,
+                remark:this.goodsSetData.remark?this.goodsSetData.remark:''
+            }
+            // this.goodsSetData.goodId = this.goodsSetData.id
+            goodSet(obj).then(res=>{
+                if (res.code && res.code==200) {
+                            this.$message.success(res.message)
+                            this.goodsSetVisible = false
+                            // this.goodsSetData = {}
+                            this.loadData();
+                        }else{
+                            this.$message.error(res.message)
+                        }
+            })
+
+        },
+        //进退货取消
+        handleGoodCancel(){
+            this.goodsSetVisible = false
+        }
+    },
+};
+</script>
+<style scoped>
+.back {
+    display: flex;
+    justify-content: space-between;
+}
+
+.back-left {
+    /* flex: 1 */
+}
+
+.back-right {
+    flex: 1;
+}
+
+.ant-tree li .ant-tree-node-content-wrapper {
+    height: auto !important;
+}
+
+.ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
+    background-color: #bae7ff33;
+}</style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 321 - 0
src/views/settings/components/modules/printComponents/incomePrint.vue


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 301 - 0
src/views/settings/components/modules/printComponents/settlePrint.vue


+ 13 - 10
src/views/settings/components/modules/printTemplateForm.vue

@@ -62,11 +62,8 @@
         </j-form-container>
       </div>
       <div class="right">
-        <a-card class="template" :style="{width:width}">
-          <p>Card content</p>
-          <p>Card content</p>
-          <p>Card content</p>
-        </a-card>
+        <!-- <jzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></jzd> -->
+        <skd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></skd>
       </div>
     </div>
 
@@ -77,10 +74,14 @@
 
   import { httpAction, getAction } from '@/api/manage'
   import { validateDuplicateValue } from '@/utils/util'
+  import jzd from './printComponents/settlePrint.vue'
+  import skd from './printComponents/incomePrint.vue'
 
   export default {
     name: 'printTemplateForm',
     components: {
+      jzd,
+      skd
     },
     props: {
       //表单禁用
@@ -92,6 +93,7 @@
     },
     data () {
       return {
+        sizeTypeClass: 'mm58',
         model:{
          },
         labelCol: {
@@ -180,11 +182,12 @@
         })
       },
       onSpecsChange(val){
-        console.log('规格切换  ————  '+val)
-        this.width = val;
-        console.log(this.width)
-        if (val === 'A5'){
-          // this.width = '210mm';
+        if(val == '80mm') {
+          this.sizeTypeClass = 'mm80'
+        } else if(val == '58mm') {
+          this.sizeTypeClass = 'mm58'
+        } else {
+          this.sizeTypeClass = 'a5'
         }
       }
     }

+ 147 - 224
src/views/settings/components/roomModules/roomGen.vue

@@ -20,72 +20,28 @@
           </a-select>
         </a-form-model-item> -->
 
-        <a-form-model-item
-          label="楼栋名称"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="layoutId"
-        >
-          <a-select
-            show-search
-            placeholder="请选择楼栋"
-            v-model="buildingId"
-            option-filter-prop="children"
-            @change="onBuildChange"
-          >
-            <a-select-option v-for="item in buildingTreeData" :key="item.id" >
+        <a-form-model-item label="楼栋名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
+          <a-select show-search placeholder="请选择楼栋" v-model="buildingId" option-filter-prop="children"
+            @change="onBuildChange">
+            <a-select-option v-for="item in buildingTreeData" :key="item.id">
               {{ item.name }}
             </a-select-option>
           </a-select>
         </a-form-model-item>
 
-        <a-form-model-item
-          label="层数最高"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="layoutId"
-        >
-          <a-input-number
-            placeholder="输入楼层数"
-            v-model="model.floorCount"
-            :min="1"
-            style="width: 120px"
-          />层
+        <a-form-model-item label="层数最高" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
+          <a-input-number placeholder="输入楼层数" v-model="model.floorCount" :min="1" style="width: 120px" />层
         </a-form-model-item>
-        <a-form-model-item
-          label="每层房间数量"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="layoutId"
-        >
-          <a-input-number
-            placeholder="输入每层房间数"
-            v-model="model.roomCount"
-            :min="1"
-            style="width: 120px"
-          />间
+        <a-form-model-item label="每层房间数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
+          <a-input-number placeholder="输入每层房间数" v-model="model.roomCount" :min="1" style="width: 120px" />间
         </a-form-model-item>
 
-        <a-form-model-item
-          label="设置前缀"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="layoutId"
-        >
+        <a-form-model-item label="设置前缀" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
           <a-input placeholder="输入房号前缀" v-model="model.prefix" />
         </a-form-model-item>
-        <a-form-model-item
-          label="设置前缀"
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="layoutId"
-        >
+        <a-form-model-item label="尾号排除" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
           <a-checkbox v-model="model.isExpectEnd"> 尾号排除 </a-checkbox>
-          <a-input
-            :disabled="!model.isExpectEnd"
-            placeholder="输入排除的其他尾号"
-            v-model="tailNumber"
-          />
+          <a-input :disabled="!model.isExpectEnd" placeholder="输入排除的其他尾号" v-model="tailNumber" />
         </a-form-model-item>
         <a-button type="primary" @click="genRooms"> 批量生成 </a-button>
       </a-form>
@@ -94,52 +50,24 @@
       <div v-if="roomTree.length > 0">
         <div v-for="(item, index) in roomTree" :key="index" style="width: 100%">
           <div style="font-width: 600; font-size: 20px" @click="sele(item)">
-            <a-input
-              placeholder="请填写楼层名"
-              v-model="item.name"
-              class="floor-input"
-            ></a-input>
-            <a-button
-              @click="delFloor(index)"
-              type="danger"
-              shape="circle"
-              size="small"
-              icon="minus"
-              style="margin-left: 5px"
-            />
+            <a-input placeholder="请填写楼层名" v-model="item.name" class="floor-input"></a-input>
+            <a-button @click="delFloor(index)" type="danger" shape="circle" size="small" icon="minus"
+              style="margin-left: 5px" />
           </div>
           <div style="color:red;" v-if="isExistNames(item.name)">名称已存在</div>
-          <div
-            style="display: flex;justify-content: start;margin: 20px;flex-wrap: wrap;"
-          >
-            <div
-              v-for="(room, indexs) in item.children"
-              :key="indexs"
-              style="width: 25%; margin-top: 10px"
-            >
+          <div style="display: flex;justify-content: start;margin: 20px;flex-wrap: wrap;">
+            <div v-for="(room, indexs) in item.children" :key="indexs" style="width: 15%; margin-top: 10px">
               <input v-model="room.name" style="width: 50%; margin: auto" />
-              
-              <a-button
-                @click="delRoom(index, indexs)"
-                type="danger"
-                shape="circle"
-                size="small"
-                icon="minus"
-                style="margin-left: 5px"
-              />
-              <div style="color:red;" v-if="repeatName(item.children,indexs)">房名重复</div>
+
+              <a-button @click="delRoom(index, indexs)" type="danger" shape="circle" size="small" icon="minus"
+                style="margin-left: 5px" />
+              <div style="color:red;" v-if="repeatName(item.children, indexs)">房名重复</div>
             </div>
-            
+
           </div>
           <div>
-            <a-button
-              @click="addRoom(index)"
-              type="primary"
-              shape="circle"
-              size="small"
-              icon="plus"
-              style="margin-left: 20px; margin: 0 20px 20px"
-            />
+            <a-button @click="addRoom(index)" type="primary" shape="circle" size="small" icon="plus"
+              style="margin-left: 20px; margin: 0 20px 20px" />
           </div>
         </div>
       </div>
@@ -153,81 +81,57 @@
     </div>
   </div>
   <div v-else class="room-layout-settings">
-    <div class="layout-rooms-item" v-for="(item, layoutIndex) in layouts" :key="item.id">
-      <div class="title-laytou">
-        {{ item.name }}
-        
+
+
+    <div style="flex:1;height: calc(100vh - 180px);overflow-y: auto;">
+      <div class="wait-select-title">
+        <div class="color-title">待配置房间</div>
       </div>
-      <div class="room-items">
-        <div v-for="(element, roomIndex) in item.rooms" :key="element.id" class="layout-room-item">
-          {{ element.name }}
-          <a-button
-          @click="delLayoutRoom(element, layoutIndex, roomIndex)"
-          type="danger"
-          shape="circle"
-          size="small"
-          icon="minus"
-          style="margin-left: 5px"
-        />
+      <div v-for="(item, index) in roomTree" :key="index" style="width: 100%; padding-left: 30px">
+        <div style="font-width: 600; font-size: 20px" @click="sele(item)">
+          {{ item.name }}
         </div>
-      </div>
-    </div>
-    <div class="wait-select-title">
-      <div class="color-title">待配置房间</div>
-    </div>
-    <div
-      v-for="(item, index) in roomTree"
-      :key="index"
-      style="width: 100%; padding-left: 30px"
-    >
-      <div style="font-width: 600; font-size: 20px" @click="sele(item)">
-        {{ item.name }}
-      </div>
-      <div
-        style="display: flex;justify-content: start;margin: 20px;flex-wrap: wrap;"
-      >
-        <div
-          v-for="(room, indexs) in item.children"
-          :key="indexs"
-          class="select-room-item"
-          :class="[room.checked ? 'checked-room' : '']"
-          @click="room.checked = !room.checked"
-          style="width: 80px; margin-top: 10px"
-        >
-          {{ room.name }}
+        <div style="display: flex;justify-content: start;margin: 20px;flex-wrap: wrap;">
+          <div v-for="(room, indexs) in item.children" :key="indexs" class="select-room-item"
+            :class="[room.checked ? 'checked-room' : '']" @click="room.checked = !room.checked"
+            style="width: 80px; margin-top: 10px">
+            {{ room.name }}
+          </div>
         </div>
+
       </div>
-      
-    </div>
-    <div class="bottom-sele-btn">
+      <div class="bottom-sele-btn">
         <a-popover placement="topRight" v-if="canMove.can">
           <template slot="content">
-            <a-button
-              type="link"
-              v-for="(item, index) in layouts"
-              :key="item.id"
-              @click="moveTo(index)"
-            >
+            <a-button type="link" v-for="(item, index) in layouts" :key="item.id" @click="moveTo(index)">
               {{ item.name }}
             </a-button>
           </template>
           <template slot="title">
             <span>要移动到的目标房型</span>
           </template>
-          <a-button :disabled="false" type="primary"
-            >移动到房型({{ canMove.count }})</a-button
-          >
+          <a-button :disabled="false" type="primary">移动到房型({{ canMove.count }})</a-button>
         </a-popover>
-        <a-button v-else :disabled="true" type="primary"
-          >移动到房型(0)</a-button
-        >
-        <a-button :disabled="saveLoading" :loading="saveLoading" @click="back" type="primary"
-          >取消</a-button
-        >
-        <a-button :disabled="saveLoading" :loading="saveLoading" @click="save" type="primary"
-          >保存并查看房间列表</a-button
-        >
+        <a-button v-else :disabled="true" type="primary">移动到房型(0)</a-button>
+        <a-button :disabled="saveLoading" :loading="saveLoading" @click="back" type="primary">取消</a-button>
+        <a-button :disabled="saveLoading" :loading="saveLoading" @click="save" type="primary">保存并查看房间列表</a-button>
 
+      </div>
+    </div>
+    <div style="flex:1;height: calc(100vh - 180px); overflow-y: auto;">
+      <div class="layout-rooms-item" v-for="(item, layoutIndex) in layouts" :key="item.id">
+        <div class="title-laytou">
+          {{ item.name }}
+
+        </div>
+        <div class="room-items">
+          <div v-for="(element, roomIndex) in item.rooms" :key="element.id" class="layout-room-item">
+            {{ element.name }}
+            <a-button @click="delLayoutRoom(element, layoutIndex, roomIndex)" type="danger" shape="circle" size="small"
+              icon="minus" style="margin-left: 5px" />
+          </div>
+        </div>
+      </div>
     </div>
   </div>
 </template>
@@ -244,8 +148,8 @@ export default {
   },
   data() {
     return {
-      floorNames:[],
-        saveLoading: false,
+      floorNames: [],
+      saveLoading: false,
       myArray: [
         {
           id: 1,
@@ -306,6 +210,10 @@ export default {
     buildingTree().then((res) => {
       if (res.code == 200) {
         this.buildingTreeData = res.result;
+        if (res.result && res.result.length > 0) {
+
+          this.buildingId = res.result[0].id
+        }
       }
     });
     getAllLayouts().then((res) => {
@@ -321,17 +229,17 @@ export default {
   methods: {
     onBuildChange() {
       let bIndex = this.buildingTreeData.findIndex(s => s.id == this.buildingId)
-      let currentFloorNames = (this.buildingTreeData[bIndex].children||[]).map(s => s.name)
+      let currentFloorNames = (this.buildingTreeData[bIndex].children || []).map(s => s.name)
       this.floorNames = currentFloorNames
       // this.roomTree = JSON.parse(JSON.stringify(this.roomTree))
     },
     delLayoutRoom(item, layoutIndex, roomIndex) {
-        this.roomTree[item.floorIndex].children.push({
-            checked: false,
-            name: item.name,
-            floorIndex: item.floorIndex
-        })
-        this.layouts[layoutIndex].rooms.splice(roomIndex,1)
+      this.roomTree[item.floorIndex].children.push({
+        checked: false,
+        name: item.name,
+        floorIndex: item.floorIndex
+      })
+      this.layouts[layoutIndex].rooms.splice(roomIndex, 1)
     },
     moveTo(idx) {
       let roomItems = [];
@@ -387,37 +295,37 @@ export default {
         return;
       }
       let errMsg = '';
-      
-      for(let i =0;i<this.roomTree.length;i++) {
+
+      for (let i = 0; i < this.roomTree.length; i++) {
         let s = this.roomTree[i]
-        if(this.isExistNames(s.name)) {
+        if (this.isExistNames(s.name)) {
           errMsg = '楼层名称有重复';
           break;
         }
       }
-      if(errMsg == '') {
-        for(let i =0;i<this.roomTree.length;i++) {
-        let s = this.roomTree[i]
-        for(let j=0;j<s.children.length;j++) {
-          let room = s.children[j]
-          if(!room.name){
-            errMsg = '存在空房名,请填写'
-            break
-          }
-          if(this.repeatName(s.children, j)) {
-            errMsg = '存在重复房名'
-            break
+      if (errMsg == '') {
+        for (let i = 0; i < this.roomTree.length; i++) {
+          let s = this.roomTree[i]
+          for (let j = 0; j < s.children.length; j++) {
+            let room = s.children[j]
+            if (!room.name) {
+              errMsg = '存在空房名,请填写'
+              break
+            }
+            if (this.repeatName(s.children, j)) {
+              errMsg = '存在重复房名'
+              break
+            }
           }
+          if (errMsg) break
         }
-        if(errMsg) break
-      }
       }
-      if(errMsg) {
+      if (errMsg) {
         this.$message.error(errMsg)
         return
       }
-      
-      
+
+
       if (this.step == 1) {
         this.step = 2;
         return;
@@ -425,43 +333,43 @@ export default {
       let treeData = this.getParams();
       this.saveLoading = true
       saveBatch(treeData).then(res => {
-        if(res.code == 200) {
-            this.$message.success("批量保存成功")
-            this.closeCurrent()
+        if (res.code == 200) {
+          this.$message.success("批量保存成功")
+          this.closeCurrent()
         }
       }).finally(_ => {
         this.saveLoading = false
       })
     },
     getParams() {
-        let param = {
-            hotelId: null,
-            buildId: null,
-            children: [],
-        };
-        let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
-        param.buildId = this.buildingId;
-        param.hotelId = hotelInfo.id;
-        let roomTree = JSON.parse(JSON.stringify(this.roomTree))
-        roomTree.forEach(a => {
-            param.children.push({
-                floorName: a.name,
-                children: []
-            })
+      let param = {
+        hotelId: null,
+        buildId: null,
+        children: [],
+      };
+      let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+      param.buildId = this.buildingId;
+      param.hotelId = hotelInfo.id;
+      let roomTree = JSON.parse(JSON.stringify(this.roomTree))
+      roomTree.forEach(a => {
+        param.children.push({
+          floorName: a.name,
+          children: []
         })
-        this.layouts.forEach(layout => {
-            layout.rooms.forEach(room => {
-                param.children[room.floorIndex].children.push({
-                    hotelId: hotelInfo.id,
-                    buildId: this.buildingId,
-                    layoutId: layout.id,
-                    name: room.name,
-                    prefix: this.model.prefix,
-                })
-            })
+      })
+      this.layouts.forEach(layout => {
+        layout.rooms.forEach(room => {
+          param.children[room.floorIndex].children.push({
+            hotelId: hotelInfo.id,
+            buildId: this.buildingId,
+            layoutId: layout.id,
+            name: room.name,
+            prefix: this.model.prefix,
+          })
         })
+      })
 
-        return param
+      return param
     },
     addRoom(index) {
       this.roomTree[index].children.push({
@@ -488,9 +396,9 @@ export default {
     back() {
       this.closeCurrent();
     },
-    check() {},
-    genRooms() { 
-      if(!this.buildingId) {
+    check() { },
+    genRooms() {
+      if (!this.buildingId) {
         this.$message.error("请先选择楼栋")
         return
       }
@@ -524,7 +432,7 @@ export default {
       }
       this.roomTree = floors;
       let bIndex = this.buildingTreeData.findIndex(s => s.id == this.buildingId)
-      let currentFloorNames = (this.buildingTreeData[bIndex].children||[]).map(s => s.name)
+      let currentFloorNames = (this.buildingTreeData[bIndex].children || []).map(s => s.name)
       this.floorNames = currentFloorNames
     },
     isExistNames(name) {
@@ -533,9 +441,9 @@ export default {
     repeatName(items, index) {
       let name = items[index].name
       let newArr = JSON.parse(JSON.stringify(items)).map(s => s.name)
-      newArr.splice(index,1)
+      newArr.splice(index, 1)
 
-      if(newArr.includes(items[index].name)) {
+      if (newArr.includes(items[index].name)) {
         return true
       }
       return false
@@ -554,16 +462,19 @@ export default {
   justify-content: center;
   align-items: center;
 }
+
 .bottom-btns {
   display: flex;
   justify-content: center;
   margin-bottom: 20px;
 }
+
 .floor-input {
   width: 200px;
 }
+
 .room-items {
-    display: inline-block;
+  display: inline-block;
   border: 1px solid #cccccc77;
   height: 200px;
   overflow-y: auto;
@@ -571,6 +482,7 @@ export default {
   border-radius: 10px;
   margin-bottom: 30px;
 }
+
 .title-laytou {
   font-size: 17px;
   font-weight: bold;
@@ -580,12 +492,15 @@ export default {
   line-height: 25px;
   background-color: antiquewhite;
 }
+
 .room-items-dr {
   border: 1px solid #f00 !important;
 }
+
 .wait-select-title {
   border-bottom: 4px solid #1cb1ac;
 }
+
 .color-title {
   background-color: #1cb1ac;
   color: white;
@@ -596,6 +511,7 @@ export default {
   border-top-right-radius: 4px;
   text-align: center;
 }
+
 .select-room-item {
   border: 1px solid #cccccc77;
   border-radius: 4px;
@@ -606,17 +522,24 @@ export default {
   background-color: white;
   cursor: pointer;
 }
+
 .checked-room {
   background-color: #1cb1ac !important;
   color: white !important;
   border: none !important;
 }
+
 .bottom-sele-btn {
   padding-bottom: 30px;
 }
-.layout-room-item{
-    display: inline-block;
-    width: fit-content;
-    padding: 10px 12px;
+
+.layout-room-item {
+  display: inline-block;
+  width: fit-content;
+  padding: 10px 12px;
+}
+
+.room-layout-settings {
+  display: flex;
 }
 </style>

+ 35 - 25
src/views/settings/components/storeInformation.vue

@@ -41,122 +41,122 @@
                 <a-form-item label="酒店设施">
                     <a-row>
                         <a-col span="3">
-                            <a-checkbox @change="onChange" value="1">
+                            <a-checkbox @change="onChange" value="1" :checked="facilityList.indexOf('1')>-1?true:false" >
                                 温泉
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="2" :checked="facilityList.indexOf('2')>-1?true:false">
                                 租车
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="3" :checked="facilityList.indexOf('3')>-1?true:false">
                                 有餐饮
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="4" :checked="facilityList.indexOf('4')>-1?true:false">
                                 游泳池
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="5" :checked="facilityList.indexOf('5')>-1?true:false">
                                 叫早
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="6" :checked="facilityList.indexOf('6')>-1?true:false">
                                 有早餐
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="7" :checked="facilityList.indexOf('7')>-1?true:false">
                                 WIFI
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="8" :checked="facilityList.indexOf('8')>-1?true:false">
                                 电热水壶
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="9" :checked="facilityList.indexOf('9')>-1?true:false">
                                 电梯
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="10" :checked="facilityList.indexOf('10')>-1?true:false">
                                 吹风机
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="11" :checked="facilityList.indexOf('11')>-1?true:false">
                                 免费停车
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="12" :checked="facilityList.indexOf('12')>-1?true:false">
                                 会议室
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="13" :checked="facilityList.indexOf('13')>-1?true:false">
                                 残疾人设施
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="14" :checked="facilityList.indexOf('14')>-1?true:false">
                                 邮政服务
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="15" :checked="facilityList.indexOf('15')>-1?true:false">
                                 婚宴服务
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="16" :checked="facilityList.indexOf('16')>-1?true:false">
                                 全天前台
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="17" :checked="facilityList.indexOf('17')>-1?true:false">
                                 接待外宾
                             </a-checkbox>
                         </a-col>
                         <a-col span="3">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="18" :checked="facilityList.indexOf('18')>-1?true:false">
                                 棋牌室
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="19" :checked="facilityList.indexOf('19')>-1?true:false">
                                 收费停车
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="20" :checked="facilityList.indexOf('20')>-1?true:false">
                                 送餐服务
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="21" :checked="facilityList.indexOf('21')>-1?true:false">
                                 洗衣服务
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="22" :checked="facilityList.indexOf('22')>-1?true:false">
                                 商务中心
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="23" :checked="facilityList.indexOf('23')>-1?true:false">
                                 叫车服务
                             </a-checkbox>
                         </a-col>
                         <a-col span="4">
-                            <a-checkbox @change="onChange">
+                            <a-checkbox @change="onChange" value="24" :checked="facilityList.indexOf('24')>-1?true:false">
                                 房间WIFI
                             </a-checkbox>
                         </a-col>
@@ -277,6 +277,8 @@
                         };
 
                         this.tags = info.tagList.split(',')
+                        this.facilityList = info.facility.split(',')
+                        console.log(this.facilityList)
                     }
                 })
             }, 100)
@@ -333,6 +335,7 @@
                 tags: [],
                 inputVisible: false,
                 inputValue: '',
+                facilityList:[],
             }
         },
         computed: {
@@ -349,12 +352,14 @@
         methods: {
             submit() {
                 // console.log(this.form.values.certImg)
+                console.log(this.facilityList)
                 this.form.validateFields((err, values) => {
-                    console.log(values.lnglat)
+                    // console.log(values.lnglat)
                     if (!err) {
                         // values['lat'] = values.latlng.split(',')[0]
                         // values['lng'] = values.latlng.split(',')[1]
                         values['tagList'] = this.tags.join(",");
+                        values['facility'] = this.facilityList.join(",");
                         if(this.model.policy) values['policy'] = this.model.policy
                         if(this.model.introduction) values['introduction'] = this.model.introduction
                         if(this.model.reserveRemind) values['reserveRemind'] = this.model.reserveRemind
@@ -376,7 +381,12 @@
                 console.log('添加酒店标签')
             },
             onChange(e) {
+                console.log(e);
                 console.log(`checked = ${e.target.checked}`);
+                console.log(`checked = ${e.target.value}`);
+                if (e.target.checked){
+                    this.facilityList.push(e.target.value)
+                }
             },
             handleClose(removedTag) {
                 const tags = this.tags.filter(tag => tag !== removedTag);

+ 544 - 0
src/views/system/RoleAndUserList.vue

@@ -0,0 +1,544 @@
+<template>
+    <a-row :gutter="10">
+      <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
+        <a-card :bordered="false">
+          <!-- 查询区域 -->
+          <div class="table-page-search-wrapper">
+            <!-- 搜索区域 -->
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+              <a-row :gutter="24">
+                <a-col :md="12" :sm="8">
+                  <a-form-item label="角色名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
+                    <a-input placeholder="" v-model="queryParam.roleName"></a-input>
+                  </a-form-item>
+                </a-col>
+                <!--
+                <a-col :md="11" :sm="12">
+                  <a-form-item label="创建时间" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
+                    <j-date v-model="queryParam.createTime_begin" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss" style="width:45%" placeholder="请选择开始时间" ></j-date>
+                    <span style="width: 10px;">~</span>
+                    <j-date v-model="queryParam.createTime_end" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss" style="width:45%" placeholder="请选择结束时间"></j-date>
+                  </a-form-item>
+                </a-col>
+                -->
+                <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-col :md="12" :sm="24">
+                 <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">查询</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              </a-col>
+            </span>
+              </a-row>
+            </a-form>
+          </div>
+          <!-- 操作按钮区域 -->
+          <div class="table-operator" style="margin: 5px 0 10px 2px">
+            <a-button @click="handleAdd" type="primary" icon="plus">新建角色</a-button>
+            <!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>-->
+            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+              <a-button type="primary" icon="import">导入</a-button>
+            </a-upload>
+            <a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button>
+          </div>
+  
+          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+            <i class="anticon anticon-info-circle ant-alert-icon">
+            </i> 已选择 <a><b>{{ selectedRowKeys1.length }}</b></a>项
+            <a style="margin-left: 24px" @click="onClearSelected1">清空</a>
+          </div>
+  
+          <div style="margin-top: 15px">
+            <a-table
+              style="height:500px"
+              ref="table"
+              size="middle"
+              bordered
+              rowKey="id"
+              :columns="columns"
+              :dataSource="dataSource"
+              :pagination="ipagination"
+              :loading="loading"
+              :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
+              @change="handleTableChange">
+            <span slot="action" slot-scope="text, record">
+              <a @click="handleOpen(record)">用户</a>
+              <a-divider type="vertical"/>
+  
+              <a-dropdown>
+                <a class="ant-dropdown-link">
+                  更多 <a-icon type="down"/>
+                </a>
+                <a-menu slot="overlay">
+                  <a-menu-item>
+                    <a @click="handlePerssion(record.id)">授权</a>
+                  </a-menu-item>
+                  <a-menu-item>
+                    <a @click="handleEdit(record)">编辑</a>
+                  </a-menu-item>
+                  <a-menu-item>
+                    <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)">
+                      <a>删除</a>
+                    </a-popconfirm>
+                  </a-menu-item>
+                </a-menu>
+              </a-dropdown>
+          </span>
+            </a-table>
+          </div>
+          <!-- 右侧的角色权限配置 -->
+          
+          <role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
+        </a-card>
+      </a-col>
+      <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
+        <a-card :bordered="false">
+          <div style="text-align: right;">
+            <a-icon type="close-circle" @click="hideUserList" />
+          </div>
+          <!-- 查询区域 -->
+          <div class="table-page-search-wrapper">
+            <a-form layout="inline">
+              <a-row :gutter="24">
+  
+                <a-col :md="12" :sm="12">
+                  <a-form-item label="用户账号">
+                    <a-input placeholder="" v-model="queryParam2.username"></a-input>
+                  </a-form-item>
+                </a-col>
+                <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-col :md="9" :sm="24">
+               <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>
+                <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>
+  
+              </a-col>
+            </span>
+              </a-row>
+            </a-form>
+          </div>
+          <!-- 操作按钮区域 -->
+          <div class="table-operator" :md="24" :sm="24">
+            <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增用户</a-button>
+            <!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
+            <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>
+  
+            <a-dropdown v-if="selectedRowKeys2.length > 0">
+              <a-menu slot="overlay">
+                <a-menu-item key="1" @click="batchDel2">
+                  <a-icon type="delete"/>
+                  取消关联
+                </a-menu-item>
+              </a-menu>
+              <a-button style="margin-left: 8px"> 批量操作
+                <a-icon type="down"/>
+              </a-button>
+            </a-dropdown>
+          </div>
+          <!-- table区域-begin -->
+          <div>
+            <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+              <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
+              selectedRowKeys2.length }}</a>项
+              <a style="margin-left: 24px" @click="onClearSelected2">清空</a>
+            </div>
+            <a-table
+              style="height:500px"
+              ref="table2"
+              bordered
+              size="middle"
+              rowKey="id"
+              :columns="columns2"
+              :dataSource="dataSource2"
+              :pagination="ipagination2"
+              :loading="loading2"
+              :rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
+              @change="handleTableChange2">
+             <span slot="action" slot-scope="text, record">
+             <a @click="handleEdit2(record)">编辑</a>
+            <a-divider type="vertical"/>
+            <a-dropdown>
+              <a class="ant-dropdown-link">
+                更多 <a-icon type="down"/>
+              </a>
+              <a-menu slot="overlay">
+                <a-menu-item>
+                  <a-popconfirm title="确定取消关联吗?" @confirm="() => handleDelete2(record.id)">
+                    <a>取消关联</a>
+                  </a-popconfirm>
+                </a-menu-item>
+              </a-menu>
+            </a-dropdown>
+          </span>
+            </a-table>
+          </div>
+          <!-- 表单区域 -->
+          <role-modal ref="modalForm" @ok="modalFormOk"></role-modal>
+          <user-modal ref="modalForm2" @ok="modalFormOk2"></user-modal>
+          <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>
+        </a-card>
+      </a-col>
+    </a-row>
+  </template>
+  <script>
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import { deleteAction, postAction, getAction } from '@/api/manage'
+    import SelectUserModal from './modules/SelectUserModal'
+    import RoleModal from './modules/RoleModal'
+    import UserModal from './modules/UserModal'
+    import { filterObj } from '@/utils/util'
+    
+    import moment from 'moment'
+  
+    export default {
+      name: 'RoleUserList',
+      mixins: [JeecgListMixin],
+      components: {
+        SelectUserModal,
+        RoleModal,
+        UserModal,
+        moment
+      },
+      data() {
+        return {
+          model1: {},
+          model2: {},
+          currentRoleId: '',
+          queryParam1: {},
+          queryParam2: {},
+          dataSource1: [],
+          dataSource2: [],
+          ipagination1: {
+            current: 1,
+            pageSize: 10,
+            pageSizeOptions: ['10', '20', '30'],
+            showTotal: (total, range) => {
+              return range[0] + '-' + range[1] + ' 共' + total + '条'
+            },
+            showQuickJumper: true,
+            showSizeChanger: true,
+            total: 0
+          },
+          ipagination2: {
+            current: 1,
+            pageSize: 10,
+            pageSizeOptions: ['10', '20', '30'],
+            showTotal: (total, range) => {
+              return range[0] + '-' + range[1] + ' 共' + total + '条'
+            },
+            showQuickJumper: true,
+            showSizeChanger: true,
+            total: 0
+          },
+          isorter1: {
+            column: 'createTime',
+            order: 'desc'
+          },
+          isorter2: {
+            column: 'createTime',
+            order: 'desc'
+          },
+          filters1: {},
+          filters2: {},
+          loading1: false,
+          loading2: false,
+          selectedRowKeys1: [],
+          selectedRowKeys2: [],
+          selectionRows1: [],
+          selectionRows2: [],
+          test:{},
+          rightcolval:0,
+          columns:
+            [
+              {
+                title: '角色编码',
+                align: 'center',
+                dataIndex: 'roleCode'
+              },
+              {
+                title: '角色名称',
+                align: 'center',
+                dataIndex: 'roleName'
+              },
+              {
+                title: '创建时间',
+                dataIndex: 'createTime',
+                align:"center",
+                sorter: true,
+                customRender: (text) => {
+                  return moment(text).format('YYYY-MM-DD')
+                }
+              },
+              {
+                title: '操作',
+                dataIndex: 'action',
+                align: 'center',
+                scopedSlots: { customRender: 'action' }
+              }
+            ],
+          columns2: [{
+            title: '用户账号',
+            align: 'center',
+            dataIndex: 'username',
+            width: 120
+          },
+            {
+              title: '用户名称',
+              align: 'center',
+              width: 100,
+              dataIndex: 'realname'
+            },
+            {
+              title: '状态',
+              align: 'center',
+              width: 80,
+              dataIndex: 'status_dictText'
+            },
+  
+            {
+              title: '操作',
+              dataIndex: 'action',
+              scopedSlots: { customRender: 'action' },
+              align: 'center',
+              width: 120
+            }],
+  
+          // 高级查询参数
+          superQueryParams2: '',
+          // 高级查询拼接条件
+          superQueryMatchType2: 'and',
+          url: {
+            list: '/sys/role/list',
+            delete: '/sys/role/delete',
+            list2: '/sys/user/userRoleList',
+            addUserRole: '/sys/user/addSysUserRole',
+            delete2: '/sys/user/deleteUserRole',
+            deleteBatch2: '/sys/user/deleteUserRoleBatch',
+            exportXlsUrl: 'sys/role/exportXls',
+            importExcelUrl: 'sys/role/importExcel'
+          }
+        }
+      },
+      computed: {
+        importExcelUrl: function() {
+          return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+        },
+        leftColMd() {
+          return this.selectedRowKeys1.length === 0 ? 24 : 12
+        },
+        rightColMd() {
+          return this.selectedRowKeys1.length === 0 ? 0 : 12
+        }
+      },
+      methods: {
+        onSelectChange2(selectedRowKeys, selectionRows) {
+          this.selectedRowKeys2 = selectedRowKeys
+          this.selectionRows2 = selectionRows
+        },
+        onClearSelected2() {
+          this.selectedRowKeys2 = []
+          this.selectionRows2 = []
+        },
+        onClearSelected1() {
+          this.selectedRowKeys1 = []
+          this.selectionRows1 = []
+        },
+        onSelectChange1(selectedRowKeys, selectionRows) {
+          this.rightcolval = 1
+          this.selectedRowKeys1 = selectedRowKeys
+          this.selectionRows1 = selectionRows
+          this.model1 = Object.assign({}, selectionRows[0])
+          console.log(this.model1)
+          this.currentRoleId = selectedRowKeys[0]
+          this.loadData2()
+        },
+        onClearSelected() {
+        },
+  
+        getQueryParams2() {
+          //获取查询条件
+          let sqp = {}
+          if (this.superQueryParams2) {
+            sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
+            sqp['superQueryMatchType'] = this.superQueryMatchType2
+          }
+          var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
+          param.field = this.getQueryField2()
+          param.pageNo = this.ipagination2.current
+          param.pageSize = this.ipagination2.pageSize
+          return filterObj(param)
+        },
+        getQueryField2() {
+          //TODO 字段权限控制
+          var str = 'id,'
+          this.columns2.forEach(function(value) {
+            str += ',' + value.dataIndex
+          })
+          return str
+        },
+        handleEdit2: function(record) {
+          this.$refs.modalForm2.title = '编辑'
+          this.$refs.modalForm2.roleDisabled = true
+          this.$refs.modalForm2.edit(record)
+        },
+        handleAdd2: function() {
+          if (this.currentRoleId == '') {
+            this.$message.error('请选择一个角色!')
+          } else {
+            this.$refs.modalForm2.roleDisabled = true
+            this.$refs.modalForm2.title = '新增'
+            this.$refs.modalForm2.edit({activitiSync:'1',userIdentity:1,selectedroles:this.currentRoleId})
+          }
+        },
+        modalFormOk2() {
+          // 新增/修改 成功时,重载列表
+          this.loadData2()
+        },
+        loadData2(arg) {
+          if (!this.url.list2) {
+            this.$message.error('请设置url.list2属性!')
+            return
+          }
+          //加载数据 若传入参数1则加载第一页的内容
+          if (arg === 1) {
+            this.ipagination2.current = 1
+          }
+          if (this.currentRoleId === '') return
+          let params = this.getQueryParams2()//查询条件
+          params.roleId = this.currentRoleId
+          this.loading2 = true
+          getAction(this.url.list2, params).then((res) => {
+            if (res.success) {
+              this.dataSource2 = res.result.records
+              this.ipagination2.total = res.result.total
+  
+            }
+            this.loading2 = false
+          })
+  
+        },
+        handleDelete1: function(id) {
+          this.handleDelete(id)
+          this.dataSource2 = []
+          this.currentRoleId = ''
+        },
+        handleDelete2: function(id) {
+          if (!this.url.delete2) {
+            this.$message.error('请设置url.delete2属性!')
+            return
+          }
+          var that = this
+          deleteAction(that.url.delete2, { roleId: this.currentRoleId, userId: id }).then((res) => {
+            if (res.success) {
+              that.$message.success(res.message)
+              that.loadData2()
+            } else {
+              that.$message.warning(res.message)
+            }
+          })
+        },
+        batchDel2: function() {
+  
+          if (!this.url.deleteBatch2) {
+            this.$message.error('请设置url.deleteBatch2属性!')
+            return
+          }
+          if (this.selectedRowKeys2.length <= 0) {
+            this.$message.warning('请选择一条记录!')
+            return
+          } else {
+            var ids = ''
+            for (var a = 0; a < this.selectedRowKeys2.length; a++) {
+              ids += this.selectedRowKeys2[a] + ','
+            }
+            var that = this
+            console.log(this.currentDeptId)
+            this.$confirm({
+              title: '确认取消关联',
+              content: '是否删除选中数据?',
+              onOk: function() {
+                deleteAction(that.url.deleteBatch2, { roleId: that.currentRoleId, userIds: ids }).then((res) => {
+                  if (res.success) {
+                    that.$message.success(res.message)
+                    that.loadData2()
+                    that.onClearSelected()
+                  } else {
+                    that.$message.warning(res.message)
+                  }
+                })
+              }
+            })
+          }
+        },
+        selectOK(data) {
+          let params = {}
+          params.roleId = this.currentRoleId
+          params.userIdList = []
+          for (var a = 0; a < data.length; a++) {
+            params.userIdList.push(data[a])
+          }
+          console.log(params)
+          postAction(this.url.addUserRole, params).then((res) => {
+            if (res.success) {
+              this.loadData2()
+              this.$message.success(res.message)
+            } else {
+              this.$message.warning(res.message)
+            }
+          })
+        },
+  
+        handleAddUserRole() {
+          if (this.currentRoleId == '') {
+            this.$message.error('请选择一个角色!')
+          } else {
+            this.$refs.selectUserModal.visible = true
+          }
+        },
+        handleOpen(record) {
+          this.rightcolval = 1
+          this.selectedRowKeys1 = [record.id]
+          this.model1 = Object.assign({}, record)
+          this.currentRoleId = record.id
+          this.onClearSelected2()
+          this.loadData2()
+        },
+        /*handleEdit: function(record) {
+          if (this.currentRoleId == '') {
+            this.$message.error('请选择一个角色!')
+          } else {
+            this.$refs.modalForm.edit(record)
+            this.$refs.modalForm.title = '编辑'
+          }
+        },*/
+        searchQuery2() {
+          this.loadData2(1)
+        },
+        searchReset2() {
+          this.queryParam2 = {}
+          this.loadData2(1)
+        },
+        handleTableChange2(pagination, filters, sorter) {
+          //分页、排序、筛选变化时触发
+          //TODO 筛选
+          if (Object.keys(sorter).length > 0) {
+            this.isorter2.column = sorter.field
+            this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
+          }
+          this.ipagination2 = pagination
+          this.loadData2()
+        },
+        hideUserList(){
+          //this.rightcolval = 0
+          this.selectedRowKeys1 = []
+        },
+        handlePerssion(roleId){
+          this.$refs.modalUserRole.show(roleId);
+        },
+      }
+    }
+  </script>
+  <style scoped>
+  @import '~@assets/less/common.less';
+    /** Button按钮间距 */
+    .ant-btn {
+      margin-left: 8px
+    }
+  </style>