Commit f4f9f033 authored by 孙浩's avatar 孙浩

标签管理修改时params非空校验

parent 4fa0e9d9
......@@ -359,7 +359,7 @@ export default {
getIncomeWmsLabel(id).then(response => {
this.form = response.data
console.log(this.form)
if (this.form.params !== null && this.form.params !== undefined) {
if (this.form.params !== null && this.form.params !== undefined && this.form.params !== '') {
this.paramsItems = []
const obj = JSON.parse(this.form.params)
for (const key in obj) {
......@@ -396,7 +396,7 @@ export default {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.paramsItems.length === 1 && this.paramsItems[0].key === '') {
this.form.params = undefined
this.form.params = null
} else {
this.form.params = JSON.stringify(this.paramsItems.reduce((obj, item) => {
if (item.key !== null && item.key !== '') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment