取消
确认
@@ -106,18 +107,20 @@ export default {
props:['enterprise'],
data() {
return {
- addressData: {
+ addressData: {
id: null,
address: null,
eaddress: null,
code: null,
type: null,
county_code: null,
- enterprise:this.enterprise
+ enterprise: this.enterprise,
+ country_code:null,
},
addressList: [],
listLoading: true,
-
+ dialogVisible:false,
+ dialogType:'create',
rule1: {
},
@@ -144,14 +147,13 @@ export default {
value: "注册地址"
}
],
- dialogVisible:false,
- dialogType:'create',
+
};
},
created() {
this.getList(),
- this. getcountrytype()
+ this.getcountrytype()
},
methods: {
checkPermission,
@@ -160,8 +162,9 @@ export default {
this.listLoading = true;
getAddressList({ enterprise: this.enterprise }).then(response => {
if (response.data) {
- this.addressList = response.data
- console.log(response.data)
+ this.addressList = response.data;
+
+
}
this.listLoading = false
});
@@ -170,22 +173,40 @@ export default {
getDictList({ type__code: "world_regions" }).then(response => {
this.country_Options = genTree(response.data);
});
- this.getValue()
-
- },
-
- getValue() {
-
- if (this.addressData.country_code == 69) {
- getDictList({ type__code: "china_regions" }).then(response => {
+ getDictList({ type__code: "china_regions" }).then(response => {
this.countyOptions = genTree(response.data);
});
- }
- else
- this.countyOptions = '';
+ },
+
+
+ getValue() {
+
+ if (this.addressData.country_code == 69) {
+ getDictList({ type__code: "china_regions" }).then(response => {
+ this.countyOptions = genTree(response.data);
+ });
+ }
+ else {
+ this.countyOptions = "";
+ }
+
+
+
+
},
handleCreate() {
-
+ this.addressData= {
+ id: null,
+ address: null,
+ eaddress: null,
+ code: null,
+ type: null,
+ county_code: null,
+ enterprise: this.enterprise,
+ country_code: null
+
+
+ },
this.dialogType = 'create'
this.dialogVisible = true
this.$nextTick(() => {
@@ -232,7 +253,7 @@ handleDelete(scope){
if (valid) {
const isEdit = this.dialogType === 'update'
if (isEdit) {
- this.addressData.county_code=this.addressData.county_code[2]
+ this.addressData.county_code=this.addressData.countyarry[2]
updateAddress(this.addressData.id, this.addressData).then(() => {
this.getList()
this.dialogVisible = false
@@ -243,8 +264,9 @@ handleDelete(scope){
})
})
} else {
- this.addressData.county_code=this.addressData.county_code[2]
- console.log(this.addressData)
+
+ this.addressData.county_code=this.addressData.countyarry[2]
+
createAddress(this.addressData).then(res => {
this.getList()
this.dialogVisible = false
diff --git a/client/src/views/implementrule/implementrule.vue b/client/src/views/implementrule/implementrule.vue
index e12b7e0..687531f 100644
--- a/client/src/views/implementrule/implementrule.vue
+++ b/client/src/views/implementrule/implementrule.vue
@@ -1,8 +1,9 @@
-
-
+
+
{{ scope.row.name }}
- {{ scope.row.cert_type }}
+ {{ scope.row.cert_field.fullname }}
{{ scope.row.pv_scope.fullname }}
@@ -105,11 +106,15 @@
diff --git a/client/src/views/implementrule/implementrulecreate.vue b/client/src/views/implementrule/implementrulecreate.vue
index e99a117..19452a4 100644
--- a/client/src/views/implementrule/implementrulecreate.vue
+++ b/client/src/views/implementrule/implementrulecreate.vue
@@ -5,21 +5,10 @@
-
-
-
-
+
+
@@ -63,7 +52,7 @@
-
+
-
+
-
+
-
+
@@ -151,7 +140,8 @@ export default {
upHeaders: upHeaders(),
upUrl: upUrl(),
formData: {
- cert_type: undefined,
+ id:null,
+ cert_field: undefined,
code: undefined,
name: undefined,
pv_scope: undefined,
@@ -159,7 +149,7 @@ export default {
ccc_list: undefined
},
rules: {
- cert_type: [
+ cert_field: [
{
required: true,
message: "请选择认证类型",
@@ -191,20 +181,8 @@ export default {
pv_class: [],
ccc_list: []
},
- cert_typeOptions: [
- {
- label: "自愿性产品认证",
- value: "pv"
- },
- {
- label: "强制性产品认证",
- value: "ccc"
- },
- {
- label: "管理体系认证",
- value: "sys"
- }
- ],
+ cert_fieldOptions: [],
+ cert_field_code:null,
pv_scopeOptions: [],
pv_classOptions: [],
ccc_listOptions: [],
@@ -213,16 +191,21 @@ export default {
},
computed: {},
watch: {
- "formData.cert_type": "changeRules"
+ // "formData.cert_field": "changeRules"
},
created() {
this.getPvscope();
this.getPvclass();
this.getCccList();
this.getCertpattern();
+ this.getCerttype();
},
mounted() {},
methods: {
+ typeChange(node,id){
+ this.cert_field_code = node.code
+ this.changeRules(node.code)
+ },
handlePreview(file) {
if ("url" in file) {
window.open(file.url);
@@ -233,8 +216,8 @@ export default {
handleSuccess(response, file, fileList) {
this.formData.path = response.data.path;
},
- changeRules() {
- if (this.formData.cert_type == "pv") {
+ changeRules(val) {
+ if (val == "pv") {
this.rules.pv_scope = [
{
required: true,
@@ -250,7 +233,7 @@ export default {
}
];
this.rules.ccc_list = [];
- } else if (this.formData.cert_type == "ccc") {
+ } else if (val == "ccc") {
this.rules.ccc_list = [
{
required: true,
@@ -271,6 +254,13 @@ export default {
this.formData = response.data;
});
},
+ getCerttype() {
+ getDictList({ type__code: "cert_field" }).then(response => {
+ if (response.data) {
+ this.cert_fieldOptions = genTree(response.data);
+ }
+ });
+ },
getPvscope() {
getDictList({ type__code: "pv_scope" }).then(response => {
if (response.data) {
@@ -304,10 +294,8 @@ export default {
if (!valid) return;
// TODO 提交表单
createImplementRule(this.formData).then(response => {
- this.$message({
- type: 'success',
- message: '成功!'
- })
+ this.$message.success('成功')
+ this.formData.id = response.data.id
});
});
},
diff --git a/client/src/views/implementrule/implementruleupdate.vue b/client/src/views/implementrule/implementruleupdate.vue
index 1cc8eb5..48ad3ea 100644
--- a/client/src/views/implementrule/implementruleupdate.vue
+++ b/client/src/views/implementrule/implementruleupdate.vue
@@ -1,133 +1,129 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 点击上传
-
-
-
-
-
- 保存
- 保存并继续单元划分
- 重置
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 点击上传
+
+
+
+
+
+ 保存
+ 重置
+
+
+
+
+
+
+
+
+