huangbin 4 år sedan
förälder
incheckning
39448b42e1

+ 50 - 39
src/views/information/account_info/compoments/add-managers-permission/index.vue

@@ -38,18 +38,22 @@
                               :key="i + '0'">
               <div class="powerRow">
                 <div class="powerLeft">
-                  <a-checkbox :value="item.Menu.resourcecode">{{item.Menu.resourcename}}</a-checkbox>
+                  <a-checkbox v-model:checked="item.Menu.ishadrole"
+                              :value="item.Menu.resourcecode">{{item.Menu.resourcename}}</a-checkbox>
                 </div>
                 <div class="powerRight">
-                  <div class="line" v-for="(sub, j) in item.SubMenu"
-                          :key="j + '1'">
+                  <div class="line"
+                       v-for="(sub, j) in item.SubMenu"
+                       :key="j + '1'">
                     <div class="left">
-                        <a-checkbox :value="sub.Menu.resourcecode">{{sub.Menu.resourcename}}</a-checkbox>
+                      <a-checkbox v-model:checked="sub.Menu.ishadrole"
+                                  :value="sub.Menu.resourcecode">{{sub.Menu.resourcename}}</a-checkbox>
                     </div>
                     <div class="right">
-                        <a-checkbox v-for="(subNext, l) in sub.SubMenu"
-                                    :key="l + '3'"
-                                    :value="subNext.Menu.resourcecode">{{subNext.Menu.resourcename}}</a-checkbox>
+                      <a-checkbox v-for="(subNext, l) in sub.SubMenu"
+                                  :key="l + '3'"
+                                  v-model:checked="subNext.Menu.ishadrole"
+                                  :value="subNext.Menu.resourcecode">{{subNext.Menu.resourcename}}</a-checkbox>
                     </div>
                   </div>
                 </div>
@@ -90,21 +94,28 @@ export default defineComponent({
             }
         });
         function submit() {
-            validateAction<BusinessFormState>(formRef, formState).then((res) => {
-                const reqParam: LoginaccountOperateReq = {
-                    operatetype: 3, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
-                    logincode: res.logincode, // string 登录账号
-                    accountname: res.accountname, // string 账户名称
-                    password: res.password, // string 登录密码(明文)
-                    mobile: res.mobile, // string 手机号码(明文)
-                    roleids: [Number(res.userid)], // uint64 账号角色
-                    logintaaccounts: [], // LoginTaaccount 期货账户(勾选交易员必填)
-                };
-                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增成功', '新增失败:']).then(() => {
-                    cancel();
-                    context.emit('refresh');
-                });
-            });
+            const result: number[] = []
+            tableList.value.forEach(first => {
+                // if(first.Menu.ishadrole) {
+
+                // }
+            })
+
+            // validateAction<BusinessFormState>(formRef, formState).then((res) => {
+            //     const reqParam: LoginaccountOperateReq = {
+            //         operatetype: 3, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+            //         logincode: res.logincode, // string 登录账号
+            //         accountname: res.accountname, // string 账户名称
+            //         password: res.password, // string 登录密码(明文)
+            //         mobile: res.mobile, // string 手机号码(明文)
+            //         roleids: [Number(res.userid)], // uint64 账号角色
+            //         logintaaccounts: [], // LoginTaaccount 期货账户(勾选交易员必填)
+            //     };
+            //     requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增成功', '新增失败:']).then(() => {
+            //         cancel();
+            //         context.emit('refresh');
+            //     });
+            // });
         }
         return {
             formState,
@@ -164,25 +175,25 @@ export default defineComponent({
                 .flex;
                 flex-direction: column;
                 .line {
-                  width: 100%;
-                  display: inline-flex;
-                  border-bottom: 3px solid @m-grey11;
-                  > div {
-                    padding: 0 8px;
-                  }
-                  .left {
-                    width: 140px;
-                    min-width: 140px;
-                    border-left: 3px solid @m-grey11;
-                    border-right: 3px solid @m-grey11;
-                  }
-                  .right {
-                    flex: 1;
-                    width: calc(100% - 120px);
-                  } 
+                    width: 100%;
+                    display: inline-flex;
+                    border-bottom: 3px solid @m-grey11;
+                    > div {
+                        padding: 0 8px;
+                    }
+                    .left {
+                        width: 140px;
+                        min-width: 140px;
+                        border-left: 3px solid @m-grey11;
+                        border-right: 3px solid @m-grey11;
+                    }
+                    .right {
+                        flex: 1;
+                        width: calc(100% - 120px);
+                    }
                 }
                 .line:last-child {
-                  border-bottom: 0;
+                    border-bottom: 0;
                 }
             }
             // .powerMiddle {

+ 1 - 1
src/views/information/account_info/list/account_info_trade/index.vue

@@ -141,7 +141,7 @@ export default defineComponent({
         const { selectedData: moreModelData, openAction: moreOptenAction } = handleModalData<ErmcpLoginUser>();
         // 处理根据状态显示对应按钮
         function handleBtnAction() {
-            handleTableList(queryTable, tableList, secondBtn);
+            handleTableList(queryTable, tableList, thirdBtn);
         }
 
         // 授权期货账户