diff --git a/src/api/resource/register.ts b/src/api/resource/register.ts
index 1327460..da6a8ca 100644
--- a/src/api/resource/register.ts
+++ b/src/api/resource/register.ts
@@ -8,3 +8,11 @@
data,
})
}
+
+export function addStaffBasic(data: object) {
+ return request({
+ url: `${prefix}/base/add`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/resource/register.ts b/src/api/resource/register.ts
index 1327460..da6a8ca 100644
--- a/src/api/resource/register.ts
+++ b/src/api/resource/register.ts
@@ -8,3 +8,11 @@
data,
})
}
+
+export function addStaffBasic(data: object) {
+ return request({
+ url: `${prefix}/base/add`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/assets/json/nation-code.json b/src/assets/json/nation-code.json
new file mode 100644
index 0000000..1aed5ec
--- /dev/null
+++ b/src/assets/json/nation-code.json
@@ -0,0 +1,282 @@
+[
+ {
+ "id": "01",
+ "text": "汉族",
+ "value": "Han"
+ },
+ {
+ "id": "02",
+ "text": "壮族",
+ "value": "Zhuang"
+ },
+ {
+ "id": "03",
+ "text": "回族",
+ "value": "Hui"
+ },
+ {
+ "id": "04",
+ "text": "藏族",
+ "value": "Tibetan"
+ },
+ {
+ "id": "05",
+ "text": "维吾尔族",
+ "value": "Uighur "
+ },
+ {
+ "id": "06",
+ "text": "苗族",
+ "value": "Miao"
+ },
+ {
+ "id": "07",
+ "text": "彝族",
+ "value": "Yi"
+ },
+ {
+ "id": "08",
+ "text": "蒙古族",
+ "value": "Mongol"
+ },
+ {
+ "id": "09",
+ "text": "布依族",
+ "value": "Buyi"
+ },
+ {
+ "id": "10",
+ "text": "朝鲜族",
+ "value": "Korean"
+ },
+ {
+ "id": "11",
+ "text": "满族",
+ "value": "Manchu"
+ },
+ {
+ "id": "12",
+ "text": "侗族",
+ "value": "Dong"
+ },
+ {
+ "id": "13",
+ "text": "瑶族",
+ "value": "Yao"
+ },
+ {
+ "id": "14",
+ "text": "白族",
+ "value": "Bai"
+ },
+ {
+ "id": "15",
+ "text": "土家族",
+ "value": "Tujia"
+ },
+ {
+ "id": "16",
+ "text": "哈尼族",
+ "value": "Hani"
+ },
+ {
+ "id": "17",
+ "text": "哈萨克族",
+ "value": "Kazakh"
+ },
+ {
+ "id": "18",
+ "text": "傣族",
+ "value": "Dai"
+ },
+ {
+ "id": "19",
+ "text": "黎族",
+ "value": "Li"
+ },
+ {
+ "id": "20",
+ "text": "傈僳族",
+ "value": "Lisu"
+ },
+ {
+ "id": "21",
+ "text": "佤族",
+ "value": "Wa"
+ },
+ {
+ "id": "22",
+ "text": "畲族",
+ "value": "She"
+ },
+ {
+ "id": "23",
+ "text": "高山族",
+ "value": "Gaoshan"
+ },
+ {
+ "id": "24",
+ "text": "拉祜族",
+ "value": "Lahu"
+ },
+ {
+ "id": "25",
+ "text": "水族",
+ "value": "Shui"
+ },
+ {
+ "id": "26",
+ "text": "东乡族",
+ "value": "Dongxiang"
+ },
+ {
+ "id": "27",
+ "text": "纳西族",
+ "value": "Naxi"
+ },
+ {
+ "id": "28",
+ "text": "景颇族",
+ "value": "Jingpo"
+ },
+ {
+ "id": "29",
+ "text": "柯尔克孜族",
+ "value": "Kirghiz"
+ },
+ {
+ "id": "30",
+ "text": "土族",
+ "value": "Tu"
+ },
+ {
+ "id": "31",
+ "text": "达斡尔族",
+ "value": "Daur"
+ },
+ {
+ "id": "32",
+ "text": "仫佬族",
+ "value": "Mulam"
+ },
+ {
+ "id": "33",
+ "text": "羌族",
+ "value": "Qiang"
+ },
+ {
+ "id": "34",
+ "text": "布朗族",
+ "value": "Blang"
+ },
+ {
+ "id": "35",
+ "text": "撒拉族",
+ "value": "Salar"
+ },
+ {
+ "id": "36",
+ "text": "毛南族",
+ "value": "Maonan"
+ },
+ {
+ "id": "37",
+ "text": "仡佬族",
+ "value": "Gelao"
+ },
+ {
+ "id": "38",
+ "text": "锡伯族",
+ "value": "Xibe"
+ },
+ {
+ "id": "39",
+ "text": "阿昌族",
+ "value": "Achang"
+ },
+ {
+ "id": "40",
+ "text": "普米族",
+ "value": "Pumi"
+ },
+ {
+ "id": "41",
+ "text": "塔吉克族",
+ "value": "Tajik"
+ },
+ {
+ "id": "42",
+ "text": "怒族",
+ "value": "Nu"
+ },
+ {
+ "id": "43",
+ "text": "乌孜别克族",
+ "value": "Uzbek"
+ },
+ {
+ "id": "44",
+ "text": "俄罗斯族",
+ "value": "Russian"
+ },
+ {
+ "id": "45",
+ "text": "鄂温克族",
+ "value": "Evenki"
+ },
+ {
+ "id": "46",
+ "text": "崩龙族(得昂族)",
+ "value": "Bumloon"
+ },
+ {
+ "id": "47",
+ "text": "保安族",
+ "value": "Bonan"
+ },
+ {
+ "id": "48",
+ "text": "裕固族",
+ "value": "Yugur"
+ },
+ {
+ "id": "49",
+ "text": "京族",
+ "value": "Gin"
+ },
+ {
+ "id": "50",
+ "text": "塔塔尔族",
+ "value": "Tatar"
+ },
+ {
+ "id": "51",
+ "text": "独龙族",
+ "value": "Drung"
+ },
+ {
+ "id": "52",
+ "text": "鄂伦春族",
+ "value": "Oroqin"
+ },
+ {
+ "id": "53",
+ "text": "赫哲族",
+ "value": "Hezhen"
+ },
+ {
+ "id": "54",
+ "text": "门巴族",
+ "value": "Menba"
+ },
+ {
+ "id": "55",
+ "text": "珞巴族",
+ "value": "Lhobo"
+ },
+ {
+ "id": "56",
+ "text": "基诺族",
+ "value": "Jino"
+ }
+]
diff --git a/src/api/resource/register.ts b/src/api/resource/register.ts
index 1327460..da6a8ca 100644
--- a/src/api/resource/register.ts
+++ b/src/api/resource/register.ts
@@ -8,3 +8,11 @@
data,
})
}
+
+export function addStaffBasic(data: object) {
+ return request({
+ url: `${prefix}/base/add`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/assets/json/nation-code.json b/src/assets/json/nation-code.json
new file mode 100644
index 0000000..1aed5ec
--- /dev/null
+++ b/src/assets/json/nation-code.json
@@ -0,0 +1,282 @@
+[
+ {
+ "id": "01",
+ "text": "汉族",
+ "value": "Han"
+ },
+ {
+ "id": "02",
+ "text": "壮族",
+ "value": "Zhuang"
+ },
+ {
+ "id": "03",
+ "text": "回族",
+ "value": "Hui"
+ },
+ {
+ "id": "04",
+ "text": "藏族",
+ "value": "Tibetan"
+ },
+ {
+ "id": "05",
+ "text": "维吾尔族",
+ "value": "Uighur "
+ },
+ {
+ "id": "06",
+ "text": "苗族",
+ "value": "Miao"
+ },
+ {
+ "id": "07",
+ "text": "彝族",
+ "value": "Yi"
+ },
+ {
+ "id": "08",
+ "text": "蒙古族",
+ "value": "Mongol"
+ },
+ {
+ "id": "09",
+ "text": "布依族",
+ "value": "Buyi"
+ },
+ {
+ "id": "10",
+ "text": "朝鲜族",
+ "value": "Korean"
+ },
+ {
+ "id": "11",
+ "text": "满族",
+ "value": "Manchu"
+ },
+ {
+ "id": "12",
+ "text": "侗族",
+ "value": "Dong"
+ },
+ {
+ "id": "13",
+ "text": "瑶族",
+ "value": "Yao"
+ },
+ {
+ "id": "14",
+ "text": "白族",
+ "value": "Bai"
+ },
+ {
+ "id": "15",
+ "text": "土家族",
+ "value": "Tujia"
+ },
+ {
+ "id": "16",
+ "text": "哈尼族",
+ "value": "Hani"
+ },
+ {
+ "id": "17",
+ "text": "哈萨克族",
+ "value": "Kazakh"
+ },
+ {
+ "id": "18",
+ "text": "傣族",
+ "value": "Dai"
+ },
+ {
+ "id": "19",
+ "text": "黎族",
+ "value": "Li"
+ },
+ {
+ "id": "20",
+ "text": "傈僳族",
+ "value": "Lisu"
+ },
+ {
+ "id": "21",
+ "text": "佤族",
+ "value": "Wa"
+ },
+ {
+ "id": "22",
+ "text": "畲族",
+ "value": "She"
+ },
+ {
+ "id": "23",
+ "text": "高山族",
+ "value": "Gaoshan"
+ },
+ {
+ "id": "24",
+ "text": "拉祜族",
+ "value": "Lahu"
+ },
+ {
+ "id": "25",
+ "text": "水族",
+ "value": "Shui"
+ },
+ {
+ "id": "26",
+ "text": "东乡族",
+ "value": "Dongxiang"
+ },
+ {
+ "id": "27",
+ "text": "纳西族",
+ "value": "Naxi"
+ },
+ {
+ "id": "28",
+ "text": "景颇族",
+ "value": "Jingpo"
+ },
+ {
+ "id": "29",
+ "text": "柯尔克孜族",
+ "value": "Kirghiz"
+ },
+ {
+ "id": "30",
+ "text": "土族",
+ "value": "Tu"
+ },
+ {
+ "id": "31",
+ "text": "达斡尔族",
+ "value": "Daur"
+ },
+ {
+ "id": "32",
+ "text": "仫佬族",
+ "value": "Mulam"
+ },
+ {
+ "id": "33",
+ "text": "羌族",
+ "value": "Qiang"
+ },
+ {
+ "id": "34",
+ "text": "布朗族",
+ "value": "Blang"
+ },
+ {
+ "id": "35",
+ "text": "撒拉族",
+ "value": "Salar"
+ },
+ {
+ "id": "36",
+ "text": "毛南族",
+ "value": "Maonan"
+ },
+ {
+ "id": "37",
+ "text": "仡佬族",
+ "value": "Gelao"
+ },
+ {
+ "id": "38",
+ "text": "锡伯族",
+ "value": "Xibe"
+ },
+ {
+ "id": "39",
+ "text": "阿昌族",
+ "value": "Achang"
+ },
+ {
+ "id": "40",
+ "text": "普米族",
+ "value": "Pumi"
+ },
+ {
+ "id": "41",
+ "text": "塔吉克族",
+ "value": "Tajik"
+ },
+ {
+ "id": "42",
+ "text": "怒族",
+ "value": "Nu"
+ },
+ {
+ "id": "43",
+ "text": "乌孜别克族",
+ "value": "Uzbek"
+ },
+ {
+ "id": "44",
+ "text": "俄罗斯族",
+ "value": "Russian"
+ },
+ {
+ "id": "45",
+ "text": "鄂温克族",
+ "value": "Evenki"
+ },
+ {
+ "id": "46",
+ "text": "崩龙族(得昂族)",
+ "value": "Bumloon"
+ },
+ {
+ "id": "47",
+ "text": "保安族",
+ "value": "Bonan"
+ },
+ {
+ "id": "48",
+ "text": "裕固族",
+ "value": "Yugur"
+ },
+ {
+ "id": "49",
+ "text": "京族",
+ "value": "Gin"
+ },
+ {
+ "id": "50",
+ "text": "塔塔尔族",
+ "value": "Tatar"
+ },
+ {
+ "id": "51",
+ "text": "独龙族",
+ "value": "Drung"
+ },
+ {
+ "id": "52",
+ "text": "鄂伦春族",
+ "value": "Oroqin"
+ },
+ {
+ "id": "53",
+ "text": "赫哲族",
+ "value": "Hezhen"
+ },
+ {
+ "id": "54",
+ "text": "门巴族",
+ "value": "Menba"
+ },
+ {
+ "id": "55",
+ "text": "珞巴族",
+ "value": "Lhobo"
+ },
+ {
+ "id": "56",
+ "text": "基诺族",
+ "value": "Jino"
+ }
+]
diff --git a/src/views/resource/person/register/component/basic.vue b/src/views/resource/person/register/component/basic.vue
index 6a090d7..c25b424 100644
--- a/src/views/resource/person/register/component/basic.vue
+++ b/src/views/resource/person/register/component/basic.vue
@@ -1,15 +1,23 @@
-
+
-
-
+
-
-
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -195,9 +304,8 @@
-
-
-
+
+
@@ -209,8 +317,8 @@
-
-
+
+
@@ -261,7 +369,11 @@
-
+
+
+ 年
+
+
-
+
-
+
-
+
-
+
+
+
+
+
diff --git a/src/api/resource/register.ts b/src/api/resource/register.ts
index 1327460..da6a8ca 100644
--- a/src/api/resource/register.ts
+++ b/src/api/resource/register.ts
@@ -8,3 +8,11 @@
data,
})
}
+
+export function addStaffBasic(data: object) {
+ return request({
+ url: `${prefix}/base/add`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/assets/json/nation-code.json b/src/assets/json/nation-code.json
new file mode 100644
index 0000000..1aed5ec
--- /dev/null
+++ b/src/assets/json/nation-code.json
@@ -0,0 +1,282 @@
+[
+ {
+ "id": "01",
+ "text": "汉族",
+ "value": "Han"
+ },
+ {
+ "id": "02",
+ "text": "壮族",
+ "value": "Zhuang"
+ },
+ {
+ "id": "03",
+ "text": "回族",
+ "value": "Hui"
+ },
+ {
+ "id": "04",
+ "text": "藏族",
+ "value": "Tibetan"
+ },
+ {
+ "id": "05",
+ "text": "维吾尔族",
+ "value": "Uighur "
+ },
+ {
+ "id": "06",
+ "text": "苗族",
+ "value": "Miao"
+ },
+ {
+ "id": "07",
+ "text": "彝族",
+ "value": "Yi"
+ },
+ {
+ "id": "08",
+ "text": "蒙古族",
+ "value": "Mongol"
+ },
+ {
+ "id": "09",
+ "text": "布依族",
+ "value": "Buyi"
+ },
+ {
+ "id": "10",
+ "text": "朝鲜族",
+ "value": "Korean"
+ },
+ {
+ "id": "11",
+ "text": "满族",
+ "value": "Manchu"
+ },
+ {
+ "id": "12",
+ "text": "侗族",
+ "value": "Dong"
+ },
+ {
+ "id": "13",
+ "text": "瑶族",
+ "value": "Yao"
+ },
+ {
+ "id": "14",
+ "text": "白族",
+ "value": "Bai"
+ },
+ {
+ "id": "15",
+ "text": "土家族",
+ "value": "Tujia"
+ },
+ {
+ "id": "16",
+ "text": "哈尼族",
+ "value": "Hani"
+ },
+ {
+ "id": "17",
+ "text": "哈萨克族",
+ "value": "Kazakh"
+ },
+ {
+ "id": "18",
+ "text": "傣族",
+ "value": "Dai"
+ },
+ {
+ "id": "19",
+ "text": "黎族",
+ "value": "Li"
+ },
+ {
+ "id": "20",
+ "text": "傈僳族",
+ "value": "Lisu"
+ },
+ {
+ "id": "21",
+ "text": "佤族",
+ "value": "Wa"
+ },
+ {
+ "id": "22",
+ "text": "畲族",
+ "value": "She"
+ },
+ {
+ "id": "23",
+ "text": "高山族",
+ "value": "Gaoshan"
+ },
+ {
+ "id": "24",
+ "text": "拉祜族",
+ "value": "Lahu"
+ },
+ {
+ "id": "25",
+ "text": "水族",
+ "value": "Shui"
+ },
+ {
+ "id": "26",
+ "text": "东乡族",
+ "value": "Dongxiang"
+ },
+ {
+ "id": "27",
+ "text": "纳西族",
+ "value": "Naxi"
+ },
+ {
+ "id": "28",
+ "text": "景颇族",
+ "value": "Jingpo"
+ },
+ {
+ "id": "29",
+ "text": "柯尔克孜族",
+ "value": "Kirghiz"
+ },
+ {
+ "id": "30",
+ "text": "土族",
+ "value": "Tu"
+ },
+ {
+ "id": "31",
+ "text": "达斡尔族",
+ "value": "Daur"
+ },
+ {
+ "id": "32",
+ "text": "仫佬族",
+ "value": "Mulam"
+ },
+ {
+ "id": "33",
+ "text": "羌族",
+ "value": "Qiang"
+ },
+ {
+ "id": "34",
+ "text": "布朗族",
+ "value": "Blang"
+ },
+ {
+ "id": "35",
+ "text": "撒拉族",
+ "value": "Salar"
+ },
+ {
+ "id": "36",
+ "text": "毛南族",
+ "value": "Maonan"
+ },
+ {
+ "id": "37",
+ "text": "仡佬族",
+ "value": "Gelao"
+ },
+ {
+ "id": "38",
+ "text": "锡伯族",
+ "value": "Xibe"
+ },
+ {
+ "id": "39",
+ "text": "阿昌族",
+ "value": "Achang"
+ },
+ {
+ "id": "40",
+ "text": "普米族",
+ "value": "Pumi"
+ },
+ {
+ "id": "41",
+ "text": "塔吉克族",
+ "value": "Tajik"
+ },
+ {
+ "id": "42",
+ "text": "怒族",
+ "value": "Nu"
+ },
+ {
+ "id": "43",
+ "text": "乌孜别克族",
+ "value": "Uzbek"
+ },
+ {
+ "id": "44",
+ "text": "俄罗斯族",
+ "value": "Russian"
+ },
+ {
+ "id": "45",
+ "text": "鄂温克族",
+ "value": "Evenki"
+ },
+ {
+ "id": "46",
+ "text": "崩龙族(得昂族)",
+ "value": "Bumloon"
+ },
+ {
+ "id": "47",
+ "text": "保安族",
+ "value": "Bonan"
+ },
+ {
+ "id": "48",
+ "text": "裕固族",
+ "value": "Yugur"
+ },
+ {
+ "id": "49",
+ "text": "京族",
+ "value": "Gin"
+ },
+ {
+ "id": "50",
+ "text": "塔塔尔族",
+ "value": "Tatar"
+ },
+ {
+ "id": "51",
+ "text": "独龙族",
+ "value": "Drung"
+ },
+ {
+ "id": "52",
+ "text": "鄂伦春族",
+ "value": "Oroqin"
+ },
+ {
+ "id": "53",
+ "text": "赫哲族",
+ "value": "Hezhen"
+ },
+ {
+ "id": "54",
+ "text": "门巴族",
+ "value": "Menba"
+ },
+ {
+ "id": "55",
+ "text": "珞巴族",
+ "value": "Lhobo"
+ },
+ {
+ "id": "56",
+ "text": "基诺族",
+ "value": "Jino"
+ }
+]
diff --git a/src/views/resource/person/register/component/basic.vue b/src/views/resource/person/register/component/basic.vue
index 6a090d7..c25b424 100644
--- a/src/views/resource/person/register/component/basic.vue
+++ b/src/views/resource/person/register/component/basic.vue
@@ -1,15 +1,23 @@
-
+
-
-
+
-
-
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -195,9 +304,8 @@
-
-
-
+
+
@@ -209,8 +317,8 @@
-
-
+
+
@@ -261,7 +369,11 @@
-
+
+
+ 年
+
+
-
+
-
+
-
+
-
+
+
+
+
+
diff --git a/src/views/resource/person/register/detail.vue b/src/views/resource/person/register/detail.vue
index e822772..f6abb88 100644
--- a/src/views/resource/person/register/detail.vue
+++ b/src/views/resource/person/register/detail.vue
@@ -11,6 +11,7 @@
const $route = useRoute()
const $router = useRouter()
const title = ref('')
+const operation = ref('')
const radioItems = ref([
{ name: '基本信息', value: 'register-basic' },
@@ -21,7 +22,11 @@
{ name: '训练情况', value: 'register-trainning' },
])
const current = ref('register-basic')
-const operation = ref('')
+
+const staffId = ref('')
+
+// 子组件的引用
+const refRegisterBasic = ref()
// 逻辑
// 重置各个子组件的表单内容
@@ -37,18 +42,38 @@
resetFormData()
}
+// 保存
+const saveForm = () => {
+ switch (current.value) {
+ case 'register-basic':
+ refRegisterBasic.value.saveBasicForm()
+ break
+ }
+}
+
// 弹窗初始化
const initDialog = (row: any) => {
operation.value = row.operation
- if (row.operation === 'create') {
- title.value = '人员登记(新增)'
+ switch (row.operation) {
+ case 'create' :
+ title.value = '人员登记(新增)'
+ break
+ case 'update':
+ title.value = '人员登记(编辑)'
+ break
+ case 'detail':
+ title.value = '人员登记(详情)'
+ break
+ default:
+ title.value = ''
+ break
}
- else if (row.operation === 'update') {
- title.value = '人员登记(编辑)'
- }
- else if (row.operation === 'detail') {
- title.value = '人员登记(详情)'
- }
+}
+
+const getStaffId = (id: string) => {
+ console.log('from child comp...', id)
+ staffId.value = id
+ console.log(staffId.value)
}
onMounted(() => {
@@ -60,7 +85,7 @@
-
+
保存
@@ -72,7 +97,7 @@
-
+
diff --git a/src/api/resource/register.ts b/src/api/resource/register.ts
index 1327460..da6a8ca 100644
--- a/src/api/resource/register.ts
+++ b/src/api/resource/register.ts
@@ -8,3 +8,11 @@
data,
})
}
+
+export function addStaffBasic(data: object) {
+ return request({
+ url: `${prefix}/base/add`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/assets/json/nation-code.json b/src/assets/json/nation-code.json
new file mode 100644
index 0000000..1aed5ec
--- /dev/null
+++ b/src/assets/json/nation-code.json
@@ -0,0 +1,282 @@
+[
+ {
+ "id": "01",
+ "text": "汉族",
+ "value": "Han"
+ },
+ {
+ "id": "02",
+ "text": "壮族",
+ "value": "Zhuang"
+ },
+ {
+ "id": "03",
+ "text": "回族",
+ "value": "Hui"
+ },
+ {
+ "id": "04",
+ "text": "藏族",
+ "value": "Tibetan"
+ },
+ {
+ "id": "05",
+ "text": "维吾尔族",
+ "value": "Uighur "
+ },
+ {
+ "id": "06",
+ "text": "苗族",
+ "value": "Miao"
+ },
+ {
+ "id": "07",
+ "text": "彝族",
+ "value": "Yi"
+ },
+ {
+ "id": "08",
+ "text": "蒙古族",
+ "value": "Mongol"
+ },
+ {
+ "id": "09",
+ "text": "布依族",
+ "value": "Buyi"
+ },
+ {
+ "id": "10",
+ "text": "朝鲜族",
+ "value": "Korean"
+ },
+ {
+ "id": "11",
+ "text": "满族",
+ "value": "Manchu"
+ },
+ {
+ "id": "12",
+ "text": "侗族",
+ "value": "Dong"
+ },
+ {
+ "id": "13",
+ "text": "瑶族",
+ "value": "Yao"
+ },
+ {
+ "id": "14",
+ "text": "白族",
+ "value": "Bai"
+ },
+ {
+ "id": "15",
+ "text": "土家族",
+ "value": "Tujia"
+ },
+ {
+ "id": "16",
+ "text": "哈尼族",
+ "value": "Hani"
+ },
+ {
+ "id": "17",
+ "text": "哈萨克族",
+ "value": "Kazakh"
+ },
+ {
+ "id": "18",
+ "text": "傣族",
+ "value": "Dai"
+ },
+ {
+ "id": "19",
+ "text": "黎族",
+ "value": "Li"
+ },
+ {
+ "id": "20",
+ "text": "傈僳族",
+ "value": "Lisu"
+ },
+ {
+ "id": "21",
+ "text": "佤族",
+ "value": "Wa"
+ },
+ {
+ "id": "22",
+ "text": "畲族",
+ "value": "She"
+ },
+ {
+ "id": "23",
+ "text": "高山族",
+ "value": "Gaoshan"
+ },
+ {
+ "id": "24",
+ "text": "拉祜族",
+ "value": "Lahu"
+ },
+ {
+ "id": "25",
+ "text": "水族",
+ "value": "Shui"
+ },
+ {
+ "id": "26",
+ "text": "东乡族",
+ "value": "Dongxiang"
+ },
+ {
+ "id": "27",
+ "text": "纳西族",
+ "value": "Naxi"
+ },
+ {
+ "id": "28",
+ "text": "景颇族",
+ "value": "Jingpo"
+ },
+ {
+ "id": "29",
+ "text": "柯尔克孜族",
+ "value": "Kirghiz"
+ },
+ {
+ "id": "30",
+ "text": "土族",
+ "value": "Tu"
+ },
+ {
+ "id": "31",
+ "text": "达斡尔族",
+ "value": "Daur"
+ },
+ {
+ "id": "32",
+ "text": "仫佬族",
+ "value": "Mulam"
+ },
+ {
+ "id": "33",
+ "text": "羌族",
+ "value": "Qiang"
+ },
+ {
+ "id": "34",
+ "text": "布朗族",
+ "value": "Blang"
+ },
+ {
+ "id": "35",
+ "text": "撒拉族",
+ "value": "Salar"
+ },
+ {
+ "id": "36",
+ "text": "毛南族",
+ "value": "Maonan"
+ },
+ {
+ "id": "37",
+ "text": "仡佬族",
+ "value": "Gelao"
+ },
+ {
+ "id": "38",
+ "text": "锡伯族",
+ "value": "Xibe"
+ },
+ {
+ "id": "39",
+ "text": "阿昌族",
+ "value": "Achang"
+ },
+ {
+ "id": "40",
+ "text": "普米族",
+ "value": "Pumi"
+ },
+ {
+ "id": "41",
+ "text": "塔吉克族",
+ "value": "Tajik"
+ },
+ {
+ "id": "42",
+ "text": "怒族",
+ "value": "Nu"
+ },
+ {
+ "id": "43",
+ "text": "乌孜别克族",
+ "value": "Uzbek"
+ },
+ {
+ "id": "44",
+ "text": "俄罗斯族",
+ "value": "Russian"
+ },
+ {
+ "id": "45",
+ "text": "鄂温克族",
+ "value": "Evenki"
+ },
+ {
+ "id": "46",
+ "text": "崩龙族(得昂族)",
+ "value": "Bumloon"
+ },
+ {
+ "id": "47",
+ "text": "保安族",
+ "value": "Bonan"
+ },
+ {
+ "id": "48",
+ "text": "裕固族",
+ "value": "Yugur"
+ },
+ {
+ "id": "49",
+ "text": "京族",
+ "value": "Gin"
+ },
+ {
+ "id": "50",
+ "text": "塔塔尔族",
+ "value": "Tatar"
+ },
+ {
+ "id": "51",
+ "text": "独龙族",
+ "value": "Drung"
+ },
+ {
+ "id": "52",
+ "text": "鄂伦春族",
+ "value": "Oroqin"
+ },
+ {
+ "id": "53",
+ "text": "赫哲族",
+ "value": "Hezhen"
+ },
+ {
+ "id": "54",
+ "text": "门巴族",
+ "value": "Menba"
+ },
+ {
+ "id": "55",
+ "text": "珞巴族",
+ "value": "Lhobo"
+ },
+ {
+ "id": "56",
+ "text": "基诺族",
+ "value": "Jino"
+ }
+]
diff --git a/src/views/resource/person/register/component/basic.vue b/src/views/resource/person/register/component/basic.vue
index 6a090d7..c25b424 100644
--- a/src/views/resource/person/register/component/basic.vue
+++ b/src/views/resource/person/register/component/basic.vue
@@ -1,15 +1,23 @@
-
+
-
-
+
-
-
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -195,9 +304,8 @@
-
-
-
+
+
@@ -209,8 +317,8 @@
-
-
+
+
@@ -261,7 +369,11 @@
-
+
+
+ 年
+
+
-
+
-
+
-
+
-
+
+
+
+
+
diff --git a/src/views/resource/person/register/detail.vue b/src/views/resource/person/register/detail.vue
index e822772..f6abb88 100644
--- a/src/views/resource/person/register/detail.vue
+++ b/src/views/resource/person/register/detail.vue
@@ -11,6 +11,7 @@
const $route = useRoute()
const $router = useRouter()
const title = ref('')
+const operation = ref('')
const radioItems = ref([
{ name: '基本信息', value: 'register-basic' },
@@ -21,7 +22,11 @@
{ name: '训练情况', value: 'register-trainning' },
])
const current = ref('register-basic')
-const operation = ref('')
+
+const staffId = ref('')
+
+// 子组件的引用
+const refRegisterBasic = ref()
// 逻辑
// 重置各个子组件的表单内容
@@ -37,18 +42,38 @@
resetFormData()
}
+// 保存
+const saveForm = () => {
+ switch (current.value) {
+ case 'register-basic':
+ refRegisterBasic.value.saveBasicForm()
+ break
+ }
+}
+
// 弹窗初始化
const initDialog = (row: any) => {
operation.value = row.operation
- if (row.operation === 'create') {
- title.value = '人员登记(新增)'
+ switch (row.operation) {
+ case 'create' :
+ title.value = '人员登记(新增)'
+ break
+ case 'update':
+ title.value = '人员登记(编辑)'
+ break
+ case 'detail':
+ title.value = '人员登记(详情)'
+ break
+ default:
+ title.value = ''
+ break
}
- else if (row.operation === 'update') {
- title.value = '人员登记(编辑)'
- }
- else if (row.operation === 'detail') {
- title.value = '人员登记(详情)'
- }
+}
+
+const getStaffId = (id: string) => {
+ console.log('from child comp...', id)
+ staffId.value = id
+ console.log(staffId.value)
}
onMounted(() => {
@@ -60,7 +85,7 @@
-
+
保存
@@ -72,7 +97,7 @@
-
+
diff --git a/src/views/resource/person/register/list.vue b/src/views/resource/person/register/list.vue
index 6e4fdd0..3006886 100644
--- a/src/views/resource/person/register/list.vue
+++ b/src/views/resource/person/register/list.vue
@@ -143,4 +143,3 @@
-@/api/resource/register
diff --git a/src/api/resource/register.ts b/src/api/resource/register.ts
index 1327460..da6a8ca 100644
--- a/src/api/resource/register.ts
+++ b/src/api/resource/register.ts
@@ -8,3 +8,11 @@
data,
})
}
+
+export function addStaffBasic(data: object) {
+ return request({
+ url: `${prefix}/base/add`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/assets/json/nation-code.json b/src/assets/json/nation-code.json
new file mode 100644
index 0000000..1aed5ec
--- /dev/null
+++ b/src/assets/json/nation-code.json
@@ -0,0 +1,282 @@
+[
+ {
+ "id": "01",
+ "text": "汉族",
+ "value": "Han"
+ },
+ {
+ "id": "02",
+ "text": "壮族",
+ "value": "Zhuang"
+ },
+ {
+ "id": "03",
+ "text": "回族",
+ "value": "Hui"
+ },
+ {
+ "id": "04",
+ "text": "藏族",
+ "value": "Tibetan"
+ },
+ {
+ "id": "05",
+ "text": "维吾尔族",
+ "value": "Uighur "
+ },
+ {
+ "id": "06",
+ "text": "苗族",
+ "value": "Miao"
+ },
+ {
+ "id": "07",
+ "text": "彝族",
+ "value": "Yi"
+ },
+ {
+ "id": "08",
+ "text": "蒙古族",
+ "value": "Mongol"
+ },
+ {
+ "id": "09",
+ "text": "布依族",
+ "value": "Buyi"
+ },
+ {
+ "id": "10",
+ "text": "朝鲜族",
+ "value": "Korean"
+ },
+ {
+ "id": "11",
+ "text": "满族",
+ "value": "Manchu"
+ },
+ {
+ "id": "12",
+ "text": "侗族",
+ "value": "Dong"
+ },
+ {
+ "id": "13",
+ "text": "瑶族",
+ "value": "Yao"
+ },
+ {
+ "id": "14",
+ "text": "白族",
+ "value": "Bai"
+ },
+ {
+ "id": "15",
+ "text": "土家族",
+ "value": "Tujia"
+ },
+ {
+ "id": "16",
+ "text": "哈尼族",
+ "value": "Hani"
+ },
+ {
+ "id": "17",
+ "text": "哈萨克族",
+ "value": "Kazakh"
+ },
+ {
+ "id": "18",
+ "text": "傣族",
+ "value": "Dai"
+ },
+ {
+ "id": "19",
+ "text": "黎族",
+ "value": "Li"
+ },
+ {
+ "id": "20",
+ "text": "傈僳族",
+ "value": "Lisu"
+ },
+ {
+ "id": "21",
+ "text": "佤族",
+ "value": "Wa"
+ },
+ {
+ "id": "22",
+ "text": "畲族",
+ "value": "She"
+ },
+ {
+ "id": "23",
+ "text": "高山族",
+ "value": "Gaoshan"
+ },
+ {
+ "id": "24",
+ "text": "拉祜族",
+ "value": "Lahu"
+ },
+ {
+ "id": "25",
+ "text": "水族",
+ "value": "Shui"
+ },
+ {
+ "id": "26",
+ "text": "东乡族",
+ "value": "Dongxiang"
+ },
+ {
+ "id": "27",
+ "text": "纳西族",
+ "value": "Naxi"
+ },
+ {
+ "id": "28",
+ "text": "景颇族",
+ "value": "Jingpo"
+ },
+ {
+ "id": "29",
+ "text": "柯尔克孜族",
+ "value": "Kirghiz"
+ },
+ {
+ "id": "30",
+ "text": "土族",
+ "value": "Tu"
+ },
+ {
+ "id": "31",
+ "text": "达斡尔族",
+ "value": "Daur"
+ },
+ {
+ "id": "32",
+ "text": "仫佬族",
+ "value": "Mulam"
+ },
+ {
+ "id": "33",
+ "text": "羌族",
+ "value": "Qiang"
+ },
+ {
+ "id": "34",
+ "text": "布朗族",
+ "value": "Blang"
+ },
+ {
+ "id": "35",
+ "text": "撒拉族",
+ "value": "Salar"
+ },
+ {
+ "id": "36",
+ "text": "毛南族",
+ "value": "Maonan"
+ },
+ {
+ "id": "37",
+ "text": "仡佬族",
+ "value": "Gelao"
+ },
+ {
+ "id": "38",
+ "text": "锡伯族",
+ "value": "Xibe"
+ },
+ {
+ "id": "39",
+ "text": "阿昌族",
+ "value": "Achang"
+ },
+ {
+ "id": "40",
+ "text": "普米族",
+ "value": "Pumi"
+ },
+ {
+ "id": "41",
+ "text": "塔吉克族",
+ "value": "Tajik"
+ },
+ {
+ "id": "42",
+ "text": "怒族",
+ "value": "Nu"
+ },
+ {
+ "id": "43",
+ "text": "乌孜别克族",
+ "value": "Uzbek"
+ },
+ {
+ "id": "44",
+ "text": "俄罗斯族",
+ "value": "Russian"
+ },
+ {
+ "id": "45",
+ "text": "鄂温克族",
+ "value": "Evenki"
+ },
+ {
+ "id": "46",
+ "text": "崩龙族(得昂族)",
+ "value": "Bumloon"
+ },
+ {
+ "id": "47",
+ "text": "保安族",
+ "value": "Bonan"
+ },
+ {
+ "id": "48",
+ "text": "裕固族",
+ "value": "Yugur"
+ },
+ {
+ "id": "49",
+ "text": "京族",
+ "value": "Gin"
+ },
+ {
+ "id": "50",
+ "text": "塔塔尔族",
+ "value": "Tatar"
+ },
+ {
+ "id": "51",
+ "text": "独龙族",
+ "value": "Drung"
+ },
+ {
+ "id": "52",
+ "text": "鄂伦春族",
+ "value": "Oroqin"
+ },
+ {
+ "id": "53",
+ "text": "赫哲族",
+ "value": "Hezhen"
+ },
+ {
+ "id": "54",
+ "text": "门巴族",
+ "value": "Menba"
+ },
+ {
+ "id": "55",
+ "text": "珞巴族",
+ "value": "Lhobo"
+ },
+ {
+ "id": "56",
+ "text": "基诺族",
+ "value": "Jino"
+ }
+]
diff --git a/src/views/resource/person/register/component/basic.vue b/src/views/resource/person/register/component/basic.vue
index 6a090d7..c25b424 100644
--- a/src/views/resource/person/register/component/basic.vue
+++ b/src/views/resource/person/register/component/basic.vue
@@ -1,15 +1,23 @@
-
+
-
-
+
-
-
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -195,9 +304,8 @@
-
-
-
+
+
@@ -209,8 +317,8 @@
-
-
+
+
@@ -261,7 +369,11 @@
-
+
+
+ 年
+
+
-
+
-
+
-
+
-
+
+
+
+
+
diff --git a/src/views/resource/person/register/detail.vue b/src/views/resource/person/register/detail.vue
index e822772..f6abb88 100644
--- a/src/views/resource/person/register/detail.vue
+++ b/src/views/resource/person/register/detail.vue
@@ -11,6 +11,7 @@
const $route = useRoute()
const $router = useRouter()
const title = ref('')
+const operation = ref('')
const radioItems = ref([
{ name: '基本信息', value: 'register-basic' },
@@ -21,7 +22,11 @@
{ name: '训练情况', value: 'register-trainning' },
])
const current = ref('register-basic')
-const operation = ref('')
+
+const staffId = ref('')
+
+// 子组件的引用
+const refRegisterBasic = ref()
// 逻辑
// 重置各个子组件的表单内容
@@ -37,18 +42,38 @@
resetFormData()
}
+// 保存
+const saveForm = () => {
+ switch (current.value) {
+ case 'register-basic':
+ refRegisterBasic.value.saveBasicForm()
+ break
+ }
+}
+
// 弹窗初始化
const initDialog = (row: any) => {
operation.value = row.operation
- if (row.operation === 'create') {
- title.value = '人员登记(新增)'
+ switch (row.operation) {
+ case 'create' :
+ title.value = '人员登记(新增)'
+ break
+ case 'update':
+ title.value = '人员登记(编辑)'
+ break
+ case 'detail':
+ title.value = '人员登记(详情)'
+ break
+ default:
+ title.value = ''
+ break
}
- else if (row.operation === 'update') {
- title.value = '人员登记(编辑)'
- }
- else if (row.operation === 'detail') {
- title.value = '人员登记(详情)'
- }
+}
+
+const getStaffId = (id: string) => {
+ console.log('from child comp...', id)
+ staffId.value = id
+ console.log(staffId.value)
}
onMounted(() => {
@@ -60,7 +85,7 @@
-
+
保存
@@ -72,7 +97,7 @@
-
+
diff --git a/src/views/resource/person/register/list.vue b/src/views/resource/person/register/list.vue
index 6e4fdd0..3006886 100644
--- a/src/views/resource/person/register/list.vue
+++ b/src/views/resource/person/register/list.vue
@@ -143,4 +143,3 @@
-@/api/resource/register
diff --git a/src/views/resource/person/register/person-regitster.ts b/src/views/resource/person/register/person-regitster.ts
index 0388a5c..dd23d17 100644
--- a/src/views/resource/person/register/person-regitster.ts
+++ b/src/views/resource/person/register/person-regitster.ts
@@ -25,6 +25,7 @@
recordDate: string
officerNo: string
gender: string
+ genderName: string
graduationDate: string
nation: string
degree: string