Browse Source

修改基础设置

zs 1 year ago
parent
commit
6e1effbf77
2 changed files with 25 additions and 7 deletions
  1. 25 1
      src/views/system/config/index.vue
  2. 0 6
      src/views/users/two/index.vue

+ 25 - 1
src/views/system/config/index.vue

@@ -17,6 +17,26 @@
                 @change="onUpload"
                 @change="onUpload"
               ></cUpload>
               ></cUpload>
             </template>
             </template>
+            <template #boy_url="{ item }">
+              <cUpload
+                :model="item.model"
+                :limit="1"
+                url="/files/material/config/upload"
+                :list="form[item.model]"
+                listType="picture-card"
+                @change="onUpload"
+              ></cUpload>
+            </template>
+            <template #girl_url="{ item }">
+              <cUpload
+                :model="item.model"
+                :limit="1"
+                url="/files/material/config/upload"
+                :list="form[item.model]"
+                listType="picture-card"
+                @change="onUpload"
+              ></cUpload>
+            </template>
           </cForm>
           </cForm>
         </el-col>
         </el-col>
       </el-col>
       </el-col>
@@ -38,7 +58,11 @@ const configAxios = ConfigStore();
 const loading: Ref<any> = ref(false);
 const loading: Ref<any> = ref(false);
 // 表单
 // 表单
 let form: Ref<any> = ref({});
 let form: Ref<any> = ref({});
-let fields: Ref<any[]> = ref([{ label: 'logo', model: 'logo_url', custom: true }]);
+let fields: Ref<any[]> = ref([
+  { label: 'logo', model: 'logo_url', custom: true },
+  { label: '男头像', model: 'boy_url', custom: true },
+  { label: '女头像', model: 'girl_url', custom: true }
+]);
 const rules = reactive<FormRules>({});
 const rules = reactive<FormRules>({});
 // 请求
 // 请求
 onMounted(async () => {
 onMounted(async () => {

+ 0 - 6
src/views/users/two/index.vue

@@ -55,8 +55,6 @@ let fields: Ref<any[]> = ref([
   { label: '姓名', model: 'name', isSearch: true },
   { label: '姓名', model: 'name', isSearch: true },
   { label: '性别', model: 'gender', format: (i: any) => getDict(i, genderList.value, 'dict') },
   { label: '性别', model: 'gender', format: (i: any) => getDict(i, genderList.value, 'dict') },
   { label: '角色', model: 'role', format: (i: any) => getDict(i, roleList.value, 'role') },
   { label: '角色', model: 'role', format: (i: any) => getDict(i, roleList.value, 'role') },
-  { label: '所属街道', model: 'street', format: (i: any) => getDict(i, belongList.value) },
-  { label: '所属社区', model: 'community', format: (i: any) => getDict(i, belongList.value) },
   { label: '状态', model: 'status', format: (i: any) => getDict(i, statusList.value, 'dict') }
   { label: '状态', model: 'status', format: (i: any) => getDict(i, statusList.value, 'dict') }
 ]);
 ]);
 // 操作
 // 操作
@@ -70,7 +68,6 @@ let searchForm: Ref<any> = ref({});
 // 字典表
 // 字典表
 const genderList: Ref<any> = ref([]);
 const genderList: Ref<any> = ref([]);
 const roleList: Ref<any> = ref([]);
 const roleList: Ref<any> = ref([]);
-const belongList: Ref<any> = ref([]);
 const statusList: Ref<any> = ref([]);
 const statusList: Ref<any> = ref([]);
 // 弹框
 // 弹框
 const dialog: Ref<any> = ref({ title: '审核管理', show: false, type: '1' });
 const dialog: Ref<any> = ref({ title: '审核管理', show: false, type: '1' });
@@ -157,9 +154,6 @@ const searchOther = async () => {
   // 角色
   // 角色
   res = await roleAxios.query({ type: 'role', is_use: '0' });
   res = await roleAxios.query({ type: 'role', is_use: '0' });
   if (res.errcode == '0') roleList.value = res.data;
   if (res.errcode == '0') roleList.value = res.data;
-  // 所属
-  res = await officeAxios.query({ is_use: '0' });
-  if (res.errcode == '0') belongList.value = res.data;
   // 状态
   // 状态
   res = await dictAxios.query({ type: 'status', is_use: '0' });
   res = await dictAxios.query({ type: 'status', is_use: '0' });
   if (res.errcode == '0') statusList.value = res.data;
   if (res.errcode == '0') statusList.value = res.data;