3 files modified
1 files added
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/save', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel" |
| | | v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" |
| | | :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="{row, size, index}"> |
| | | <el-button size="small" type="text" icon="el-icon-share" plain @click="share(row)">分享 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')" |
| | | v-text="textDispose(row, 'phoneflag', 'phone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="分享" append-to-body :visible.sync="sharePopup" center @close="popupClose"> |
| | | <div style="display: flex; justify-content: center; "> |
| | | <el-radio-group v-model="circleRadio"> |
| | | <el-radio :label="0">邻里圈</el-radio> |
| | | <el-radio :label="1">协同圈</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="sharePopup = false">取 消</el-button> |
| | | <el-button type="primary" @click="shareCircle()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | add, |
| | | getECallEvent |
| | | } from "@/api/task/eCall" |
| | | import { |
| | | add as circleAdd, |
| | | } from "@/api/circle/circle" |
| | | import { |
| | | getList as getHouseList, |
| | | getDetatil as getHouseDetail |
| | |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | sharePopup: false, |
| | | circleRadio: 0, |
| | | shareCircleRow: {}, |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | // searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | menuWidth: 310, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | rules: [ |
| | | { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | }], |
| | | } |
| | | ], |
| | | slot: true |
| | | }, |
| | | { |
| | |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | |
| | | share(row) { |
| | | console.table(row) |
| | | this.shareCircleRow = row |
| | | this.sharePopup = true |
| | | }, |
| | | // 分享圈子 |
| | | shareCircle() { |
| | | this.sharePopup = false |
| | | let param = {} |
| | | param.circleType = this.circleRadio |
| | | param.houseCode = this.shareCircleRow.addressCode |
| | | param.circleImages = this.shareCircleRow.imageUrls |
| | | param.communityCode = this.shareCircleRow.communityCode |
| | | param.circleText = this.shareCircleRow.remark |
| | | param.evenType = this.shareCircleRow.evenType |
| | | param.eventId = this.shareCircleRow.id |
| | | circleAdd(param).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | popupClose() { |
| | | this.sharePopup = false |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "mch-id", |
| | | label: "商户号mch-id", |
| | | labelWidth: labelWidth, |
| | | prop: "mchId", |
| | | span: 24, |
| | |
| | | </template> |
| | | |
| | | <template slot-scope="{ row, size, index }" slot="menu"> |
| | | <el-button :size="size" type="text" icon="el-icon-video-play" v-if="userInfo.role_name.includes('admin')" |
| | | <!-- <el-button :size="size" type="text" icon="el-icon-video-play" v-if="userInfo.role_name.includes('admin')" |
| | | @click="handleDebug(row)">调试 |
| | | </el-button> |
| | | </el-button> --> |
| | | <el-button :size="size" type="text" icon="el-icon-circle-check" v-if="permission.sms_enable" |
| | | @click.stop="handleEnable(row)">启用 |
| | | </el-button> |