|
|
@@ -50,7 +50,7 @@
|
|
|
<a-col :span="12">{{getLoginStatusEnumItemName(sub.loginstatus)}}</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
|
- <BtnList :btnList="forDataBtn"
|
|
|
+ <BtnList :btnList="sub.btnList"
|
|
|
:selectedData="sub"
|
|
|
@onClick="chooseAction" />
|
|
|
</a-collapse-panel>
|
|
|
@@ -64,7 +64,7 @@
|
|
|
<Reset :selectedData="selectedData"
|
|
|
@refresh="queryTable" />
|
|
|
<Locked :selectedData="selectedData"
|
|
|
- @refresh="queryTable"/>
|
|
|
+ @refresh="queryTable" />
|
|
|
<Cancel />
|
|
|
<Detail :selectedData="selectedData" />
|
|
|
</div>
|
|
|
@@ -101,12 +101,32 @@ export default defineComponent({
|
|
|
setup() {
|
|
|
const { loading, tableList, queryTable } = queryTableList();
|
|
|
const { commonBtn, forDataBtn } = getBtnList('account_info_business', true);
|
|
|
+ console.log('forDataBtn', forDataBtn);
|
|
|
+
|
|
|
// 角色id
|
|
|
const roleid = ref<number>(0);
|
|
|
// 操作相关选中的数据
|
|
|
const selectedData = reactive({});
|
|
|
initData(() => {
|
|
|
- queryTable();
|
|
|
+ queryTable().then(() => {
|
|
|
+ tableList.value.forEach((el) => {
|
|
|
+ // 过滤无效
|
|
|
+ const arr = el.userlist.filter((item) => item.loginstatus !== 3);
|
|
|
+ arr.forEach((item) => {
|
|
|
+ const { loginstatus } = item;
|
|
|
+ let btnList = [...forDataBtn.value];
|
|
|
+ if (loginstatus === 1) {
|
|
|
+ // 正常
|
|
|
+ btnList = forDataBtn.value.filter((e) => e.lable !== '解锁');
|
|
|
+ } else if (loginstatus === 2) {
|
|
|
+ // 冻结
|
|
|
+ btnList = forDataBtn.value.filter((e) => e.lable === '解锁' || e.lable === '详情');
|
|
|
+ }
|
|
|
+ Object.assign(item, { btnList });
|
|
|
+ });
|
|
|
+ Object.assign(el, { userlist: arr });
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
// 查询
|
|
|
function search(value: any) {}
|