diff --git a/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue b/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue index 4179b70..9b17937 100644 --- a/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue +++ b/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue @@ -7,27 +7,37 @@ append-to-body @close="close" > - +
- +
- +
- +
- - 保存 - - + 保存 + 取消 @@ -56,7 +64,7 @@ // import { Message } from 'element-ui' // import { C_add,C_list,C_update,detail } from "../../../api/product/category" // import { getCertification } from '../../../api/systemNew/systemNew' -import { add, update } from '../../../../api/system/certification' +import { add, update } from "../../../../api/system/certification"; export default { components: { // inputVue, @@ -68,57 +76,55 @@ props: { isShowInfo: { type: Boolean, - default: true + default: true, }, dataInfo: { - type: Object + type: Object, }, - title: '' + title: "", }, data() { return { // 品类信息 cerInfo: { - qualifyName: '', - qualifyDesc: '', - proveMaterialDesc: '', - remark: '' + qualifyName: "", + qualifyDesc: "", + proveMaterialDesc: "", + remark: "", }, categoryList: [], // 资质列表 certificationList: [], rules: { - empty: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } - ], + empty: [{ required: true, message: "此内容不能为空", trigger: "blur" }], qualifyDesc: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } + { required: true, message: "此内容不能为空", trigger: "blur" }, ], proveMaterialDesc: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } - ] - } - } + { required: true, message: "此内容不能为空", trigger: "blur" }, + ], + }, + }; }, watch: { dataInfo: { handler(vla) { - if (vla != '') { + if (vla != "") { // 编辑操作 - if (!vla.id) return - this.cerInfo.id = vla.id - this.cerInfo.qualifyName = vla.qualifyName - this.cerInfo.qualifyDesc = vla.qualifyDesc - this.cerInfo.proveMaterialDesc = vla.proveMaterialDesc - this.cerInfo.remark = vla.remark + if (!vla.id) return; + this.cerInfo.id = vla.id; + this.cerInfo.qualifyName = vla.qualifyName; + this.cerInfo.qualifyDesc = vla.qualifyDesc; + this.cerInfo.proveMaterialDesc = vla.proveMaterialDesc; + this.cerInfo.remark = vla.remark; } else { - this.resetData() + this.resetData(); } }, deep: true, - immediate: true - } + immediate: true, + }, }, mounted() { // C_list().then((res) => { @@ -131,56 +137,58 @@ }, methods: { close() { - this.$emit('close') + this.$emit("close"); // 重置数据 // this.resetData() }, // 数据处理 save() { - if (this.title == '新增资质要求') { - add(this.cerInfo).then((res) => { - console.log(res, res != '') - if (res != '') { - this.$message({ - message: '保存成功', - type: 'success' - }) - this.close() - // 保存后刷新数据 - this.$emit('refresh') + console.log(this.$refs) + this.$refs.form.validate((valid) => { + if (valid) { + if (this.title == "新增资质要求") { + add(this.cerInfo).then((res) => { + console.log(res, res != ""); + this.$message({ + message: "保存成功", + type: "success", + }); + this.close(); + // 保存后刷新数据 + this.$emit("refresh"); + }); + } else { + update(this.cerInfo).then((res) => { + this.$message({ + message: "更新成功", + type: "success", + }); + this.close(); + // 保存后刷新数据 + this.$emit("refresh"); + }); } - }) - } else { - update(this.cerInfo).then((res) => { - if (res != '') { - this.$message({ - message: '更新成功', - type: 'success' - }) - this.close() - // 保存后刷新数据 - this.$emit('refresh') - } - }) - } + } else { + return false; + } + }); }, resetData() { this.cerInfo = { - qualifyName: '', - qualifyDesc: '', - proveMaterialDesc: '', - remark: '' - } - } - } -} + qualifyName: "", + qualifyDesc: "", + proveMaterialDesc: "", + remark: "", + }; + }, + }, +}; diff --git a/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue b/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue index 4179b70..9b17937 100644 --- a/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue +++ b/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue @@ -7,27 +7,37 @@ append-to-body @close="close" > - +
- +
- +
- +
- - 保存 - - + 保存 + 取消 @@ -56,7 +64,7 @@ // import { Message } from 'element-ui' // import { C_add,C_list,C_update,detail } from "../../../api/product/category" // import { getCertification } from '../../../api/systemNew/systemNew' -import { add, update } from '../../../../api/system/certification' +import { add, update } from "../../../../api/system/certification"; export default { components: { // inputVue, @@ -68,57 +76,55 @@ props: { isShowInfo: { type: Boolean, - default: true + default: true, }, dataInfo: { - type: Object + type: Object, }, - title: '' + title: "", }, data() { return { // 品类信息 cerInfo: { - qualifyName: '', - qualifyDesc: '', - proveMaterialDesc: '', - remark: '' + qualifyName: "", + qualifyDesc: "", + proveMaterialDesc: "", + remark: "", }, categoryList: [], // 资质列表 certificationList: [], rules: { - empty: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } - ], + empty: [{ required: true, message: "此内容不能为空", trigger: "blur" }], qualifyDesc: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } + { required: true, message: "此内容不能为空", trigger: "blur" }, ], proveMaterialDesc: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } - ] - } - } + { required: true, message: "此内容不能为空", trigger: "blur" }, + ], + }, + }; }, watch: { dataInfo: { handler(vla) { - if (vla != '') { + if (vla != "") { // 编辑操作 - if (!vla.id) return - this.cerInfo.id = vla.id - this.cerInfo.qualifyName = vla.qualifyName - this.cerInfo.qualifyDesc = vla.qualifyDesc - this.cerInfo.proveMaterialDesc = vla.proveMaterialDesc - this.cerInfo.remark = vla.remark + if (!vla.id) return; + this.cerInfo.id = vla.id; + this.cerInfo.qualifyName = vla.qualifyName; + this.cerInfo.qualifyDesc = vla.qualifyDesc; + this.cerInfo.proveMaterialDesc = vla.proveMaterialDesc; + this.cerInfo.remark = vla.remark; } else { - this.resetData() + this.resetData(); } }, deep: true, - immediate: true - } + immediate: true, + }, }, mounted() { // C_list().then((res) => { @@ -131,56 +137,58 @@ }, methods: { close() { - this.$emit('close') + this.$emit("close"); // 重置数据 // this.resetData() }, // 数据处理 save() { - if (this.title == '新增资质要求') { - add(this.cerInfo).then((res) => { - console.log(res, res != '') - if (res != '') { - this.$message({ - message: '保存成功', - type: 'success' - }) - this.close() - // 保存后刷新数据 - this.$emit('refresh') + console.log(this.$refs) + this.$refs.form.validate((valid) => { + if (valid) { + if (this.title == "新增资质要求") { + add(this.cerInfo).then((res) => { + console.log(res, res != ""); + this.$message({ + message: "保存成功", + type: "success", + }); + this.close(); + // 保存后刷新数据 + this.$emit("refresh"); + }); + } else { + update(this.cerInfo).then((res) => { + this.$message({ + message: "更新成功", + type: "success", + }); + this.close(); + // 保存后刷新数据 + this.$emit("refresh"); + }); } - }) - } else { - update(this.cerInfo).then((res) => { - if (res != '') { - this.$message({ - message: '更新成功', - type: 'success' - }) - this.close() - // 保存后刷新数据 - this.$emit('refresh') - } - }) - } + } else { + return false; + } + }); }, resetData() { this.cerInfo = { - qualifyName: '', - qualifyDesc: '', - proveMaterialDesc: '', - remark: '' - } - } - } -} + qualifyName: "", + qualifyDesc: "", + proveMaterialDesc: "", + remark: "", + }; + }, + }, +}; diff --git a/src/views/login/index_2.vue b/src/views/login/index_2.vue index ef21e99..d248ed1 100644 --- a/src/views/login/index_2.vue +++ b/src/views/login/index_2.vue @@ -53,7 +53,7 @@ - diff --git a/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue b/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue index 4179b70..9b17937 100644 --- a/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue +++ b/src/components/mycomponent/dialog/certification/certificationAddDlalog.vue @@ -7,27 +7,37 @@ append-to-body @close="close" > - +
- +
- +
- +
- - 保存 - - + 保存 + 取消 @@ -56,7 +64,7 @@ // import { Message } from 'element-ui' // import { C_add,C_list,C_update,detail } from "../../../api/product/category" // import { getCertification } from '../../../api/systemNew/systemNew' -import { add, update } from '../../../../api/system/certification' +import { add, update } from "../../../../api/system/certification"; export default { components: { // inputVue, @@ -68,57 +76,55 @@ props: { isShowInfo: { type: Boolean, - default: true + default: true, }, dataInfo: { - type: Object + type: Object, }, - title: '' + title: "", }, data() { return { // 品类信息 cerInfo: { - qualifyName: '', - qualifyDesc: '', - proveMaterialDesc: '', - remark: '' + qualifyName: "", + qualifyDesc: "", + proveMaterialDesc: "", + remark: "", }, categoryList: [], // 资质列表 certificationList: [], rules: { - empty: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } - ], + empty: [{ required: true, message: "此内容不能为空", trigger: "blur" }], qualifyDesc: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } + { required: true, message: "此内容不能为空", trigger: "blur" }, ], proveMaterialDesc: [ - { required: true, message: '此内容不能为空', trigger: 'blur' } - ] - } - } + { required: true, message: "此内容不能为空", trigger: "blur" }, + ], + }, + }; }, watch: { dataInfo: { handler(vla) { - if (vla != '') { + if (vla != "") { // 编辑操作 - if (!vla.id) return - this.cerInfo.id = vla.id - this.cerInfo.qualifyName = vla.qualifyName - this.cerInfo.qualifyDesc = vla.qualifyDesc - this.cerInfo.proveMaterialDesc = vla.proveMaterialDesc - this.cerInfo.remark = vla.remark + if (!vla.id) return; + this.cerInfo.id = vla.id; + this.cerInfo.qualifyName = vla.qualifyName; + this.cerInfo.qualifyDesc = vla.qualifyDesc; + this.cerInfo.proveMaterialDesc = vla.proveMaterialDesc; + this.cerInfo.remark = vla.remark; } else { - this.resetData() + this.resetData(); } }, deep: true, - immediate: true - } + immediate: true, + }, }, mounted() { // C_list().then((res) => { @@ -131,56 +137,58 @@ }, methods: { close() { - this.$emit('close') + this.$emit("close"); // 重置数据 // this.resetData() }, // 数据处理 save() { - if (this.title == '新增资质要求') { - add(this.cerInfo).then((res) => { - console.log(res, res != '') - if (res != '') { - this.$message({ - message: '保存成功', - type: 'success' - }) - this.close() - // 保存后刷新数据 - this.$emit('refresh') + console.log(this.$refs) + this.$refs.form.validate((valid) => { + if (valid) { + if (this.title == "新增资质要求") { + add(this.cerInfo).then((res) => { + console.log(res, res != ""); + this.$message({ + message: "保存成功", + type: "success", + }); + this.close(); + // 保存后刷新数据 + this.$emit("refresh"); + }); + } else { + update(this.cerInfo).then((res) => { + this.$message({ + message: "更新成功", + type: "success", + }); + this.close(); + // 保存后刷新数据 + this.$emit("refresh"); + }); } - }) - } else { - update(this.cerInfo).then((res) => { - if (res != '') { - this.$message({ - message: '更新成功', - type: 'success' - }) - this.close() - // 保存后刷新数据 - this.$emit('refresh') - } - }) - } + } else { + return false; + } + }); }, resetData() { this.cerInfo = { - qualifyName: '', - qualifyDesc: '', - proveMaterialDesc: '', - remark: '' - } - } - } -} + qualifyName: "", + qualifyDesc: "", + proveMaterialDesc: "", + remark: "", + }; + }, + }, +}; diff --git a/src/views/login/index_2.vue b/src/views/login/index_2.vue index ef21e99..d248ed1 100644 --- a/src/views/login/index_2.vue +++ b/src/views/login/index_2.vue @@ -53,7 +53,7 @@ - diff --git a/src/views/product/deviceList.vue b/src/views/product/deviceList.vue index feb9245..00602b6 100644 --- a/src/views/product/deviceList.vue +++ b/src/views/product/deviceList.vue @@ -27,21 +27,46 @@
SN码
- +
设备型号
- +
品牌
- - + +
设备状态
- + 是否绑定用户
- +
- + 查询 - + 重置 - + 一键解绑 - + 导出 - - 一键固件升级 - + 一键固件升级
- + - -