| | |
| | | prop: "publicFlag", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | // search: true, |
| | | // cascader: ["communityCode"], |
| | | type: "select", |
| | | dicData: [{ |
| | |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | editDisplay: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{rotationRange}}`, |
| | | formslot: true, |
| | |
| | | watch: { |
| | | 'form.publicFlag': { |
| | | handler(newData) { |
| | | // console.log('** ** ** ** ** ** **', newData) |
| | | const column = this.findObject(this.option.column, "rotationRange") |
| | | if (newData == 1) { |
| | | column.editDisplay = true |
| | | } else { |
| | | column.editDisplay = false |
| | | } |
| | | |
| | | const column2 = this.findObject(this.option.column, "articleId") |
| | | if (newData == 1) { |
| | | column2.editDisplay = true |
| | | } else { |
| | | column2.editDisplay = false |
| | | } |
| | | |
| | | }, |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | if (row.rotationRange) { |
| | | row.rotationRange = JSON.stringify(row.rotationRange) |
| | | } |
| | | if (row.publicFlag == 2) { |
| | | row.rotationRange = [] |
| | | row.rotationRange = JSON.stringify(row.rotationRange) |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.rotationRange) { |
| | | row.rotationRange = JSON.stringify(row.rotationRange) |
| | | } |
| | | if (row.publicFlag == 2) { |
| | | row.rotationRange = [] |
| | | row.rotationRange = JSON.stringify(row.rotationRange) |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | if (["edit", "view"].includes(type)) { |
| | | getRotation(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | | if (this.form.rotationRange) { |
| | | this.form.rotationRange = JSON.parse(this.form.rotationRange) |
| | | } |
| | | if (this.form.url.length > 0) { |
| | | var urls = [] |
| | | var names = this.form.url.split(",") |
| | |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | if (item.rotationRange) { |
| | | item.rotationRange = JSON.parse(item.rotationRange) |
| | | } |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |