Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/views/publicSecurity/bailReporting.vue
# src/views/publicSecurity/keynotePlaceManage.vue
| | |
| | | },], |
| | | }, |
| | | { |
| | | 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: "发布时间", |
| | | prop: "createTime", |
| | |
| | | }, |
| | | methods: { |
| | | getUserList () { |
| | | let dicUrl = `/blade-household/household/selectHouseholdList?searchKey={{key}}&limit=20` |
| | | let dicUrl = `/api/blade-household/household/selectHouseholdList?searchKey={{key}}&limit=20` |
| | | const column = this.findObject(this.option.column, "userIds") |
| | | column.dicUrl = dicUrl |
| | | }, |
| | |
| | | },], |
| | | }, |
| | | { |
| | | 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: "发布时间", |
| | | prop: "createTime", |
| | |
| | | }], |
| | | }, |
| | | { |
| | | 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: "发布时间", |
| | | prop: "createTime", |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: false, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 96, |
| | | slot: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 96, |
| | | slot: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | span: 24, |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "巡查时间", |
| | | prop: "patrolTime", |
| | | width: 160, |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | border: false, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | width: 120, |
| | | label: "走访类型", |
| | | prop: "type", |
| | | span: 12, |
| | |
| | | }, |
| | | |
| | | { |
| | | dispaly: false, |
| | | width: 144, |
| | | label: "上报时间", |
| | | prop: "createTime", |
| | |
| | | |
| | | methods: { |
| | | getUserList (param = '') { |
| | | let dicUrl = `/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20` |
| | | let dicUrl = `/api/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20` |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | column.dicUrl = dicUrl |
| | | }, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | menu: false, |
| | | addBtn: false, |
| | | border: true, |
| | |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | //stripe:true, |
| | | viewBtn: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | width: 96, |
| | | width: 110, |
| | | label: "打卡人员", |
| | | prop: "name", |
| | | search: true, |
| | |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布时间", |
| | | message: "请选择打卡时间", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "打卡时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | |
| | | prop: "workContent", |
| | | }, |
| | | { |
| | | width: 96, |
| | | label: "经度", |
| | | prop: "lng", |
| | | }, |
| | | { |
| | | width: 96, |
| | | label: "纬度", |
| | | prop: "lat", |
| | | }, |
| | | { |
| | | overHidden: true, |
| | | label: "打卡地址", |
| | | prop: "address", |
| | | }, |
| | |
| | | // import AvueMap from "avue-plugin-map"; |
| | | export default { |
| | | data () { |
| | | |
| | | //手机号格式校验 |
| | | let validatorPhone = function (rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事件类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | dataType: "number", |
| | | type: "select", |
| | | width: 100, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=eCallEventType", |
| | | props: { |
| | | label: "dictValue", |
| | |
| | | // search: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "姓名", |
| | | prop: "realName", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | rules: [{ |
| | | required: false, |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | span: 12, |
| | | width: 100, |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | { |
| | | label: "事发地点", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事发时间", |
| | | prop: "occurrenceTime", |
| | | width: 100, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {deployUpload} from "@/api/flow/flow"; |
| | | import {flowCategory} from "@/util/flow"; |
| | | import { deployUpload } from "@/api/flow/flow" |
| | | import { flowCategory } from "@/util/flow" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | file: {}, |
| | | }, |
| | | option: { |
| | | labelWidth: 120, |
| | | labelWidth: 96, |
| | | menuBtn: false, |
| | | column: [ |
| | | { |
| | |
| | | 'form.flowMode'() { |
| | | this.$refs.form.option.column.filter(item => { |
| | | if (item.prop === "tenantId") { |
| | | item.display = this.form.flowMode === 2; |
| | | item.display = this.form.flowMode === 2 |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | uploadBefore(file, done) { |
| | | this.$message.success('部署开始'); |
| | | this.file = file; |
| | | this.$message.success('部署开始') |
| | | this.file = file |
| | | done() |
| | | }, |
| | | uploadAfter(res, done, loading) { |
| | | if (!this.form.flowCategory) { |
| | | this.$message.warning('清先选择流程类型'); |
| | | this.$message.warning('清先选择流程类型') |
| | | loading() |
| | | return false; |
| | | return false |
| | | } |
| | | if (this.form.flowMode === 2 && !this.form.tenantId) { |
| | | this.$message.warning('清先选择对应租户'); |
| | | loading(); |
| | | return false; |
| | | this.$message.warning('清先选择对应租户') |
| | | loading() |
| | | return false |
| | | } |
| | | if (res.success) { |
| | | deployUpload( |
| | |
| | | (this.form.tenantId) ? this.form.tenantId.join(",") : "", |
| | | [this.file] |
| | | ).then(res => { |
| | | const data = res.data; |
| | | const data = res.data |
| | | if (data.success) { |
| | | done() |
| | | } else { |
| | | this.$message.error(data.msg); |
| | | this.$message.error(data.msg) |
| | | loading() |
| | | } |
| | | }) |
| | | } else { |
| | | this.$message.warning('请上传 bpmn20.xml 标准格式文件'); |
| | | this.$message.warning('请上传 bpmn20.xml 标准格式文件') |
| | | loading() |
| | | return false; |
| | | return false |
| | | } |
| | | }, |
| | | } |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot-scope="{row}" |
| | | slot="suspensionState"> |
| | | <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page" |
| | | :permission="permissionList" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | |
| | | <template slot-scope="{ row, size }" slot="suspensionState"> |
| | | <el-tag :size="size" :type="showStatus(row.suspensionState).type" |
| | | v-text="showStatus(row.suspensionState).text"> |
| | | </el-tag> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | <el-dialog title="流程删除" |
| | | append-to-body |
| | | :visible.sync="followBox" |
| | | width="20%"> |
| | | <el-form :model="form" |
| | | ref="form" |
| | | label-width="80px"> |
| | | |
| | | <el-dialog title="流程删除" append-to-body :visible.sync="followBox" width="20%"> |
| | | <el-form :model="form" ref="form" label-width="80px"> |
| | | <el-form-item label="删除理由"> |
| | | <el-input v-model="deleteReason" |
| | | placeholder="请输入删除理由" /> |
| | | <el-input v-model="deleteReason" placeholder="请输入删除理由" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" |
| | | class="dialog-footer"> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="followBox = false">关 闭</el-button> |
| | | <el-button type="primary" |
| | | @click="handleDelete">确 定</el-button> |
| | | <el-button type="primary" @click="handleDelete">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import {followList, deleteProcessInstance} from "@/api/flow/flow"; |
| | | import { mapGetters } from "vuex" |
| | | import { followList, deleteProcessInstance } from "@/api/flow/flow" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | followBox: false, |
| | | deleteReason: '', |
| | | option: { |
| | | labelWidth: 84, |
| | | searchLabelWidth: 84, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 80, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | dialogWidth: 900, |
| | | menuWidth: 100, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "执行id", |
| | | prop: "executionId", |
| | | searchSpan: 4, |
| | | search: true, |
| | | width: 320, |
| | | }, |
| | | { |
| | | label: "流程key", |
| | | prop: "processDefinitionKey", |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "实例id", |
| | | prop: "processInstanceId", |
| | | searchSpan: 4, |
| | | search: true, |
| | | width: 320, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "状态", |
| | | prop: "suspensionState", |
| | | slot: true, |
| | | width: 80, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "发起人", |
| | | prop: "startUser", |
| | | width: 100, |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: '开始时间', |
| | | prop: 'startTime', |
| | | width: 165, |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | delBtn: this.vaildData(this.permission.flow_follow_delete, false), |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | showStatus () { |
| | | return (data) => { |
| | | if (data == 1) { |
| | | return { |
| | | text: '激活', |
| | | type: 'success' |
| | | } |
| | | } else { |
| | | return { |
| | | text: '挂起', |
| | | type: 'info' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | rowDel(row) { |
| | | this.followBox = true; |
| | | this.selectionId = row.id; |
| | | this.processInstanceId = row.processInstanceId; |
| | | this.followBox = true |
| | | this.selectionId = row.id |
| | | this.processInstanceId = row.processInstanceId |
| | | }, |
| | | handleDelete() { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return deleteProcessInstance({deleteReason: this.deleteReason, processInstanceId: this.processInstanceId}); |
| | | return deleteProcessInstance({ deleteReason: this.deleteReason, processInstanceId: this.processInstanceId }) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.followBox = false; |
| | | this.onLoad(this.page) |
| | | this.followBox = false |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | this.loading = true |
| | | followList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | <el-radio-button label="2">定制流程</el-radio-button> |
| | | </el-radio-group> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" size="small" icon="el-icon-refresh" v-if="permission.flow_manager_state" |
| | | @click.stop="handleState(scope.row,scope.index)">变更状态 |
| | | <template slot-scope="{ row, size, index }" slot="menu"> |
| | | <el-button type="text" :size="size" icon="el-icon-refresh" v-if="permission.flow_manager_state" |
| | | @click.stop="handleState(row, index)">变更状态 |
| | | </el-button> |
| | | <el-button type="text" size="small" icon="el-icon-search" v-if="permission.flow_manager_image" |
| | | @click.stop="handleImage(scope.row,scope.index)">流程图 |
| | | <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.flow_manager_image" |
| | | @click.stop="handleImage(row, index)">流程图 |
| | | </el-button> |
| | | <el-button type="text" size="small" icon="el-icon-delete" v-if="permission.flow_manager_remove" |
| | | @click.stop="handleSlotDelete(scope.row,scope.index)">删除 |
| | | <el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.flow_manager_remove" |
| | | @click.stop="handleSlotDelete(row, index)">删除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" slot="tenantId"> |
| | | <el-tag>{{row.tenantId===''?'通用':row.tenantId}}</el-tag> |
| | | <template slot-scope="{ row, size }" slot="tenantId"> |
| | | <el-tag :size="size">{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" slot="version"> |
| | | <el-tag>v{{row.version}}</el-tag> |
| | | <template slot-scope="{ row, size }" slot="version"> |
| | | <el-tag :size="size">v{{ row.version }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" slot="suspensionState"> |
| | | <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag> |
| | | <template slot-scope="{ row, size }" slot="suspensionState"> |
| | | <el-tag :size="size" :type="showStatus(row.suspensionState).type" |
| | | v-text="showStatus(row.suspensionState).text"> |
| | | </el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" slot="category"> |
| | | <el-tag>{{row.categoryName}}</el-tag> |
| | | <template slot-scope="{ row, size }" slot="category"> |
| | | <el-tag :size="size">{{ row.categoryName }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <flow-design is-dialog :is-display.sync="flowBox" :process-definition-id="processDefinitionId"></flow-design> |
| | |
| | | <script> |
| | | import { |
| | | mapGetters |
| | | } from "vuex"; |
| | | } from "vuex" |
| | | import { |
| | | managerList, |
| | | changeState, |
| | | deleteDeployment |
| | | } from "@/api/flow/flow"; |
| | | } from "@/api/flow/flow" |
| | | import { |
| | | flowCategory |
| | | } from "@/util/flow"; |
| | | } from "@/util/flow" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | label: '挂起' |
| | | }], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 240, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | dialogWidth: 900, |
| | | menuWidth: 250, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: '租户编号', |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | overHidden: true, |
| | | label: '流程主键', |
| | | prop: 'id', |
| | | }, |
| | | { |
| | | width: 150, |
| | | overHidden: true, |
| | | label: '流程标识', |
| | | prop: 'key', |
| | | searchSpan: 4, |
| | | search: true, |
| | | width: 150, |
| | | }, |
| | | { |
| | | width: 150, |
| | | overHidden: true, |
| | | label: '流程名称', |
| | | prop: 'name', |
| | | searchSpan: 4, |
| | | search: true, |
| | | width: 150, |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "流程分类", |
| | | type: "select", |
| | | row: true, |
| | |
| | | slot: true, |
| | | prop: "category", |
| | | // search: true, |
| | | width: 100, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: '流程版本', |
| | | prop: 'version', |
| | | slot: true, |
| | | width: 80, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: '状态', |
| | | prop: 'suspensionState', |
| | | slot: true, |
| | | width: 80, |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: '部署时间', |
| | | prop: 'deploymentTime', |
| | | width: 165, |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | 'mode'() { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | permissionList() { |
| | | return { |
| | | delBtn: this.vaildData(this.permission.flow_manager_remove, false), |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | deploymentIds() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.deploymentId); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.deploymentId) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | showStatus () { |
| | | return (data) => { |
| | | if (data == 1) { |
| | | return { |
| | | text: '激活', |
| | | type: 'success' |
| | | } |
| | | } else { |
| | | return { |
| | | text: '挂起', |
| | | type: 'info' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return deleteDeployment(this.deploymentIds); |
| | | return deleteDeployment(this.deploymentIds) |
| | | }) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | this.onLoad(this.page); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | this.onLoad(this.page) |
| | | }) |
| | | }, |
| | | handleSlotDelete(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return deleteDeployment(row.deploymentId); |
| | | return deleteDeployment(row.deploymentId) |
| | | }) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | this.onLoad(this.page); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | this.onLoad(this.page) |
| | | }) |
| | | }, |
| | | handleState(row) { |
| | | this.stateBox = true; |
| | | this.selectionId = row.id; |
| | | this.stateBox = true |
| | | this.selectionId = row.id |
| | | }, |
| | | handleDoState() { |
| | | if (!this.flowState) { |
| | | this.$message({ |
| | | type: "warn", |
| | | message: "请先选择流程状态!" |
| | | }); |
| | | return; |
| | | }) |
| | | return |
| | | } |
| | | changeState({ |
| | | processId: this.selectionId, |
| | | state: this.flowState |
| | | }).then(res => { |
| | | const data = res.data; |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: data.msg |
| | | }); |
| | | this.stateBox = false; |
| | | this.onLoad(this.page); |
| | | }) |
| | | this.stateBox = false |
| | | this.onLoad(this.page) |
| | | } else { |
| | | this.$message({ |
| | | type: "warn", |
| | | message: data.msg |
| | | }); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleImage(row) { |
| | | this.processDefinitionId = row.id; |
| | | this.flowBox = true; |
| | | this.processDefinitionId = row.id |
| | | this.flowBox = true |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const values = { |
| | | ...params, |
| | | category: (params.category) ? flowCategory(params.category) : null, |
| | | mode: this.mode |
| | | }; |
| | | this.loading = true; |
| | | } |
| | | this.loading = true |
| | | managerList(page.currentPage, page.pageSize, Object.assign(values, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :page.sync="page" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page" |
| | | @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 type="primary" |
| | | size="mini" |
| | | icon="el-icon-circle-plus" |
| | | v-if="permission.flow_model_create" |
| | | plain |
| | | <el-button type="primary" size="mini" icon="el-icon-circle-plus" v-if="permission.flow_model_create" plain |
| | | @click="handleCreate">创 建 |
| | | </el-button> |
| | | <el-button type="danger" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | v-if="permission.flow_model_delete" |
| | | plain |
| | | <el-button type="danger" size="mini" icon="el-icon-delete" v-if="permission.flow_model_delete" plain |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" |
| | | slot="menu"> |
| | | <el-button type="text" |
| | | size="mini" |
| | | icon="el-icon-setting" |
| | | v-if="permission.flow_model_update" |
| | | @click.stop="handleUpdate(scope.row,scope.index)">配置 |
| | | |
| | | <template slot-scope="{ row, size, index }" slot="menu"> |
| | | <el-button type="text" :size="size" icon="el-icon-setting" v-if="permission.flow_model_update" |
| | | @click.stop="handleUpdate(row, index)">配置 |
| | | </el-button> |
| | | <el-button type="text" |
| | | size="mini" |
| | | icon="el-icon-upload2" |
| | | v-if="permission.flow_model_deploy" |
| | | @click.stop="handleDeploy(scope.row,scope.index)">部署 |
| | | <el-button type="text" :size="size" icon="el-icon-upload2" v-if="permission.flow_model_deploy" |
| | | @click.stop="handleDeploy(row, index)">部署 |
| | | </el-button> |
| | | <el-button type="text" |
| | | size="mini" |
| | | icon="el-icon-delete" |
| | | v-if="permission.flow_model_delete" |
| | | @click.stop="handleSlotDelete(scope.row,scope.index)">删除 |
| | | <el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.flow_model_delete" |
| | | @click.stop="handleSlotDelete(row, index)">删除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="version"> |
| | | <el-tag>v{{ row.version }}</el-tag> |
| | | <template slot-scope="{row, size}" slot="version"> |
| | | <el-tag :size="size">v{{ row.version }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="流程配置" |
| | | append-to-body |
| | | destroy-on-close |
| | | :visible.sync="flowBox" |
| | | :close-on-press-escape="false" |
| | | :fullscreen="true" |
| | | :before-close="handleNutflowClose" |
| | | custom-class="wf-dialog"> |
| | | <wf-design-base v-if="nutflowOption.step === 1" |
| | | class="animated fadeIn" |
| | | style="height: calc(100vh - 108px);" |
| | | ref="wf-design" |
| | | :options="nutflowOption.step1"></wf-design-base> |
| | | <wf-design-base v-if="nutflowOption.step === 2" |
| | | class="animated fadeIn" |
| | | style="height: calc(100vh - 108px);" |
| | | ref="wf-design-view" |
| | | :options="nutflowOption.step2"></wf-design-base> |
| | | <span slot="footer" |
| | | class="avue-dialog__footer"> |
| | | <el-button size="small" |
| | | @click="handleNutflowClose(() => {}, true)">取 消</el-button> |
| | | <el-button v-if="nutflowOption.step === 1" |
| | | size="small" |
| | | type="success" |
| | | @click="handleStep(1)">下 一 步</el-button> |
| | | <el-button v-if="nutflowOption.step === 2" |
| | | size="small" |
| | | type="success" |
| | | @click="handleStep(-1)">上 一 步</el-button> |
| | | <el-button v-if="nutflowOption.step === 2" |
| | | size="small" |
| | | type="primary" |
| | | @click="handleSubmitModel">确 定</el-button> |
| | | <el-dialog title="流程配置" append-to-body destroy-on-close :visible.sync="flowBox" :close-on-press-escape="false" |
| | | :fullscreen="true" :before-close="handleNutflowClose" custom-class="wf-dialog"> |
| | | <wf-design-base v-if="nutflowOption.step === 1" class="animated fadeIn" style="height: calc(100vh - 108px);" |
| | | ref="wf-design" :options="nutflowOption.step1"></wf-design-base> |
| | | <wf-design-base v-if="nutflowOption.step === 2" class="animated fadeIn" style="height: calc(100vh - 108px);" |
| | | ref="wf-design-view" :options="nutflowOption.step2"></wf-design-base> |
| | | <span slot="footer" class="avue-dialog__footer"> |
| | | <el-button size="small" @click="handleNutflowClose(() => { }, true)">取 消</el-button> |
| | | <el-button v-if="nutflowOption.step === 1" size="small" type="success" @click="handleStep(1)">下 一 |
| | | 步</el-button> |
| | | <el-button v-if="nutflowOption.step === 2" size="small" type="success" @click="handleStep(-1)">上 一 |
| | | 步</el-button> |
| | | <el-button v-if="nutflowOption.step === 2" size="small" type="primary" @click="handleSubmitModel">确 |
| | | 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="流程部署" |
| | | append-to-body |
| | | :visible.sync="deployBox" |
| | | width="20%"> |
| | | <avue-form ref="form" |
| | | :option="optionDeploy" |
| | | v-model="form" |
| | | @submit="handleSubmit"/> |
| | | <span slot="footer" |
| | | class="dialog-footer"> |
| | | <el-dialog title="流程部署" append-to-body :visible.sync="deployBox" width="20%"> |
| | | <avue-form ref="form" :option="optionDeploy" v-model="form" @submit="handleSubmit" /> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="deployBox = false">取 消</el-button> |
| | | <el-button type="primary" |
| | | @click="handleDoDeploy" |
| | | :loading="deployLoading">确 定</el-button> |
| | | <el-button type="primary" @click="handleDoDeploy" :loading="deployLoading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import {modelList, removeModel, deployModel, submitModel, detail} from "@/api/flow/flow"; |
| | | import {flowCategory} from "@/util/flow"; |
| | | import { mapGetters } from "vuex" |
| | | import { modelList, removeModel, deployModel, submitModel, detail } from "@/api/flow/flow" |
| | | import { flowCategory } from "@/util/flow" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | deployBox: false, |
| | | flowBox: false, |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | dialogWidth: 900, |
| | | menuWidth: 200, |
| | | dialogClickModal: false, |
| | | size: 'mini', |
| | | searchSize: 'mini', |
| | | column: [ |
| | | { |
| | | label: '模型主键', |
| | |
| | | { |
| | | label: '模型标识', |
| | | prop: 'modelKey', |
| | | searchSpan: 4, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: '模型名称', |
| | | prop: 'name', |
| | | searchSpan: 4, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | |
| | | overHidden: true |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: '创建时间', |
| | | prop: 'created', |
| | | overHidden: true |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: '更新时间', |
| | | prop: 'lastUpdated', |
| | | overHidden: true |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | minimap: true, |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.flowMode'() { |
| | | this.$refs.form.option.column.filter(item => { |
| | | if (item.prop === "tenantId") { |
| | | item.display = this.form.flowMode === 2; |
| | | item.display = this.form.flowMode === 2 |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }, |
| | | handleSubmit(form, done) { |
| | | this.deployLoading = true; |
| | | this.deployLoading = true |
| | | deployModel({ |
| | | modelId: this.selectionId, |
| | | category: flowCategory(form.categoryValue), |
| | | tenantIds: form.tenantId ? form.tenantId.join(",") : "" |
| | | }).then(res => { |
| | | const data = res.data; |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: data.msg |
| | | }); |
| | | done(); |
| | | this.$refs.form.resetForm(); |
| | | this.deployBox = false; |
| | | this.deployLoading = false; |
| | | }) |
| | | done() |
| | | this.$refs.form.resetForm() |
| | | this.deployBox = false |
| | | this.deployLoading = false |
| | | } else { |
| | | done(); |
| | | this.deployLoading = false; |
| | | done() |
| | | this.deployLoading = false |
| | | this.$message({ |
| | | type: "warn", |
| | | message: data.msg |
| | | }); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return removeModel(this.ids); |
| | | return removeModel(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | this.onLoad(this.page); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | this.onLoad(this.page) |
| | | }) |
| | | }, |
| | | handleCreate() { |
| | | this.flowBox = true; |
| | | this.flowBox = true |
| | | }, |
| | | handleUpdate(row) { |
| | | detail({id: row.id}).then(res => { |
| | |
| | | const {modelEditorXml} = data |
| | | this.$set(this.nutflowOption.step1, 'xml', modelEditorXml) |
| | | this.$set(this.nutflowOption, 'process', data) |
| | | this.flowBox = true; |
| | | this.flowBox = true |
| | | }) |
| | | }, |
| | | handleDeploy(row) { |
| | | this.deployBox = true; |
| | | this.selectionId = row.id; |
| | | this.deployBox = true |
| | | this.selectionId = row.id |
| | | }, |
| | | handleDoDeploy() { |
| | | this.$refs.form.submit(); |
| | | this.$refs.form.submit() |
| | | }, |
| | | handleSlotDelete(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return removeModel(row.id); |
| | | return removeModel(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | this.onLoad(this.page); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | this.onLoad(this.page) |
| | | }) |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | this.loading = true |
| | | modelList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | .wf-dialog { |
| | | .el-dialog__body { |
| | | padding: 5px; |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 120, |
| | | label: "联系电话", |
| | | prop: "mobile", |
| | | searchSpan: 4, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | overHidden: true, |
| | | label: "所属网格", |
| | | addDisplay: false, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "形象照", |
| | | prop: "picUrl", |
| | | width: 80, |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | |
| | | @click="manageMember(scope.row)">业委会成员 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row, size }" slot="status"> |
| | | <el-tag :size="size" :type="showStatus(row.status).type" v-text="showStatus(row.status).text"> |
| | | </el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-drawer title="业委会成员" size="40%" append-to-body :visible.sync="memberFlag" :direction="'rtl'"> |
| | |
| | | selectionList: [], |
| | | memberFlag: false, |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 300, |
| | | |
| | | // menu: false, |
| | | // addBtn: false, |
| | | border: true, |
| | |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | //stripe:true, |
| | | viewBtn: true, |
| | | excelBtn: true, |
| | |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | cascader: ['principalId'], |
| | | span: 10, |
| | | labelWidth: 120, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | }, |
| | | |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | offset: 2, |
| | | overHidden: true, |
| | | width: 120, |
| | | label: "业委会名称", |
| | | prop: "name", |
| | | search: true, |
| | | searchLabelWidth: 136, |
| | | searchLabelWidth: 124, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入业委会名称", |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 220, |
| | | overHidden: true, |
| | | width: 220, |
| | | label: '小区名称', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | display: false, |
| | | }, |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | label: "业委会负责人", |
| | | prop: "principalId", |
| | | type: "tree", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | width: 120, |
| | | label: "负责人名称", |
| | | offset: 2, |
| | | prop: "principalName", |
| | | rules: [{ |
| | | required: true, |
| | |
| | | },], |
| | | }, |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | width: 120, |
| | | label: "负责人手机号", |
| | | prop: "mobile", |
| | | rules: [{ |
| | |
| | | }, |
| | | |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | width: 120, |
| | | label: "业委会届别", |
| | | offset: 2, |
| | | prop: "session", |
| | | type: "number", |
| | | rules: [{ |
| | |
| | | }, |
| | | |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | width: 100, |
| | | label: "成立时间", |
| | | prop: "establishTime", |
| | | type: "date", |
| | |
| | | |
| | | { |
| | | span: 20, |
| | | labelWidth: 120, |
| | | label: "所在地址", |
| | | prop: "location", |
| | | }, |
| | | |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | width: 124, |
| | | label: "任期开始时间", |
| | | prop: "startTime", |
| | | type: "date", |
| | |
| | | }, |
| | | |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | width: 124, |
| | | label: "任期结束时间", |
| | | offset: 2, |
| | | prop: "endTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | |
| | | label: "图片", |
| | | prop: "imageUrl", |
| | | type: "upload", |
| | | labelWidth: 120, |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | |
| | | url: "link", |
| | | }, |
| | | viewDisplay: false, |
| | | span: 20, |
| | | span: 24, |
| | | }, |
| | | |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | span: 12, |
| | | label: "排序", |
| | | prop: "sort", |
| | | type: 'number', |
| | |
| | | }, |
| | | |
| | | { |
| | | span: 10, |
| | | labelWidth: 120, |
| | | width: 100, |
| | | span: 12, |
| | | label: "状态", |
| | | offset: 2, |
| | | slot: true, |
| | | prop: "status", |
| | | type: 'switch', |
| | | activeColor: "#13ce66", |
| | |
| | | |
| | | { |
| | | span: 20, |
| | | labelWidth: 120, |
| | | label: "简介", |
| | | prop: "profile", |
| | | component: "AvueUeditor", |
| | |
| | | // { |
| | | // label: "简介", |
| | | // prop: "profile", |
| | | // // labelWidth: 140, |
| | | // viewDisplay: false, |
| | | // type: "textarea" |
| | | // }, |
| | |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | showStatus () { |
| | | return (data) => { |
| | | if (data == 0) { |
| | | return { |
| | | text: '正常', |
| | | type: 'success' |
| | | } |
| | | } else { |
| | | return { |
| | | text: '关闭', |
| | | type: 'info' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | manageMember (row) { |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import {add, getDetail, getList, remove, update} from "@/api/partyOrganization/partyOrganizationMember"; |
| | | import {validatePhone} from "@/util/validate"; |
| | | import {getAllHouseHold,getDetatils as householdDetail} from "@/api/userHouse/list/houseHold"; |
| | | import func from "@/util/func"; |
| | | import website from "@/config/website"; |
| | | const labelWidth = 100; |
| | | const searchSpan = 5; |
| | | import { mapGetters } from "vuex" |
| | | import { add, getDetail, getList, remove, update } from "@/api/partyOrganization/partyOrganizationMember" |
| | | import { validatePhone } from "@/util/validate" |
| | | import { getAllHouseHold, getDetatils as householdDetail } from "@/api/userHouse/list/houseHold" |
| | | import func from "@/util/func" |
| | | import website from "@/config/website" |
| | | const labelWidth = 100 |
| | | const searchSpan = 5 |
| | | export default { |
| | | name: "partyOrganizationMember", |
| | | data () { |
| | |
| | | |
| | | getUserList(param){ |
| | | let dicUrl = `/api/blade-household/household/getAllHouseHold?name={{key}}®ionCode=${this.row.areaId}` |
| | | const column = this.findObject(this.option.column, "householdId"); |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | column.dicUrl = dicUrl |
| | | }, |
| | | |
| | |
| | | done() |
| | | }, |
| | | beforeOpen (done, type) { |
| | | const column = this.findObject(this.option.column, "householdId"); |
| | | const column = this.findObject(this.option.column, "householdId") |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | <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.district_delete" @click="handleDelete">删 除 |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.district_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | import website from '@/config/website' |
| | | export default { |
| | | data() { |
| | | //手机号格式校验 |
| | | let validatorPhone = function (rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 66, |
| | | searchLabelWidth: 66, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "电话", |
| | | width: 120, |
| | | label: "联系方式", |
| | | prop: "telephone", |
| | | span: 24, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入电话", |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | { |
| | | label: "备注", |
| | |
| | | <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 size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | <!-- <el-button size="small" icon="el-icon-s-order" plain @click="kqcomment">开启评论 |
| | | </el-button> |
| | |
| | | <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row,1)"> |
| | | 创建议题 |
| | | </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 v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" |
| | | @click.stop="updateFb(row)"> |
| | | 发布 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="publish"> |
| | | <el-tag>{{ |
| | | row.publish == "1" ? "已发布" : row.publish == "0" ? "未发布" : "未发布" |
| | | }} |
| | | <template slot-scope="{ row, size }" slot="publish"> |
| | | <el-tag :size="size" :type="showStatus(row.publish, 1).type" v-text="showStatus(row.publish, 1).text"> |
| | | </el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="iscomment"> |
| | | <el-tag>{{ |
| | | row.iscomment == "1" ? "开启" : row.iscomment == "0" ? "关闭" : "关闭" |
| | | }} |
| | | <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> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose"> |
| | | <span slot="title" class="dialog-footer"> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | add, |
| | | getNotice, |
| | | upcomment |
| | | } from "@/api/article/article"; |
| | | } from "@/api/article/article" |
| | | |
| | | import { |
| | | getListPd, |
| | |
| | | addPd, |
| | | getNoticePd, |
| | | upcommentPd |
| | | } from "@/api/discuss/publicDiscuss"; |
| | | } from "@/api/discuss/publicDiscuss" |
| | | |
| | | import website from '@/config/website'; |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | import { |
| | | getDistrictTree |
| | | } from "@/api/district/index"; |
| | | } from "@/api/district/index" |
| | | |
| | | import { |
| | | mapGetters |
| | | } from "vuex"; |
| | | } from "vuex" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | border: false, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "招标封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | width: 80, |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | |
| | | hide: true, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "招标类型", |
| | | prop: "type", |
| | | searchSpan: 3, |
| | | width: 80, |
| | | value: 2, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | |
| | | { |
| | | label: "发布时间", |
| | | prop: "dateTime", |
| | | type: "datetime", |
| | | type: "daterange", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchSpan: 5, |
| | | searchSpan: 6, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | searchSpan: 3, |
| | | width: 80, |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | |
| | | ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | width: 80, |
| | | slot: true, |
| | | type: "select", |
| | | dicData: [{ |
| | |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '开启', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '开启投票', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | |
| | | value: 1 |
| | | }] |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '开启签名', |
| | | prop: 'signatureFlag', |
| | | type: 'radio', |
| | |
| | | ] |
| | | }, |
| | | districtTree: [], |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.articleType": { |
| | | handler(val) { |
| | | if (val) { |
| | | var videoUrl = this.findObject(this.option.column, "videoUrl"); |
| | | var content = this.findObject(this.option.column, "content"); |
| | | var videoUrl = this.findObject(this.option.column, "videoUrl") |
| | | var content = this.findObject(this.option.column, "content") |
| | | if (val.indexOf('ksp') != -1) { |
| | | videoUrl.display = true; |
| | | content.display = false; |
| | | videoUrl.display = true |
| | | content.display = false |
| | | videoUrl.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | }, ]; |
| | | },] |
| | | } else { |
| | | videoUrl.display = false; |
| | | content.display = true; |
| | | videoUrl.rules = ""; |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | |
| | | viewBtn: this.vaildData(this.permission.article_view, true), |
| | | delBtn: this.vaildData(this.permission.article_delete, true), |
| | | editBtn: this.vaildData(this.permission.article_edit, true), |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | showStatus () { |
| | | return (data, type) => { |
| | | if (data == 0) { |
| | | return { |
| | | text: type == 1 ? '未发布' : '关闭', |
| | | type: 'info' |
| | | } |
| | | } else if (data == 1) { |
| | | return { |
| | | text: type == 1 ? '已发布' : '开启', |
| | | type: 'success' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | }, |
| | | |
| | | handleSubmit(form, done) { |
| | | done(); |
| | | done() |
| | | addPd(form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }) |
| | | this.dialogVisibles = false |
| | | done(); |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | window.console.log(error) |
| | | // loading(); |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | |
| | | handleClose(done) { |
| | | done(); |
| | | done() |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | if (row.videoUrl.length == 0) { |
| | | row.videoUrl = ""; |
| | | row.videoUrl = "" |
| | | } |
| | | row.userid = this.userInfo.user_id; |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(","); |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/"); |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(","); |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/"); |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | |
| | | |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | var names = data.url.split(","); |
| | | var names = data.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | data.url = urls.join(",") |
| | | } |
| | | data.articleList = JSON.parse(data.articleRange) |
| | | this.form = data; |
| | | }); |
| | | this.form = data |
| | | }) |
| | | } |
| | | // con |
| | | done(); |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query; |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0], |
| | | endTime: dateTime[1], |
| | | ...this.query, |
| | | }; |
| | | values.dateTime = null; |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | values.type = 2 |
| | | this.loading = true; |
| | | this.loading = true |
| | | console.log(values) |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(","); |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree(params = {}).then((res) => { |
| | | const data = res.data.data; |
| | | this.districtTree = data; |
| | | const column = this.findObject(this.option.column, "articleList"); |
| | | column.dicData = res.data.data; |
| | | this.loading = false; |
| | | }); |
| | | const data = res.data.data |
| | | this.districtTree = data |
| | | const column = this.findObject(this.option.column, "articleList") |
| | | column.dicData = res.data.data |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | updateFb(row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1"; |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0"; |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(","); |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/"); |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | kqcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1"); |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0"); |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | } |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="publish"> |
| | | <el-tag>{{ |
| | | row.publish == "1" ? "已发布" : row.publish == "0" ? "未发布" : "未发布" |
| | | }} |
| | | <template slot-scope="{ row, size }" slot="publish"> |
| | | <el-tag :size="size" :type="showStatus(row.publish, 1).type" v-text="showStatus(row.publish, 1).text"> |
| | | </el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="iscomment"> |
| | | <el-tag>{{ |
| | | row.iscomment == "1" ? "开启" : row.iscomment == "0" ? "关闭" : "关闭" |
| | | }} |
| | | <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> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose"> |
| | | <span slot="title" class="dialog-footer"> |
| | |
| | | </avue-form> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | |
| | | </basic-container> |
| | | </template> |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | border: false, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "缩略图", |
| | | prop: "url", |
| | | // align:'center', |
| | | width: 80, |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | |
| | | { |
| | | label: "收支类型", |
| | | prop: "type", |
| | | searchSpan: 3, |
| | | width: 80, |
| | | value: 1, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | |
| | | value: 1, |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | label: "发布时间", |
| | | prop: "dateTime", |
| | | type: "datetime", |
| | | type: "daterange", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchSpan: 5, |
| | | searchSpan: 6, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | searchSpan: 3, |
| | | width: 80, |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | |
| | | ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | width: 80, |
| | | slot: true, |
| | | type: "select", |
| | | dicData: [{ |
| | |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '开启', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '开启投票', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | |
| | | value: 1 |
| | | }] |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '开启签名', |
| | | prop: 'signatureFlag', |
| | | type: 'radio', |
| | |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | showStatus () { |
| | | return (data, type) => { |
| | | if (data == 0) { |
| | | return { |
| | | text: type == 1 ? '未发布' : '关闭', |
| | | type: 'info' |
| | | } |
| | | } else if (data == 1) { |
| | | return { |
| | | text: type == 1 ? '已发布' : '开启', |
| | | type: 'success' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form" |
| | | :permission="permissionList" @search-change="searchChange" @search-reset="searchReset" |
| | | @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | :before-open="beforeOpen" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | :permission="permissionList" @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" |
| | | @row-save="rowSave" @row-del="rowDel" :before-open="beforeOpen" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | |
| | | <template slot-scope="{row}" slot="phone"> |
| | | <el-button type="text" @click="showStringDispose(row, 'phoneNumberflag')"> |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneNumberflag')"> |
| | | {{ textDispose(row, 'phoneNumberflag', 'phone') }} |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" icon="el-icon-circle-plus-outline" size="small" |
| | | @click="manageMember(scope.row)">党成员 |
| | | <template slot-scope="{row, size, index}" slot="menu"> |
| | | <el-button :size="size" type="text" icon="el-icon-circle-plus-outline" @click="manageMember(row)">党成员 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | <el-drawer title="党成员" size="60%" append-to-body :visible.sync="memberFlag" :direction="'rtl'"> |
| | | <PartyOrganizationMember ref="partyOrganizationMember" /> |
| | | </el-drawer> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import {getDetail,getList,add,update,remove} from "@/api/partyOrganization/partyOrganization"; |
| | | import website from "@/config/website"; |
| | | import func from "@/util/func"; |
| | | import {validatePhone} from "@/util/validate"; |
| | | import PartyOrganizationMember from "@/views/property/components/partyOrganizationMember.vue"; |
| | | import { mapGetters } from "vuex" |
| | | import { getDetail, getList, add, update, remove } from "@/api/partyOrganization/partyOrganization" |
| | | import website from "@/config/website" |
| | | import func from "@/util/func" |
| | | import { validatePhone } from "@/util/validate" |
| | | import PartyOrganizationMember from "@/views/property/components/partyOrganizationMember.vue" |
| | | const searchSpan = 4 |
| | | export default { |
| | | name: "partyOrganization", |
| | |
| | | selectionList: [], |
| | | memberFlag: false, |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | // menu: false, |
| | | // addBtn: false, |
| | | border: true, |
| | |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | //stripe:true, |
| | | viewBtn: true, |
| | | excelBtn: true, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "负责人", |
| | | prop: "chargePerson", |
| | | rules: [{ |
| | |
| | | }] |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "姓名", |
| | | prop: "name", |
| | | searchSpan: searchSpan, |
| | | searchLabelWidth: 66, |
| | | searchPlaceholder:"请输入负责人或党成员", |
| | | hide:true, |
| | | display: false, |
| | | search: true |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "手机号", |
| | | prop: "phone", |
| | | slot: true, |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" size="small" v-if="scope.row.applyStatus === 4" @click="handleWork(scope.row)">调整申请 |
| | | <template slot-scope="{ row, size, index }" slot="menu"> |
| | | <el-button :size="size" type="text" v-if="scope.row.applyStatus === 4" @click="handleWork(scope.row)">调整申请 |
| | | </el-button> |
| | | <el-button type="text" size="small" @click="goDetail(scope.row)">查看申请 |
| | | <el-button :size="size" type="text" @click="goDetail(scope.row)">查看申请 |
| | | </el-button> |
| | | <el-button type="text" size="small" @click="goDetail(scope.row)">删 除 |
| | | <el-button :size="size" type="text" @click="goDetail(scope.row)">删 除 |
| | | </el-button> |
| | | </template> |
| | | <!-- <template slot="menuLeft"> |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 154, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 140, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 120, |
| | | width: 260, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | searchLabelWidth: 124, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | labelWidth: 140, |
| | | value: '按建筑面积分摊', |
| | | span: 14, |
| | | row: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 80, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: '申请时间', |
| | | prop: 'applyTime', |
| | | span: 12, |
| | | labelWidth: 160, |
| | | display: false, |
| | | }, { |
| | | label: '审核进度', |
| | | prop: 'applyStatus', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | display: false, |
| | | dicData: [{ |
| | | label: "待审核", |
| | |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00' |
| | |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00' |
| | |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00' |
| | |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00' |
| | |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea" |
| | | }, |
| | | { |
| | |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea" |
| | | }, |
| | | { |
| | |
| | | type: 'upload', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form" |
| | | :permission="permissionList" @search-change="searchChange" @search-reset="searchReset" |
| | | @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | :before-open="beforeOpen" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | :permission="permissionList" @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" |
| | | @row-save="rowSave" @row-del="rowDel" :before-open="beforeOpen" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | </avue-crud> |
| | | |
| | | |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import {getDetail,getList,add,update,remove} from "@/api/property/propertyCharge"; |
| | | import website from "@/config/website"; |
| | | import func from "@/util/func"; |
| | | import {validatePhone} from "@/util/validate"; |
| | | import { mapGetters } from "vuex" |
| | | import { getDetail, getList, add, update, remove } from "@/api/property/propertyCharge" |
| | | import website from "@/config/website" |
| | | import func from "@/util/func" |
| | | import { validatePhone } from "@/util/validate" |
| | | const searchSpan = 4 |
| | | const labelWidth=110 |
| | | export default { |
| | |
| | | selectionList: [], |
| | | memberFlag: false, |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | // menu: false, |
| | | // addBtn: false, |
| | | border: true, |
| | |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | //stripe:true, |
| | | viewBtn: true, |
| | | excelBtn: true, |
| | |
| | | label: "name", |
| | | value: "deptId", |
| | | }, |
| | | searchSpan: 4, |
| | | search:true, |
| | | disabled:false, |
| | | type: "select", |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form" |
| | | :permission="permissionList" @search-change="searchChange" @search-reset="searchReset" |
| | | @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | :before-open="beforeOpen" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | :permission="permissionList" @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" |
| | | @row-save="rowSave" @row-del="rowDel" :before-open="beforeOpen" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | </avue-crud> |
| | | |
| | | |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import {getDetail,getList,add,update,remove} from "@/api/property/propertyChargeRecord"; |
| | | import website from "@/config/website"; |
| | | import func from "@/util/func"; |
| | | import {validatePhone} from "@/util/validate"; |
| | | import { mapGetters } from "vuex" |
| | | import { getDetail, getList, add, update, remove } from "@/api/property/propertyChargeRecord" |
| | | import website from "@/config/website" |
| | | import func from "@/util/func" |
| | | import { validatePhone } from "@/util/validate" |
| | | const searchSpan = 4 |
| | | const labelWidth=110 |
| | | export default { |
| | | name: "propertyChargeRecord", |
| | | data () { |
| | |
| | | selectionList: [], |
| | | memberFlag: false, |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | // menu: false, |
| | | // addBtn: false, |
| | | border: true, |
| | |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | //stripe:true, |
| | | viewBtn: true, |
| | | excelBtn: true, |
| | |
| | | column: [ |
| | | { |
| | | label: "物业公司", |
| | | labelWidth:labelWidth, |
| | | prop: "propertyId", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-propertyCompany/propertyCompany/getPropertyCompanyList", |
| | |
| | | label: "name", |
| | | value: "deptId", |
| | | }, |
| | | searchSpan, |
| | | search:true, |
| | | disabled:false, |
| | | type: "select", |
| | |
| | | }, |
| | | |
| | | { |
| | | |
| | | label: "付款人", |
| | | labelWidth:labelWidth, |
| | | prop: "payUser", |
| | | searchSpan: searchSpan, |
| | | searchLabelWidth: labelWidth, |
| | | searchLabelWidth: 80, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | }, |
| | | { |
| | | label: "付款时间", |
| | | labelWidth:labelWidth, |
| | | prop: "payTime", |
| | | rules: [{ |
| | | required: true, |
| | |
| | | }, |
| | | { |
| | | label: "付款金额(元)", |
| | | labelWidth:labelWidth, |
| | | prop: "payPrice", |
| | | type:'number', |
| | | precision:2, |
| | |
| | | }, |
| | | { |
| | | label: "付款方式", |
| | | labelWidth:labelWidth, |
| | | prop: "payFunc", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=payPeriod", |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | <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"> |
| | | :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.propertyCompany_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button v-if="permission.payInfo" type="text" icon="el-icon-circle-plus-outline" size="small" |
| | | @click="openPayConfig(scope.row)">商户配置 |
| | | <template slot-scope="{row, size, index}" slot="menu"> |
| | | <el-button :size="size" v-if="permission.payInfo" type="text" icon="el-icon-circle-plus-outline" |
| | | @click="openPayConfig(row)">商户配置 |
| | | </el-button> |
| | | </template> |
| | | |
| | | |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="商户配置" append-to-body :visible.sync="payInfoVisible" top="10vh" width="70%"> |
| | |
| | | <!-- </div>--> |
| | | |
| | | </el-dialog> |
| | | |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | getPropertyCompany, |
| | | getPayConfig, |
| | | saveOrUpdateWx, saveOrUpdateAli |
| | | } from "@/api/property/propertyCompany"; |
| | | import {mapGetters} from "vuex"; |
| | | import website from '@/config/website'; |
| | | import func from "@/util/func"; |
| | | } from "@/api/property/propertyCompany" |
| | | import { mapGetters } from "vuex" |
| | | import website from '@/config/website' |
| | | import func from "@/util/func" |
| | | |
| | | const labelWidth = 120 |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | currentTab: "wxInfo", |
| | | payInfoVisible: false, |
| | | currentRow: {}, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | overHidden: true, |
| | | label: "物业公司名称", |
| | | prop: "name", |
| | | searchSpan: 6, |
| | | searchSpan: 5, |
| | | searchLabelWidth: 124, |
| | | search: true, |
| | | searchLabelWidth: 120, |
| | | span: 18, |
| | | row: true, |
| | | labelWidth: 120, |
| | | width: 260, |
| | | rules: [ |
| | | { |
| | |
| | | }, |
| | | hide: true, |
| | | span: 6, |
| | | labelWidth: 120, |
| | | cascader: ['city'], |
| | | dicUrl: `/api/blade-system/region/select`, |
| | | rules: [ |
| | |
| | | ] |
| | | }, |
| | | { |
| | | overHidden: true, |
| | | label: "地址", |
| | | prop: "address", |
| | | span: 18, |
| | | labelWidth: 120, |
| | | row: true, |
| | | }, |
| | | { |
| | | label: "社会信用代码", |
| | | prop: "socialCreditCode", |
| | | labelWidth: 120, |
| | | }, |
| | | |
| | | { |
| | | label: "简介", |
| | | prop: "remark", |
| | | component: "AvueUeditor", |
| | | labelWidth: 120, |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | props: { |
| | |
| | | ], |
| | | } |
| | | |
| | | }; |
| | | } |
| | | }, |
| | | watch: {}, |
| | | computed: { |
| | |
| | | viewBtn: this.vaildData(this.permission.propertyCompany_view, true), |
| | | delBtn: this.vaildData(this.permission.propertyCompany_delete, true), |
| | | editBtn: this.vaildData(this.permission.propertyCompany_edit, true), |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | }, |
| | | created() { |
| | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }) |
| | | |
| | | }, |
| | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }) |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | rowSave(row, done, loading) { |
| | | row.userid = this.userInfo.user_id; |
| | | row.userid = this.userInfo.user_id |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getPropertyCompany(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | this.form = res.data.data |
| | | }) |
| | | } |
| | | // con |
| | | done(); |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const {dateTime} = this.query; |
| | | const { dateTime } = this.query |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0], |
| | | endTime: dateTime[1], |
| | | ...this.query, |
| | | }; |
| | | values.dateTime = null; |
| | | } |
| | | this.loading = true; |
| | | values.dateTime = null |
| | | } |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | import func from "@/util/func" |
| | | export default { |
| | | data () { |
| | | //手机号格式校验 |
| | | let validatorPhone = function (rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: '小区名称', |
| | | addDisplay: false, |
| | |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 120, |
| | | width: 260, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | }, |
| | | |
| | | { |
| | | overHidden: true, |
| | | label: "物业公司", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | width: 160, |
| | | label: "物业公司", |
| | | prop: "propertyCompanyName", |
| | | search: true, |
| | | searchSpan: 4, |
| | |
| | | prop: 'propertyCompanyId', |
| | | type: 'tree', |
| | | span: 12, |
| | | labelWidth: 120, |
| | | dicUrl: `/api/blade-propertyCompany/propertyCompany/getPropertyCompanyList`, |
| | | cascader: ['userId'], |
| | | props: { |
| | |
| | | }] |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: '项目经理', |
| | | prop: 'principal', |
| | | span: 12, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: '联系方式', |
| | | prop: 'principalPhone', |
| | | span: 12, |
| | | labelWidth: 120, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | { |
| | | label: "物业成员", |
| | | prop: "userId", |
| | | span: 12, |
| | | labelWidth: 120, |
| | | type: "tree", |
| | | multiple: true, |
| | | remote: true, |
| | |
| | | dicUrl: `/api/blade-propertyCompany/propertyCompany/getUserByPropertyCompany?id={{propertyCompanyId}}`, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "物业阶段", |
| | | span: 12, |
| | | prop: "propertyStage", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | search: true, |
| | | searchSpan: 4, |
| | |
| | | }, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "合同开始时间", |
| | | prop: "startTime", |
| | | span: 12, |
| | | labelWidth: 120, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "合同结束时间", |
| | | prop: "endTime", |
| | | labelWidth: 120, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | |
| | | <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"> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" size="small" icon="el-icon-view" plain @click="lookDetail(scope.row,0)">查 看 |
| | | 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-scope="{row, size, index}" slot="menu"> |
| | | <el-button :size="size" type="text" icon="el-icon-view" plain @click="lookDetail(row, 0)">查 看 |
| | | </el-button> |
| | | <el-button type="text" size="small" icon="el-icon-s-check" v-if="scope.row.status == 1" plain |
| | | @click="lookDetail(scope.row,1)">审 核 |
| | | <el-button :size="size" type="text" icon="el-icon-s-check" v-if="row.status == 1" plain |
| | | @click="lookDetail(row, 1)">审 核 |
| | | </el-button> |
| | | <el-button type="text" size="small" icon="el-icon-delete" plain @click="rowDel(scope.row)">删 除 |
| | | <el-button :size="size" type="text" icon="el-icon-delete" plain @click="rowDel(row)">删 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="status" slot-scope="{row, size}"> |
| | | <el-tag :size="size" :type="showStatus(row.status).type"> |
| | | {{ showStatus(row.status).text }} |
| | | </el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog class="place-info-box audit-info-box" title="" append-to-body :visible.sync="auditBasePopup" width="60%"> |
| | |
| | | |
| | | export default { |
| | | data() { |
| | | |
| | | //手机号格式校验 |
| | | let validatorPhone = function (rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | return { |
| | | curRow: {}, |
| | | roleBox: false, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | border: true, |
| | | // menu: false, |
| | | //stripe:true, |
| | |
| | | searchSpan: 4, |
| | | search: true, |
| | | hide: true, |
| | | }, { |
| | | }, |
| | | { |
| | | width: 100, |
| | | span: 12, |
| | | label: "名称", |
| | | prop: "realName", |
| | | prop: "name", |
| | | searchSpan: 4, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | }, { |
| | | width: 120, |
| | | span: 12, |
| | | label: "电话", |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | }, { |
| | | span: 12, |
| | | label: "外出事由", |
| | |
| | | search: true, |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | width: 100, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | // hide: true, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | search: true, |
| | | parent: false, |
| | | prop: "streetCode", |
| | | type: "tree", |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | width: 156, |
| | | // hide: true, |
| | | parent: false, |
| | | searchSpan: 4, |
| | | label: "所属社区", |
| | | prop: "neiCode", |
| | | // search: true, |
| | | search: true, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/tree", |
| | | props: { |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: "小区", |
| | | prop: "aoiCode", |
| | | searchSpan: 4, |
| | | type: 'tree', |
| | | // search: true, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | parent: false, |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | |
| | | }, |
| | | // defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 120, |
| | | // width: 220, |
| | | // overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | |
| | | display: true, |
| | | // hide: true, |
| | | }, |
| | | // { |
| | | // addDisplay: false, |
| | | // editDisplay: false, |
| | | // viewDisplay: false, |
| | | // label: '类型', |
| | | // prop: 'reportType', |
| | | // type: 'radio', |
| | | // slot: true, |
| | | // // search: true, |
| | | // dicData: [{ |
| | | // label: '取保候审', |
| | | // value: 1 |
| | | // }, ] |
| | | // }, |
| | | // { |
| | | // span: 12, |
| | | // label: "地址", |
| | | // prop: "addressName", |
| | | // searchSpan: 4, |
| | | // }, |
| | | |
| | | ], |
| | | }, |
| | | data: [], |
| | |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | showStatus () { |
| | | return (data) => { |
| | | let tags = {} |
| | | |
| | | if (data == 1) { |
| | | tags = { |
| | | type: 'warning', |
| | | text: '待审核' |
| | | } |
| | | } else if (data == 2) { |
| | | tags = { |
| | | type: 'success', |
| | | text: '已审核' |
| | | } |
| | | } else if (data == 3) { |
| | | tags = { |
| | | type: 'danger', |
| | | text: '未通过' |
| | | } |
| | | } |
| | | |
| | | return tags |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | colseDetail() { |
| | |
| | | <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-scope="scope" slot="menu"> |
| | | <el-button type="text" size="small" icon="el-icon-view" plain @click="lookDetail(scope.row,0)">查 看 |
| | | <template slot-scope="{row, size}" slot="menu"> |
| | | <el-button type="text" :size="size" icon="el-icon-view" plain @click="lookDetail(row, 0)">查 看 |
| | | </el-button> |
| | | <el-button type="text" size="small" icon="el-icon-s-check" v-if="scope.row.status == 1" plain |
| | | @click="lookDetail(scope.row,1)">审 核 |
| | | <el-button type="text" :size="size" icon="el-icon-s-check" v-if="row.status == 1" plain |
| | | @click="lookDetail(row, 1)">审 核 |
| | | </el-button> |
| | | <el-button type="text" size="small" icon="el-icon-delete" plain @click="rowDel(scope.row)">删 除 |
| | | <el-button type="text" :size="size" icon="el-icon-delete" plain @click="rowDel(row)">删 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="status" slot-scope="{row, size}"> |
| | | <el-tag :size="size" :type="showStatus(row.status).type"> |
| | | {{ showStatus(row.status).text }} |
| | | </el-tag> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | |
| | | |
| | | export default { |
| | | data() { |
| | | |
| | | //手机号格式校验 |
| | | let validatorPhone = function (rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | return { |
| | | taskType: 0, |
| | | curRow: {}, |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | // menu: false, |
| | | border: true, |
| | | //stripe:true, |
| | |
| | | delBtn: false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | // { |
| | | // span: 12, |
| | | // label: "场所名称", |
| | | // prop: "name", |
| | | // searchSpan: 4, |
| | | // search: true, |
| | | // }, |
| | | { |
| | | column: [ { |
| | | span: 12, |
| | | label: "社区", |
| | | prop: "communityName", |
| | |
| | | search: true, |
| | | hide: true, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | span: 12, |
| | | label: "名称", |
| | | prop: "realName", |
| | | searchSpan: 4, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | }, { |
| | | width: 120, |
| | | span: 12, |
| | | label: "电话", |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, { |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | label: '类型', |
| | | prop: 'reportType', |
| | | type: 'radio', |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 3, |
| | | dicData: [{ |
| | | label: '旅馆安全', |
| | | value: 2 |
| | | }, { |
| | | label: '打金店', |
| | | value: 3 |
| | | }, { |
| | | label: '二手手机维修', |
| | | value: 4 |
| | | }, { |
| | | label: '二手车交易', |
| | | value: 5 |
| | | }, { |
| | | label: '校园安全', |
| | | value: 6 |
| | | }] |
| | | }, |
| | | rules: [ |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | }, { |
| | | overHidee: true, |
| | | span: 12, |
| | | label: "地址", |
| | | prop: "addressName", |
| | | searchSpan: 4, |
| | | // search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入地址", |
| | | trigger: "blur", |
| | | },], |
| | | }, { |
| | | width: 144, |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | searchSpan: 4, |
| | | |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | |
| | | value: 3 |
| | | }] |
| | | }, { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | searchSpan: 4, |
| | | |
| | | }, { |
| | | width: 110, |
| | | label: "所属街道", |
| | | // hide: true, |
| | | // search: true, |
| | | search: true, |
| | | parent: false, |
| | | searchSpan: 4, |
| | | prop: "streetCode", |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | width: 156, |
| | | // hide: true, |
| | | // search: true, |
| | | search: true, |
| | | parent: false, |
| | | searchSpan: 4, |
| | | label: "所属社区", |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | width: 220, |
| | | overHidee: true, |
| | | // hide: true, |
| | | // search: true, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | parent: false, |
| | | searchSpan: 4, |
| | | label: "小区", |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | span: 12, |
| | | label: "地址", |
| | | prop: "addressName", |
| | | width: 100, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | label: '类型', |
| | | prop: 'reportType', |
| | | type: 'radio', |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入场所名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | dicData: [{ |
| | | label: '旅馆安全', |
| | | value: 2 |
| | | }, { |
| | | label: '打金店', |
| | | value: 3 |
| | | }, { |
| | | label: '二手手机维修', |
| | | value: 4 |
| | | }, { |
| | | label: '二手车交易', |
| | | value: 5 |
| | | }, { |
| | | label: '校园安全', |
| | | value: 6 |
| | | }] |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | showStatus () { |
| | | return (data) => { |
| | | let tags = {} |
| | | |
| | | if (data == 1) { |
| | | tags = { |
| | | type: 'warning', |
| | | text: '待审核' |
| | | } |
| | | } else if (data == 2) { |
| | | tags = { |
| | | type: 'success', |
| | | text: '已审核' |
| | | } |
| | | } else if (data == 3) { |
| | | tags = { |
| | | type: 'danger', |
| | | text: '未通过' |
| | | } |
| | | } |
| | | |
| | | return tags |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page" |
| | | :permission="permissionList" @row-del="rowDel" @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 type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | @click="handleDelete">删 除 |
| | | <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-edit-outline" |
| | | size="small" |
| | | @click.stop="handleDesign(scope.row.name)" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | >设计 |
| | | <template slot-scope="{ row, size, index }" slot="menu"> |
| | | <el-button :size="size" type="text" icon="el-icon-edit-outline" @click.stop="handleDesign(row.name)" |
| | | v-if="userInfo.role_name.includes('admin')">设计 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-view" |
| | | size="small" |
| | | @click.stop="handlePreview(scope.row.name)" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | >预览 |
| | | <el-button :size="size" type="text" icon="el-icon-view" @click.stop="handlePreview(row.name)" |
| | | v-if="userInfo.role_name.includes('admin')">预览 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" slot="name"> |
| | | <el-tag style="cursor:pointer" @click="handlePreview(row.name)">{{ row.name }}</el-tag> |
| | | |
| | | <template slot-scope="{row, size}" slot="name"> |
| | | <el-tag :size="size" style="cursor:pointer" @click="handlePreview(row.name)">{{ row.name }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, remove} from "@/api/report/report"; |
| | | import {mapGetters} from "vuex"; |
| | | import { getList, remove } from "@/api/report/report" |
| | | import { mapGetters } from "vuex" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | total: 0 |
| | | }, |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 240, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | |
| | | { |
| | | label: "文件名", |
| | | prop: "name", |
| | | searchSpan: 4, |
| | | search: true, |
| | | slot: true, |
| | | }, |
| | |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | |
| | | viewBtn: false, |
| | | delBtn: true, |
| | | editBtn: false |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | }, |
| | | methods: { |
| | | handlePreview(name) { |
| | | this.$router.push({path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`}); |
| | | this.$router.push({ path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}` }) |
| | | }, |
| | | handleDesign(name) { |
| | | this.$router.push({path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.reportUrl}/designer?_u=blade-${name}`}); |
| | | this.$router.push({ path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.reportUrl}/designer?_u=blade-${name}` }) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList" |
| | | :before-open="beforeOpen" v-model="form" ref="crud" @row-del="rowDel" @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 type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="permission.attach_upload" |
| | | icon="el-icon-upload2" |
| | | <el-button type="primary" size="small" plain v-if="permission.attach_upload" icon="el-icon-upload2" |
| | | @click="handleUpload">上 传 |
| | | </el-button> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.attach_delete" |
| | | <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.attach_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" |
| | | icon="el-icon-download" |
| | | size="small" |
| | | v-if="permission.attach_download" |
| | | @click="handleDownload(scope.row)">下载 |
| | | <template slot-scope="{row, size}" slot="menu"> |
| | | <el-button :size="size" type="text" icon="el-icon-download" v-if="permission.attach_download" |
| | | @click="handleDownload(row)">下载 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="attachSize"> |
| | | <el-tag>{{`${row.attachSize} KB`}}</el-tag> |
| | | <template slot-scope="{row, size}" slot="attachSize"> |
| | | <el-tag :size="size">{{ `${row.attachSize} KB` }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="附件管理" |
| | | append-to-body |
| | | :visible.sync="attachBox" |
| | | width="555px"> |
| | | <el-dialog title="附件管理" append-to-body :visible.sync="attachBox" width="555px"> |
| | | <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-after="uploadAfter"> |
| | | </avue-form> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, remove} from "@/api/resource/attach"; |
| | | import {mapGetters} from "vuex"; |
| | | import { getList, getDetail, remove } from "@/api/resource/attach" |
| | | import { mapGetters } from "vuex" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | attachBox: false, |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 140, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | |
| | | { |
| | | label: "附件域名", |
| | | prop: "domainUrl", |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | { |
| | | label: "附件名称", |
| | | prop: "name", |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | { |
| | | label: "附件原名", |
| | | prop: "originalName", |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "附件拓展名", |
| | | prop: "extension", |
| | | rules: [{ |
| | |
| | | }] |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "附件大小", |
| | | prop: "attachSize", |
| | | slot: true, |
| | |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | |
| | | editBtn: false, |
| | | viewBtn: false, |
| | | delBtn: this.vaildData(this.permission.attach_delete, false) |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | }, |
| | | methods: { |
| | | handleUpload() { |
| | | this.attachBox = true; |
| | | this.attachBox = true |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.attachBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | window.console.log(column) |
| | | this.attachBox = false |
| | | this.refreshChange() |
| | | done() |
| | | }, |
| | | handleDownload(row) { |
| | | window.open(`${row.link}`); |
| | | window.open(`${row.link}`) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | this.form = res.data.data |
| | | }) |
| | | } |
| | | done(); |
| | | done() |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | :before-open="beforeOpen" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList" |
| | | v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | :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 type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.oss_delete" |
| | | <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.oss_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" |
| | | icon="el-icon-video-play" |
| | | size="small" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | @click="handleDebug(scope.row)">调试 |
| | | |
| | | <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')" |
| | | @click="handleDebug(row)">调试 |
| | | </el-button> |
| | | <el-button type="text" |
| | | icon="el-icon-circle-check" |
| | | size="small" |
| | | v-if="permission.oss_enable" |
| | | @click.stop="handleEnable(scope.row)">启用 |
| | | <el-button :size="size" type="text" icon="el-icon-circle-check" v-if="permission.oss_enable" |
| | | @click.stop="handleEnable(row)">启用 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="status"> |
| | | <el-tag>{{row.statusName}}</el-tag> |
| | | |
| | | <template slot-scope="{row, size}" slot="status"> |
| | | <el-tag :size="size" :type="row.statusName == '是' ? 'success' : 'info'">{{ row.statusName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="category"> |
| | | <el-tag>{{row.categoryName}}</el-tag> |
| | | <template slot-scope="{row, size}" slot="category"> |
| | | <el-tag :size="size">{{ row.categoryName }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="对象存储上传调试" |
| | | append-to-body |
| | | :visible.sync="box" |
| | | width="550px"> |
| | | |
| | | <el-dialog title="对象存储上传调试" append-to-body :visible.sync="box" width="550px"> |
| | | <avue-form ref="form" :option="debugOption" v-model="debugForm" @submit="handleSubmit"/> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove, enable} from "@/api/resource/oss"; |
| | | import {mapGetters} from "vuex"; |
| | | import func from "@/util/func"; |
| | | import { getList, getDetail, add, update, remove, enable } from "@/api/resource/oss" |
| | | import { mapGetters } from "vuex" |
| | | import func from "@/util/func" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | menuWidth: 350, |
| | | labelWidth: 100, |
| | | dialogWidth: 880, |
| | | dialogClickModal: false, |
| | | column: [ |
| | |
| | | display: false, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "是否启用", |
| | | prop: "status", |
| | | span: 24, |
| | | width: 80, |
| | | align: "center", |
| | | slot: true, |
| | | addDisplay: false, |
| | |
| | | }, |
| | | ] |
| | | } |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.category'() { |
| | | const category = func.toInt(this.form.category); |
| | | const category = func.toInt(this.form.category) |
| | | this.$refs.crud.option.column.filter(item => { |
| | | if (item.prop === "appId") { |
| | | item.display = category === 4; |
| | | item.display = category === 4 |
| | | } |
| | | if (item.prop === "region") { |
| | | item.display = category === 4 || category === 5; |
| | | item.display = category === 4 || category === 5 |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | 'debugForm.code'() { |
| | | const column = this.findObject(this.debugOption.column, "backgroundUrl"); |
| | | column.action = `/api/blade-resource/oss/endpoint/put-file?code=${this.debugForm.code}`; |
| | | const column = this.findObject(this.debugOption.column, "backgroundUrl") |
| | | column.action = `/api/blade-resource/oss/endpoint/put-file?code=${this.debugForm.code}` |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | viewBtn: this.vaildData(this.permission.oss_view), |
| | | delBtn: this.vaildData(this.permission.oss_delete), |
| | | editBtn: this.vaildData(this.permission.oss_edit) |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleEnable(row) { |
| | | this.$confirm("是否确定启用这条配置?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return enable(row.id); |
| | | return enable(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | handleDebug(row) { |
| | | this.box = true; |
| | | this.debugForm.code = row.ossCode; |
| | | this.debugForm.backgroundUrl = ''; |
| | | this.box = true |
| | | this.debugForm.code = row.ossCode |
| | | this.debugForm.backgroundUrl = '' |
| | | }, |
| | | handleSubmit(form, done) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: `获取到图片地址:[${form.backgroundUrl}]` |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | this.form = res.data.data |
| | | }) |
| | | } |
| | | done(); |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList" |
| | | :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" |
| | | @row-del="rowDel" @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 type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.sms_delete" |
| | | <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.sms_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button type="text" |
| | | icon="el-icon-video-play" |
| | | size="small" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | @click="handleDebug(scope.row)">调试 |
| | | |
| | | <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')" |
| | | @click="handleDebug(row)">调试 |
| | | </el-button> |
| | | <el-button type="text" |
| | | icon="el-icon-circle-check" |
| | | size="small" |
| | | v-if="permission.sms_enable" |
| | | @click.stop="handleEnable(scope.row)">启用 |
| | | <el-button :size="size" type="text" icon="el-icon-circle-check" v-if="permission.sms_enable" |
| | | @click.stop="handleEnable(row)">启用 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="status"> |
| | | <el-tag>{{row.statusName}}</el-tag> |
| | | |
| | | <template slot-scope="{row, size}" slot="status"> |
| | | <el-tag :size="size" :type="row.statusName == '是' ? 'success' : 'info'">{{ row.statusName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="category"> |
| | | <el-tag>{{row.categoryName}}</el-tag> |
| | | <template slot-scope="{row, size}" slot="category"> |
| | | <el-tag :size="size">{{ row.categoryName }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="手机短信发送调试" |
| | | append-to-body |
| | | :visible.sync="box" |
| | | width="550px"> |
| | | <el-dialog title="手机短信发送调试" append-to-body :visible.sync="box" width="550px"> |
| | | <avue-form :option="debugOption" v-model="debugForm" @submit="handleSend"/> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove, enable, send} from "@/api/resource/sms"; |
| | | import {mapGetters} from "vuex"; |
| | | import func from "@/util/func"; |
| | | import { getList, getDetail, add, update, remove, enable, send } from "@/api/resource/sms" |
| | | import { mapGetters } from "vuex" |
| | | import func from "@/util/func" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | menuWidth: 350, |
| | | labelWidth: 100, |
| | | dialogWidth: 880, |
| | | dialogClickModal: false, |
| | | column: [ |
| | |
| | | value: 1, |
| | | span: 24, |
| | | width: 100, |
| | | searchLabelWidth: 50, |
| | | searchLabelWidth: 66, |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=sms", |
| | | props: { |
| | |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "category", |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | prop: "smsCode", |
| | | span: 24, |
| | | width: 200, |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | prop: "templateId", |
| | | span: 24, |
| | | width: 200, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 80, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | }], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "是否启用", |
| | | prop: "status", |
| | | span: 24, |
| | | width: 80, |
| | | align: "center", |
| | | slot: true, |
| | | addDisplay: false, |
| | |
| | | }, |
| | | ] |
| | | } |
| | | }; |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.category'() { |
| | | const category = func.toInt(this.form.category); |
| | | const category = func.toInt(this.form.category) |
| | | this.$refs.crud.option.column.filter(item => { |
| | | if (item.prop === "templateId") { |
| | | if (category === 1) { |
| | | item.label = "模版内容"; |
| | | item.label = "模版内容" |
| | | } else { |
| | | item.label = "模版ID"; |
| | | item.label = "模版ID" |
| | | } |
| | | } |
| | | if (item.prop === "accessKey") { |
| | | if (category === 1) { |
| | | item.label = "apiKey"; |
| | | item.label = "apiKey" |
| | | } else if (category === 4) { |
| | | item.label = "appId"; |
| | | item.label = "appId" |
| | | } else { |
| | | item.label = "accessKey"; |
| | | item.label = "accessKey" |
| | | } |
| | | } |
| | | if (item.prop === "secretKey") { |
| | | item.display = category !== 1; |
| | | item.display = category !== 1 |
| | | if (category === 4) { |
| | | item.label = "appKey"; |
| | | item.label = "appKey" |
| | | } else { |
| | | item.label = "secretKey"; |
| | | item.label = "secretKey" |
| | | } |
| | | } |
| | | if (item.prop === "regionId") { |
| | | if (category === 3) { |
| | | item.display = true; |
| | | item.value = "cn-hangzhou"; |
| | | item.display = true |
| | | item.value = "cn-hangzhou" |
| | | } else { |
| | | item.display = false; |
| | | item.display = false |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | viewBtn: this.vaildData(this.permission.sms_view, false), |
| | | delBtn: this.vaildData(this.permission.sms_delete, false), |
| | | editBtn: this.vaildData(this.permission.sms_edit, false) |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | handleEnable(row) { |
| | | this.$confirm("是否确定启用这条配置?", { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return enable(row.id); |
| | | return enable(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | handleDebug(row) { |
| | | this.box = true; |
| | | this.debugForm.code = row.smsCode; |
| | | this.box = true |
| | | this.debugForm.code = row.smsCode |
| | | }, |
| | | handleSend(form, done, loading) { |
| | | send(form.code, form.phones, form.params).then((res) => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "发送成功!" |
| | | }); |
| | | done(); |
| | | window.console.log(res); |
| | | this.box = false; |
| | | }) |
| | | done() |
| | | window.console.log(res) |
| | | this.box = false |
| | | }, error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | }); |
| | | window.console.log(error) |
| | | loading() |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | this.form = res.data.data |
| | | }) |
| | | } |
| | | done(); |
| | | done() |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-12-14 17:10:00 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-01-06 15:01:25 |
| | | * @LastEditTime: 2024-01-09 18:59:37 |
| | | * @FilePath: \jczz_web\src\views\task\reportForRepairs.vue |
| | | * @Description: |
| | | * |
| | |
| | | <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"> |
| | | <template slot="confirmFlag" slot-scope="{row}"> |
| | | <el-tag size="small" :type="showConfirmFlag(row.confirmFlag).type"> |
| | | 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="confirmFlag" slot-scope="{row, size}"> |
| | | <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type"> |
| | | {{ showConfirmFlag(row.confirmFlag).text }} |
| | | </el-tag> |
| | | </template> |
| | | |
| | | <template slot="expand" slot-scope="{row}"> |
| | | <template slot="expand" slot-scope="{row, size}"> |
| | | <el-timeline> |
| | | <el-timeline-item v-for="(item, index) in timeLineData(row)" :key="index" :timestamp="item.createTime" |
| | | :icon="item.icon" :color="item.color" :hide-timestamp="item.contentType == 3" placement="top"> |
| | |
| | | </el-timeline> |
| | | </template> |
| | | |
| | | <template slot-scope="scope" slot="menu"> |
| | | <el-button v-if="permission.report_for_repairs_details" size="small" type="text" icon="el-icon-document-remove" |
| | | @click="rowExpansion(scope.row)"> |
| | | <template slot-scope="{row, size, index}" slot="menu"> |
| | | <el-button :size="size" v-if="permission.report_for_repairs_details" type="text" |
| | | icon="el-icon-document-remove" @click="rowExpansion(row)"> |
| | | 详情 |
| | | </el-button> |
| | | |
| | | <el-button v-if="permission.report_for_repairs_reply" size="small" type="text" icon="el-icon-chat-dot-square" |
| | | :disabled="scope.row.confirmFlag === 3" @click="replyBtnClick(scope.row)"> |
| | | <el-button :size="size" v-if="permission.report_for_repairs_reply" type="text" |
| | | icon="el-icon-chat-dot-square" :disabled="row.confirmFlag === 3" @click="replyBtnClick(row)"> |
| | | 回复 |
| | | </el-button> |
| | | |
| | | <el-button v-if="permission.report_for_repairs_turn_over" size="small" type="text" icon="el-icon-document-copy" |
| | | :disabled="scope.row.confirmFlag === 3" @click="turnOverBtnClick(scope.row)"> |
| | | <el-button :size="size" v-if="permission.report_for_repairs_turn_over" type="text" |
| | | icon="el-icon-document-copy" :disabled="row.confirmFlag === 3" @click="turnOverBtnClick(row)"> |
| | | 移交 |
| | | </el-button> |
| | | |
| | | <el-button v-if="permission.report_for_repairs_del" size="small" type="text" icon="el-icon-delete" |
| | | @click="rowDel(scope.row)"> |
| | | <el-button :size="size" v-if="permission.report_for_repairs_del" type="text" icon="el-icon-delete" |
| | | @click="rowDel(row)"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | |
| | | <avue-form ref="replyForm" :option="replyOption" v-model="replyForm" @submit="handleSubmit" |
| | | @reset-change="handleReset"> |
| | | <template slot-scope="{row}" slot="videoList"> |
| | | <el-upload class="video-uploader" action="/api/blade-resource/oss/endpoint/put-file" :file-list="fileList" |
| | | :headers="updateHeader" :show-file-list="true" :limit="1" :on-change="getFile" :on-exceed="handleExceed" |
| | | :on-success="uploadVideoProcess" :before-upload="beforeUploadVideo" :before-remove="beforeRemove"> |
| | | <el-upload class="video-uploader" action="/api/blade-resource/oss/endpoint/put-file" |
| | | :file-list="fileList" :headers="updateHeader" :show-file-list="true" :limit="1" :on-change="getFile" |
| | | :on-exceed="handleExceed" :on-success="uploadVideoProcess" :before-upload="beforeUploadVideo" |
| | | :before-remove="beforeRemove"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">上传视频只能是 mp4 格式,且大小不能超过 50MB</div> |
| | | </el-upload> |
| | |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | viewBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 272, |
| | | border: true, |
| | | //stripe:true, |
| | | // excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | width: 96, |
| | | column: [ |
| | | { |
| | | width: 100, |
| | | label: "类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchLabelWidth: 66, |
| | | searchSpan: 4, |
| | | search: true, |
| | | dataType: "number", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType", |
| | |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | search: true, |
| | | }, |
| | | { |
| | | width: 96, |
| | | width: 110, |
| | | label: "姓名", |
| | | prop: "realName", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | width: 96, |
| | | width: 120, |
| | | label: "手机号码", |
| | | prop: "phone", |
| | | search: true, |
| | | searchSpan: 3, |
| | | searchSpan: 4, |
| | | slot: true, |
| | | rules: [{ |
| | | validator: validatorPhone, |
| | |
| | | span: 24, |
| | | }, |
| | | { |
| | | overHidden: true, |
| | | label: "地点", |
| | | prop: "addressName", |
| | | overHidden: true |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "状态", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | slot: true, |
| | | label: "状态", |
| | | prop: "confirmFlag", |
| | | overHidden: true |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "上报时间", |
| | | prop: "createTime", |
| | | width: 160, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | type: "date", |
| | |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "处理时间", |
| | | prop: "confirmTime", |
| | | width: 160, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | type: "date", |