|
@@ -4,7 +4,7 @@
|
|
|
<byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
|
|
|
:selectConfig="selectConfig" :action-list="[
|
|
|
{
|
|
|
- text: '添加店铺',
|
|
|
+ text: '添加AppSecret',
|
|
|
action: () => openModal('add'),
|
|
|
disabled: false,
|
|
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
|
|
|
</byTable>
|
|
|
</div>
|
|
|
- <el-dialog :title="modalType == 'add' ? '添加店铺' : '编辑店铺'" v-model="dialogVisible" width="500px" destroy-on-close>
|
|
|
+ <el-dialog :title="modalType == 'add' ? '添加AppSecret' : '编辑AppSecret'" v-model="dialogVisible" width="600px" destroy-on-close>
|
|
|
<byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
@@ -54,7 +54,14 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "公司名称",
|
|
|
+ label: "部门名称",
|
|
|
+ prop: "deptName",
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "应用名称",
|
|
|
prop: "companyName",
|
|
|
},
|
|
|
},
|
|
@@ -72,6 +79,18 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "accessToken",
|
|
|
+ prop: "accessToken",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "refreshToken",
|
|
|
+ prop: "refreshToken",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "备注",
|
|
|
prop: "remark",
|
|
|
},
|
|
@@ -129,16 +148,25 @@ const formData = reactive({
|
|
|
});
|
|
|
const formOption = reactive({
|
|
|
inline: true,
|
|
|
- labelWidth: 100,
|
|
|
+ labelWidth: 110,
|
|
|
itemWidth: 100,
|
|
|
});
|
|
|
const formDom = ref(null);
|
|
|
const formConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
+ type: "treeSelect",
|
|
|
+ prop: "deptId",
|
|
|
+ label: "部门",
|
|
|
+ data: treeData.value,
|
|
|
+ propsTreeLabel: "deptName",
|
|
|
+ propsTreeValue: "deptId",
|
|
|
+ itemWidth: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
type: "input",
|
|
|
prop: "companyName",
|
|
|
- label: "公司名称",
|
|
|
+ label: "应用名称",
|
|
|
itemWidth: 100,
|
|
|
disabled: false,
|
|
|
},
|
|
@@ -158,6 +186,20 @@ const formConfig = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
+ prop: "accessToken",
|
|
|
+ label: "accessToken",
|
|
|
+ itemWidth: 100,
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "refreshToken",
|
|
|
+ label: "refreshToken",
|
|
|
+ itemWidth: 100,
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
itemType: "textarea",
|
|
|
prop: "remark",
|
|
|
label: "备注",
|
|
@@ -167,9 +209,14 @@ const formConfig = computed(() => {
|
|
|
];
|
|
|
});
|
|
|
const rules = ref({
|
|
|
+ deptId: [{ required: true, message: "请选择部门", trigger: "change" }],
|
|
|
companyName: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
|
|
|
appKey: [{ required: true, message: "请输入AppKey", trigger: "blur" }],
|
|
|
appSecret: [{ required: true, message: "请输入AppSecret", trigger: "blur" }],
|
|
|
+ accessToken: [{ required: true, message: "accessToken", trigger: "blur" }],
|
|
|
+ refreshToken: [
|
|
|
+ { required: true, message: "请输入refreshToken", trigger: "blur" },
|
|
|
+ ],
|
|
|
});
|
|
|
|
|
|
const getList = async (req) => {
|
|
@@ -222,6 +269,32 @@ const getDtl = (row) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const arrayRecursion = (arr) => {
|
|
|
+ arr.forEach((item) => {
|
|
|
+ if (item.children && item.children.length > 0) {
|
|
|
+ item.disabled = true;
|
|
|
+ arrayRecursion(item.children);
|
|
|
+ } else {
|
|
|
+ item.disabled = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return arr;
|
|
|
+};
|
|
|
+
|
|
|
+const getTreeData = () => {
|
|
|
+ proxy
|
|
|
+ .get("/tenantDept/list", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 9999,
|
|
|
+ keyword: "",
|
|
|
+ tenantId: proxy.useUserStore().user.tenantId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ treeData.value = proxy.handleTree(res.data, "deptId");
|
|
|
+ arrayRecursion(treeData.value);
|
|
|
+ });
|
|
|
+};
|
|
|
+getTreeData();
|
|
|
getList();
|
|
|
</script>
|
|
|
|