diff --git a/src/api/modular/main/CommondbCodeCountry.js b/src/api/modular/main/CommondbCodeCountry.js
index 3e8e9f0..89f62ec 100644
--- a/src/api/modular/main/CommondbCodeCountry.js
+++ b/src/api/modular/main/CommondbCodeCountry.js
@@ -7,7 +7,7 @@ import { axios } from '@/utils/request'
*/
export function CommondbCodeCountryList(parameter) {
return axios({
- url: '/commondb/code-country-list',
+ url: '/api/commondb/code-country-list',
method: 'post',
params: parameter
})
diff --git a/src/views/main/CommondbCodeCountry/addForm.vue b/src/views/main/CommondbCodeCountry/addForm.vue
index 0206cfe..a86103d 100644
--- a/src/views/main/CommondbCodeCountry/addForm.vue
+++ b/src/views/main/CommondbCodeCountry/addForm.vue
@@ -98,6 +98,10 @@ export default {
},
mounted() {},
methods: {
+ // 初始化方法
+ add(record) {
+ this.visible = true
+ },
/**
* 提交表单
*/
diff --git a/src/views/main/CommondbCodeCountry/editForm.vue b/src/views/main/CommondbCodeCountry/editForm.vue
index a2b5bd4..6de0745 100644
--- a/src/views/main/CommondbCodeCountry/editForm.vue
+++ b/src/views/main/CommondbCodeCountry/editForm.vue
@@ -51,18 +51,19 @@
-
-
+
+
+
+
+
+
-
-
-
-
-
@@ -77,15 +78,15 @@ export default {
TypeData: [],
labelCol: {
xs: { span: 24 },
- sm: { span: 7 }
+ sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
- sm: { span: 15 }
+ sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
- sm: { span: 4 }
+ sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
@@ -93,12 +94,29 @@ export default {
},
visible: false,
confirmLoading: false,
- form: this.$form.createForm(this),
- data: {}
+ form: this.$form.createForm(this)
}
},
mounted() {},
methods: {
+ // 初始化方法
+ edit(record) {
+ this.data = record
+ console.log(record)
+ this.visible = true
+ setTimeout(() => {
+ this.form.setFieldsValue({
+ code: record.code,
+ enName: record.enName,
+ cnName: record.cnName,
+ capital: record.capital,
+ continent: record.continent,
+ description: record.description,
+ remark: record.remark
+ })
+ console.log(this.form.getFieldsValue())
+ }, 100)
+ },
handleSubmit() {
const {
form: { validateFields }
diff --git a/src/views/main/CommondbCodeCountry/index.vue b/src/views/main/CommondbCodeCountry/index.vue
index 7217604..bb35e71 100644
--- a/src/views/main/CommondbCodeCountry/index.vue
+++ b/src/views/main/CommondbCodeCountry/index.vue
@@ -10,7 +10,7 @@
-
+
+
+
+
+
@@ -45,7 +50,7 @@
-
+
@@ -68,7 +74,6 @@