| | |
| | | <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row)"> |
| | | 参与用户 |
| | | </el-button> |
| | | <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)"> |
| | | <!-- <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)"> |
| | | 撤销 |
| | | </el-button> |
| | | <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)"> |
| | | </el-button> --> |
| | | <!-- <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)"> |
| | | 发布 |
| | | </el-button> |
| | | </el-button> --> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row, size }" slot="publish"> |
| | |
| | | </template> |
| | | |
| | | <template slot-scope="{ row, size }" slot="iscomment"> |
| | | <el-tag :size="size" :type="showStatus(row.iscomment, 2).type" v-text="showStatus(row.iscomment, 2).text"> |
| | | </el-tag> |
| | | <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: false, |
| | |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入文章标题", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "文章范围", |
| | | prop: "articleList", |
| | | span: 12, |
| | | minRows: 2, |
| | | type: "tree", |
| | | multiple: true, |
| | | dataType: "string", |
| | | tags: true, |
| | | dicData: [], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择文章范围", |
| | | trigger: "blur", |
| | | }, ], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | // hide: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "文章范围", |
| | | prop: "articleList", |
| | | span: 12, |
| | | minRows: 2, |
| | | type: "cascader", |
| | | multiple: true, |
| | | tags: true, |
| | | dicData: [], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择文章范围", |
| | | trigger: "blur", |
| | | }, ], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | hide: true, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "文章类型", |
| | |
| | | searchSpan: 4, |
| | | value: 3, |
| | | slot: true, |
| | | search: true, |
| | | // search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | |
| | | value: 3, // // 类型 0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查 |
| | | }], |
| | | }, |
| | | { |
| | | label: "发布时间", |
| | | prop: "dateTime", |
| | | type: "daterange", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchSpan: 6, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | // { |
| | | // label: "发布时间", |
| | | // prop: "dateTime", |
| | | // type: "daterange", |
| | | // format: "yyyy-MM-dd", |
| | | // valueFormat: "yyyy-MM-dd", |
| | | // searchSpan: 6, |
| | | // searchRange: true, |
| | | // hide: true, |
| | | // addDisplay: false, |
| | | // editDisplay: false, |
| | | // viewDisplay: false, |
| | | // search: true, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择发布时间", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | width: 100, |
| | | label: "发布时间", |
| | |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | editDisplay: false, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | searchSpan: 4, |
| | | value: "0", |
| | | value: "1", |
| | | slot: true, |
| | | search: true, |
| | | hide: true, |
| | | // search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | slot: true, |
| | | type: "select", |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | iscommentInput(e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | openUserPopup(row) { |
| | | this.$refs.publicSignUpChild.openUser(row) |
| | |
| | | // row.videoUrl = ""; |
| | | // } |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | row.articleRange = row.articleList |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | row.articleRange = row.articleList |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | }) |
| | | data.url = urls.join(",") |
| | | } |
| | | data.articleList = JSON.parse(data.articleRange) |
| | | data.articleList = data.articleRange |
| | | this.form = data |
| | | }) |
| | | } |
| | |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | item.articleList = item.articleRange |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree(params = {}).then((res) => { |
| | | getDistrictTree(params = { |
| | | filterFlag: 1 |
| | | }).then((res) => { |
| | | const data = res.data.data |
| | | this.districtTree = data |
| | | const column = this.findObject(this.option.column, "articleList") |