|
@@ -30,11 +30,13 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import type { FormRules } from 'element-plus';
|
|
|
|
import type { Ref } from 'vue';
|
|
import type { Ref } from 'vue';
|
|
import { ref, reactive, onMounted } from 'vue';
|
|
import { ref, reactive, onMounted } from 'vue';
|
|
-import { ElMessage } from 'element-plus';
|
|
|
|
import { useRoute } from 'vue-router';
|
|
import { useRoute } from 'vue-router';
|
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
|
+import type { FormRules } from 'element-plus';
|
|
|
|
+
|
|
|
|
+// 接口
|
|
import { DictDataStore } from '@common/src/stores/system/dictData'; // 字典表
|
|
import { DictDataStore } from '@common/src/stores/system/dictData'; // 字典表
|
|
import { RoleStore } from '@common/src/stores/system/role'; // 个人
|
|
import { RoleStore } from '@common/src/stores/system/role'; // 个人
|
|
import { ExpertStore } from '@common/src/stores/admins/expert'; // 专家
|
|
import { ExpertStore } from '@common/src/stores/admins/expert'; // 专家
|
|
@@ -44,16 +46,16 @@ const expert = ExpertStore();
|
|
const dictData = DictDataStore();
|
|
const dictData = DictDataStore();
|
|
const role = RoleStore();
|
|
const role = RoleStore();
|
|
const personal = PersonalStore();
|
|
const personal = PersonalStore();
|
|
|
|
+
|
|
|
|
+// 路由
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
|
+
|
|
|
|
+// 加载中
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
-let form: Ref<any> = ref({});
|
|
|
|
-let roleList: Ref<any> = ref([]);
|
|
|
|
-let statusList: Ref<any> = ref([]);
|
|
|
|
-let codeList: Ref<any> = ref([]);
|
|
|
|
-let areaList: Ref<any> = ref([]);
|
|
|
|
-let personalList: Ref<any> = ref([]);
|
|
|
|
-let disabled: Ref<any> = ref(false);
|
|
|
|
|
|
+
|
|
// 表单
|
|
// 表单
|
|
|
|
+let disabled: Ref<any> = ref(false);
|
|
|
|
+let form: Ref<any> = ref({});
|
|
let formFields: Ref<any[]> = ref([
|
|
let formFields: Ref<any[]> = ref([
|
|
{ label: '邀请码', model: 'code', type: 'select' },
|
|
{ label: '邀请码', model: 'code', type: 'select' },
|
|
{ label: '账号', model: 'account' },
|
|
{ label: '账号', model: 'account' },
|
|
@@ -83,10 +85,15 @@ let formFields: Ref<any[]> = ref([
|
|
{ label: '状态', model: 'status', type: 'select' },
|
|
{ label: '状态', model: 'status', type: 'select' },
|
|
{ label: '个人用户id', model: 'personal_id', type: 'select' } //查询个人用户,选择
|
|
{ label: '个人用户id', model: 'personal_id', type: 'select' } //查询个人用户,选择
|
|
]);
|
|
]);
|
|
-const rules = reactive<FormRules>({
|
|
|
|
- name: [{ required: true, message: '名称', trigger: 'blur' }],
|
|
|
|
- account: [{ required: true, message: '账号', trigger: 'blur' }]
|
|
|
|
-});
|
|
|
|
|
|
+const rules = reactive<FormRules>({});
|
|
|
|
+
|
|
|
|
+// 字典表
|
|
|
|
+let roleList: Ref<any> = ref([]);
|
|
|
|
+let statusList: Ref<any> = ref([]);
|
|
|
|
+let codeList: Ref<any> = ref([]);
|
|
|
|
+let areaList: Ref<any> = ref([]);
|
|
|
|
+let personalList: Ref<any> = ref([]);
|
|
|
|
+
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
loading.value = true;
|
|
loading.value = true;
|
|
if (route.query.isdisabled) disabled.value = route.query.isdisabled;
|
|
if (route.query.isdisabled) disabled.value = route.query.isdisabled;
|
|
@@ -138,7 +145,7 @@ const searchOther = async () => {
|
|
res = await dictData.query({ type: 'common_status' });
|
|
res = await dictData.query({ type: 'common_status' });
|
|
if (res.errcode == 0) statusList.value = res.data;
|
|
if (res.errcode == 0) statusList.value = res.data;
|
|
// 个人
|
|
// 个人
|
|
- res = await personal.query();
|
|
|
|
|
|
+ res = await personal.query({ status: '1' });
|
|
if (res.errcode == 0) personalList.value = res.data;
|
|
if (res.errcode == 0) personalList.value = res.data;
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|