فهرست منبع

Merge branch 'develop' of http://git.chelingzhu.com/chelingzhu-web/storeCheck-admin-html into develop

lilei 4 سال پیش
والد
کامیت
15751990dd

+ 1 - 0
src/views/SupervisionAuth/role/menuModal.vue

@@ -65,6 +65,7 @@ export default {
     },
     onCheck (checkedKeys, info) {
       this.checkedData = [...checkedKeys, ...info.halfCheckedKeys]
+	  console.log(this.checkedData,'---选中菜单')
       this.checkedKeys = checkedKeys
     },
     cancel (e) {

+ 25 - 26
src/views/SupervisionAuth/user/newStoreModal.vue

@@ -15,17 +15,18 @@
             @expand="onExpand"
             @select="onSelect"
             :expandedKeys="expandedKeys"
+			 :autoExpandParent="autoExpandParent"
             :default-selected-keys="defaultSelectedOrgId"
             v-model="checkedKeys"
             :treeData="treeData" />
         </a-col>
         <a-col :span="14">
-          <a-table :columns="columns" :data-source="loadData" :pagination="false" bordered>
+          <a-table :columns="columns" :data-source="loadData" :pagination="false" :rowKey="(record) => record.id" bordered>
             <template slot="title">
               选择门店
             </template>
             <span slot="action" slot-scope="text, record">
-              <a-button type="danger" v-if="record.usedFlag == 1" @click="delect(record)" size="small" id="newStoreModal-delect">解绑</a-button>
+              <a-button type="danger" v-if="record.usedFlag == 1" :disabled="true" size="small" id="newStoreModal-delect">已绑定</a-button>
               <a-button type="primary" v-if="record.usedFlag == 0" @click="handleSubmit(record)" size="small" id="newStoreModal-handleSubmit">绑定</a-button>
             </span>
           </a-table>
@@ -128,7 +129,6 @@ export default {
       this.autoExpandParent = false
     },
     onSelect (selectedKeys, info) {
-      console.log(selectedKeys, '---------------', info)
       this.selectedKeys = selectedKeys[0]	// 选中项的id
       this.getListData(this.selectedKeys)
     },
@@ -179,28 +179,28 @@ export default {
       })
     },
     // 解绑
-    delect (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        centered: true,
-        content: '解绑后数据无法恢复,确认解绑?',
-        okText: '确定',
-        cancelText: '取消',
-        onOk () {
-          deleteUsedStore({
-            id: row.id
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.getListData(this.selectedKeys)
-            } else {
-              _this.$message.error(res.message)
-            }
-          })
-        }
-      })
-    }
+    // delect (row) {
+    //   const _this = this
+    //   this.$confirm({
+    //     title: '提示',
+    //     centered: true,
+    //     content: '解绑后数据无法恢复,确认解绑?',
+    //     okText: '确定',
+    //     cancelText: '取消',
+    //     onOk () {
+    //       deleteUsedStore({
+    //         id: row.id
+    //       }).then(res => {
+    //         if (res.status == 200) {
+    //           _this.$message.success(res.message)
+    //           _this.getListData(this.selectedKeys)
+    //         } else {
+    //           _this.$message.error(res.message)
+    //         }
+    //       })
+    //     }
+    //   })
+    // }
   },
   beforeCreate () {
     this.form = this.$form.createForm(this, {
@@ -216,7 +216,6 @@ export default {
     },
     isShow (newValue, oldValue) {
       if (newValue) {
-		  console.log(this.defaultSelectedOrgId, '====this.defaultSelectedOrgId')
         // 获取组织机构树的数据
         findOrgTree().then(res => {
           if (res.status == 200) {

+ 7 - 7
src/views/SupervisionAuth/user/usedStoreModal.vue

@@ -4,18 +4,18 @@
       v-model="isShow"
       @cancel="cancel"
       title="点检关联门店"
-      width="45%"
+      width="35%"
       :footer="null"
       :centered="true">
       <!-- 新增点检门店按钮 -->
-      <a-button type="primary" icon="plus" @click="openModal" style="margin-bottom: 20px;" id="usedStoreModal-openModal">新增门店</a-button>
+      <a-button type="primary" icon="plus" @click="openModal" style="margin-bottom: 20px;" id="usedStoreModal-openModal">关联门店</a-button>
       <!-- 列表 -->
-      <a-table :columns="columns" :data-source="loadData" :pagination="false" bordered>
+      <a-table :columns="columns" :data-source="loadData" :pagination="false" :rowKey="(record) => record.id" bordered>
         <template slot="title">
           已选门店
         </template>
         <span slot="action" slot-scope="text, record">
-          <a-button type="primary" @click="delect(record)" size="small" id="usedStoreModal-delect">解绑</a-button>
+         <a-button type="primary" @click="delect(record)" size="small" id="usedStoreModal-delect">解绑</a-button>
         </span>
       </a-table>
     </a-modal>
@@ -69,8 +69,8 @@ export default {
         align: 'center'
       },
       {
-        title: '操作',
-        key: '操作',
+        title: '状态',
+        key: '状态',
         width: 100,
         align: 'center',
         scopedSlots: {
@@ -123,7 +123,7 @@ export default {
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              _this.getListData()
+              _this.getListData(_this.userId)
             } else {
               _this.$message.error(res.message)
             }

+ 1 - 1
src/views/SupervisionAuth/user/userList.vue

@@ -46,7 +46,7 @@
       :data="loadData"
       ref="table"
       size="default"
-      rowKey="id"
+      :rowKey="(record) => record.id"
       bordered>
       <template slot="loginFlag" slot-scope="text">
         <span :style="{ color: text == '1' ? '#12b512' : 'red' }">{{ text == '1' ? '已启用' : '已禁用' }}</span>

+ 3 - 4
src/views/SupervisionAuth/user/userModal.vue

@@ -87,7 +87,6 @@
                 :tree-data="treeData"
                 placeholder="请选择所属机构"
                 treeNodeFilterProp="title"
-                @change="treeChange"
                 v-decorator="[
                   'formData.orgCode',
                   {
@@ -203,9 +202,9 @@ export default {
       })
     },
     //  组织归属  change
-    treeChange (value, label, extra) {
-      this.parentCodePaths = extra.triggerNode.$options.propsData.dataRef.parentCodePaths
-    },
+    // treeChange (value, label, extra) {
+    //   this.parentCodePaths = extra.triggerNode.$options.propsData.dataRef.parentCodePaths
+    // },
     // 递归函数
     recursionFun (data) {
       if (data) {

+ 5 - 0
src/views/power/role/menuModal.vue

@@ -63,8 +63,11 @@ export default {
       this.autoExpandParent = false
     },
     onCheck (checkedKeys, info) {
+		
       this.checkedData = [...checkedKeys, ...info.halfCheckedKeys]
+	  console.log(this.checkedData,'选中菜单')
       this.checkedKeys = checkedKeys
+	  console.log(this.checkedKeys,'------',info)
     },
     cancel (e) {
       this.clear()
@@ -130,11 +133,13 @@ export default {
     isshow (newValue, oldValue) {
       if (newValue) {
         if (this.data) { // 编辑
+		console.log(this.data)
           this.treeData = this.data.allMenuList
           this.id = this.data.role.id
           this.roleName = '分配权限' + '(' + this.data.role.name + ')'
           if (this.data.role.menuIds) {
             const arr = this.data.role.menuIds.split(',')
+			console.log(arr)
             this.checkedData = arr
             // 找出叶子节点
             this.findLeaf(this.treeData, arr)