Browse Source

禅道bug处理

master
suyanyan 1 month ago
parent
commit
11cc99fd8e
7 changed files with 24 additions and 11 deletions
  1. +1
    -1
      SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts
  2. +1
    -0
      SafeCampus.WEB/src/views/userManage/classManage/components/formClass/index.vue
  3. +11
    -6
      SafeCampus.WEB/src/views/userManage/clothing/index.vue
  4. +1
    -1
      SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue
  5. +1
    -0
      SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue
  6. +4
    -1
      SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue
  7. +5
    -2
      SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue

+ 1
- 1
SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts View File

@@ -58,7 +58,7 @@ export namespace SysUserPersonnel {
/** 姓名 */ /** 姓名 */
name?: string; name?: string;
/** 年龄 */ /** 年龄 */
age?: number | string;
age?: any;
/** 性别 */ /** 性别 */
gender?: string; gender?: string;
/** 手机 */ /** 手机 */


+ 1
- 0
SafeCampus.WEB/src/views/userManage/classManage/components/formClass/index.vue View File

@@ -97,6 +97,7 @@ async function handleSubmit() {
await userManageClassManageApi await userManageClassManageApi
.add(sysUserProps.record) .add(sysUserProps.record)
.then(() => { .then(() => {
ElMessage.success("新增成功");
sysUserProps.successful!(); //调用父组件的successful方法 sysUserProps.successful!(); //调用父组件的successful方法
}) })
.finally(() => { .finally(() => {


+ 11
- 6
SafeCampus.WEB/src/views/userManage/clothing/index.vue View File

@@ -160,13 +160,12 @@ const RefreshTable = () => {
getList(clothSetId.value) getList(clothSetId.value)
} }
// 刷新表格+树 // 刷新表格+树
const RefreshTree = () => {
getList(clothSetId.value)
treeFilter.value?.refresh(); //刷新树形筛选器
const RefreshTree = async() => {
await getTree(); //刷新树形筛选器
await getList(clothSetId.value)
} }





/** 服装库切换切换 */ /** 服装库切换切换 */
const clothSetId = ref<number | string>() const clothSetId = ref<number | string>()
function changeTreeFilter(val: number | string) { function changeTreeFilter(val: number | string) {
@@ -183,10 +182,16 @@ const getList = (clothSetId:any)=>{
} }
}) })
} }
onMounted(async () => {
const getTree =async ()=>{
const { data }:any = await userManageClothApi.getList({}); const { data }:any = await userManageClothApi.getList({});
treeData.value = data; treeData.value = data;
clothSetId.value = data[0].clothSetId.toString()
if(!clothSetId.value ){
clothSetId.value = data[0].clothSetId.toString()
}
}
onMounted(async () => {
await getTree()
getList(clothSetId.value) getList(clothSetId.value)
}) })
</script> </script>


+ 1
- 1
SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue View File

@@ -46,7 +46,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<s-form-item label="年龄" prop="age"> <s-form-item label="年龄" prop="age">
<s-input v-model="userInfo.age"></s-input>
<s-input v-model="userInfo.age" type="number" min="1"></s-input>
</s-form-item> </s-form-item>
</el-col> </el-col>
</el-row> </el-row>


+ 1
- 0
SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue View File

@@ -65,6 +65,7 @@ function onOpen(props: FormProps.Base<SysUserPersonnel.SysUserPerInfo>) {
if (props.record.personId) { if (props.record.personId) {
//如果传了id,就去请求api获取record //如果传了id,就去请求api获取record
userManageKeyPersonApi.detail({ id: props.record.personId }).then((res: any) => { userManageKeyPersonApi.detail({ id: props.record.personId }).then((res: any) => {
if (!res.data.age) res.data.age = "";
sysUserProps.record = res.data; sysUserProps.record = res.data;
}); });
} }


+ 4
- 1
SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue View File

@@ -101,7 +101,10 @@ const columns: ColumnProps<SysUserPersonnel.SysUserPerInfo>[] = [
}, },
{ {
prop: "age", prop: "age",
label: "年龄"
label: "年龄",
render: scope => {
return scope.row.age ? scope.row.age : '--';
}
}, },
{ prop: "operation", label: "操作", width: 250, fixed: "right" } { prop: "operation", label: "操作", width: 250, fixed: "right" }
]; ];


+ 5
- 2
SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue View File

@@ -151,11 +151,11 @@ const genderOptions = ref([
]); ]);
onMounted(async () => { onMounted(async () => {
departmentOptions.value = await getDepartmentList(); departmentOptions.value = await getDepartmentList();
// 获取班级
classOptions.value = await getClassList("");
// 初始化 // 初始化
userInfo.value.gender = userInfo.value.gender ? userInfo.value.gender : genderOptions.value[0].value; userInfo.value.gender = userInfo.value.gender ? userInfo.value.gender : genderOptions.value[0].value;
if (userInfo.value.personId) { if (userInfo.value.personId) {
majorOptions.value = await getMajorList(userInfo.value.depId);
classOptions.value = await getClassList(userInfo.value.majorId);
if (userInfo.value.faces?.length > 0) { if (userInfo.value.faces?.length > 0) {
fileList.value = [ fileList.value = [
...JSON.parse(JSON.stringify(userInfo.value.faces)).map((item: any) => { ...JSON.parse(JSON.stringify(userInfo.value.faces)).map((item: any) => {
@@ -176,6 +176,9 @@ onMounted(async () => {
}) })
]; ];
} }
} else {
// 获取班级
classOptions.value = await getClassList("");
} }
/* 监听系部、专业 */ /* 监听系部、专业 */
watch( watch(


Loading…
Cancel
Save