-
-
+
+
{{ scope.row.name }}
- {{ scope.row.cert_type }}
+ {{ scope.row.cert_field.fullname }}
{{ scope.row.pv_scope.fullname }}
@@ -99,11 +100,15 @@
diff --git a/client/src/views/implementrule/implementrulecreate.vue b/client/src/views/implementrule/implementrulecreate.vue
index 3bb2798..057d112 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 dd1767b..ceae635 100644
--- a/client/src/views/implementrule/implementruleupdate.vue
+++ b/client/src/views/implementrule/implementruleupdate.vue
@@ -5,21 +5,10 @@
-
-
-
-
+
+
@@ -63,7 +52,7 @@
-
+
-
+
-
+
-
+
@@ -151,7 +140,7 @@ export default {
upHeaders: upHeaders(),
upUrl: upUrl(),
formData: {
- cert_type: undefined,
+ cert_field: undefined,
code: undefined,
name: undefined,
pv_scope: undefined,
@@ -159,7 +148,7 @@ export default {
ccc_list: undefined
},
rules: {
- cert_type: [
+ cert_field: [
{
required: true,
message: "请选择认证类型",
@@ -191,20 +180,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,7 +190,7 @@ export default {
},
computed: {},
watch: {
- "formData.cert_type": "changeRules"
+ // "formData.cert_field": "changeRules"
},
created() {
this.formData.id = this.$route.query.id; //接收参数
@@ -222,9 +199,14 @@ export default {
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);
@@ -235,8 +217,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,
@@ -252,7 +234,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 +253,7 @@ export default {
getRule() {
getImplementRule(this.formData.id).then(response => {
this.formData = response.data;
+ this.cert_field_code = response.data.cert_field_.code
});
},
getPvscope() {
@@ -287,6 +270,13 @@ export default {
}
});
},
+ getCerttype() {
+ getDictList({ type__code: "cert_field" }).then(response => {
+ if (response.data) {
+ this.cert_fieldOptions = genTree(response.data);
+ }
+ });
+ },
getCccList() {
getDictList({ type__code: "ccc_list" }).then(response => {
if (response.data) {
diff --git a/client/src/views/implementrule/unittype.vue b/client/src/views/implementrule/unittype.vue
index 14b2de7..d1e4838 100644
--- a/client/src/views/implementrule/unittype.vue
+++ b/client/src/views/implementrule/unittype.vue
@@ -140,11 +140,7 @@ export default {
},
handleDelete(scope){
deleteUnitType(scope.row.id).then(res=>{
- this.$notify({
- title: '成功',
- type: 'success',
- duration: 2000
- })
+ this.$message.success('成功')
this.getList()
})
},
@@ -163,21 +159,13 @@ handleDelete(scope){
updateUnitType(this.unittype.id, this.unittype).then(() => {
this.getList()
this.dialogVisible = false
- this.$notify({
- title: '成功',
- type: 'success',
- duration: 2000
- })
+ this.$message.success('成功')
})
} else {
createUnitType(this.unittype).then(res => {
this.getList()
this.dialogVisible = false
- this.$notify({
- title: '成功',
- type: 'success',
- duration: 2000
- })
+ this.$message.success('成功')
})
}
} else {
diff --git a/client/src/views/standard/standard.vue b/client/src/views/standard/standard.vue
index 8f602d4..306c0b0 100644
--- a/client/src/views/standard/standard.vue
+++ b/client/src/views/standard/standard.vue
@@ -273,22 +273,14 @@ export default {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false
- this.$notify({
- title: "成功",
- message: "编辑成功",
- type: "success",
- duration: 2000
- });
+ this.$message.success('成功')
}
});
} else {
createStandard(this.standard).then(res => {
this.getList();
this.dialogVisible = false
- this.$notify({
- title: "成功",
- type: "success",
- })
+ this.$message.success('成功')
}).catch(error=>{})
}
diff --git a/client/src/views/system/dict.vue b/client/src/views/system/dict.vue
index bc92719..c9610ba 100644
--- a/client/src/views/system/dict.vue
+++ b/client/src/views/system/dict.vue
@@ -63,23 +63,23 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
-
+
{{ scope.row.code }}
-
+
{{ scope.row.name }}
-
+
{{ scope.row.description }}
-
+
无效
有效
-
+