|  | @@ -5,22 +5,32 @@ import {
 | 
	
		
			
				|  |  |    NSpace,
 | 
	
		
			
				|  |  |    NButton,
 | 
	
		
			
				|  |  |    useMessage,
 | 
	
		
			
				|  |  | -  NAlert
 | 
	
		
			
				|  |  | +  NAlert,
 | 
	
		
			
				|  |  | +  NCascader
 | 
	
		
			
				|  |  |  } from 'naive-ui';
 | 
	
		
			
				|  |  | -import { defineComponent, reactive, ref } from 'vue';
 | 
	
		
			
				|  |  | +import { Prop, PropType, defineComponent, reactive, ref } from 'vue';
 | 
	
		
			
				|  |  |  import { api_teacherAdd } from '../../api';
 | 
	
		
			
				|  |  |  import { useUserStore } from '/src/store/modules/users';
 | 
	
		
			
				|  |  |  export default defineComponent({
 | 
	
		
			
				|  |  |    name: 'teacher-operation',
 | 
	
		
			
				|  |  |    emits: ['close'],
 | 
	
		
			
				|  |  | +  props: {
 | 
	
		
			
				|  |  | +    areaList: {
 | 
	
		
			
				|  |  | +      type: Array as PropType<any[]>,
 | 
	
		
			
				|  |  | +      default: () => []
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |    setup(props, { emit }) {
 | 
	
		
			
				|  |  |      const user = useUserStore();
 | 
	
		
			
				|  |  |      const forms = reactive({
 | 
	
		
			
				|  |  | +      provinceCode: '',
 | 
	
		
			
				|  |  | +      cityCode: '',
 | 
	
		
			
				|  |  | +      regionCode: '',
 | 
	
		
			
				|  |  |        tenantId: user.info.schoolInfos?.[0]?.tenantId,
 | 
	
		
			
				|  |  |        phone: null,
 | 
	
		
			
				|  |  |        schoolId: user.info.schoolInfos?.[0]?.id,
 | 
	
		
			
				|  |  |        nickname: null,
 | 
	
		
			
				|  |  | -      gender: 0
 | 
	
		
			
				|  |  | +      gender: 1
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      const btnLoading = ref(false);
 | 
	
		
			
				|  |  |      const formsRef = ref();
 | 
	
	
		
			
				|  | @@ -115,6 +125,23 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                </n-button>
 | 
	
		
			
				|  |  |              </NSpace>
 | 
	
		
			
				|  |  |            </NFormItem>
 | 
	
		
			
				|  |  | +          <NFormItem label="城区">
 | 
	
		
			
				|  |  | +            <NCascader
 | 
	
		
			
				|  |  | +              to="body"
 | 
	
		
			
				|  |  | +              placeholder="请选择城区"
 | 
	
		
			
				|  |  | +              options={props.areaList}
 | 
	
		
			
				|  |  | +              labelField="name"
 | 
	
		
			
				|  |  | +              valueField="code"
 | 
	
		
			
				|  |  | +              childrenField="areas"
 | 
	
		
			
				|  |  | +              checkStrategy="child"
 | 
	
		
			
				|  |  | +              expandTrigger="hover"
 | 
	
		
			
				|  |  | +              onUpdate:value={(val: any, option: any, pathValues: any) => {
 | 
	
		
			
				|  |  | +                forms.provinceCode = pathValues[0]?.code;
 | 
	
		
			
				|  |  | +                forms.cityCode = pathValues[1]?.code;
 | 
	
		
			
				|  |  | +                forms.regionCode = pathValues[2]?.code;
 | 
	
		
			
				|  |  | +              }}
 | 
	
		
			
				|  |  | +            />
 | 
	
		
			
				|  |  | +          </NFormItem>
 | 
	
		
			
				|  |  |            <NFormItem
 | 
	
		
			
				|  |  |              label="手机号"
 | 
	
		
			
				|  |  |              path="phone"
 | 
	
	
		
			
				|  | @@ -132,7 +159,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]}>
 | 
	
		
			
				|  |  |              <NInput
 | 
	
		
			
				|  |  | -              maxlength={11} 
 | 
	
		
			
				|  |  | +              maxlength={11}
 | 
	
		
			
				|  |  |                v-model:value={forms.phone}
 | 
	
		
			
				|  |  |                placeholder="请输入手机号"
 | 
	
		
			
				|  |  |                clearable
 |