Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web
55 files modified
1 files renamed
2 files copied
16 files added
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-articleIntegral/articleIntegral/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/save', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-circle/circle/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-disputeRecord/disputeRecord/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-disputeRecord/disputeRecord/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-disputeRecord/disputeRecord/saveOrUpdate', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-disputeRecord/disputeRecord/saveOrUpdate', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-disputeRecord/disputeRecord/getDetail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export const getApiList = (current, size) => { |
| | | export const getApiList = (current, size,params) => { |
| | | return request({ |
| | | url: '/api/blade-log/api/list', |
| | | url: '/api/blade-log/api/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export const addTwo = (row) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroup/addTwo', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/patrol/patrolGroup/submit', |
| | |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | }; |
| | | |
| | | |
| | | |
| | | // 标准地址 |
| | | export const getPlaceAddressList = (params) => { |
| | | return request({ |
| | | url: "/api/blade-doorplateAddress/doorplateAddress/getPlaceList", |
| | | method: "get", |
| | | params: params |
| | | }); |
| | | }; |
| | | |
| | | |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 列表详情 |
| | | export const getTaskNoFraudReportingInfo = (params) => { |
| | | return request({ |
| | | url: "/api/blade-taskNoFraudReporting/taskNoFraudReporting/getInfo", |
| | | method: "get", |
| | | params |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-smsRecord/smsRecord/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-smsRecord/smsRecord/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-smsRecord/smsRecord/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-smsRecord/smsRecord/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-smsRecord/smsRecord/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-smsTemplate/smsTemplate/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-smsTemplate/smsTemplate/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/blade-smsTemplate/smsTemplate/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-smsTemplate/smsTemplate/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-smsTemplate/smsTemplate/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export const getUserlnfoByDistrictlds = (districtIds) => { |
| | | export const getUserlnfoByDistrictlds = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-system/user/getUserInfoByDistrictIds', |
| | | url: '/api/blade-household/household/getUserInfoByDistrictIds', |
| | | method: 'get', |
| | | params: { |
| | | districtIds, |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | |
| | | import request from '@/router/axios' |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-task/task/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-task/task/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getTaskPlaceSelfCheckList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-taskPlaceSelfCheck/taskPlaceSelfCheck/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-taskPlaceSelfCheck/taskPlaceSelfCheck/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const getTaskNoFraudReportingList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const applyTaskExamine = (data) => { |
| | | return request({ |
| | | url: "/api/blade-task/task/examine", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export const getBailReportingPage = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-task/task/getBailReportingPage', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-task/task/getBailReportingPage', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const removeTask = (row) => { |
| | | return request({ |
| | | url: '/api/blade-task/task/removeTask', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-task/task/removeTask', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-task/task/save', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-task/task/save', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-task/task/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | return request({ |
| | | url: '/api/blade-task/task/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios' |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/blade-jobInfo/jobInfo/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/blade-jobInfo/jobInfo/addJob', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-jobInfo/jobInfo/updateJob', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (params) => { |
| | | return request({ |
| | | url: "/api/blade-jobInfo/jobInfo/getDetail", |
| | | method: "get", |
| | | params: { |
| | | ...params, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: "/api/blade-jobInfo/jobInfo/remove", |
| | | method: "post", |
| | | params: { |
| | | ids, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | export const start = (row) => { |
| | | return request({ |
| | | url: '/api/blade-jobInfo/jobInfo/start', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const stop = (row) => { |
| | | return request({ |
| | | url: '/api/blade-jobInfo/jobInfo/stop', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | |
| | | * 全局配置文件 |
| | | */ |
| | | export default { |
| | | title: "saber", |
| | | logo: "S", |
| | | key: "saber", //配置主键,目前用于存储 |
| | | title: "jczz", |
| | | logo: "J", |
| | | key: "jczz", //配置主键,目前用于存储 |
| | | indexTitle: "基层智治综合协同平台", |
| | | clientId: "saber", // 客户端id |
| | | clientSecret: "saber_secret", // 客户端密钥 |
| | | clientId: "jczz", // 客户端id |
| | | clientSecret: "jczz_secret_FaXfddsafRsfjlsdf2A12412", // 客户端密钥 |
| | | tenantMode: true, // 是否开启租户模式 |
| | | tenantId: "000000", // 管理组租户编号 |
| | | captchaMode: true, // 是否开启验证码模式 |
| | |
| | | <p class="title">基层智治综合协同平台</p> |
| | | </div> |
| | | <div class="login-border"> |
| | | <img class="img" src="/img/logo.png" alt=""> |
| | | <!-- <img class="img" src="/img/logo.png" alt=""> --> |
| | | <div class="login-main"> |
| | | |
| | | <h4 class="login-title"> |
| | |
| | | import Cookies from 'js-cookie' |
| | | const TokenKey = 'saber-access-token' |
| | | const RefreshTokenKey = 'saber-refresh-token' |
| | | const TokenKey = 'jczz-access-token' |
| | | const RefreshTokenKey = 'jczz-refresh-token' |
| | | const SessionId = 'JSESSIONID'; |
| | | const UserId = 'b-user-id'; |
| | | export function getToken() { |
| | |
| | | prop: "articleList", |
| | | span: 12, |
| | | minRows: 2, |
| | | type: "cascader", |
| | | type: "tree", |
| | | dataType: "string", |
| | | multiple: true, |
| | | tags: true, |
| | | // search: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "name", |
| | |
| | | :deep(.avue-form__menu--center .el-button) { |
| | | margin: 0 5px 0 0; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | articleId: '', |
| | | parentId: '', |
| | | level: '', |
| | | children: [{ |
| | | optionContent: '', |
| | | optionDetail: '', |
| | | number: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | articleId: '', |
| | | parentId: '', |
| | | level: '', |
| | | }] |
| | | children: [] |
| | | }, |
| | | optionDiscuss: { |
| | | emptyText: '取消', |
| | |
| | | }], |
| | | }, |
| | | { |
| | | label: '议题必填', |
| | | prop: 'mandatoryFlag', |
| | | type: 'radio', |
| | | value: 1, |
| | | button: true, |
| | | row: true, |
| | | dicData: [{ |
| | | label: '否', |
| | | value: 1 |
| | | }, { |
| | | label: '是', |
| | | value: 2 |
| | | }], |
| | | rules: [{ |
| | | required: true, |
| | | message: '请选择是否必填', |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | { |
| | | label: '选项范围', |
| | | prop: 'optionRange', |
| | | type: 'radio', |
| | |
| | | button: true, |
| | | row: true, |
| | | dicData: [{ |
| | | label: '多选', |
| | | value: 1 |
| | | }, { |
| | | label: '单选', |
| | | value: 0 |
| | | }, { |
| | | label: '多选', |
| | | value: 1 |
| | | }], |
| | | rules: [{ |
| | | required: true, |
| | |
| | | }], |
| | | }, |
| | | { |
| | | label: '最多选择数', |
| | | label: '最少选', |
| | | prop: 'optionNumberMin', |
| | | display: false, |
| | | row: true, |
| | | min: 1, |
| | | max: 10, |
| | | type: 'number', |
| | | step: 1, |
| | | value: 1, |
| | | rules: [{ |
| | | required: true, |
| | | message: '请输入最少可选择数量', |
| | | trigger: 'blur' |
| | | }], |
| | | span: 3, |
| | | }, |
| | | { |
| | | label: '最多选', |
| | | prop: 'optionNumber', |
| | | display: false, |
| | | min: 1, |
| | | row: true, |
| | | max: 10, |
| | | type: 'number', |
| | | step: 1, |
| | | value: 1 |
| | | value: 1, |
| | | rules: [{ |
| | | required: true, |
| | | message: '请输入最多可选择数量', |
| | | trigger: 'blur' |
| | | }], |
| | | span: 3, |
| | | }, |
| | | { |
| | | width: 110, |
| | | labelWidth: 100, |
| | | label: "附件", |
| | | prop: "attachment", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-pdfFile", |
| | | accept: "application/pdf", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: '选项内容', |
| | |
| | | type: 'dynamic', |
| | | span: 24, |
| | | children: { |
| | | rowAdd: (done) => { |
| | | // this.$message.success('新增回调' + this.disCussFrom.children.length); |
| | | this.addC(this.disCussFrom.children.length) |
| | | done({ |
| | | input: '默认值' |
| | | }); |
| | | }, |
| | | rowDel: (row, done) => { |
| | | // this.$message.success('删除回调' + this.disCussFrom.children.length); |
| | | this.reduceC(this.disCussFrom.children.length) |
| | | done(); |
| | | }, |
| | | column: [{ |
| | | label: '选项标题', |
| | | prop: 'optionContent', |
| | |
| | | handler(newData) { |
| | | // console.log('** ** ** ** ** ** **', newData) |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | const columnMin = this.findObject(this.optionDiscuss.column, "optionNumberMin") |
| | | if (newData == 1) { |
| | | column.display = true |
| | | columnMin.display = true |
| | | } else { |
| | | column.display = false |
| | | columnMin.display = false |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | addC(number) { |
| | | console.log("******************", number) |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | const columnMin = this.findObject(this.optionDiscuss.column, "optionNumberMin") |
| | | column.max = number + 1 |
| | | columnMin.max = number + 1 |
| | | if (this.disCussFrom.optionNumber > number + 1) { |
| | | this.disCussFrom.optionNumber = number + 1 |
| | | } |
| | | if (this.disCussFrom.optionNumberMin > number + 1) { |
| | | this.disCussFrom.optionNumberMin = number + 1 |
| | | } |
| | | }, |
| | | |
| | | editC(number) { |
| | | console.log("******************", number) |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | const columnMin = this.findObject(this.optionDiscuss.column, "optionNumberMin") |
| | | column.max = number |
| | | columnMin.max = number |
| | | }, |
| | | |
| | | |
| | | reduceC(number) { |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | const columnMin = this.findObject(this.optionDiscuss.column, "optionNumberMin") |
| | | columnMin.max = number - 1 |
| | | column.max = number - 1 |
| | | if (this.disCussFrom.optionNumber > number - 1) { |
| | | this.disCussFrom.optionNumber = number - 1 |
| | | } |
| | | if (this.disCussFrom.optionNumberMin > number - 1) { |
| | | this.disCussFrom.optionNumberMin = number - 1 |
| | | } |
| | | }, |
| | | |
| | | handleExport() { |
| | | this.$confirm("是否导出投票人员数据?", "提示", { |
| | |
| | | } |
| | | data = Qs.stringify(data) |
| | | exportBlob( |
| | | `/api/blade-userTopics/userTopics/exportUser?${this.website.tokenHeader}=${getToken()}&` + data).then( |
| | | res => { |
| | | downloadXls(res.data, `投票人员${dateNow()}.xlsx`) |
| | | NProgress.done() |
| | | }) |
| | | `/api/blade-userTopics/userTopics/exportUser?${this.website.tokenHeader}=${getToken()}&` + data) |
| | | .then( |
| | | res => { |
| | | downloadXls(res.data, `投票人员${dateNow()}.xlsx`) |
| | | NProgress.done() |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | |
| | |
| | | done() |
| | | }, |
| | | |
| | | openUser(row, type = 0) { |
| | | openUser(row, type) { |
| | | this.type = type |
| | | this.popupTableUserShow = true |
| | | this.query = {} |
| | |
| | | }, |
| | | |
| | | initData(newData) { |
| | | console.log("======>", newData); |
| | | this.editFlag = false |
| | | this.popupTableShow = true |
| | | this.articleId = newData.id |
| | |
| | | handleSubmit(form, done) { |
| | | done() |
| | | form.articleId = this.articleId |
| | | console.log("form===>", form); |
| | | |
| | | |
| | | if (this.editFlag && Array.isArray(form.attachment)) { |
| | | if (form.attachment.length > 0) { |
| | | var urls = [] |
| | | // var split = form.attachment.split(",") |
| | | form.attachment.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | form.attachment = urls.join(",") |
| | | } else { |
| | | form.attachment = ""; |
| | | } |
| | | } else { |
| | | if (form.attachment) { |
| | | var urls = []; |
| | | var splits = form.attachment.split(","); |
| | | splits.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | form.attachment = urls.join(",") |
| | | } |
| | | } |
| | | |
| | | if (this.disCussFromListClone.length > 0) { |
| | | this.disCussFromListClone.forEach(item => { |
| | | if (form.children.length > 0) { |
| | |
| | | // 提交修改 |
| | | rowUpdate(row, index, done, loading) { |
| | | done() |
| | | |
| | | if (row.attachment.length > 0) { |
| | | var urls = [] |
| | | var split = row.attachment.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.attachment = urls.join(",") |
| | | } |
| | | |
| | | if (!row.id) { |
| | | addPd(row).then(() => { |
| | | this.onLoad() |
| | |
| | | }, |
| | | |
| | | add() { |
| | | this.disCussFrom = {} |
| | | this.editFlag = true |
| | | }, |
| | | |
| | |
| | | this.disCussFrom = row |
| | | this.disCussFromListClone = [].concat(row.children) |
| | | this.editFlag = true |
| | | this.editC(this.disCussFrom.children.length) |
| | | }, |
| | | |
| | | deletes(row) { |
| | |
| | | this.userPage.total = data.total |
| | | this.userData = data.records |
| | | this.userData.forEach(item => { |
| | | if (item.avatar.length > 0) { |
| | | if (item.avatar) { |
| | | item.avatar = website.minioUrl + item.avatar |
| | | } |
| | | if (item.signaturePath && item.signaturePath.length > 0) { |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped></style> |
| | |
| | | @close="handleClose" @open="opens"> |
| | | <avue-form ref="DisCussFrom" :option="option" v-model="froms" @submit="handleSubmit"></avue-form> |
| | | </el-dialog> |
| | | |
| | | <userList ref="userList" @selectPersonList="selectPersonList"></userList> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | getDictionary |
| | | } from '@/api/system/dict' |
| | | import userList from "./userList.vue"; |
| | | |
| | | |
| | | // import { |
| | | // getList as getHouseholdList, |
| | |
| | | |
| | | let formData = {} |
| | | export default { |
| | | components: { |
| | | userList |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisibles: false, |
| | |
| | | { |
| | | display: false, |
| | | label: "选择用户", |
| | | prop: "userIds", |
| | | prop: "userName", |
| | | tags: true, |
| | | type: "tree", |
| | | type: "input", |
| | | multiple: true, |
| | | span: 12, |
| | | offset: 8, |
| | |
| | | hide: true, |
| | | row: true, |
| | | // dicUrl: `/api/blade-system/user/getUserlnfoByDistrictlds?districtlds={{}}`, |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | dicData: [], |
| | | // props: { |
| | | // label: 'name', |
| | | // value: 'id', |
| | | // }, |
| | | // dicData: [], |
| | | rules: [{ |
| | | required: true, |
| | | message: '请输入姓名', |
| | | trigger: 'blur' |
| | | }], |
| | | focus: ({ |
| | | value, |
| | | column |
| | | }) => { |
| | | // this.$message.success('focus事件查看控制台') |
| | | // console.log('获取焦点', value, column) |
| | | // this.$refs.userList && this.$refs.userList.resetForm() |
| | | this.$refs.userList.show(this.discussion.articleRange) |
| | | }, |
| | | }, |
| | | |
| | | { |
| | |
| | | dialogVisibles: false, |
| | | articleId: '', |
| | | discussion: {}, |
| | | id: "" |
| | | id: "", |
| | | personList: [], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getUserList() |
| | | // this.getUserList() |
| | | }, |
| | | |
| | | mounted() { |
| | |
| | | watch: { |
| | | 'froms.appointUser': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "userIds") |
| | | const column = this.findObject(this.option.column, "userName") |
| | | if (newData == 1) { |
| | | column.display = true |
| | | // this.$refs.userList.show() |
| | | } else { |
| | | column.display = false |
| | | } |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | selectPersonList(personList) { |
| | | console.log(personList, "++++++++++++") |
| | | this.personList = personList |
| | | let nameList = personList.map(e => { |
| | | return e.name |
| | | }) |
| | | this.froms.userName = nameList.join(",") |
| | | }, |
| | | getuserInfoByDistrictId() { |
| | | getUserlnfoByDistrictlds(this.discussion.articleRange).then(res => { |
| | | const column = this.findObject(this.option.column, "userIds") |
| | | column.dicData = res.data.data |
| | | column.dicData = res.data.data.records |
| | | }) |
| | | }, |
| | | getUserList() { |
| | |
| | | handleSubmit(form, done) { |
| | | form.articleId = this.articleId |
| | | form.eventType = 1 |
| | | form.userIds = JSON.stringify(form.userIds) |
| | | form.userIds = this.personList.map(e => e.id).join(",") |
| | | // form.userIds = JSON.stringify(form.userIds) |
| | | if (form.appointUser == 0) { |
| | | form.userIds = '' |
| | | } |
| | |
| | | this.froms.userIds = JSON.parse(this.froms.userIds) |
| | | } |
| | | } |
| | | this.getuserInfoByDistrictId() |
| | | // this.getuserInfoByDistrictId() |
| | | |
| | | }) |
| | | }, |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog title="" append-to-body :visible.sync="dialogVisiblesUser" width="80%" :before-close="userHandleClose"> |
| | | <avue-crud ref="DataUser" :option="userOption" :data="dataUser" v-model="dataUser" :page="pageUser" |
| | | @search-change="searchChange" @search-reset="searchReset"></avue-crud> |
| | | </el-dialog> |
| | | </div> |
| | | <div> |
| | | <el-dialog title="" append-to-body :visible.sync="dialogVisiblesUser" width="80%" :before-close="userHandleClose"> |
| | | <avue-crud ref="DataUser" :option="userOption" :data="dataUser" v-model="dataUser" :page="pageUser" |
| | | @search-change="searchChange" @search-reset="searchReset"></avue-crud> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | |
| | | <!-- </basicContainer> --> |
| | | <!-- </basicContainer> --> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | getListPd, |
| | | getDetailPd, |
| | | addPd, |
| | | updatePd, |
| | | removePd, |
| | | } from "@/api/discuss/publicDiscuss" |
| | | import { |
| | | } from "@/api/discuss/publicDiscuss" |
| | | import { |
| | | getPageUser, |
| | | } from "@/api/discuss/userPublicEnroll" |
| | | import option from "@/option/discuss/publicDiscuss" |
| | | import { |
| | | } from "@/api/discuss/userPublicEnroll" |
| | | import option from "@/option/discuss/publicDiscuss" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import { |
| | | } from "vuex" |
| | | import { |
| | | getDictionary |
| | | } from '@/api/system/dict' |
| | | } from '@/api/system/dict' |
| | | |
| | | import website from '@/config/website' |
| | | import website from '@/config/website' |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | option1: { |
| | | menu: false, |
| | | addBtn: false, |
| | | column: [{ |
| | | label: '姓名', |
| | | prop: 'name' |
| | | }, { |
| | | label: '头像', |
| | | prop: 'avatar' |
| | | }, { |
| | | label: '手机', |
| | | prop: 'phone' |
| | | }, { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: '小区名称', |
| | | prop: 'aoiName' |
| | | }, { |
| | | label: '地址', |
| | | prop: 'addressName' |
| | | }, { |
| | | label: '时间', |
| | | prop: 'createTime' |
| | | }] |
| | | }, |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | }, |
| | | export default { |
| | | data() { |
| | | return { |
| | | option1: { |
| | | menu: false, |
| | | addBtn: false, |
| | | column: [{ |
| | | label: '姓名', |
| | | prop: 'name' |
| | | }, { |
| | | label: '头像', |
| | | prop: 'avatar' |
| | | }, { |
| | | label: '手机', |
| | | prop: 'phone' |
| | | }, { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: '小区名称', |
| | | prop: 'aoiName' |
| | | }, { |
| | | label: '地址', |
| | | prop: 'addressName' |
| | | }, { |
| | | label: '时间', |
| | | prop: 'createTime' |
| | | }] |
| | | }, |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | }, |
| | | |
| | | dialogVisibles: false, |
| | | dialogVisiblesUser: false, |
| | | // 弹框标题 |
| | | title: '', |
| | | // 是否展示弹框 |
| | | box: false, |
| | | // 是否显示查询 |
| | | search: true, |
| | | // 加载中 |
| | | loading: true, |
| | | // 是否为查看模式 |
| | | view: false, |
| | | // 查询信息 |
| | | query: {}, |
| | | // 分页信息 |
| | | page: { |
| | | pageSize: 10, |
| | | pageSizes: [10, 20, 30, 50, 100], |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | dialogVisibles: false, |
| | | dialogVisiblesUser: false, |
| | | // 弹框标题 |
| | | title: '', |
| | | // 是否展示弹框 |
| | | box: false, |
| | | // 是否显示查询 |
| | | search: true, |
| | | // 加载中 |
| | | loading: true, |
| | | // 是否为查看模式 |
| | | view: false, |
| | | // 查询信息 |
| | | query: {}, |
| | | // 分页信息 |
| | | page: { |
| | | pageSize: 10, |
| | | pageSizes: [10, 20, 30, 50, 100], |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | |
| | | // 分页信息 |
| | | pageUser: { |
| | | pageSize: 10, |
| | | pageSizes: [10, 20, 30, 50, 100], |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | // 表单数据 |
| | | form: {}, |
| | | // 选择行 |
| | | selectionList: [], |
| | | userOption: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | // menuWidth: 500, |
| | | menu: false, |
| | | // 分页信息 |
| | | pageUser: { |
| | | pageSize: 10, |
| | | pageSizes: [10, 20, 30, 50, 100], |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | // 表单数据 |
| | | form: {}, |
| | | // 选择行 |
| | | selectionList: [], |
| | | userOption: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | // menuWidth: 500, |
| | | menu: false, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | selection: true, |
| | | delBtn: false, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | header:false, |
| | | column: [{ |
| | | label: '姓名', |
| | | prop: 'name', |
| | | search: true, |
| | | }, { |
| | | label: '头像', |
| | | type: 'upload', |
| | | listType: "picture-img", |
| | | prop: 'avatar' |
| | | }, |
| | | { |
| | | label: '签名', |
| | | type: 'upload', |
| | | listType: "picture-img", |
| | | prop: 'signaturePath' |
| | | }, |
| | | { |
| | | label: '手机', |
| | | prop: 'phone', |
| | | search: true, |
| | | }, { |
| | | label: '小区', |
| | | prop: 'aoiName' |
| | | }, { |
| | | label: '地址', |
| | | prop: 'addressName' |
| | | }, { |
| | | label: '时间', |
| | | prop: 'createTime' |
| | | } |
| | | ] |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | selection: true, |
| | | delBtn: false, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | header: false, |
| | | column: [{ |
| | | label: '姓名', |
| | | prop: 'name', |
| | | search: true, |
| | | }, { |
| | | label: '头像', |
| | | type: 'upload', |
| | | listType: "picture-img", |
| | | prop: 'avatar' |
| | | }, |
| | | // 表单列表 |
| | | data: [], |
| | | dataUser: [], |
| | | } |
| | | { |
| | | label: '签名', |
| | | type: 'upload', |
| | | listType: "picture-img", |
| | | prop: 'signaturePath' |
| | | }, |
| | | { |
| | | label: '手机', |
| | | prop: 'phone', |
| | | search: true, |
| | | }, { |
| | | label: '小区', |
| | | prop: 'aoiName' |
| | | }, { |
| | | label: '地址', |
| | | prop: 'addressName' |
| | | }, { |
| | | label: '时间', |
| | | prop: 'createTime' |
| | | } |
| | | ] |
| | | }, |
| | | // 表单列表 |
| | | data: [], |
| | | dataUser: [], |
| | | } |
| | | }, |
| | | mounted () { |
| | | // this.init(); |
| | | // this.onLoad(this.page); |
| | | mounted() { |
| | | // this.init(); |
| | | // this.onLoad(this.page); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | ...mapGetters(["permission"]), |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | } |
| | | }, |
| | | methods: { |
| | | searchReset () { |
| | | this.query = {} |
| | | this.getUser(this.userPage) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.getUser(this.userPage) |
| | | }, |
| | | |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.userPage.currentPage = 1 |
| | | this.getUser(this.userPage, params) |
| | | done() |
| | | }, |
| | | init (data) { |
| | | this.houseCode = data.houseCode |
| | | this.onLoad(this.page) |
| | | }, |
| | | getUser (page, params) { |
| | | getPageUser(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| | | this.pageUser.total = data.total |
| | | this.dataUser = data.records |
| | | this.dataUser.forEach(item => { |
| | | if (item.avatar.length > 0) { |
| | | item.avatar = website.minioUrl + item.avatar |
| | | } |
| | | if (item.signaturePath && item.signaturePath.length > 0) { |
| | | item.signaturePath = website.minioUrl + item.signaturePath |
| | | console.log("=====>", item.signaturePath) |
| | | } |
| | | }) |
| | | this.loading = false |
| | | // this.selectionClear() |
| | | }) |
| | | }, |
| | | userHandleClose () { |
| | | this.dialogVisiblesUser = false |
| | | this.dataUser = [] |
| | | // this.$refs.DataUser && this.$refs.DataUser.resetForm() |
| | | // console.log(this.$refs, 90999) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.userPage.currentPage = 1 |
| | | this.getUser(this.userPage, params) |
| | | done() |
| | | }, |
| | | init(data) { |
| | | this.houseCode = data.houseCode |
| | | this.onLoad(this.page) |
| | | }, |
| | | getUser(page, params) { |
| | | getPageUser(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| | | this.pageUser.total = data.total |
| | | this.dataUser = data.records |
| | | this.dataUser.forEach(item => { |
| | | if (item.avatar) { |
| | | item.avatar = website.minioUrl + item.avatar |
| | | console.log("=avatar====>", item.avatar) |
| | | } |
| | | if (item.signaturePath && item.signaturePath.length > 0) { |
| | | item.signaturePath = website.minioUrl + item.signaturePath |
| | | console.log("=====>", item.signaturePath) |
| | | } |
| | | }) |
| | | this.loading = false |
| | | // this.selectionClear() |
| | | }) |
| | | }, |
| | | userHandleClose() { |
| | | this.dialogVisiblesUser = false |
| | | this.dataUser = [] |
| | | // this.$refs.DataUser && this.$refs.DataUser.resetForm() |
| | | // console.log(this.$refs, 90999) |
| | | }, |
| | | |
| | | openUser (row) { |
| | | this.dialogVisiblesUser = true |
| | | let params = { |
| | | articleId: row.id |
| | | } |
| | | this.getUser(this.pageUser, params) |
| | | }, |
| | | |
| | | openDilog (row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm = row |
| | | let times = new Date(row.endTime).getTime() |
| | | this.discussForm.endTime = times |
| | | console.table(this.discussForm) |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | searchHide () { |
| | | this.search = !this.search |
| | | }, |
| | | searchChange () { |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page) |
| | | }, |
| | | handleSubmit (form, done) { |
| | | done() |
| | | if (!this.discussForm.id) { |
| | | addPd(this.discussForm).then(() => { |
| | | this.dialogVisibles = false |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | } else { |
| | | updatePd(this.discussForm).then(() => { |
| | | this.dialogVisibles = false |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | handleAdd () { |
| | | this.title = '新增' |
| | | this.form = {} |
| | | this.box = true |
| | | }, |
| | | handleEdit (row) { |
| | | this.title = '编辑' |
| | | this.box = true |
| | | getDetailPd(row.id).then(res => { |
| | | this.form = res.data.data |
| | | }) |
| | | }, |
| | | handleView (row) { |
| | | this.title = '查看' |
| | | this.view = true |
| | | this.box = true |
| | | getDetailPd(row.id).then(res => { |
| | | this.form = res.data.data |
| | | }) |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return removePd(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.selectionClear() |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | beforeClose (done) { |
| | | done() |
| | | this.form = {} |
| | | this.view = false |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | // this.$refs.table.clearSelection(); |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | this.onLoad(this.page) |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | this.onLoad(this.page) |
| | | }, |
| | | onLoad (page, params = { |
| | | eventType: 0 |
| | | }) { |
| | | this.loading = true |
| | | getListPd(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() |
| | | }) |
| | | openUser(row) { |
| | | this.dialogVisiblesUser = true |
| | | let params = { |
| | | articleId: row.id |
| | | } |
| | | this.getUser(this.pageUser, params) |
| | | }, |
| | | |
| | | openDilog(row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm = row |
| | | let times = new Date(row.endTime).getTime() |
| | | this.discussForm.endTime = times |
| | | console.table(this.discussForm) |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | searchHide() { |
| | | this.search = !this.search |
| | | }, |
| | | searchChange() { |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page) |
| | | }, |
| | | handleSubmit(form, done) { |
| | | done() |
| | | if (!this.discussForm.id) { |
| | | addPd(this.discussForm).then(() => { |
| | | this.dialogVisibles = false |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | } else { |
| | | updatePd(this.discussForm).then(() => { |
| | | this.dialogVisibles = false |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | handleAdd() { |
| | | this.title = '新增' |
| | | this.form = {} |
| | | this.box = true |
| | | }, |
| | | handleEdit(row) { |
| | | this.title = '编辑' |
| | | this.box = true |
| | | getDetailPd(row.id).then(res => { |
| | | this.form = res.data.data |
| | | }) |
| | | }, |
| | | handleView(row) { |
| | | this.title = '查看' |
| | | this.view = true |
| | | this.box = true |
| | | getDetailPd(row.id).then(res => { |
| | | this.form = res.data.data |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return removePd(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.selectionClear() |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | beforeClose(done) { |
| | | done() |
| | | this.form = {} |
| | | this.view = false |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | // this.$refs.table.clearSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | this.onLoad(this.page) |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | this.onLoad(this.page) |
| | | }, |
| | | onLoad(page, params = { |
| | | eventType: 0 |
| | | }) { |
| | | this.loading = true |
| | | getListPd(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() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .el-pagination { |
| | | .el-pagination { |
| | | margin-top: 20px; |
| | | } |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <el-dialog class="dept-user-table-dialog" width="70%" title="选择人员" modal-append-to-body="false" append-to-body="true" |
| | | :close-on-click-model="true" :visible.sync="showDialog" @close="showDialog = false"> |
| | | <!-- <div class="left"> |
| | | <el-scrollbar> |
| | | <basic-container> |
| | | <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" /> |
| | | </basic-container> |
| | | </el-scrollbar> |
| | | </div> --> |
| | | <div class="right"> |
| | | <avue-crud :option="option" :search.sync="search" :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"></avue-crud> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="showDialog = false">取 消</el-button> |
| | | <el-button type="primary" @click="submit">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getDeptLazyTree |
| | | } from "@/api/system/dept"; |
| | | import { |
| | | getUserlnfoByDistrictlds |
| | | } from "@/api/system/user"; |
| | | import { |
| | | mapGetters |
| | | } from "vuex"; |
| | | |
| | | export default { |
| | | name: "DeptUserTable", |
| | | data() { |
| | | return { |
| | | showDialog: false, |
| | | form: {}, |
| | | search: {}, |
| | | selectionList: [], |
| | | query: {}, |
| | | loading: true, |
| | | platformLoading: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | treeDeptId: '', |
| | | treeData: [], |
| | | treeOption: { |
| | | nodeKey: 'id', |
| | | lazy: true, |
| | | treeLoad: function(node, resolve) { |
| | | const parentId = (node.level === 0) ? 0 : node.data.id |
| | | getDeptLazyTree(parentId).then(res => { |
| | | resolve(res.data.data.map(item => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren |
| | | } |
| | | })) |
| | | }) |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | | size: 'small', |
| | | props: { |
| | | labelText: '标题', |
| | | label: 'title', |
| | | value: 'value', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | option: { |
| | | height: 'auto', |
| | | calcHeight: 120, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | rowKey: "id", |
| | | reserveSelection: true, |
| | | column: [{ |
| | | label: "用户姓名", |
| | | prop: "name", |
| | | search: true, |
| | | searchSpan: 4, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "电话", |
| | | prop: "phoneNumber", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "地址", |
| | | width: 560, |
| | | prop: "address", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "楼栋", |
| | | prop: "building", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "单元", |
| | | prop: "unit", |
| | | searchSpan: 4, |
| | | slot: true, |
| | | search: true, |
| | | display: false |
| | | }, |
| | | |
| | | ], |
| | | }, |
| | | data: [], |
| | | articleRange: '', |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | console.log(ele, "---------") |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | idsList() { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push({ |
| | | id: ele.id, |
| | | name: ele.name |
| | | }) |
| | | }) |
| | | return ids |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit("selectPersonList", this.idsList) |
| | | this.showDialog = false |
| | | }, |
| | | |
| | | show(articleRange) { |
| | | console.log("***111111111111111111***", articleRange) |
| | | this.articleRange = articleRange |
| | | this.showDialog = true |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page) |
| | | }, |
| | | |
| | | nodeClick(data) { |
| | | this.treeDeptId = data.id |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.treeDeptId = '' |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | console.log(list, "list") |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | this.onLoad(this.page) |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true |
| | | params.districtIds = this.articleRange |
| | | getUserlnfoByDistrictlds(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId) |
| | | .then(res => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | // this.selectionClear() |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .dept-user-table-dialog { |
| | | margin: 0 !important; |
| | | |
| | | .el-dialog { |
| | | display: flex; |
| | | flex-direction: column; |
| | | margin: auto !important; |
| | | position: absolute; |
| | | top: 0 !important; |
| | | left: 0 !important; |
| | | right: 0 !important; |
| | | bottom: 0 !important; |
| | | //width: 1000px !important; |
| | | height: 800px !important; |
| | | |
| | | .el-dialog__body { |
| | | height: 0 !important; |
| | | flex: 1; |
| | | display: flex; |
| | | |
| | | .left { |
| | | width: 0; |
| | | flex: 2; |
| | | } |
| | | |
| | | .right { |
| | | margin-left: 10px; |
| | | flex: 9; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | 编辑议题 |
| | | </el-button> |
| | | |
| | | <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row, 1)"> |
| | | <el-button icon="el-icon-user" :size="size" v-if="row.articleType != 4" :type="type" |
| | | @click.stop="openUserPopup(row, 0)"> |
| | | 参与用户 |
| | | </el-button> |
| | | |
| | | <el-button icon="el-icon-user" v-if="row.articleType == 4" :size="size" :type="type" |
| | | @click.stop="handleExport(row)"> |
| | | 导出投票结果 |
| | | </el-button> |
| | | |
| | | <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)"> |
| | |
| | | } from "vuex" |
| | | import deitDiscussion from "./components/deitDiscussion" |
| | | import discussionManageChild from "./components/discussionManageChild" |
| | | import NProgress from 'nprogress' |
| | | import 'nprogress/nprogress.css' |
| | | import Qs from "qs" |
| | | import { |
| | | exportBlob |
| | | } from "@/api/common" |
| | | import { |
| | | getToken |
| | | } from '@/util/auth' |
| | | import { |
| | | downloadXls |
| | | } from "@/util/util" |
| | | import { |
| | | dateNow |
| | | } from "@/util/date" |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | minRows: 2, |
| | | tags: true, |
| | | type: "tree", |
| | | dataType: "string", |
| | | multiple: true, |
| | | dicData: [], |
| | | rules: [{ |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleExport(row) { |
| | | this.$confirm("是否导出投票结果数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | NProgress.start() |
| | | this.query = {} |
| | | this.query.articleId = row.id |
| | | this.query.districtId = row.articleRange |
| | | var data = { |
| | | ...this.query |
| | | } |
| | | data = Qs.stringify(data) |
| | | exportBlob( |
| | | `/api/blade-userTopics/userTopics/exportDataIndex?${this.website.tokenHeader}=${getToken()}&` + data) |
| | | .then( |
| | | res => { |
| | | downloadXls(res.data, `投票结果${dateNow()}.xlsx`) |
| | | NProgress.done() |
| | | }) |
| | | }) |
| | | }, |
| | | iscommentInput(e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | |
| | | }) |
| | | }, |
| | | |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row) |
| | | openUserPopup(row, type) { |
| | | this.$refs.DeitDiscussion.openUser(row, type) |
| | | }, |
| | | |
| | | openDilog(row, type) { |
| | |
| | | row.videoUrl = "" |
| | | } |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | row.articleRange = row.articleList |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | row.articleRange = row.articleList |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | // }) |
| | | this.form = { |
| | | ...data, |
| | | articleList: JSON.parse(data.articleRange) |
| | | articleList: data.articleRange |
| | | } |
| | | }) |
| | | } |
| | |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | // item.articleRange = JSON.parse(item.articleRange) |
| | | item.articleList = item.articleRange |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "文章范围", |
| | | prop: "articleList", |
| | | span: 12, |
| | | minRows: 2, |
| | | type: "tree", |
| | | multiple: true, |
| | | dataType: "string", |
| | | tags: true, |
| | | dicData: [], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择文章范围", |
| | | trigger: "blur", |
| | | }, ], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | // hide: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "文章封面", |
| | | prop: "url", |
| | |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "文章范围", |
| | | prop: "articleList", |
| | | span: 12, |
| | | minRows: 2, |
| | | type: "tree", |
| | | multiple: true, |
| | | tags: true, |
| | | dicData: [], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择文章范围", |
| | | trigger: "blur", |
| | | }, ], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | hide: true, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "文章类型", |
| | |
| | | value: 3, // // 类型 0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查 |
| | | }], |
| | | }, |
| | | { |
| | | label: "发布时间", |
| | | prop: "dateTime", |
| | | type: "daterange", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchSpan: 6, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | // { |
| | | // label: "发布时间", |
| | | // prop: "dateTime", |
| | | // type: "daterange", |
| | | // format: "yyyy-MM-dd", |
| | | // valueFormat: "yyyy-MM-dd", |
| | | // searchSpan: 6, |
| | | // searchRange: true, |
| | | // hide: true, |
| | | // addDisplay: false, |
| | | // editDisplay: false, |
| | | // viewDisplay: false, |
| | | // search: true, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择发布时间", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | width: 100, |
| | | label: "发布时间", |
| | |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | editDisplay: false, |
| | | }, |
| | | { |
| | | width: 100, |
| | |
| | | // row.videoUrl = ""; |
| | | // } |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | row.articleRange = row.articleList |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | row.articleRange = row.articleList |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | }) |
| | | data.url = urls.join(",") |
| | | } |
| | | data.articleList = JSON.parse(data.articleRange) |
| | | data.articleList = data.articleRange |
| | | this.form = data |
| | | }) |
| | | } |
| | |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | item.articleList = item.articleRange |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | |
| | | <!-- 走访日志 --> |
| | | <!-- 轮播图 --> |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel" |
| | |
| | | data() { |
| | | return { |
| | | form: { |
| | | publicFlag: 1 |
| | | publicFlag: 2 |
| | | }, |
| | | query: {}, |
| | | loading: true, |
| | |
| | | label: "综治", |
| | | value: 2 |
| | | } |
| | | ] |
| | | ], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | width: 110, |
| | | labelWidth: 100, |
| | |
| | | prop: "publicFlag", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | // cascader: ["communityCode"], |
| | | type: "select", |
| | | type: "select", |
| | | dicData: [{ |
| | | label: "不公开", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "公开", |
| | | value: 2 |
| | | } |
| | | }, { |
| | | label: "限定公开", |
| | | value: 1 |
| | | }, |
| | | |
| | | ] |
| | | }, |
| | | // { |
| | | // width: 156, |
| | | // labelWidth: 100, |
| | | // overHidden: true, |
| | | // label: "所属社区", |
| | | // // parent: false, |
| | | // prop: "communityCode", |
| | | // multiple: true, |
| | | // tags: true, |
| | | // hide: true, |
| | | // dateType: "string", |
| | | // type: "tree", |
| | | // dicUrl: "/api/blade-system/region/tree?deptNature={{type}}", |
| | | // props: { |
| | | // label: "name", |
| | | // value: "id" |
| | | // }, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择所属社区", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | label: "范围", |
| | | width: 156, |
| | | labelWidth: 100, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | // parent: false, |
| | | prop: "communityCode", |
| | | multiple: true, |
| | | tags: true, |
| | | hide: true, |
| | | dataType: "string", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/tree?deptNature={{type}}", |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "公开范围", |
| | | prop: "rotationRange", |
| | | width: 156, |
| | | labelWidth: 100, |
| | | tags: true, |
| | | type: "tree", |
| | | multiple: true, |
| | | // dateType: "string", |
| | | dataType: "string", |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | cascader: ['articleId'], |
| | | dicUrl: "/api/blade-district/district/getDistrictTree?filterFlag=1", |
| | | rules: [{ |
| | |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | // hide: true, |
| | | }, |
| | | { |
| | | hide: true, |
| | |
| | | search: false, |
| | | viewDisabled: false, |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{rotationRange}}`, |
| | | formslot: true, |
| | | cascader: ['vote'], |
| | | // cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | |
| | | const column = this.findObject(this.option.column, "rotationRange") |
| | | if (newData == 1) { |
| | | column.editDisplay = true |
| | | column.addDisplay = true |
| | | } else { |
| | | column.editDisplay = false |
| | | column.addDisplay = false |
| | | } |
| | | |
| | | const column2 = this.findObject(this.option.column, "articleId") |
| | | if (newData == 1) { |
| | | column2.editDisplay = true |
| | | column2.addDisplay = true |
| | | } else { |
| | | column2.editDisplay = false |
| | | column2.addDisplay = false |
| | | } |
| | | |
| | | }, |
| | | }, |
| | | 'form.type': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "communityCode") |
| | | if (newData != 3) { |
| | | column.editDisplay = true |
| | | column.addDisplay = true |
| | | } else { |
| | | column.editDisplay = false |
| | | column.addDisplay = false |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | // if (row.rotationRange) { |
| | | // row.rotationRange = JSON.stringify(row.rotationRange) |
| | | // } |
| | | if (row.communityCode) { |
| | | row.communityCode = JSON.stringify(row.communityCode) |
| | | } |
| | | if (row.publicFlag == 2) { |
| | | row.rotationRange = '' |
| | | // row.rotationRange = JSON.stringify(row.rotationRange) |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | // if (row.rotationRange) { |
| | | // row.rotationRange = JSON.stringify(row.rotationRange) |
| | | // } |
| | | if (row.communityCode) { |
| | | row.communityCode = JSON.stringify(row.communityCode) |
| | | } |
| | | if (row.publicFlag == 2) { |
| | | row.rotationRange = '' |
| | | // row.rotationRange = JSON.stringify(row.rotationRange) |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | |
| | | if (["edit", "view"].includes(type)) { |
| | | getRotation(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | | // if (this.form.rotationRange) { |
| | | // this.form.rotationRange = JSON.parse(this.form.rotationRange) |
| | | // } |
| | | // if (this.form.communityCode) { |
| | | // this.form.communityCode = JSON.parse(this.form.communityCode) |
| | | // } |
| | | if (this.form.url.length > 0) { |
| | | var urls = [] |
| | | var names = this.form.url.split(",") |
| | |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | // if (item.rotationRange) { |
| | | // item.rotationRange = JSON.parse(item.rotationRange) |
| | | // } |
| | | // if (item.communityCode) { |
| | | // item.communityCode = JSON.parse(item.communityCode) |
| | | // } |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| New file |
| | |
| | | <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="menuLeft"> |
| | | <!-- <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_backblast_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> --> |
| | | </template> |
| | | |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | |
| | | <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row, 1)" v-if="permission.article_backblast_user"> |
| | | 浏览人员 |
| | | </el-button> |
| | | |
| | | <el-button v-if="row.publish == '1' && permission.article_backblast_addOrDel" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)"> |
| | | 撤销 |
| | | </el-button> |
| | | |
| | | <el-button v-if="row.publish == '0' && permission.article_backblast_addOrDel" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)"> |
| | | 发布 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <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, size }" slot="iscomment"> |
| | | <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <deitDiscussion ref="DeitDiscussion"> |
| | | </deitDiscussion> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getNotice, |
| | | upcomment |
| | | } from "@/api/article/article" |
| | | |
| | | import website from '@/config/website' |
| | | import deitDiscussion from "./components/deitDiscussion" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | export default { |
| | | components: { |
| | | deitDiscussion, |
| | | }, |
| | | data() { |
| | | return { |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | signatureFlag: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: 0, |
| | | userIds: '', |
| | | eventType: 1, |
| | | }, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: false, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | overHidden: true, |
| | | label: "宣传标题", |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入宣传标题", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "范围", |
| | | prop: "articleRange", |
| | | span: 24, |
| | | minRows: 2, |
| | | tags: true, |
| | | type: "tree", |
| | | multiple: true, |
| | | dicUrl:"/api/blade-district/district/getDistrictTree?filterFlag=1", |
| | | dataType:"string", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择范围", |
| | | trigger: "blur", |
| | | }, ], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | // hide: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // width: 110, |
| | | // label: "宣传类型", |
| | | // prop: "articleType", |
| | | // addDisplay: true, |
| | | // editDisplay: true, |
| | | // viewDisplay: true, |
| | | // searchSpan: 4, |
| | | // checkStrictly: true, |
| | | // dicUrl: "/api/blade-system/dict-biz/dictionary?code=investigateType", |
| | | // props: { |
| | | // label: "dictValue", |
| | | // value: "dictKey", |
| | | // }, |
| | | // search: true, |
| | | // type: "tree", |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择宣传类型", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | width: 110, |
| | | label: "观看得分", |
| | | prop: "score", |
| | | type: "number", |
| | | align:"center", |
| | | value:2, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入观看得分", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | search: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | searchSpan: 4, |
| | | value: "0", |
| | | slot: true, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布状态", |
| | | trigger: "blur", |
| | | }, ], |
| | | dicData: [{ |
| | | label: "未发布", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "已发布", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | span: 24, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | width: 80, |
| | | slot: true, |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "开启", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "视频", |
| | | prop: "videoUrl", |
| | | type: "upload", |
| | | accept: "video/mp4", |
| | | display: false, |
| | | hide: true, |
| | | span: 24, |
| | | listType: "picture-img", |
| | | action: "/api/depl/put-depl", |
| | | propsHttp: { |
| | | url: "data", |
| | | }, |
| | | }, |
| | | { |
| | | label: "宣传内容", |
| | | prop: "content", |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | optionDiscuss: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '开启投票', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择开启状态", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '投票限制', |
| | | prop: 'voteRestrictions', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '一人一票', |
| | | value: 0 |
| | | }, { |
| | | label: '一户一票', |
| | | value: 1 |
| | | }], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票限制", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '签名', |
| | | prop: 'signatureFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '不需要', |
| | | value: 0 |
| | | }, { |
| | | label: '需要', |
| | | value: 1 |
| | | }], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择是否签名", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | labelWidth: 100, |
| | | label: '指定用户', |
| | | prop: 'appointUser', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '不限制', |
| | | value: 0 |
| | | }, { |
| | | label: '指定用户', |
| | | value: 1 |
| | | }], |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择是否指定用户", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择截止时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | ] |
| | | }, |
| | | districtTree: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.articleType": { |
| | | handler(val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | }, ] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_backblast_add, true), |
| | | viewBtn: this.vaildData(this.permission.article_backblast_view, true), |
| | | delBtn: this.vaildData(this.permission.article_backblast_delete, true), |
| | | editBtn: this.vaildData(this.permission.article_backblast_edit, true), |
| | | } |
| | | }, |
| | | |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | 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: { |
| | | iscommentInput(e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | openEditPopup(row) { |
| | | getListPd(1, 10, { |
| | | eventType: 1, |
| | | articleId: row.id |
| | | }).then(res => { |
| | | if (res.data.data.records.length == 0) { |
| | | this.$message.warning('请先设置宣传规则!') |
| | | setTimeout(() => { |
| | | this.openDilog(row, 1) |
| | | }, 200) |
| | | } else { |
| | | this.$refs.DeitDiscussion.initData(row) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row) |
| | | }, |
| | | |
| | | openDilog(row, type) { |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | that.$refs.discussionManageChild.init(row) |
| | | }) |
| | | }, |
| | | |
| | | rowSave(row, done, loading) { |
| | | if (row.videoUrl.length == 0) { |
| | | row.videoUrl = "" |
| | | } |
| | | row.userid = this.userInfo.user_id |
| | | // row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | // 类型 0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查 5: 业主大会 6:反诈宣传 |
| | | row.type = 6 |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | 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(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | var names = data.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | data.url = urls.join(",") |
| | | } |
| | | // }) |
| | | // this.form = { |
| | | // ...data, |
| | | // articleList: JSON.parse(data.articleRange) |
| | | // } |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0], |
| | | endTime: dateTime[1], |
| | | ...this.query, |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | // 类型为反诈宣传的 |
| | | values.type = 6 |
| | | 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 |
| | | this.data.forEach(item => { |
| | | // item.articleRange = JSON.parse(item.articleRange) |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | // getDistrictTree(params = { |
| | | // filterFlag: 1 |
| | | // }).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 |
| | | // }) |
| | | }, |
| | | updateFb(row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | kqcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | </style> |
| | |
| | | v-text="textDispose(row, 'policemanPhoneflag', 'policemanPhone')"> |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size,index}" slot="peopleForm" > |
| | | <el-table :data="form.backblastPubPersonEntityList" v-if="form.backblastPubPersonEntityList"> |
| | | <el-table-column width="100" property="name" label="姓名" |
| | | label-class-name="workOrderStyle"></el-table-column> |
| | | <el-table-column width="150" property="telephone" label="手机号" label-class-name="workOrderStyle"> |
| | | </el-table-column> |
| | | <el-table-column width="160" property="idCard" label="身份证号" label-class-name="workOrderStyle"> |
| | | </el-table-column> |
| | | <el-table-column width="150" property="occupation" label="职业" label-class-name="workOrderStyle"> |
| | | </el-table-column> |
| | | <el-table-column width="160" property="address" label="居住地" label-class-name="workOrderStyle"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | <!-- <template slot="menuLeft"> |
| | | <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出 |
| | | </el-button> |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "宣传地址", |
| | | label: "地址", |
| | | prop: "address", |
| | | align: 'center', |
| | | minWidth: 210, |
| | | labelWidth:120, |
| | | // align: 'center', |
| | | minWidth: 180, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 5, |
| | | overHidden: true, |
| | | row:true, |
| | | span:24, |
| | | row: true, |
| | | span: 24, |
| | | }, { |
| | | label: "宣传内容", |
| | | label: "宣防内容", |
| | | prop: "pubContent", |
| | | labelWidth:120, |
| | | align: 'center', |
| | | type:"textarea", |
| | | row:true, |
| | | span:24, |
| | | overHidden:true, |
| | | labelWidth: 120, |
| | | // align: 'center', |
| | | type: "textarea", |
| | | row: true, |
| | | span: 24, |
| | | overHidden: true, |
| | | }, |
| | | |
| | | { |
| | | label: "是否下载国家反诈app", |
| | | prop: "isFzApp", |
| | | labelWidth: 120, |
| | | // align: 'center', |
| | | type: "select", |
| | | row: true, |
| | | span: 24, |
| | | overHidden: true, |
| | | hide: true, |
| | | dicData: [{ |
| | | label: "是", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: 2 |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "宣传图片", |
| | | label: "是否打开预警共能", |
| | | prop: "isOpenAlarm", |
| | | labelWidth: 120, |
| | | // align: 'center', |
| | | type: "select", |
| | | row: true, |
| | | span: 24, |
| | | overHidden: true, |
| | | hide: true, |
| | | dicData: [{ |
| | | label: "是", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: 2 |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "宣防佐证照片", |
| | | prop: "pubUrls", |
| | | // align: 'center', |
| | | fileType: 'img', |
| | | labelWidth:120, |
| | | labelWidth: 120, |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | width: 110, |
| | | row:true, |
| | | span:24, |
| | | row: true, |
| | | span: 24, |
| | | }, { |
| | | label: "宣传时间", |
| | | label: "时间", |
| | | prop: "createTime", |
| | | align: 'center', |
| | | labelWidth:120, |
| | | labelWidth: 120, |
| | | width: 156, |
| | | row:true, |
| | | row: true, |
| | | }, { |
| | | label: "民警姓名", |
| | | prop: "policeman", |
| | | align: 'center', |
| | | labelWidth:120, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 4, |
| | | // searchLabelWidth: 96, |
| | |
| | | prop: "policemanPhone", |
| | | align: 'center', |
| | | slot: true, |
| | | labelWidth:120, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | width: 120 |
| | | }, { |
| | | label: "地区", |
| | | label: "所属街道", |
| | | prop: "townName", |
| | | align: 'center', |
| | | search: true, |
| | | searchSpan: 3, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | labelWidth: 120, |
| | | width: 156, |
| | | searchPlaceholder: '请输入地区' |
| | | searchPlaceholder: '请输入街道' |
| | | }, { |
| | | label: "辖区派出所", |
| | | prop: "pcsName", |
| | | align: 'center', |
| | | labelWidth:120, |
| | | search: true, |
| | | labelWidth: 120, |
| | | search: false, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 96, |
| | | searchPlaceholder: '请输入辖区派出所' |
| | | }], |
| | | searchPlaceholder: '请输入辖区派出所', |
| | | hide:true |
| | | }, |
| | | { |
| | | label: "宣防对象", |
| | | prop: "people", |
| | | align: 'center', |
| | | labelWidth: 120, |
| | | search: false, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 96, |
| | | searchPlaceholder: '请输入辖区派出所', |
| | | hide:true, |
| | | span:24, |
| | | slot: true, |
| | | formslot: true |
| | | }, |
| | | ], |
| | | }, |
| | | data: [] |
| | | } |
| | |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | |
| | | console.log("===>",res); |
| | | this.$set(this.form,"backblastPubPersonEntityList",res.data.data.backblastPubPersonEntityList) |
| | | }) |
| | | done() |
| | | } else { |
| | |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'policemanPhoneflag', false) |
| | | if (item.pubUrls && item.pubUrls != '' && item.pubUrls != null && item.pubUrls.length) { |
| | | var urls = [] |
| | | var names = item.pubUrls.split(",").filter(item => item != '') |
| | |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "预警地址", |
| | | label: "地址", |
| | | prop: "address", |
| | | align: 'center', |
| | | // align: 'center', |
| | | minWidth: 210, |
| | | search: true, |
| | | searchSpan: 5, |
| | |
| | | labelWidth:120, |
| | | row:true, |
| | | }, { |
| | | label: "预警核实内容", |
| | | label: "核实内容信息", |
| | | prop: "recContent", |
| | | align: 'center', |
| | | // align: 'center', |
| | | minWidth:150, |
| | | labelWidth:120, |
| | | type:"textarea", |
| | |
| | | overHidden:true, |
| | | }, |
| | | { |
| | | label: "预警核实图片", |
| | | label: "核实现场照片", |
| | | prop: "sceUrls", |
| | | // align: 'center', |
| | | labelWidth:120, |
| | |
| | | dataType: "string", |
| | | width: 110, |
| | | }, { |
| | | label: "预警核实时间", |
| | | label: "时间", |
| | | prop: "createTime", |
| | | labelWidth:120, |
| | | align: 'center', |
| | |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'policemanPhoneflag', false) |
| | | if (item.sceUrls && item.sceUrls != '' && item.sceUrls != null && item.sceUrls.length) { |
| | | var urls = [] |
| | | var names = item.sceUrls.split(",").filter(item => item != '') |
| New file |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="title" append-to-body :visible.sync="popupTableUserShow" width="80%" :before-close="userHandleClose"> |
| | | <basic-container> |
| | | <avue-crud :data="userData" :page="userPage" :option="userOption" @search-change="searchChange" |
| | | @search-reset="searchReset"> |
| | | <!-- <template slot-scope="{type,size,row }" slot="menuLeft"> |
| | | <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出 |
| | | </el-button> |
| | | </template> --> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addPd, |
| | | updatePd |
| | | } from "@/api/discuss/publicDiscuss" |
| | | |
| | | import { |
| | | getList as getPage |
| | | } from "@/api/article/articleIntegral" |
| | | import 'nprogress/nprogress.css' |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | import { |
| | | getLists, |
| | | getList, |
| | | getDetail, |
| | | add, |
| | | update, |
| | | remove |
| | | } from "@/api/discuss/topics" |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | popupTableShow: false, |
| | | popupTableUserShow: false, |
| | | |
| | | loading: true, |
| | | |
| | | title: '浏览人员信息', |
| | | editFlag: false, |
| | | disCussFromListClone: {}, |
| | | disCussFrom: { |
| | | discussContent: '', |
| | | optionRange: 0, |
| | | sort: 1, |
| | | optionContent: '', |
| | | optionDetail: '', |
| | | number: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | articleId: '', |
| | | parentId: '', |
| | | level: '', |
| | | children: [{ |
| | | optionContent: '', |
| | | optionDetail: '', |
| | | number: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | articleId: '', |
| | | parentId: '', |
| | | level: '', |
| | | }] |
| | | }, |
| | | // 表单数据 |
| | | form: { |
| | | optionRange: 0, |
| | | }, |
| | | data: [], |
| | | articleId: '', |
| | | userData: [], |
| | | userOption: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | // menuWidth: 500, |
| | | menu: false, |
| | | height: "400px", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | selection: true, |
| | | delBtn: false, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | header: true, |
| | | column: [{ |
| | | label: '姓名', |
| | | prop: 'realName', |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 46, |
| | | width:100, |
| | | }, { |
| | | label: '头像', |
| | | type: 'upload', |
| | | listType: "picture-img", |
| | | prop: 'avatar', |
| | | width:100, |
| | | }, { |
| | | label: '手机', |
| | | prop: 'phone', |
| | | searchSpan: 4, |
| | | searchLabelWidth: 60, |
| | | search: true, |
| | | width:100, |
| | | |
| | | }, { |
| | | label: '小区', |
| | | prop: 'aoiName', |
| | | width:180, |
| | | overHidden:true, |
| | | }, { |
| | | label: '地址', |
| | | prop: 'address', |
| | | minWidth:100, |
| | | overHidden:true, |
| | | |
| | | }, { |
| | | label: '浏览时间', |
| | | prop: 'createTime', |
| | | width:160, |
| | | }, |
| | | { |
| | | label: '获得积分', |
| | | prop: 'score', |
| | | width:160, |
| | | width:80, |
| | | align:"center", |
| | | } |
| | | ] |
| | | }, |
| | | // 分页信息 |
| | | userPage: { |
| | | pageSize: 10, |
| | | pageSizes: [10, 20, 30, 50, 100], |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | query: {}, |
| | | type: '', |
| | | newData: {}, |
| | | articleRange: {}, |
| | | tops: {}, |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | 'disCussFrom.optionRange': { |
| | | handler(newData) { |
| | | // console.log('** ** ** ** ** ** **', newData) |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | if (newData == 1) { |
| | | column.display = true |
| | | } else { |
| | | column.display = false |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | userHandleClose() { |
| | | this.popupTableUserShow = false |
| | | }, |
| | | searchReset() { |
| | | this.query ={} |
| | | this.getUserPage(this.userPage, this.query) |
| | | }, |
| | | |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.query.districtId = this.newData.articleRange |
| | | if (this.type == 0) { |
| | | this.query.articleId = this.articleId |
| | | } else { |
| | | this.query.topicsId = this.tops.id |
| | | } |
| | | this.userPage.currentPage = 1 |
| | | this.getUserPage(this.userPage, this.query) |
| | | done() |
| | | }, |
| | | |
| | | openUser(row, type = 0) { |
| | | this.type = type |
| | | this.popupTableUserShow = true |
| | | this.query = {} |
| | | this.articleId = row.id |
| | | this.getUserPage(this.userPage, this.userParams) |
| | | }, |
| | | |
| | | initData(newData) { |
| | | console.log("======>", newData); |
| | | this.editFlag = false |
| | | this.popupTableShow = true |
| | | this.articleId = newData.id |
| | | this.query.level = 1 |
| | | this.query.articleId = this.articleId |
| | | this.newData = newData |
| | | this.query.districtId = newData.articleRange |
| | | this.onLoad(this.userPage, this.query) |
| | | }, |
| | | |
| | | handleClose() { |
| | | this.popupTableShow = false |
| | | this.disCussFrom = {} |
| | | }, |
| | | |
| | | handleReset() { |
| | | this.editFlag = false |
| | | }, |
| | | |
| | | // 提交修改 |
| | | rowUpdate(row, index, done, loading) { |
| | | done() |
| | | |
| | | if (row.attachment.length > 0) { |
| | | var urls = [] |
| | | var split = row.attachment.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.attachment = urls.join(",") |
| | | } |
| | | |
| | | if (!row.id) { |
| | | addPd(row).then(() => { |
| | | this.onLoad() |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | } else { |
| | | updatePd(row).then(() => { |
| | | this.onLoad() |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.getUserPage(this.userPage) |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | add() { |
| | | this.editFlag = true |
| | | }, |
| | | |
| | | edit(row) { |
| | | this.disCussFrom = row |
| | | this.disCussFromListClone = [].concat(row.children) |
| | | this.editFlag = true |
| | | }, |
| | | |
| | | deletes(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | return remove(row.id) |
| | | }).then(() => { |
| | | let param = {} |
| | | this.onLoad(this.userPage, param) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | getUserPage(page, params = {}) { |
| | | params['articleId'] = this.articleId |
| | | getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| | | this.userPage.total = data.total |
| | | this.userData = data.records |
| | | this.userData.forEach(item => { |
| | | if (item.avatar.length > 0) { |
| | | item.avatar = website.minioUrl + item.avatar |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | onLoad(page, params = {}) { |
| | | this.loading = true |
| | | getLists(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| | | this.data = data |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | <!-- e 呼即办 --> |
| | | <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="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')" |
| | | v-text="textDispose(row, 'phoneflag', 'phone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <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="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="{row, size, index}"> |
| | | <el-button size="small" type="text" icon="el-icon-share" plain @click="share(row)">分享 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="phone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')" |
| | | v-text="textDispose(row, 'phoneflag', 'phone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="分享" append-to-body :visible.sync="sharePopup" center @close="popupClose"> |
| | | <div style="display: flex; justify-content: center; "> |
| | | <el-radio-group v-model="circleRadio"> |
| | | <el-radio :label="0">邻里圈</el-radio> |
| | | <el-radio :label="1">协同圈</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="sharePopup = false">取 消</el-button> |
| | | <el-button type="primary" @click="shareCircle()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getECallEvent |
| | | } from "@/api/task/eCall" |
| | | import { |
| | | } from "@/api/task/eCall" |
| | | import { |
| | | add as circleAdd, |
| | | } from "@/api/circle/circle" |
| | | import { |
| | | getList as getHouseList, |
| | | getDetatil as getHouseDetail |
| | | } from "@/api/doorplateAddress/doorplateAddress.js" |
| | | import { |
| | | } from "@/api/doorplateAddress/doorplateAddress.js" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import website from '@/config/website' |
| | | // import AvueMap from "avue-plugin-map"; |
| | | export default { |
| | | data () { |
| | | } from "vuex" |
| | | import website from '@/config/website' |
| | | // 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() |
| | | } |
| | | } |
| | | //手机号格式校验 |
| | | let validatorPhone = function(rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | sharePopup: false, |
| | | circleRadio: 0, |
| | | shareCircleRow: {}, |
| | | option: { |
| | | labelWidth: 96, |
| | | // searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 310, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | // excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "事件名称", |
| | | prop: "name", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入事件名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事件类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | dataType: "number", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=eCallEventType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择事件类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | // search: true, |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | label: "所属社区", |
| | | hide: true, |
| | | parent: false, |
| | | prop: "communityCode", |
| | | search: false, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/tree", |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | label: "数据来源", |
| | | prop: "source", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | hide: true, |
| | | // search: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "姓名", |
| | | prop: "realName", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请输入姓名", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | slot: true |
| | | }, |
| | | { |
| | | label: "事发地点", |
| | | prop: "scene", |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入事发地点", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事发时间", |
| | | prop: "occurrenceTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择事发时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "事发位置", |
| | | prop: "location", |
| | | submitBtn: "保存", |
| | | hide: true, |
| | | type: 'map', |
| | | dataType: "string", |
| | | span: 24, |
| | | value: [117.966460, 28.431002, ""] |
| | | }, |
| | | { |
| | | label: "标准地址", |
| | | prop: "addressCode", |
| | | hide: true, |
| | | type: "table", |
| | | span: 24, |
| | | row: true, |
| | | children: { |
| | | border: true, |
| | | height: 400, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | submitText: "确定", |
| | | column: [ |
| | | // { |
| | | // label: "小区", |
| | | // prop: "aoiName", |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择小区", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "标准地址", |
| | | search: true, |
| | | searchSpan: 8, |
| | | prop: "addressName", |
| | | display: false |
| | | }, |
| | | ], |
| | | }, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | total: 0 |
| | | }, |
| | | formatter: (row) => { |
| | | return row.addressName |
| | | // if (!row.districtName) return '' |
| | | // return row.districtName + '-' + row.unit + row.building + row.room |
| | | }, |
| | | onLoad: ({ |
| | | page, |
| | | value, |
| | | data |
| | | }, callback) => { |
| | | //首次加载去查询对应的值 |
| | | if (value) { |
| | | getHouseDetail({ |
| | | addressCode: value |
| | | }).then(res => { |
| | | var resData = res.data.data |
| | | // 查询对应行数据 |
| | | callback(resData) |
| | | return |
| | | }) |
| | | } |
| | | if (page) { |
| | | this.loading = true |
| | | var params = { |
| | | ...data, |
| | | townStreetCode: "361102005" |
| | | } |
| | | getHouseList(page.currentPage, page.pageSize, Object.assign(params)).then(res => { |
| | | const resData = res.data.data |
| | | var total = resData.total |
| | | var data = resData.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | //分页查询信息 |
| | | callback({ |
| | | total: total, |
| | | data: data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | props: { |
| | | label: 'addressName', |
| | | value: 'addressCode' |
| | | } |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | // excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "事件名称", |
| | | prop: "name", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入事件名称", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事件类型", |
| | | prop: "type", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | dataType: "number", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=eCallEventType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择事件类型", |
| | | trigger: "blur", |
| | | },], |
| | | // search: true, |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | label: "所属社区", |
| | | hide: true, |
| | | parent: false, |
| | | prop: "communityCode", |
| | | search: false, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/tree", |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | label: "数据来源", |
| | | prop: "source", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | hide: true, |
| | | // search: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "姓名", |
| | | prop: "realName", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 66, |
| | | search: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请输入姓名", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | }], |
| | | slot: true |
| | | }, |
| | | { |
| | | label: "事发地点", |
| | | prop: "scene", |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入事发地点", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事发时间", |
| | | prop: "occurrenceTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择事发时间", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: "事发位置", |
| | | prop: "location", |
| | | submitBtn: "保存", |
| | | hide: true, |
| | | type: 'map', |
| | | dataType: "string", |
| | | span: 24, |
| | | value: [117.966460, 28.431002, ""] |
| | | }, |
| | | { |
| | | label: "标准地址", |
| | | prop: "addressCode", |
| | | hide: true, |
| | | type: "table", |
| | | span: 24, |
| | | row: true, |
| | | children: { |
| | | border: true, |
| | | height: 400, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | submitText: "确定", |
| | | column: [ |
| | | // { |
| | | // label: "小区", |
| | | // prop: "aoiName", |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请选择小区", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "标准地址", |
| | | search: true, |
| | | searchSpan: 8, |
| | | prop: "addressName", |
| | | display: false |
| | | }, |
| | | ], |
| | | }, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | formatter: (row) => { |
| | | return row.addressName |
| | | // if (!row.districtName) return '' |
| | | // return row.districtName + '-' + row.unit + row.building + row.room |
| | | }, |
| | | onLoad: ({ |
| | | page, |
| | | value, |
| | | data |
| | | }, callback) => { |
| | | //首次加载去查询对应的值 |
| | | if (value) { |
| | | getHouseDetail({ |
| | | addressCode: value |
| | | }).then(res => { |
| | | var resData = res.data.data |
| | | // 查询对应行数据 |
| | | callback(resData) |
| | | return |
| | | }) |
| | | } |
| | | if (page) { |
| | | this.loading = true |
| | | var params = { |
| | | ...data, |
| | | townStreetCode: "361102005" |
| | | } |
| | | getHouseList(page.currentPage, page.pageSize, Object.assign(params)).then(res => { |
| | | const resData = res.data.data |
| | | var total = resData.total |
| | | var data = resData.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | //分页查询信息 |
| | | callback({ |
| | | total: total, |
| | | data: data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | props: { |
| | | label: 'addressName', |
| | | value: 'addressCode' |
| | | } |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "现场图片", |
| | | prop: "imageUrls", |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | multiple: true, |
| | | row: true, |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | }, |
| | | |
| | | { |
| | | label: "事件简述", |
| | | prop: "remark", |
| | | type: "textarea", |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "处置情况", |
| | | // prop: "disSit", |
| | | // type:"textarea", |
| | | // hide:true, |
| | | // span: 24, |
| | | // }, |
| | | { |
| | | label: "处理结果", |
| | | prop: "disRes", |
| | | type: "textarea", |
| | | hide: true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "回访情况", |
| | | prop: "retVis", |
| | | type: "textarea", |
| | | hide: true, |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "处置状态", |
| | | // prop: "dis_status", |
| | | // type:"select", |
| | | // hide:true, |
| | | // } |
| | | ], |
| | | { |
| | | width: 110, |
| | | label: "现场图片", |
| | | prop: "imageUrls", |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | multiple: true, |
| | | row: true, |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | }, |
| | | data: [], |
| | | } |
| | | |
| | | { |
| | | label: "事件简述", |
| | | prop: "remark", |
| | | type: "textarea", |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "处置情况", |
| | | // prop: "disSit", |
| | | // type:"textarea", |
| | | // hide:true, |
| | | // span: 24, |
| | | // }, |
| | | { |
| | | label: "处理结果", |
| | | prop: "disRes", |
| | | type: "textarea", |
| | | hide: true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "回访情况", |
| | | prop: "retVis", |
| | | type: "textarea", |
| | | hide: true, |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "处置状态", |
| | | // prop: "dis_status", |
| | | // type:"select", |
| | | // hide:true, |
| | | // } |
| | | ], |
| | | }, |
| | | data: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.location": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler (val) { |
| | | if (typeof val == "string") { |
| | | var arr = val.split(",") |
| | | //经纬度替换 |
| | | this.form.lat = arr[1] |
| | | this.form.lng = arr[0] |
| | | this.form.address = arr[2] |
| | | } |
| | | }, |
| | | immediate: true, |
| | | "form.location": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | if (typeof val == "string") { |
| | | var arr = val.split(",") |
| | | //经纬度替换 |
| | | this.form.lat = arr[1] |
| | | this.form.lng = arr[0] |
| | | this.form.address = arr[2] |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.eCallEvent_add, true), |
| | | viewBtn: this.vaildData(this.permission.eCallEvent_view, true), |
| | | delBtn: this.vaildData(this.permission.eCallEvent_delete, true), |
| | | editBtn: this.vaildData(this.permission.eCallEvent_edit, true), |
| | | } |
| | | }, |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.eCallEvent_add, true), |
| | | viewBtn: this.vaildData(this.permission.eCallEvent_view, true), |
| | | delBtn: this.vaildData(this.permission.eCallEvent_delete, true), |
| | | editBtn: this.vaildData(this.permission.eCallEvent_edit, true), |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | showStringDispose (row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | rowSave (row, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate (row, index, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getECallEvent(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | | if (this.form.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var names = this.form.imageUrls.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | this.form.imageUrls = urls.join(",") |
| | | } |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | 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 |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'phoneflag', false) |
| | | if (item.imageUrls) { |
| | | if (item.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var names = item.imageUrls.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.imageUrls = urls.join(",") |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | rowSave(row, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.imageUrls = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | |
| | | share(row) { |
| | | console.table(row) |
| | | this.shareCircleRow = row |
| | | this.sharePopup = true |
| | | }, |
| | | // 分享圈子 |
| | | shareCircle() { |
| | | this.sharePopup = false |
| | | let param = {} |
| | | param.circleType = this.circleRadio |
| | | param.houseCode = this.shareCircleRow.addressCode |
| | | param.circleImages = this.shareCircleRow.imageUrls |
| | | param.communityCode = this.shareCircleRow.communityCode |
| | | param.circleText = this.shareCircleRow.remark |
| | | param.evenType = 2 |
| | | param.eventId = this.shareCircleRow.id |
| | | circleAdd(param).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | popupClose() { |
| | | this.sharePopup = false |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getECallEvent(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | | if (this.form.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var names = this.form.imageUrls.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | this.form.imageUrls = urls.join(",") |
| | | } |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | 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 |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'phoneflag', false) |
| | | if (item.imageUrls) { |
| | | if (item.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var names = item.imageUrls.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.imageUrls = urls.join(",") |
| | | } |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-upload__icon { |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | </style> |
| | | } |
| | | </style> |
| New file |
| | |
| | | <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="{row, size}" slot="phoneOne"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneOneflag')" |
| | | v-text="textDispose(row, 'phoneOneflag', 'phoneOne')"> |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="idCardOne"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'idCardOneflag')" |
| | | v-text="textDispose(row, 'idCardOneflag', 'idCardOne')"> |
| | | </el-button> |
| | | </template> |
| | | |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button type="success" size="small" plain v-if="permission.dispute_record_import" |
| | | icon="el-icon-upload2" @click="handleImport">导入 |
| | | </el-button> |
| | | <el-button type="warning" size="small" plain v-if="permission.dispute_record_export" |
| | | icon="el-icon-download" @click="handleExport">导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="矛盾纠纷事件数据导入" append-to-body :visible.sync="excelBox" width="555px"> |
| | | <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
| | | <template slot="excelTemplate"> |
| | | <el-button size="small" type="primary" @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import { |
| | | getList, |
| | | add, |
| | | update, |
| | | remove, |
| | | getDetail |
| | | } from "@/api/disputeRecord/disputeRecord" |
| | | import NProgress from 'nprogress' |
| | | import 'nprogress/nprogress.css' |
| | | import Qs from "qs" |
| | | import { |
| | | exportBlob |
| | | } from "@/api/common" |
| | | import { |
| | | getToken |
| | | } from '@/util/auth' |
| | | import { |
| | | downloadXls |
| | | } from "@/util/util" |
| | | import { |
| | | dateNow |
| | | } from "@/util/date" |
| | | import website from '@/config/website' |
| | | export default { |
| | | data() { |
| | | let isCardId = function (rule, value, callback) { |
| | | // 15位和18位身份证号码的正则表达式 |
| | | var regIdCard = |
| | | /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/ |
| | | |
| | | // 如果通过该验证,说明身份证格式正确,但准确性还需计算 |
| | | if (regIdCard.test(value) || value == '') { |
| | | if (value.length == 18) { |
| | | var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, |
| | | 5, 8, 4, 2) // 将前17位加权因子保存在数组里 |
| | | var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2) // 这是除以11后,可能产生的11位余数、验证码,也保存成数组 |
| | | var idCardWiSum = 0 // 用来保存前17位各自乖以加权因子后的总和 |
| | | for (var i = 0; i < 17; i++) { |
| | | idCardWiSum += value.substring(i, i + 1) * idCardWi[i] |
| | | } |
| | | |
| | | var idCardMod = idCardWiSum % 11 // 计算出校验码所在数组的位置 |
| | | var idCardLast = value.substring(17) // 得到最后一位身份证号码 |
| | | |
| | | // 如果等于2,则说明校验码是10,身份证号码最后一位应该是X |
| | | if (idCardMod == 2) { |
| | | if (idCardLast == "X" || idCardLast == "x") { |
| | | callback() |
| | | } else { |
| | | callback(new Error("身份证号格式有误!")) |
| | | } |
| | | } else { |
| | | // 用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码 |
| | | if (idCardLast == idCardY[idCardMod]) { |
| | | callback() |
| | | } else { |
| | | callback(new Error("身份证号格式有误!")) |
| | | } |
| | | } |
| | | } else { |
| | | callback() |
| | | } |
| | | } else { |
| | | //alert("身份证格式不正确!"); |
| | | callback(new Error("身份证号格式有误!")) |
| | | } |
| | | |
| | | callback() |
| | | } |
| | | |
| | | //手机号格式校验 |
| | | let validatorPhone = function (rule, value, callback) { |
| | | if (value) { |
| | | if (!/^1[3456789]\d{9}$/.test(value)) { |
| | | callback(new Error('手机号格式有误!')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | callback() |
| | | } |
| | | return { |
| | | excelForm: {}, |
| | | excelBox: false, |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [{ |
| | | label: '模板上传', |
| | | prop: 'excelFile', |
| | | type: 'upload', |
| | | drag: true, |
| | | loadText: '模板上传中,请稍等', |
| | | span: 24, |
| | | propsHttp: { |
| | | res: 'data' |
| | | }, |
| | | tip: '请上传 .xls,.xlsx 标准格式文件', |
| | | action: "/api/blade-disputeRecord/disputeRecord/import-disputeRecord" |
| | | }, |
| | | // { |
| | | // label: "数据覆盖", |
| | | // prop: "isCovered", |
| | | // type: "switch", |
| | | // align: "center", |
| | | // width: 80, |
| | | // dicData: [{ |
| | | // label: "否", |
| | | // value: 0 |
| | | // }, |
| | | // { |
| | | // label: "是", |
| | | // value: 1 |
| | | // } |
| | | // ], |
| | | // value: 0, |
| | | // slot: true, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请选择是否覆盖", |
| | | // trigger: "blur" |
| | | // }] |
| | | // }, |
| | | { |
| | | label: '模板下载', |
| | | prop: 'excelTemplate', |
| | | formslot: true, |
| | | span: 24, |
| | | } |
| | | ] |
| | | }, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | menuWidth: 210, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | border: true, |
| | | index: true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | addBtn: true, |
| | | viewBtn: true, |
| | | refreshBtn: true, |
| | | searchShowBtn: true, |
| | | columnBtn: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "事发地址", |
| | | prop: "address", |
| | | // align: 'center', |
| | | minWidth: 210, |
| | | search: true, |
| | | searchSpan: 5, |
| | | display: false, |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: "事发地址", |
| | | prop: "location", |
| | | align: 'center', |
| | | minWidth: 210, |
| | | span: 12, |
| | | hide: true, |
| | | overHidden: true, |
| | | labelWidth: 150, |
| | | // row: true, |
| | | type: 'map', |
| | | dataType: "string", |
| | | value: [117.966460, 28.431002, ""], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择巡查地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, { |
| | | width: 150, |
| | | label: "事发时间", |
| | | prop: "eventTime", |
| | | type: "datetime", |
| | | labelWidth: 150, |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择事发时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, { |
| | | label: "事发时间", |
| | | prop: "dateTime", |
| | | type: "daterange", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchSpan: 6, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择事发时间", |
| | | trigger: "blur", |
| | | },], |
| | | }, { |
| | | label: "纠纷内容", |
| | | prop: "disputeContent", |
| | | // align: 'center', |
| | | minWidth: 150, |
| | | labelWidth: 150, |
| | | type: "textarea", |
| | | row: true, |
| | | span: 24, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入纠纷内容", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "纠纷类型", |
| | | prop: "disputeType", |
| | | align: 'center', |
| | | minWidth: 150, |
| | | labelWidth: 150, |
| | | search: true, |
| | | searchSpan: 4, |
| | | dataType: "number", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=disputeType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择纠纷类型", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: "是否受伤", |
| | | prop: "injuryFlag", |
| | | align: 'center', |
| | | width: 80, |
| | | search: true, |
| | | searchSpan: 3, |
| | | labelWidth: 150, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "是", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: 0 |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择是否受伤", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "受伤情况描述", |
| | | prop: "injuryDesc", |
| | | align: 'center', |
| | | minWidth: 150, |
| | | labelWidth: 150, |
| | | display: false, |
| | | hide: true, |
| | | row: true, |
| | | span: 24, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | message: "请输入受伤情况描述", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "报警次数", |
| | | prop: "alarmNum", |
| | | align: 'center', |
| | | type: "number", |
| | | labelWidth: 150, |
| | | }, |
| | | { |
| | | label: "信息来源", |
| | | prop: "source", |
| | | labelWidth: 150, |
| | | align: 'center', |
| | | width: 156, |
| | | dataType: "number", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=disputeSource", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择信息来源", |
| | | trigger: "blur", |
| | | },], |
| | | }, { |
| | | label: "当事人1姓名", |
| | | prop: "nameOne", |
| | | align: 'center', |
| | | slot: true, |
| | | labelWidth: 150, |
| | | search: true, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入当事人1姓名", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | },{ |
| | | label: "当事人1性别", |
| | | prop: "genderOne", |
| | | align: 'center', |
| | | slot: true, |
| | | labelWidth: 150, |
| | | // search: true, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | type:"select", |
| | | dicData:[ |
| | | { |
| | | label:"男", |
| | | value: 1 |
| | | },{ |
| | | label:"女", |
| | | value: 2 |
| | | } |
| | | ], |
| | | width: 100, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择当事人1性别", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, { |
| | | label: "当事人1电话", |
| | | prop: "phoneOne", |
| | | align: 'center', |
| | | slot: true, |
| | | labelWidth: 150, |
| | | search: true, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入当事人1电话", |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "当事人1身份证号", |
| | | prop: "idCardOne", |
| | | align: 'center', |
| | | slot: true, |
| | | labelWidth: 150, |
| | | // search: true, |
| | | searchLabelWidth: 150, |
| | | searchSpan: 5, |
| | | width: 150, |
| | | // row: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入当事人1身份证号", |
| | | trigger: "blur", |
| | | }, { |
| | | validator: isCardId, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "当事人2姓名", |
| | | prop: "nameTwo", |
| | | align: 'center', |
| | | slot: true, |
| | | hide: true, |
| | | labelWidth: 150, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | width: 120, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入当事人2姓名", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, { |
| | | label: "当事人2性别", |
| | | prop: "genderOne", |
| | | align: 'center', |
| | | slot: true, |
| | | labelWidth: 150, |
| | | // search: true, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | type:"select", |
| | | dicData:[ |
| | | { |
| | | label:"男", |
| | | value: 1 |
| | | },{ |
| | | label:"女", |
| | | value: 2 |
| | | } |
| | | ], |
| | | width: 100, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择当事人2性别", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, { |
| | | label: "当事人2电话", |
| | | prop: "phoneTwo", |
| | | align: 'center', |
| | | slot: true, |
| | | hide: true, |
| | | labelWidth: 150, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | width: 120, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入当事人2电话", |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | | validator: validatorPhone, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "当事人2身份证号", |
| | | prop: "idCardTwo", |
| | | align: 'center', |
| | | slot: true, |
| | | hide: true, |
| | | labelWidth: 150, |
| | | searchLabelWidth: 110, |
| | | searchSpan: 4, |
| | | width: 120, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入当事人2身份证号", |
| | | trigger: "blur", |
| | | }, { |
| | | validator: isCardId, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "地区", |
| | | prop: "townName", |
| | | align: 'center', |
| | | search: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | searchSpan: 3, |
| | | searchLabelWidth: 60, |
| | | labelWidth: 150, |
| | | width: 120, |
| | | searchPlaceholder: '请输入地区' |
| | | }, { |
| | | label: "辖区派出所", |
| | | prop: "pcsName", |
| | | align: 'center', |
| | | search: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | searchSpan: 4, |
| | | labelWidth: 150, |
| | | width: 120, |
| | | searchLabelWidth: 96, |
| | | searchPlaceholder: '请输入辖区派出所' |
| | | }, { |
| | | label: "处理结果", |
| | | prop: "handleResult", |
| | | align: 'center', |
| | | search: true, |
| | | labelWidth: 150, |
| | | searchSpan: 4, |
| | | width: 110, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "已化解", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "未化解", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "移送e呼即办", |
| | | value: 3 |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择处理结果", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }], |
| | | }, |
| | | data: [] |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.dispute_record_add, true), |
| | | viewBtn: this.vaildData(this.permission.dispute_record_view, true), |
| | | delBtn: this.vaildData(this.permission.dispute_record_delete, true), |
| | | editBtn: this.vaildData(this.permission.dispute_record_edit, true), |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.injuryFlag": { |
| | | // form是表单或者表格绑定的数据集,v-model='form' |
| | | handler(val) { |
| | | let injuryDescColumn = this.findObject( |
| | | this.option.column, |
| | | 'injuryDesc' |
| | | ) |
| | | if (val == 1) { |
| | | injuryDescColumn.rules[0].required = true |
| | | injuryDescColumn.display = true |
| | | } else { |
| | | injuryDescColumn.rules[0].required = false |
| | | injuryDescColumn.display = false |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | locationDispose(data) { |
| | | data = data.split(',') |
| | | |
| | | return { |
| | | lng: data[0], |
| | | lat: data[1], |
| | | address: data[2] |
| | | } |
| | | }, |
| | | handleTemplate() { |
| | | exportBlob(`/api/blade-disputeRecord/disputeRecord/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => { |
| | | downloadXls(res.data, "矛盾纠纷事件数据模板.xlsx") |
| | | }) |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | this.excelBox = false |
| | | this.refreshChange() |
| | | done() |
| | | }, |
| | | handleExport() { |
| | | this.$confirm("是否导出矛盾纠纷事件数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | NProgress.start() |
| | | var data = { |
| | | ...this.query |
| | | } |
| | | data.isNine = 1 |
| | | data = Qs.stringify(data) |
| | | exportBlob( |
| | | `/api/blade-disputeRecord/disputeRecord/export-disputeRecord?${this.website.tokenHeader}=${getToken()}&` + data |
| | | ).then(res => { |
| | | console.log('exportBlob', res) |
| | | downloadXls(res.data, `矛盾纠纷事件${dateNow()}.xlsx`) |
| | | NProgress.done() |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | rowSave(row, done, loading) { |
| | | add({ |
| | | ...row, |
| | | ...this.locationDispose(row.location) |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update({ |
| | | ...row, |
| | | ...this.locationDispose(row.location) |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$nextTick(() => { |
| | | this.$refs.crud && this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | 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.location = [this.form.lng, this.form.lat, this.form.address].join(',') |
| | | }) |
| | | done() |
| | | } else { |
| | | done() |
| | | } |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | if (dateTime) { |
| | | params['startTime'] = dateTime[0] |
| | | params['endTime'] = dateTime[1] |
| | | } |
| | | 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.data.forEach(item => { |
| | | this.$set(item, 'phoneOneflag', false) |
| | | this.$set(item, 'idCardOneflag', false) |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <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-scope="{row, size, index}" slot="menu"> |
| | | <el-button type="text" :size="size" icon="el-icon-info" v-if="permission.gzll_todo_detail" |
| | | @click.stop="handleDetail(row)">详情 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.gzll_todo_follow" |
| | | @click.stop="handleImage(row, index)">流程图 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="processDefinitionVersion"> |
| | | <el-tag :size="size">v{{ row.processDefinitionVersion }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="linkPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'linkPhoneflag')" |
| | | v-text="textDispose(row, 'linkPhoneflag', 'linkPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design> |
| | | </div> |
| | | <div> |
| | | <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-scope="{row, size, index}" slot="menu"> |
| | | <el-button type="text" :size="size" icon="el-icon-info" v-if="permission.gzll_todo_detail" |
| | | @click.stop="handleDetail(row)">详情 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.gzll_todo_follow" |
| | | @click.stop="handleImage(row, index)">流程图 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="processDefinitionVersion"> |
| | | <el-tag :size="size">v{{ row.processDefinitionVersion }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="linkPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'linkPhoneflag')" |
| | | v-text="textDispose(row, 'linkPhoneflag', 'linkPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import { |
| | | } from "vuex" |
| | | import { |
| | | doneList |
| | | } from "@/api/work/work" |
| | | import { |
| | | } from "@/api/work/work" |
| | | import { |
| | | flowCategory, |
| | | flowRoute |
| | | } from "@/util/flow" |
| | | } from "@/util/flow" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | form: {}, |
| | | selectionId: '', |
| | | selectionList: [], |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | processInstanceId: '', |
| | | flowBox: false, |
| | | workBox: false, |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 140, |
| | | export default { |
| | | data() { |
| | | return { |
| | | datetime: "", |
| | | form: {}, |
| | | selectionId: '', |
| | | selectionList: [], |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | processInstanceId: '', |
| | | flowBox: false, |
| | | workBox: false, |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 140, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | border: true, |
| | | index: true, |
| | | // selection: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | columnBtn: false, |
| | | dialogWidth: 900, |
| | | dialogClickModal: false, |
| | | header: false, |
| | | column: [ |
| | | { |
| | | label: "流程分类", |
| | | type: "select", |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=flow", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "category", |
| | | // search: true, |
| | | hide: true, |
| | | width: 100, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: '申请类型', |
| | | prop: 'categoryName', |
| | | // search: true, |
| | | }, { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | // search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | }, { |
| | | width: 110, |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | // search: true, |
| | | }, { |
| | | width: 120, |
| | | label: '联系电话', |
| | | prop: 'linkPhone', |
| | | // search: true, |
| | | slot: true |
| | | }, { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | // search: true, |
| | | }, |
| | | { |
| | | label: '当前步骤', |
| | | prop: 'taskName', |
| | | }, |
| | | // { |
| | | // label: '流程版本', |
| | | // prop: 'processDefinitionVersion', |
| | | // slot: true, |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | width: 144, |
| | | label: '申请时间', |
| | | prop: 'createTime', |
| | | }, |
| | | ] |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | border: true, |
| | | index: true, |
| | | // selection: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | columnBtn: false, |
| | | dialogWidth: 900, |
| | | dialogClickModal: false, |
| | | header: false, |
| | | column: [{ |
| | | label: "流程分类", |
| | | type: "select", |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=flow", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "category", |
| | | // search: true, |
| | | hide: true, |
| | | width: 100, |
| | | }, |
| | | data: [] |
| | | } |
| | | { |
| | | width: 110, |
| | | label: '小区名称', |
| | | prop: 'districtName', |
| | | search: true, |
| | | hide: true, |
| | | }, { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "申请时间", |
| | | prop: "dateTime", |
| | | type: "datetimerange", |
| | | defaultTime: ['00:00:00', '23:59:59'], |
| | | format: 'yyyy-MM-dd HH:mm:ss', |
| | | valueFormat: 'yyyy-MM-dd HH:mm:ss', |
| | | startPlaceholder: '开始范围自定义', |
| | | endPlaceholder: '结束范围自定义', |
| | | searchSpan: 5, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择申请时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: '申请类型', |
| | | prop: 'categoryName', |
| | | // search: true, |
| | | }, { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | // search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | }, { |
| | | width: 110, |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | // search: true, |
| | | }, { |
| | | width: 120, |
| | | label: '联系电话', |
| | | prop: 'linkPhone', |
| | | // search: true, |
| | | slot: true |
| | | }, { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | // search: true, |
| | | }, |
| | | { |
| | | label: '当前步骤', |
| | | prop: 'taskName', |
| | | }, |
| | | // { |
| | | // label: '流程版本', |
| | | // prop: 'processDefinitionVersion', |
| | | // slot: true, |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | width: 144, |
| | | label: '申请时间', |
| | | prop: 'createTime', |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | ...mapGetters(["permission", "flowRoutes"]), |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | ...mapGetters(["permission", "flowRoutes"]), |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | showStringDispose (row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDetail (row) { |
| | | this.$router.push({ |
| | | path: `/gzll/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` |
| | | }) |
| | | }, |
| | | handleImage (row) { |
| | | this.processInstanceId = row.processInstanceId |
| | | this.flowBox = true |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const query = { |
| | | ...this.query, |
| | | category: (params.category) ? flowCategory(params.category) : null |
| | | } |
| | | this.loading = true |
| | | doneList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => { |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'linkPhoneflag': false |
| | | } |
| | | }) |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDetail(row) { |
| | | this.$router.push({ |
| | | path: `/gzll/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` |
| | | }) |
| | | }, |
| | | handleImage(row) { |
| | | this.processInstanceId = row.processInstanceId |
| | | this.flowBox = true |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | let query = { |
| | | ...this.query, |
| | | category: (params.category) ? flowCategory(params.category) : null |
| | | } |
| | | const { |
| | | dateTime |
| | | } = query |
| | | |
| | | if (dateTime) { |
| | | query = { |
| | | startTimes: dateTime[0], |
| | | endTimes: dateTime[1], |
| | | } |
| | | } |
| | | this.loading = true |
| | | doneList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => { |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'linkPhoneflag': false |
| | | } |
| | | }) |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | datetime: "", |
| | | typeStatus: 1, |
| | | form: {}, |
| | | selectionId: '', |
| | |
| | | prop: 'districtName', |
| | | search: true, |
| | | hide: true, |
| | | }, { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "申请时间", |
| | | prop: "dateTime", |
| | | type: "datetimerange", |
| | | defaultTime: ['00:00:00', '23:59:59'], |
| | | format: 'yyyy-MM-dd HH:mm:ss', |
| | | valueFormat: 'yyyy-MM-dd HH:mm:ss', |
| | | startPlaceholder: '开始范围自定义', |
| | | endPlaceholder: '结束范围自定义', |
| | | searchSpan: 5, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择申请时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 110, |
| | |
| | | // search: true, |
| | | slot: true |
| | | }, |
| | | { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | label: '当前步骤', |
| | | prop: 'taskName', |
| | |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const query = { |
| | | let query = { |
| | | ...this.query, |
| | | category: (params.category) ? flowCategory(params.category) : null |
| | | } |
| | | const { |
| | | dateTime |
| | | } = query |
| | | |
| | | if (dateTime) { |
| | | query = { |
| | | startTimes: dateTime[0], |
| | | endTimes: dateTime[1], |
| | | } |
| | | } |
| | | this.loading = true |
| | | todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => { |
| | | const data = { |
| New file |
| | |
| | | <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="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <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> |
| | | </template> |
| | | |
| | | <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-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getNotice, |
| | | upcomment |
| | | } from "@/api/article/article" |
| | | |
| | | import { |
| | | addPd, |
| | | } from "@/api/discuss/publicDiscuss" |
| | | |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | import { |
| | | getDistrictTree |
| | | } from "@/api/district/index" |
| | | |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | }, |
| | | dialogVisibles: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "标题", |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 46, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入业主大会标题", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | hide: true, |
| | | parent: false, |
| | | label: "公示范围", |
| | | prop: "articleList", |
| | | type: 'tree', |
| | | dicData: [], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | span: 12, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择公示范围", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "业主大会类型", |
| | | prop: "type", |
| | | value: 5, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择招标类型", |
| | | trigger: "blur", |
| | | },], |
| | | dicData: [{ |
| | | label: "业主大会", |
| | | value: 5, |
| | | }], |
| | | }, |
| | | { |
| | | 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: 144, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "streetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | display: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布状态", |
| | | trigger: "blur", |
| | | },], |
| | | dicData: [{ |
| | | label: "未发布", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "已发布", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | slot: true, |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "开启", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "内容", |
| | | prop: "content", |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | |
| | | districtTree: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.articleType": { |
| | | handler (val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | },] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | 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: { |
| | | iscommentInput (e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | openDilog (row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm.eventType = type |
| | | this.discussForm.articleId = row.id |
| | | this.discussForm.title = row.title |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | handleSubmit (form, done) { |
| | | done() |
| | | addPd(form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.dialogVisibles = false |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | // loading(); |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | handleClose (done) { |
| | | done() |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | rowSave (row, done, loading) { |
| | | row['type'] = 5 |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add({ |
| | | ...row, |
| | | districtId: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | 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(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | |
| | | update({ |
| | | ...row, |
| | | district_id: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | 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 |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0] + ' 00:00:01', |
| | | endTime: dateTime[1] + ' 23:59:59', |
| | | ...this.query, |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | values.type = 5 |
| | | 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 |
| | | this.data.forEach(item => { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree({ |
| | | filterFlag: 1 |
| | | }).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 |
| | | }) |
| | | }, |
| | | updateFb (row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | kqcomment () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | |
| | | :deep(.avue-form__menu--center) { |
| | | text-align: left; |
| | | } |
| | | |
| | | :deep(.avue-form__menu--center .el-button) { |
| | | margin: 0 5px 0 0; |
| | | }</style> |
| | |
| | | <span>审批信息</span> |
| | | </div> |
| | | <avue-form :option="option" :value="form"> |
| | | |
| | | |
| | | <template slot-scope="{ row, size, index }" slot="vote"> |
| | | <div>{{ topicTitle }}</div> |
| | | <el-table :data="topictData" v-if="topictData.length"> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | |
| | | |
| | | </avue-form> |
| | | <!-- <el-form-item label="申请人"> |
| | | <el-input :disabled="true" v-model="form.flow.assigneeName" /> |
| | |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply"; |
| | | import { |
| | | getLists |
| | | } from "@/api/discuss/topics" |
| | | import deitDiscussion from "../../components/deitDiscussion.vue" |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | getLists |
| | | } from "@/api/discuss/topics" |
| | | import deitDiscussion from "../../components/deitDiscussion.vue" |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | businessId: '', |
| | |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | label: "楼栋", |
| | | prop: "buildingName", |
| | | labelWidth: 140, |
| | | value: '按建筑面积分摊', |
| | | value: '', |
| | | span: 12, |
| | | row: true, |
| | | disabled: true |
| | |
| | | }, |
| | | |
| | | { |
| | | disabled:true, |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth:140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票结果", |
| | | trigger: "blur", |
| | | },], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | if (val.value && !this.form.id) { |
| | | this.articleRange = val.articleRange; |
| | | // this.showDialog = true; |
| | | // this.getDetail(val.value, val.articleRange) |
| | | } |
| | | disabled: true, |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票结果", |
| | | trigger: "blur", |
| | | }, ], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | if (val.value && !this.form.id) { |
| | | this.articleRange = val.articleRange; |
| | | // this.showDialog = true; |
| | | // this.getDetail(val.value, val.articleRange) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140, |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140, |
| | | |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | label: "项目摘要", |
| | |
| | | ], |
| | | }, |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | } |
| | | }, |
| | | |
| | | |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | }, |
| | | |
| | | created() { |
| | | this.init(); |
| | |
| | | }); |
| | | }, |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | }) |
| | | }, |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style> |
| | | |
| | | |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | label: "楼栋", |
| | | prop: "buildingName", |
| | | labelWidth: 140, |
| | | value: '按建筑面积分摊', |
| | | value: '', |
| | | span: 12, |
| | | row: true, |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系人', |
| | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | |
| | | </div> |
| | | |
| | | <deitDiscussion ref="DeitDiscussion"> |
| | | </deitDiscussion> |
| | | </deitDiscussion> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process" |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process" |
| | | |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply" |
| | | import { |
| | | completeTask |
| | | } from "@/api/work/work" |
| | | import website from '@/config/website' |
| | | import { |
| | | getLists, |
| | | } from "@/api/discuss/topics" |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply" |
| | | import { |
| | | completeTask |
| | | } from "@/api/work/work" |
| | | import website from '@/config/website' |
| | | import { |
| | | getLists, |
| | | } from "@/api/discuss/topics" |
| | | |
| | | import deitDiscussion from "../../components/deitDiscussion" |
| | | import deitDiscussion from "../../components/deitDiscussion" |
| | | |
| | | |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | taskId: '', |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | taskId: '', |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 120, |
| | | width: 220, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | }, |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同开始时间", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同结束时间", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | labelWidth: 140, |
| | | value: '按建筑面积分摊', |
| | | span: 12, |
| | | row: true, |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目预算总金额(元)", |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "实际预算金额(元)", |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "自筹金额(元)", |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预算应拨付金额(元)", |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 120, |
| | | width: 220, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同开始时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同结束时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "楼栋", |
| | | prop: "buildingName", |
| | | labelWidth: 140, |
| | | value: '', |
| | | span: 12, |
| | | row: true, |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目预算总金额(元)", |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "实际预算金额(元)", |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "自筹金额(元)", |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预算应拨付金额(元)", |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | |
| | | { |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`, |
| | | // slot: true, |
| | | formslot: true, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | width: 260, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票结果", |
| | | trigger: "blur", |
| | | },], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | if (val.value && !this.form.id) { |
| | | this.articleRange = val.articleRange; |
| | | // this.showDialog = true; |
| | | // this.getDetail(val.value, val.articleRange) |
| | | { |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`, |
| | | // slot: true, |
| | | formslot: true, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | width: 260, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票结果", |
| | | trigger: "blur", |
| | | }, ], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | if (val.value && !this.form.id) { |
| | | this.articleRange = val.articleRange; |
| | | // this.showDialog = true; |
| | | // this.getDetail(val.value, val.articleRange) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | |
| | | { |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140 |
| | | }, |
| | | |
| | | |
| | | { |
| | | label: "项目摘要", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目进度描述", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, { |
| | | label: "批复意见", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "comment", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入批复意见", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | listType: 'picture-img', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | trigger: "blur", |
| | | }, ], |
| | | } |
| | | ], |
| | | }, |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | } |
| | | }, |
| | | |
| | | |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | }, |
| | | |
| | | { |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140 |
| | | }, |
| | | |
| | | |
| | | { |
| | | label: "项目摘要", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目进度描述", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, { |
| | | label: "批复意见", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "comment", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入批复意见", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | listType: 'picture-img', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | trigger: "blur", |
| | | },], |
| | | } |
| | | ], |
| | | }, |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | } |
| | | }, |
| | | |
| | | |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | |
| | | |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | |
| | | created() { |
| | | this.init() |
| | | }, |
| | | beforeRouteUpdate(to, from, next) { |
| | | // 在当前路由改变,但是该组件被复用时调用 |
| | | // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候 |
| | | // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用 |
| | | // 可以访问组件实例 `this` |
| | | if (to.fullPath !== from.fullPath) { |
| | | next() |
| | | created() { |
| | | this.init() |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.taskId = this.$route.params.taskId |
| | | this.processInstanceId = this.$route.params.processInstanceId |
| | | this.businessId = this.$route.params.businessId |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.flowList = data.data |
| | | } |
| | | }) |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls |
| | | this.form = data.data |
| | | } |
| | | }) |
| | | }, |
| | | handleAgree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | beforeRouteUpdate(to, from, next) { |
| | | // 在当前路由改变,但是该组件被复用时调用 |
| | | // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候 |
| | | // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用 |
| | | // 可以访问组件实例 `this` |
| | | if (to.fullPath !== from.fullPath) { |
| | | next() |
| | | this.init() |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | flag: 'ok', |
| | | comment: this.form.comment, |
| | | } |
| | | completeTask(params).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/gzll/todo` |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败') |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.taskId = this.$route.params.taskId |
| | | this.processInstanceId = this.$route.params.processInstanceId |
| | | this.businessId = this.$route.params.businessId |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.flowList = data.data |
| | | } |
| | | }) |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls |
| | | this.form = data.data |
| | | } |
| | | }) |
| | | }, |
| | | handleAgree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | } |
| | | }) |
| | | }, |
| | | handleDisagree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | comment: this.form.comment, |
| | | } |
| | | completeTask(params).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/gzll/todo` |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败') |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | flag: 'ok', |
| | | comment: this.form.comment, |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/gzll/todo` |
| | | }) |
| | | }, |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | completeTask(params).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/gzll/todo` |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败') |
| | | } |
| | | }) |
| | | }, |
| | | handleDisagree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | } |
| | | }) |
| | | }, |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | comment: this.form.comment, |
| | | } |
| | | completeTask(params).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/gzll/todo` |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败') |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/gzll/todo` |
| | | }) |
| | | }, |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | position: relative; |
| | | /* 确保按钮相对于该元素定位 */ |
| | | } |
| | | .container { |
| | | position: relative; |
| | | /* 确保按钮相对于该元素定位 */ |
| | | } |
| | | |
| | | #myButton { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | } |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | | #myButton { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | } |
| | | |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | params['type'] = '2' |
| | | this.loading = true |
| | | getApiList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| New file |
| | |
| | | <template> |
| | | <el-dialog :title="this.id ? '修改' : '新增'" width="60%" modal-append-to-body="false" append-to-body="true" |
| | | :close-on-click-model="true" :visible.sync="visible" @close="closeDialog"> |
| | | <avue-form ref="form" :option="option" v-model="form" @submit="submit"></avue-form> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getList, |
| | | addTwo |
| | | } from "@/api/patrol/patrolGroup"; |
| | | |
| | | export default { |
| | | name: "add", |
| | | data() { |
| | | return { |
| | | inputs: { |
| | | input1: 1, |
| | | }, |
| | | editFlag: false, |
| | | optionContentAId: null, |
| | | optionContentBId: null, |
| | | optionContentCId: null, |
| | | optionContentDId: null, |
| | | optionContentEId: null, |
| | | arrContent: ["1"], |
| | | list: [{ |
| | | data: 1, |
| | | }, |
| | | { |
| | | data: 1, |
| | | }, |
| | | { |
| | | data: 1, |
| | | }, |
| | | ], |
| | | visible: false, |
| | | choicesType: "0", |
| | | loading: false, |
| | | form: {}, |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, //liu |
| | | stripe: true, |
| | | align: "center", |
| | | index: true, |
| | | selection: true, |
| | | viewBtn: true, |
| | | defaultExpandAll: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "类型", |
| | | prop: "type", |
| | | type: "select", |
| | | props: { |
| | | label: "title", |
| | | value: "key", |
| | | }, |
| | | dicUrl: "/api/blade-system/dict-biz/tree?code=subject_max", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | span: 24, |
| | | }, |
| | | { |
| | | prop: "id", |
| | | display: false, |
| | | type: 'input', |
| | | }, |
| | | { |
| | | label: "题目名称", |
| | | prop: "name", |
| | | search: true, |
| | | type: "textarea", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入题目名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: '选项内容', |
| | | prop: 'patrolGroupItemList', |
| | | type: 'dynamic', |
| | | span: 24, |
| | | children: { |
| | | align: 'center', |
| | | headerAlign: 'center', |
| | | rowAdd: (done) => { |
| | | // this.$message.success('新增回调'); |
| | | done({ |
| | | input: '默认值' |
| | | }); |
| | | }, |
| | | rowDel: (row, done) => { |
| | | if (row.id) { |
| | | row.isDeleted = 1 |
| | | this.deleteList.push(row) |
| | | |
| | | } |
| | | // this.$message.success('删除回调' + JSON.stringify(row)); |
| | | done(); |
| | | }, |
| | | column: [{ |
| | | label: '选项标题', |
| | | prop: 'itemsName', |
| | | type: 'input', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入选项标题", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | label: '选项类型', |
| | | prop: 'type', |
| | | type: "select", |
| | | props: { |
| | | label: "title", |
| | | value: "key", |
| | | }, |
| | | dicUrl: "/api/blade-system/dict-biz/tree?code=subject", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入选项类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | }] |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | formCheckbox: {}, |
| | | |
| | | formJudge: {}, |
| | | formFill: {}, |
| | | deleteList: [], |
| | | |
| | | data: [{ |
| | | discussContent: '', |
| | | optionContent: '' |
| | | }, { |
| | | discussContent: '', |
| | | optionContent: '' |
| | | }], |
| | | }; |
| | | }, |
| | | computed: { |
| | | // ...mapState({ |
| | | // userInfo: (state) => state.user.userInfo, |
| | | // }), |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | add() { |
| | | this.editFlag = true |
| | | }, |
| | | |
| | | edit(row) { |
| | | this.disCussFrom = row |
| | | this.editFlag = true |
| | | }, |
| | | //初始化 |
| | | inits(row) { |
| | | // var formula = "2 + 3 * (4 - 1)"; // 要转换的字符串表达式 |
| | | // var result = eval(formula); // 调用eval()函数进行计算 |
| | | // console.log(result); // 输出结果:9 |
| | | // console.table(row); // 输出结果为 "2" |
| | | // this.id = id || 0; |
| | | this.visible = true; |
| | | this.form = row |
| | | // this.list = [{ |
| | | // data: 1 |
| | | // }]; |
| | | // if (this.id) { |
| | | // //查询题目信息 |
| | | // this.getSubjectInfo(id); |
| | | // } |
| | | }, |
| | | |
| | | //加一行 |
| | | addRows() { |
| | | //获取已有行的数据 |
| | | // debugger; |
| | | if (this.index == 6) { |
| | | return; |
| | | } |
| | | this.index++; |
| | | this.list.push({ |
| | | data: this.index, |
| | | }); |
| | | this.inputs[`input${this.index + 1}`] = ""; |
| | | }, |
| | | //减一行 |
| | | deleteRows(index) { |
| | | if (this.index == 1) { |
| | | return; |
| | | } |
| | | this.index--; |
| | | this.list.splice(index, 1); |
| | | }, |
| | | //单选题提交(新增)数据 |
| | | submit(row, done, loading) { |
| | | var that = this; |
| | | // console.table(this.deleteList) |
| | | row.patrolGroupItemList = row.patrolGroupItemList.concat(this.deleteList) |
| | | addTwo(row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | that.visible = false; |
| | | that.$refs.form.resetForm(); |
| | | this.$emit('refreshPage'); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | //关闭窗口清除数据 |
| | | closeDialog() { |
| | | this.$refs.form.resetForm(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .optionContent-suffix { |
| | | margin-top: 5px; |
| | | } |
| | | |
| | | .optionContent-suffix span { |
| | | margin-left: -20px; |
| | | } |
| | | |
| | | .optionContent-suffix .optionContent-input { |
| | | width: 90%; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .optionContent-suffix .optionContent-botton { |
| | | margin-left: 10px; |
| | | } |
| | | </style> |
| New file |
| | |
| | | /* * @Author: Morpheus * @Date: 2021-07-05 16:31:54 * @Last Modified by: liu * |
| | | @Last Modified time: 2021-11-23 14:14:38 * menu-name 物业评定题库查询 */ |
| | | <template> |
| | | <basic-container :class=""> |
| | | <avue-crud class="company-box tablesss" :option="questionBankOption" :search.sync="questionBankSearch" |
| | | :table-loading="questionBankLoading" :data="questionBankData" ref="questionBankCrud" :page.sync="questionBankPage" |
| | | @selection-change="questionBankSelectionChange" @search-change="questionBankSearchChange" |
| | | @search-reset="questionBankSearchReset" @current-change="questionBankCurrentChange" |
| | | @size-change="questionBankSizeChange" @row-del="questionBankHandleDel" @on-load="questionBankOnLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" size="small" icon="el-icon-plus" @click="questionBankHandleAdd">新 增 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="menu"> |
| | | <el-button type="text" size="mini" icon="el-icon-edit" @click="questionBankHandleEdit(row)">编辑 |
| | | </el-button> |
| | | <el-button type="text" size="mini" icon="el-icon-delete" @click="questionBankHandleDel(row)">删除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <!-- <el-dialog title="题库导入" append-to-body :visible.sync="excelBox" width="555px"> |
| | | <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> --> |
| | | <addsubject ref="addsubject" v-on:refreshPage="refreshPage"></addsubject> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getList, |
| | | remove |
| | | } from "@/api/patrol/patrolGroup"; |
| | | |
| | | import addsubject from "./addsubject.vue"; |
| | | // import { |
| | | // mapGetters, |
| | | // mapState |
| | | // } from "vuex"; |
| | | import Qs from "qs"; |
| | | import { |
| | | getToken |
| | | } from "@/util/auth"; |
| | | export default { |
| | | components: { |
| | | addsubject |
| | | }, |
| | | data() { |
| | | return { |
| | | excelBox: false, |
| | | excelForm: {}, |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [{ |
| | | label: "模板上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/examSubjectChoices/import-examSubject" |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24 |
| | | } |
| | | ] |
| | | }, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | selection: true, |
| | | menu: true, |
| | | // 导出按钮 |
| | | excelBtn: true, |
| | | excelBtnText: "题库导出", |
| | | // title: '题库', |
| | | align: "center", |
| | | height: "auto", |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | index: true, |
| | | indexLabel: "序号", |
| | | viewBtn: true, |
| | | //dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | // 操作栏宽度 |
| | | menuWidth: 226, |
| | | // ...this.$store.state.control.clearOtherBut, |
| | | // ...this.$store.state.control.searchOpen, |
| | | column: [{ |
| | | label: "题目类型", |
| | | prop: "type", |
| | | search: true, |
| | | type: "select", |
| | | searchSpan: 4, |
| | | dicUrl: "/api/blade-system/dict-biz/tree?code=subject_max", |
| | | props: { |
| | | label: "title", |
| | | value: "key", |
| | | }, |
| | | slot: true, |
| | | width: 96 |
| | | }, { |
| | | label: "题目名称", |
| | | prop: "name", |
| | | searchSpan: 4, |
| | | search: true, |
| | | slot: true |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | | prop: "createDate", |
| | | slot: true, |
| | | width: 130 |
| | | }, |
| | | { |
| | | label: "修改人", |
| | | prop: "modifier", |
| | | slot: true, |
| | | width: 96 |
| | | }, |
| | | { |
| | | label: "修改时间", |
| | | prop: "modifyDate", |
| | | slot: true, |
| | | width: 130 |
| | | } |
| | | ] |
| | | }, |
| | | questionBankSearch: {}, |
| | | questionBankLoading: true, |
| | | questionBankData: [], |
| | | questionBankPage: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 16, |
| | | // ...this.$store.state.control.changePageSize |
| | | }, |
| | | questionBankQuery: {}, |
| | | questionBankSelectionList: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | computed: { |
| | | // ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | // addBtn: this.vaildData(this.permission.subject_add, false), |
| | | // viewBtn: this.vaildData(this.permission.subject_view, false), |
| | | // delBtn: this.vaildData(this.permission.subject_delete, false), |
| | | // editBtn: this.vaildData(this.permission.subject_edit, false), |
| | | // excelBtn: this.vaildData(this.permission.subject_report, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.questionBankSelectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | methods: { |
| | | //触发页面刷新 |
| | | refreshPage() { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | }, |
| | | questionBankHandleAdd() { |
| | | this.$refs.addsubject.inits(); |
| | | }, |
| | | questionBankHandleEdit(row) { |
| | | this.$refs.addsubject.inits(row); |
| | | }, |
| | | questionBankOnLoad(page, params = {}) { |
| | | params = this.questionBankSearch; |
| | | this.questionBankLoading = false; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.questionBankPage.total = data.total; |
| | | this.questionBankData = data.records; |
| | | for (var i = 0; i < this.questionBankData.length; i++) { |
| | | this.questionBankData[i].type = this.questionBankData[i].type.toString() |
| | | for (var j = 0; j < this.questionBankData[i].patrolGroupItemList.length; j++) { |
| | | this.questionBankData[i].patrolGroupItemList[j].type = this.questionBankData[i].patrolGroupItemList[j] |
| | | .type.toString() |
| | | } |
| | | } |
| | | this.questionBankLoading = false; |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.questionBankSelectionClear(); |
| | | }); |
| | | }, |
| | | questionBankSelectionClear() { |
| | | this.questionBankSelectionList = []; |
| | | this.$refs.questionBankCrud.toggleSelection(); |
| | | }, |
| | | questionBankSelectionChange(list) { |
| | | this.questionBankSelectionList = list; |
| | | }, |
| | | questionBankSearchChange(params, done) { |
| | | this.questionBankQuery = params; |
| | | this.questionBankPage.currentPage = 1; |
| | | this.questionBankOnLoad(this.questionBankPage, params); |
| | | done(); |
| | | }, |
| | | questionBankSearchReset() { |
| | | this.questionBankQuery = {}; |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | }, |
| | | questionBankCurrentChange(currentPage) { |
| | | this.questionBankPage.currentPage = currentPage; |
| | | }, |
| | | questionBankSizeChange(pageSize) { |
| | | this.questionBankPage.pageSize = pageSize; |
| | | }, |
| | | |
| | | questionBankHandleDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | questionBankHandleDelete() { |
| | | if (this.questionBankSelectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.questionBankOnLoad(this.questionBankPage); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.questionBankCrud.toggleSelection(); |
| | | }); |
| | | }, |
| | | |
| | | //导出数据 |
| | | handleExport() { |
| | | this.$confirm("是否导出清册数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | window.open( |
| | | `/api/apply/export-apply?examId=${this.$route.query.id}&${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}` |
| | | ); |
| | | }); |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | handleTemplate() { |
| | | window.open( |
| | | `/api/examSubjectChoices/export-template?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}` |
| | | ); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | refreshChange() { |
| | | this.questionBankOnLoad(this.page, this.query); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" 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"> |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)"> |
| | | 详情 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)"> |
| | | 详情 |
| | | </el-button> |
| | | </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="{type,size,row }" slot="menu"> |
| | | <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)"> |
| | | 详情 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)"> |
| | | 详情 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="principalPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')" |
| | | v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <template slot-scope="{row, size}" slot="principalPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')" |
| | | v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | |
| | | <el-drawer title="巡查详情" :visible.sync="isDetail" :append-to-body="true" size="60%" direction="rtl"> |
| | | <el-drawer title="巡查详情" :visible.sync="isDetail" :append-to-body="true" size="60%" direction="rtl"> |
| | | |
| | | <el-card class="trackClass" style="overflow-y: auto"> |
| | | <el-card class="trackClass" style="overflow-y: auto"> |
| | | |
| | | <el-collapse v-model="activeNames" @change="handleChange"> |
| | | <div v-for="(item, index) in 10" :key="index"> |
| | | <el-collapse-item title="一致性 Consistency" name="1"> |
| | | <div>{{ index }} |
| | | |
| | | <el-collapse v-model="activeNames" @change="handleChange"> |
| | | <div v-for="(item, index) in 10" :key="index"> |
| | | <el-collapse-item title="一致性 Consistency" name="1"> |
| | | <div>{{ index }} |
| | | |
| | | <el-collapse v-model="activeNames" @change="handleChange"> |
| | | <div v-for="(item, index) in 3" :key="index"> |
| | | <el-collapse-item title="er致性 Consistency" name="1"> |
| | | <div>在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。{{ index }}</div> |
| | | </el-collapse-item> |
| | | </div> |
| | | </el-collapse> |
| | | </div> |
| | | </el-collapse-item> |
| | | </div> |
| | | <div v-for="(item, index) in 3" :key="index"> |
| | | <el-collapse-item title="er致性 Consistency" name="1"> |
| | | <div>在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。{{ index }}</div> |
| | | </el-collapse-item> |
| | | </div> |
| | | </el-collapse> |
| | | </div> |
| | | </el-collapse-item> |
| | | </div> |
| | | </el-collapse> |
| | | |
| | | <!-- <el-form :model="form" label-position="right" size="mini" class="taskinfoForm" label-width="70px"> |
| | | <!-- <el-form :model="form" label-position="right" size="mini" class="taskinfoForm" label-width="70px"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="巡查内容"> |
| | |
| | | </el-row> |
| | | </el-form> --> |
| | | |
| | | </el-card> |
| | | </el-card> |
| | | |
| | | <!-- <DcMap v-if="isDetail" :is-detail="isDetail" :range="form.taskRoute" :patrolRoute="form.patrolRoute"> |
| | | <!-- <DcMap v-if="isDetail" :is-detail="isDetail" :range="form.taskRoute" :patrolRoute="form.patrolRoute"> |
| | | </DcMap> --> |
| | | |
| | | </el-drawer> |
| | | </el-drawer> |
| | | |
| | | </basic-container> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | getList, |
| | | remove, |
| | | add, |
| | | update, |
| | | getDetail, |
| | | getPatrolGroupTree |
| | | } from "@/api/patrol/placeChek" |
| | | } from "@/api/patrol/placeChek" |
| | | |
| | | import website from '@/config/website' |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | // import { |
| | | // getDistrictTree |
| | | // } from "@/api/district/index" |
| | | // import { |
| | | // getDistrictTree |
| | | // } from "@/api/district/index" |
| | | |
| | | import { |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | } from "vuex" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | isDetail: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | export default { |
| | | data() { |
| | | return { |
| | | isDetail: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | // menuWidth: 450, |
| | | // menu: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | addBtn: false, |
| | | delBtn: false, |
| | | //stripe:true, |
| | | index: true, |
| | | editBtn: false, |
| | | viewBtn: false, |
| | | // selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | header: false, |
| | | column: [{ |
| | | label: "所属街道", |
| | | prop: "streetName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | // menuWidth: 450, |
| | | // menu: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | addBtn: false, |
| | | delBtn: false, |
| | | //stripe:true, |
| | | index: true, |
| | | editBtn: false, |
| | | viewBtn: false, |
| | | // selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | header:false, |
| | | column: [{ |
| | | label: "所属街道", |
| | | prop: "streetName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "所属社区", |
| | | prop: "communityName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "所属网格", |
| | | prop: "gridName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "场所名称", |
| | | prop: "placeName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "场所隐患", |
| | | prop: "remark", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | }, |
| | | |
| | | { |
| | | label: "场所负责人", |
| | | prop: "principal", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | label: "场所负责人电话", |
| | | prop: "principalPhone", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | slot: true |
| | | }, |
| | | { |
| | | label: "场所地址", |
| | | prop: "location", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "签名", |
| | | prop: "signaturePath", |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | }, |
| | | ], |
| | | { |
| | | label: "所属社区", |
| | | prop: "communityName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | data: [], |
| | | { |
| | | label: "所属网格", |
| | | prop: "gridName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "场所名称", |
| | | prop: "placeName", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "场所隐患", |
| | | prop: "remark", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | }, |
| | | |
| | | patrolTree: [], |
| | | } |
| | | { |
| | | label: "场所负责人", |
| | | prop: "principal", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | label: "场所负责人电话", |
| | | prop: "principalPhone", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | slot: true |
| | | }, |
| | | { |
| | | label: "场所地址", |
| | | prop: "location", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "签名", |
| | | prop: "signaturePath", |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | |
| | | patrolTree: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.articleType": { |
| | | handler (val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | },] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | "form.articleType": { |
| | | handler(val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | }, ] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | viewBtn: this.vaildData(this.permission.article_view, true), |
| | | delBtn: this.vaildData(this.permission.article_delete, true), |
| | | editBtn: this.vaildData(this.permission.article_edit, true), |
| | | } |
| | | }, |
| | | |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | viewBtn: this.vaildData(this.permission.article_view, true), |
| | | delBtn: this.vaildData(this.permission.article_delete, true), |
| | | editBtn: this.vaildData(this.permission.article_edit, true), |
| | | } |
| | | }, |
| | | |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | showStringDispose (row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | getDetail (row) { |
| | | this.isDetail = true |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | getDetail(row) { |
| | | this.isDetail = true |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | var names = data.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | data.url = urls.join(",") |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | data.articleList = JSON.parse(data.articleRange) |
| | | this.form = data |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | 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.data.forEach(item => { |
| | | this.$set(item, 'principalPhoneflag', false) |
| | | if (item.signaturePath.length > 0) { |
| | | var urls = [] |
| | | var names = item.signaturePath.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.signaturePath = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getPatrolGroupTree({ |
| | | type: 1, |
| | | childType: 1 |
| | | }).then((res) => { |
| | | const data = res.data.data |
| | | this.patrolTree = 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" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | 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 |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | 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.data.forEach(item => { |
| | | this.$set(item, 'principalPhoneflag', false) |
| | | if (item.signaturePath.length > 0) { |
| | | var urls = [] |
| | | var names = item.signaturePath.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.signaturePath = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getPatrolGroupTree({}).then((res) => { |
| | | const data = res.data.data |
| | | this.patrolTree = 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" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-upload__icon { |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | </style> |
| | | } |
| | | </style> |
| | |
| | | <div class="content-box"> |
| | | <box-title class="m10" :classVal="9" :title="'基本信息'"></box-title> |
| | | <avue-form v-if="baseShow" ref="baseForm" :option="option" v-model="form"> |
| | | <template slot-scope="{ row, size, index }" slot="houseCodeBinds"> |
| | | <el-select v-model="form.houseCodeBinds" filterable remote multiple :remote-method="onRemoteMethod" |
| | | @change="onSelectChange" placeholder="请选择标准地址" reserve-keyword> |
| | | <el-option v-for="item in standardAddressList" :key="item.addressCode" :label="item.addressName" |
| | | :value="item.addressCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </avue-form> |
| | | |
| | | |
| | | <box-title class="m10" :classVal="9" :title="'房东信息'"></box-title> |
| | | <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="form"></avue-form> |
| | | <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="placeForm"></avue-form> |
| | | |
| | | <box-title class="m10" :classVal="9" :title="'其他信息'"></box-title> |
| | | <avue-form v-if="restShow" ref="restForm" :option="optionDetail" v-model="placeForm"></avue-form> |
| | |
| | | getHoldList, |
| | | update, |
| | | updatePlaceExt, |
| | | getPlaceAddressList |
| | | } from "@/api/place/place" |
| | | import { |
| | | getPlaceList |
| | |
| | | span: 12, |
| | | label: "场所名称", |
| | | prop: "placeName", |
| | | labelWidth: 120, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入场所名称", |
| | |
| | | { |
| | | label: "负责人", |
| | | prop: "principal", |
| | | labelWidth: 120, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请输入负责人", |
| | |
| | | width: 96, |
| | | label: "手机号码", |
| | | prop: "principalPhone", |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 4, |
| | | slot: true, |
| | |
| | | width: 120, |
| | | overHidden: true, |
| | | label: "身份证号", |
| | | labelWidth: 120, |
| | | prop: "principalIdCard", |
| | | search: true, |
| | | searchSpan: 4, |
| | |
| | | hide: true, |
| | | parent: false, |
| | | label: "所属社区", |
| | | labelWidth: 120, |
| | | prop: "neiCode", |
| | | search: false, |
| | | type: "tree", |
| | |
| | | label: "所属网格", |
| | | prop: "gridCode", |
| | | type: "tree", |
| | | labelWidth: 120, |
| | | cell: true, |
| | | props: { |
| | | label: "gridName", |
| | |
| | | span: 7, |
| | | label: "场所标签", |
| | | prop: "label", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | dicUrl: "/api/blade-category/category/getCategory?level=2", |
| | | cascader: ["smallLabel"], |
| | |
| | | label: "标签颜色", |
| | | prop: "color", |
| | | type: "select", |
| | | labelWidth: 120, |
| | | dicData: [{ |
| | | label: "绿", |
| | | value: "green", |
| | |
| | | span: 12, |
| | | label: "九小场所", |
| | | prop: "isNine", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | dicData: [{ |
| | | label: "是", |
| | |
| | | span: 12, |
| | | label: "九小分类", |
| | | prop: "nineType", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | display: false, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=nineType", |
| | |
| | | span: 12, |
| | | label: "阵地", |
| | | prop: "isFront", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | dicData: [{ |
| | | label: "是", |
| | |
| | | label: "阵地类型", |
| | | prop: "frontType", |
| | | type: "select", |
| | | labelWidth: 120, |
| | | display: false, |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType", |
| | |
| | | }, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "三级消防单位", |
| | | prop: "threeFireProtection", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | dicData: [{ |
| | | label: "是", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: 2, |
| | | } |
| | | ], |
| | | hide: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择三级消防单位", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | span: 12, |
| | | label: "无炸类型", |
| | | prop: "noExplosionCategory", |
| | | type: "select", |
| | | labelWidth: 120, |
| | | display: true, |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=noExplosionCategory", |
| | | dataType: "number", |
| | | hide: true, |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | label: "场所照片", |
| | | prop: "imageUrls", |
| | | width: 80, |
| | | type: "upload", |
| | | labelWidth: 120, |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | multiple: true, |
| | |
| | | name: "name", |
| | | url: "link", |
| | | }, |
| | | span: 12, |
| | | span: 24, |
| | | }, |
| | | { |
| | | width: 160, |
| | |
| | | prop: "location", |
| | | type: "map", |
| | | dataType: "string", |
| | | span: 12, |
| | | labelWidth: 120, |
| | | span: 24, |
| | | value: [117.96646, 28.431002, ""], |
| | | cascader: ['houseCodeBinds'], |
| | | rules: [{ |
| | |
| | | width: 160, |
| | | overHidden: true, |
| | | display: false, |
| | | labelWidth: 120, |
| | | hide: true, |
| | | label: "地址", |
| | | prop: "addressName", |
| | | span: 12 |
| | | }, |
| | | |
| | | // { |
| | | // width: 160, |
| | | // overHidden: true, |
| | | // slot: true, |
| | | // label: "标准地址", |
| | | // prop: "houseCodeBinds", |
| | | // span: 24, |
| | | // type: 'select', |
| | | // labelWidth:120, |
| | | // dataType: "object", |
| | | // remote: true, |
| | | // multiple: true, |
| | | // hide: true, |
| | | // display: false, |
| | | // filterable:true, |
| | | // dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList`, |
| | | // props: { |
| | | // label: 'addressName', |
| | | // value: 'addressCode', |
| | | // }, |
| | | // dicData: [], |
| | | // rules: [{ |
| | | // required: false, |
| | | // message: "请选择标准地址", |
| | | // trigger: "blur", |
| | | // }, ] |
| | | // }, |
| | | { |
| | | width: 160, |
| | | overHidden: true, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "houseCodeBinds", |
| | | slot: true, |
| | | label: "标准地址", |
| | | prop: "houseCodeBinds", |
| | | span: 24, |
| | | type: 'tree', |
| | | dataType: "object", |
| | | remote: true, |
| | | multiple: true, |
| | | hide: true, |
| | | display: false, |
| | | dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList?addressName={{addressName}}`, |
| | | props: { |
| | | label: 'addressName', |
| | | value: 'addressCode', |
| | | }, |
| | | dicData: [], |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择地址", |
| | | trigger: "blur", |
| | | }, ], |
| | | labelWidth: 120, |
| | | |
| | | }, |
| | | |
| | | { |
| | | label: "备注", |
| | | prop: "remark", |
| | | type: 'textarea', |
| | | labelWidth: 120, |
| | | hide: true, |
| | | span: 24, |
| | | rules: [{ |
| | |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | label: "电话号码", |
| | | prop: "telephone", |
| | | search: true, |
| | | searchSpan: 4, |
| | | slot: true, |
| | | overHidden: true, |
| | | rules: [{ |
| | | validator: validatorPhone, |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | label: "身份证号", |
| | | prop: "idCard", |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | label: "现居住地", |
| | | prop: "tempAddress", |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | label: "性别", |
| | |
| | | } |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | span: 12, |
| | |
| | | value: "dictKey", |
| | | }, |
| | | }, |
| | | { |
| | | labelWidth: 100, |
| | | label: "身份证号", |
| | | prop: "idCard", |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | label: "电话号码", |
| | | prop: "telephone", |
| | | search: true, |
| | | searchSpan: 4, |
| | | slot: true, |
| | | overHidden: true, |
| | | rules: [{ |
| | | validator: validatorPhone, |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | labelWidth: 100, |
| | | label: "现居住地", |
| | | prop: "tempAddress", |
| | | searchSpan: 4, |
| | | search: true, |
| | | }, |
| | | { |
| | | labelWidth: 100, |
| | | label: "岗位", |
| | |
| | | }, |
| | | |
| | | { |
| | | label: "从业人员照片", |
| | | prop: "employerImg", |
| | | labelWidth: 100, |
| | | type: "upload", |
| | | listType: "picture-card", |
| | | dataType: "string", |
| | | multiple: true, |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: "name", |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "入职时间", |
| | | labelWidth: 100, |
| | | hide: true, |
| | | row: true, |
| | | prop: "resignationTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | // format: "yyyy-MM-dd hh:mm:ss", |
| | | // valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择入职时间", |
| | | trigger: "blur", |
| | | }] |
| | | }, |
| | | { |
| | | label: "离职时间", |
| | | labelWidth: 100, |
| | | hide: true, |
| | | row: true, |
| | | prop: "employmentTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | // format: "yyyy-MM-dd hh:mm:ss", |
| | | // valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择离职时间", |
| | | trigger: "blur", |
| | | }] |
| | | }, |
| | | { |
| | | labelWidth: 100, |
| | | label: "状态", |
| | | prop: "resignationFlag", |
| | | // hide: true |
| | | type: "select", |
| | | display: false, |
| | | dicData: [{ |
| | | label: "在职", |
| | | value: 1 |
| | |
| | | slot: true, |
| | | overHidden: true, |
| | | rules: [{ |
| | | validator: validatorPhone, |
| | | // validator: validatorPhone, |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 96, |
| | | label: "微信号", |
| | | prop: "legalTel", |
| | | search: true, |
| | | searchSpan: 4, |
| | | slot: true, |
| | | overHidden: true, |
| | | rules: [{ |
| | | validator: validatorPhone, |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | |
| | | |
| | | ], |
| | | }, |
| | | userOption: { |
| | |
| | | |
| | | ], |
| | | }, |
| | | |
| | | standardAddressList: [], //标准地址数据 |
| | | standardAddress: "", |
| | | standardAddressSearchKey: "" |
| | | } |
| | | }, |
| | | |
| | |
| | | }), getPlaceList()]) |
| | | .then( |
| | | that.$axios.spread(function(baseInfo, restInfo) { |
| | | console.log("houseCodeBinds===>", baseInfo.data.data.houseCodeBinds) |
| | | that.form = baseInfo.data.data |
| | | that.form.addressName = that.form.location; |
| | | that.form.location = [ |
| | |
| | | that.form.lat, |
| | | that.form.location, |
| | | ].join(",") |
| | | if (baseInfo.data.data.houseCodeBinds) { |
| | | that.standardAddressList = baseInfo.data.data.houseBindList; |
| | | that.form.houseCodeBinds = baseInfo.data.data.houseCodeBinds.split(",") |
| | | } |
| | | |
| | | if (that.form.imageUrls && that.form.imageUrls.length) { |
| | | that.form.imageUrls = that.form.imageUrls |
| | |
| | | that.baseShow = true |
| | | const data = restInfo.data.data |
| | | |
| | | |
| | | |
| | | |
| | | if (data) { |
| | | let imageUrls = data.imageUrls |
| | | let planImageUrls = data.planImageUrls |
| | |
| | | ...data, |
| | | imageUrls, |
| | | planImageUrls, |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | that.restShow = true |
| | | }) |
| | | ) |
| | | |
| | | that.getPlaceAddressListRequest() |
| | | }, |
| | | |
| | | locationDispose(data) { |
| | |
| | | this.form.houseCodeBinds = this.form.houseCodeBinds.join(",") |
| | | } |
| | | |
| | | |
| | | this.form.placeExtEntity = null |
| | | this.$refs.baseForm.validate((valid, done, msg) => { |
| | | if (valid) { |
| | | that.$axios |
| | |
| | | this.restShow = false |
| | | this.roleBox = false |
| | | }, |
| | | |
| | | getPlaceAddressListRequest(query) { |
| | | getPlaceAddressList({ |
| | | addressName: query |
| | | }).then(res => { |
| | | this.standardAddressList = res.data.data; |
| | | }) |
| | | }, |
| | | |
| | | onSelectChange(e) { |
| | | console.log("selectChange===>", e); |
| | | // this.getPlaceAddressListRequest() |
| | | }, |
| | | |
| | | onRemoteMethod(query) { |
| | | console.log("remote===>", query) |
| | | this.getPlaceAddressListRequest(query) |
| | | }, |
| | | |
| | | |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | justify-content: center; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="confirmFlag"> |
| | | <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{ showConfirmFlag(row.confirmFlag).text |
| | | }}</el-tag> |
| | | <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{ |
| | | showConfirmFlag(row.confirmFlag).text |
| | | }}</el-tag> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="source"> |
| | | <el-tag :size="size" :type="showSource(row.source).type">{{ showSource(row.source).text |
| | | }}</el-tag> |
| | | }}</el-tag> |
| | | </template> |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除 |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | import baseAllInfo from './components/baseAllInfo' |
| | | |
| | | export default { |
| | | data () { |
| | | data() { |
| | | |
| | | //手机号格式校验 |
| | | let validatorPhone = function (rule, value, callback) { |
| | |
| | | }, |
| | | }, |
| | | { |
| | | span: 12, |
| | | label: "三级消防单位", |
| | | prop: "threeFireProtection", |
| | | labelWidth: 120, |
| | | type: "select", |
| | | dicData: [{ |
| | | label: "是", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: 2, |
| | | } |
| | | ], |
| | | hide: true, |
| | | rules: [{ |
| | | required: false, |
| | | message: "请选择三级消防单位", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "场所照片", |
| | | prop: "imageUrls", |
| | |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 12, |
| | | span: 24, |
| | | }, |
| | | { |
| | | width: 156, |
| | |
| | | type: 'map', |
| | | dataType: "string", |
| | | minWidth: 250, |
| | | span: 12, |
| | | span: 24, |
| | | value: [117.966460, 28.431002, ""], |
| | | rules: [ |
| | | { |
| | |
| | | } |
| | | }, |
| | | |
| | | provide () { |
| | | provide() { |
| | | return { |
| | | placeElement: this, |
| | | } |
| | |
| | | |
| | | watch: { |
| | | 'form.isNine': { |
| | | handler (newData) { |
| | | handler(newData) { |
| | | if (newData) { |
| | | let nineTypeColumn = this.findObject( |
| | | this.option.column, |
| | |
| | | }, |
| | | }, |
| | | 'form.isFront': { |
| | | handler (newData) { |
| | | handler(newData) { |
| | | if (newData) { |
| | | let frontTypeColumn = this.findObject( |
| | | this.option.column, |
| | |
| | | |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.place_add, true), |
| | | viewBtn: this.vaildData(this.permission.place_view, true), |
| | |
| | | editBtn: this.vaildData(this.permission.place_edit, true), |
| | | } |
| | | }, |
| | | ids () { |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | showConfirmFlag () { |
| | | showConfirmFlag() { |
| | | return (data) => { |
| | | let tags = { |
| | | text: '', |
| | |
| | | } |
| | | }, |
| | | |
| | | showSource () { |
| | | showSource() { |
| | | return (data) => { |
| | | let tags = { |
| | | text: '', |
| | |
| | | } |
| | | }, |
| | | |
| | | showLocation () { |
| | | showLocation() { |
| | | return (data) => { |
| | | if (data != null && data.indexOf(',') != -1) { |
| | | data = data.split(',') |
| | |
| | | } |
| | | }, |
| | | |
| | | decimalProcessing () { |
| | | decimalProcessing() { |
| | | return (data) => { |
| | | if (data != null) { |
| | | return Number(data).toFixed(6) |
| | |
| | | } |
| | | }, |
| | | |
| | | textDispose () { |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | showStringDispose (row, type) { |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | locationDispose (data) { |
| | | locationDispose(data) { |
| | | data = data.split(',') |
| | | |
| | | return { |
| | |
| | | } |
| | | }, |
| | | |
| | | auditCur (row) { |
| | | auditCur(row) { |
| | | this.curAuditRow = row |
| | | this.auditBasePopup = true |
| | | }, |
| | | |
| | | ManageTenants (item) { |
| | | ManageTenants(item) { |
| | | this.$refs.BaseAllInfo.initOpen(item) |
| | | }, |
| | | |
| | | rowSave (row, done, loading) { |
| | | rowSave(row, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",").filter(item => item != '') |
| | |
| | | ) |
| | | }, |
| | | |
| | | rowUpdate (row, index, done, loading) { |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.imageUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.imageUrls.split(",").filter(item => item != '') |
| | |
| | | ) |
| | | }, |
| | | |
| | | rowDel (row) { |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | }) |
| | | }, |
| | | |
| | | searchReset () { |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$nextTick(() => { |
| | | this.$refs.crud && this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | handleDelete () { |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | |
| | | }) |
| | | }, |
| | | |
| | | beforeOpen (done, type) { |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getPlace(this.form.id).then((res) => { |
| | | this.form = res.data.data |
| | |
| | | } |
| | | }, |
| | | |
| | | currentChange (currentPage) { |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | onLoad(page, params = {}) { |
| | | this.loading = true |
| | | |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => { |
| | |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2 |
| | | value: 0 |
| | | } |
| | | ] |
| | | }, |
| | |
| | | text: '男', |
| | | type: 'primary' |
| | | } |
| | | } else if (data == 2) { |
| | | } else if (data == 0) { |
| | | tags = { |
| | | text: '女', |
| | | type: 'primary' |
| | |
| | | |
| | | <template slot-scope="{row, size}" slot="minors"> |
| | | <el-tag :size="size">{{ |
| | | row.minors == 2?'是':row.minors==1?'否':'' |
| | | row.minors == 2?'是':'否' |
| | | }}</el-tag> |
| | | </template> |
| | | |
| | |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | stripe:true, |
| | | stripe: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | addBtn: false, |
| | |
| | | column: [{ |
| | | width: 110, |
| | | span: 12, |
| | | label: "名称", |
| | | label: "姓名", |
| | | prop: "name", |
| | | searchSpan: 4, |
| | | searchLabelWidth: 60, |
| | |
| | | align: 'center', |
| | | labelWidth: 110, |
| | | }, |
| | | { |
| | | { |
| | | width: 120, |
| | | span: 12, |
| | | label: "联系电话", |
| | |
| | | slot: true, |
| | | labelWidth: 110, |
| | | }, |
| | | |
| | | |
| | | { |
| | | width: 160, |
| | | span: 12, |
| | |
| | | prop: "address", |
| | | align: 'center', |
| | | labelWidth: 110, |
| | | overHidden:true, |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | |
| | | search: true, |
| | | prop: "minors", |
| | | type: "select", |
| | | align:"center", |
| | | dicData: [ |
| | | { |
| | | align: "center", |
| | | dicData: [{ |
| | | label: "全部", |
| | | value: "" |
| | | },{ |
| | | }, { |
| | | label: "是", |
| | | value: 2 |
| | | }, |
| | |
| | | value: 1 |
| | | }, { |
| | | label: '通过', |
| | | value: 3 |
| | | value: 2 |
| | | }, { |
| | | label: '驳回', |
| | | value: 4 |
| | | value: 3 |
| | | }], |
| | | align: 'center', |
| | | labelWidth: 110, |
| | |
| | | type: 'warning', |
| | | text: '待审核' |
| | | } |
| | | } else if (data == 3) { |
| | | } else if (data == 2) { |
| | | tags = { |
| | | type: 'danger', |
| | | text: '通过' |
| | | } |
| | | } else if (data == 4) { |
| | | } else if (data == 3) { |
| | | tags = { |
| | | type: 'warning', |
| | | text: '驳回' |
| | |
| | | <template> |
| | | <div> |
| | | <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-scope="{row, size, index}" slot="menu"> |
| | | <el-button type="text" :size="size" icon="el-icon-info" v-if="permission.property_todo_detail" |
| | | @click.stop="handleDetail(row)">详情 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.property_todo_follow" |
| | | @click.stop="handleImage(row, index)">流程图 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="processDefinitionVersion"> |
| | | <el-tag :size="size">v{{ row.processDefinitionVersion }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="linkPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'linkPhoneflag')" |
| | | v-text="textDispose(row, 'linkPhoneflag', 'linkPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design> |
| | | </div> |
| | | <div> |
| | | <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-scope="{row, size, index}" slot="menu"> |
| | | <el-button type="text" :size="size" icon="el-icon-info" v-if="permission.property_todo_detail" |
| | | @click.stop="handleDetail(row)">详情 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.property_todo_follow" |
| | | @click.stop="handleImage(row, index)">流程图 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="processDefinitionVersion"> |
| | | <el-tag :size="size">v{{ row.processDefinitionVersion }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="linkPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'linkPhoneflag')" |
| | | v-text="textDispose(row, 'linkPhoneflag', 'linkPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import { |
| | | } from "vuex" |
| | | import { |
| | | doneList |
| | | } from "@/api/work/work" |
| | | import { |
| | | } from "@/api/work/work" |
| | | import { |
| | | flowCategory, |
| | | flowRoute |
| | | } from "@/util/flow" |
| | | } from "@/util/flow" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | form: {}, |
| | | selectionId: '', |
| | | selectionList: [], |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | processInstanceId: '', |
| | | flowBox: false, |
| | | workBox: false, |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 140, |
| | | export default { |
| | | data() { |
| | | return { |
| | | datetime: "", |
| | | form: {}, |
| | | selectionId: '', |
| | | selectionList: [], |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | processInstanceId: '', |
| | | flowBox: false, |
| | | workBox: false, |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 140, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | border: true, |
| | | index: true, |
| | | // selection: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | columnBtn: false, |
| | | dialogWidth: 900, |
| | | dialogClickModal: false, |
| | | header: false, |
| | | column: [ |
| | | { |
| | | label: "流程分类", |
| | | type: "select", |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=flow", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "category", |
| | | // search: true, |
| | | hide: true, |
| | | width: 100, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: '申请类型', |
| | | prop: 'categoryName', |
| | | // search: true, |
| | | }, { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | // search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | }, { |
| | | width: 110, |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | // search: true, |
| | | }, { |
| | | width: 120, |
| | | label: '联系电话', |
| | | prop: 'linkPhone', |
| | | // search: true, |
| | | slot: true |
| | | }, { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | // search: true, |
| | | }, |
| | | { |
| | | label: '当前步骤', |
| | | prop: 'taskName', |
| | | }, |
| | | // { |
| | | // label: '流程版本', |
| | | // prop: 'processDefinitionVersion', |
| | | // slot: true, |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | width: 144, |
| | | label: '申请时间', |
| | | prop: 'createTime', |
| | | }, |
| | | ] |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | border: true, |
| | | index: true, |
| | | // selection: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | columnBtn: false, |
| | | dialogWidth: 900, |
| | | dialogClickModal: false, |
| | | header: false, |
| | | column: [{ |
| | | label: "流程分类", |
| | | type: "select", |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=flow", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "category", |
| | | // search: true, |
| | | hide: true, |
| | | width: 100, |
| | | }, |
| | | data: [] |
| | | } |
| | | { |
| | | width: 100, |
| | | label: '申请类型', |
| | | prop: 'categoryName', |
| | | // search: true, |
| | | }, { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | // search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: '小区名称', |
| | | prop: 'districtName', |
| | | search: true, |
| | | hide: true, |
| | | }, { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "申请时间", |
| | | prop: "dateTime", |
| | | type: "datetimerange", |
| | | defaultTime: ['00:00:00', '23:59:59'], |
| | | format: 'yyyy-MM-dd HH:mm:ss', |
| | | valueFormat: 'yyyy-MM-dd HH:mm:ss', |
| | | startPlaceholder: '开始范围自定义', |
| | | endPlaceholder: '结束范围自定义', |
| | | searchSpan: 5, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择申请时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, { |
| | | width: 110, |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | // search: true, |
| | | }, { |
| | | width: 120, |
| | | label: '联系电话', |
| | | prop: 'linkPhone', |
| | | // search: true, |
| | | slot: true |
| | | }, { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | // search: true, |
| | | }, |
| | | { |
| | | label: '当前步骤', |
| | | prop: 'taskName', |
| | | }, |
| | | // { |
| | | // label: '流程版本', |
| | | // prop: 'processDefinitionVersion', |
| | | // slot: true, |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | width: 144, |
| | | label: '申请时间', |
| | | prop: 'createTime', |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "flowRoutes"]), |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | ...mapGetters(["permission", "flowRoutes"]), |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | showStringDispose (row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDetail (row) { |
| | | this.$router.push({ |
| | | path: `/property/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDetail(row) { |
| | | this.$router.push({ |
| | | path: `/property/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` |
| | | }) |
| | | }, |
| | | handleImage(row) { |
| | | this.processInstanceId = row.processInstanceId |
| | | this.flowBox = true |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | let query = { |
| | | ...this.query, |
| | | category: (params.category) ? flowCategory(params.category) : null |
| | | } |
| | | const { |
| | | dateTime |
| | | } = query |
| | | |
| | | if (dateTime) { |
| | | query = { |
| | | startTimes: dateTime[0], |
| | | endTimes: dateTime[1], |
| | | } |
| | | } |
| | | this.loading = true |
| | | doneList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => { |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'linkPhoneflag': false |
| | | } |
| | | }) |
| | | }, |
| | | handleImage (row) { |
| | | this.processInstanceId = row.processInstanceId |
| | | this.flowBox = true |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const query = { |
| | | ...this.query, |
| | | category: (params.category) ? flowCategory(params.category) : null |
| | | } |
| | | this.loading = true |
| | | doneList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => { |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'linkPhoneflag': false |
| | | } |
| | | }) |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <div> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" |
| | | @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 type="text" :size="size" icon="el-icon-s-check" v-if="permission.property_todo_handle" |
| | | @click.stop="handleWork(row)">处理 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-info" v-if="permission.property_todo_detail" |
| | | @click.stop="handleDetail(row)">详情 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.property_todo_follow" |
| | | @click.stop="handleImage(row, index)">流程图 |
| | | </el-button> |
| | | </template> |
| | | <div> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" |
| | | @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 type="text" :size="size" icon="el-icon-s-check" v-if="permission.property_todo_handle" |
| | | @click.stop="handleWork(row)">处理 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-info" v-if="permission.property_todo_detail" |
| | | @click.stop="handleDetail(row)">详情 |
| | | </el-button> |
| | | <el-button type="text" :size="size" icon="el-icon-search" v-if="permission.property_todo_follow" |
| | | @click.stop="handleImage(row, index)">流程图 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{row, size}" slot="processDefinitionVersion"> |
| | | <el-tag :size="size">v{{ row.processDefinitionVersion }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="linkPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'linkPhoneflag')" |
| | | v-text="textDispose(row, 'linkPhoneflag', 'linkPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design> |
| | | </div> |
| | | <template slot-scope="{row, size}" slot="processDefinitionVersion"> |
| | | <el-tag :size="size">v{{ row.processDefinitionVersion }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row, size}" slot="linkPhone"> |
| | | <el-button :size="size" type="text" @click="showStringDispose(row, 'linkPhoneflag')" |
| | | v-text="textDispose(row, 'linkPhoneflag', 'linkPhone')"> |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import { |
| | | } from "vuex" |
| | | import { |
| | | todoList |
| | | } from "@/api/work/work" |
| | | import { |
| | | } from "@/api/work/work" |
| | | import { |
| | | flowCategory, |
| | | flowRoute |
| | | } from "@/util/flow" |
| | | } from "@/util/flow" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | typeStatus: 1, |
| | | form: {}, |
| | | selectionId: '', |
| | | selectionList: [], |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | processInstanceId: '', |
| | | flowBox: false, |
| | | workBox: false, |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | export default { |
| | | data() { |
| | | return { |
| | | datetime: "", |
| | | typeStatus: 1, |
| | | form: {}, |
| | | selectionId: '', |
| | | selectionList: [], |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | processInstanceId: '', |
| | | flowBox: false, |
| | | workBox: false, |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | simplePage: true, |
| | | border: true, |
| | | index: true, |
| | | // selection: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | columnBtn: false, |
| | | dialogWidth: 900, |
| | | dialogClickModal: false, |
| | | header: false, |
| | | column: [{ |
| | | label: "流程分类", |
| | | type: "select", |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=flow", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "category", |
| | | // search: true, |
| | | hide: true, |
| | | width: 100, |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: '申请类型', |
| | | prop: 'categoryName', |
| | | // search: true, |
| | | }, |
| | | { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: "小区", |
| | | prop: "districtId", |
| | | // search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | searchSpan: 5, |
| | | span: 12, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | // search: true, |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: '联系电话', |
| | | prop: 'linkPhone', |
| | | // search: true, |
| | | slot: true |
| | | }, |
| | | { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | // search: true, |
| | | }, |
| | | { |
| | | label: '当前步骤', |
| | | prop: 'taskName', |
| | | }, |
| | | // { |
| | | // label: '流程版本', |
| | | // prop: 'processDefinitionVersion', |
| | | // // slot: true, |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | width: 144, |
| | | label: '申请时间', |
| | | prop: 'createTime', |
| | | }, |
| | | ] |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | simplePage: true, |
| | | border: true, |
| | | index: true, |
| | | // selection: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | columnBtn: false, |
| | | dialogWidth: 900, |
| | | dialogClickModal: false, |
| | | header: false, |
| | | column: [{ |
| | | label: "流程分类", |
| | | type: "select", |
| | | row: true, |
| | | dicUrl: "/api/blade-system/dict/dictionary?code=flow", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "category", |
| | | // search: true, |
| | | hide: true, |
| | | width: 100, |
| | | }, |
| | | data: [] |
| | | } |
| | | { |
| | | width: 110, |
| | | label: '小区名称', |
| | | prop: 'districtName', |
| | | search: true, |
| | | hide: true, |
| | | }, { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "申请时间", |
| | | prop: "dateTime", |
| | | type: "datetimerange", |
| | | defaultTime: ['00:00:00', '23:59:59'], |
| | | format: 'yyyy-MM-dd HH:mm:ss', |
| | | valueFormat: 'yyyy-MM-dd HH:mm:ss', |
| | | startPlaceholder: '开始范围自定义', |
| | | endPlaceholder: '结束范围自定义', |
| | | searchSpan: 5, |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择申请时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: '申请类型', |
| | | prop: 'categoryName', |
| | | // search: true, |
| | | }, |
| | | { |
| | | width: 220, |
| | | overHidden: true, |
| | | label: "小区", |
| | | prop: "districtId", |
| | | // search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | searchSpan: 5, |
| | | span: 12, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | // search: true, |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: '联系电话', |
| | | prop: 'linkPhone', |
| | | // search: true, |
| | | slot: true |
| | | }, |
| | | { |
| | | label: '项目名称', |
| | | prop: 'name', |
| | | // search: true, |
| | | }, |
| | | { |
| | | label: '当前步骤', |
| | | prop: 'taskName', |
| | | }, |
| | | // { |
| | | // label: '流程版本', |
| | | // prop: 'processDefinitionVersion', |
| | | // // slot: true, |
| | | // width: 80, |
| | | // }, |
| | | { |
| | | width: 144, |
| | | label: '申请时间', |
| | | prop: 'createTime', |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "flowRoutes"]), |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | ...mapGetters(["permission", "flowRoutes"]), |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'principalIdCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | changeType (type) { |
| | | this.typeStatus = type |
| | | this.page.currentPage = 1 |
| | | // this.onLoad(this.page) |
| | | }, |
| | | showStringDispose (row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | changeType(type) { |
| | | this.typeStatus = type |
| | | this.page.currentPage = 1 |
| | | // this.onLoad(this.page) |
| | | }, |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleWork (row) { |
| | | this.$router.push({ |
| | | path: `/property/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}` |
| | | }) |
| | | }, |
| | | handleDetail (row) { |
| | | this.$router.push({ |
| | | path: `/property/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` |
| | | }) |
| | | }, |
| | | handleImage (row) { |
| | | this.processInstanceId = row.processInstanceId |
| | | this.flowBox = true |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const query = { |
| | | ...this.query, |
| | | category: (params.category) ? flowCategory(params.category) : null |
| | | } |
| | | this.loading = true |
| | | todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => { |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'linkPhoneflag': false |
| | | } |
| | | }) |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleWork(row) { |
| | | this.$router.push({ |
| | | path: `/property/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}` |
| | | }) |
| | | }, |
| | | handleDetail(row) { |
| | | this.$router.push({ |
| | | path: `/property/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` |
| | | }) |
| | | }, |
| | | handleImage(row) { |
| | | this.processInstanceId = row.processInstanceId |
| | | this.flowBox = true |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | let query = { |
| | | ...this.query, |
| | | category: (params.category) ? flowCategory(params.category) : null |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss" scoped> |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | const { |
| | | dateTime |
| | | } = query |
| | | |
| | | .tab-list { |
| | | if (dateTime) { |
| | | query = { |
| | | startTimes: dateTime[0], |
| | | endTimes: dateTime[1], |
| | | } |
| | | } |
| | | this.loading = true |
| | | todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => { |
| | | const data = { |
| | | ...res.data.data, |
| | | records: res.data.data.records.map(item => { |
| | | return { |
| | | ...item, |
| | | 'linkPhoneflag': false |
| | | } |
| | | }) |
| | | } |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss" scoped> |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | |
| | | .tab-list { |
| | | display: flex; |
| | | margin-right: 6px; |
| | | border: 1px solid #dcdfe6; |
| | |
| | | width: 121px; |
| | | |
| | | &>div { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 60px; |
| | | cursor: pointer; |
| | | font-size: 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 60px; |
| | | cursor: pointer; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | &>div:nth-child(2) { |
| | | border-left: 1px solid #dcdfe6; |
| | | // border-right: 1px solid #dcdfe6; |
| | | border-left: 1px solid #dcdfe6; |
| | | // border-right: 1px solid #dcdfe6; |
| | | } |
| | | |
| | | .choose { |
| | | color: #FFF; |
| | | background-color: #409dfe; |
| | | color: #FFF; |
| | | background-color: #409dfe; |
| | | } |
| | | } |
| | | } |
| | | |
| | | :deep(.avue-crud__left) { |
| | | :deep(.avue-crud__left) { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-drawer__header) { |
| | | :deep(.el-drawer__header) { |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-radio__input.is-disabled+span.el-radio__label) { |
| | | :deep(.el-radio__input.is-disabled+span.el-radio__label) { |
| | | color: #000; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-radio__input.is-checked+.el-radio__label) { |
| | | :deep(.el-radio__input.is-checked+.el-radio__label) { |
| | | color: #409EFF !important; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-radio__input.is-checked .el-radio__inner::after) { |
| | | :deep(.el-radio__input.is-checked .el-radio__inner::after) { |
| | | background-color: #FFF; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-radio__input.is-checked .el-radio__inner) { |
| | | :deep(.el-radio__input.is-checked .el-radio__inner) { |
| | | background-color: #409EFF; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-radio) { |
| | | :deep(.el-radio) { |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | |
| | | .title { |
| | | .title { |
| | | margin: 10px; |
| | | height: 40px; |
| | | background-color: #eee; |
| | |
| | | align-items: center; |
| | | |
| | | .icon { |
| | | width: 4px; |
| | | height: 18px; |
| | | background-color: #409dfe; |
| | | margin: 0 10px; |
| | | color: transparent; |
| | | width: 4px; |
| | | height: 18px; |
| | | background-color: #409dfe; |
| | | margin: 0 10px; |
| | | color: transparent; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .basic-info { |
| | | .basic-info { |
| | | padding: 0 20px; |
| | | font-size: 14px; |
| | | |
| | | .info-item { |
| | | display: flex; |
| | | padding: 10px; |
| | | |
| | | .info-name { |
| | | width: 100px; |
| | | display: flex; |
| | | padding: 10px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .info-name { |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .info-value { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .info-value { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .question-list { |
| | | .question-list { |
| | | padding: 0 20px; |
| | | font-size: 14px; |
| | | |
| | | .question-type { |
| | | height: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | justify-content: space-between; |
| | | padding-right: 20px; |
| | | height: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | justify-content: space-between; |
| | | padding-right: 20px; |
| | | |
| | | .type-name {} |
| | | .type-name {} |
| | | |
| | | .icon-box {} |
| | | .icon-box {} |
| | | } |
| | | |
| | | .question-item { |
| | | margin-bottom: 20px; |
| | | padding: 10px; |
| | | background: #f5f7fa; |
| | | border-radius: 8px; |
| | | margin-bottom: 20px; |
| | | padding: 10px; |
| | | background: #f5f7fa; |
| | | border-radius: 8px; |
| | | |
| | | &>div { |
| | | margin: 14px 0; |
| | | &>div { |
| | | margin: 14px 0; |
| | | } |
| | | |
| | | .question-name { |
| | | display: flex; |
| | | |
| | | .key { |
| | | width: 80%; |
| | | padding-right: 20px; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .question-name { |
| | | display: flex; |
| | | .value { |
| | | width: 20%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | |
| | | .key { |
| | | width: 80%; |
| | | padding-right: 20px; |
| | | word-break: break-all; |
| | | } |
| | | .yh-pic-box { |
| | | display: flex; |
| | | height: 100px; |
| | | |
| | | .value { |
| | | width: 20%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .yh-pic-name { |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: left; |
| | | } |
| | | |
| | | .yh-pic-box { |
| | | display: flex; |
| | | height: 100px; |
| | | .yh-pic-list { |
| | | width: 0; |
| | | flex: 1; |
| | | display: flex; |
| | | } |
| | | } |
| | | |
| | | .yh-pic-name { |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: left; |
| | | } |
| | | .yh-remark { |
| | | display: flex; |
| | | |
| | | .yh-pic-list { |
| | | width: 0; |
| | | flex: 1; |
| | | display: flex; |
| | | } |
| | | .yh-remark-name { |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: left; |
| | | } |
| | | |
| | | .yh-remark { |
| | | display: flex; |
| | | |
| | | .yh-remark-name { |
| | | width: 100px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: left; |
| | | } |
| | | |
| | | .yh-remark-value { |
| | | word-break: break-all; |
| | | } |
| | | .yh-remark-value { |
| | | word-break: break-all; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .remark-box { |
| | | padding: 10px; |
| | | background-color: #f5f7fa; |
| | | border-radius: 8px; |
| | | min-height: 40px; |
| | | margin-bottom: 20px; |
| | | padding: 10px; |
| | | background-color: #f5f7fa; |
| | | border-radius: 8px; |
| | | min-height: 40px; |
| | | margin-bottom: 20px; |
| | | } |
| | | } |
| | | } |
| | | </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"> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </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="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <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> |
| | | </template> |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <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> |
| | | </template> |
| | | |
| | | <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, 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-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> |
| | | </avue-crud> |
| | | <template slot-scope="{ row }" slot="iscomment"> |
| | | <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose"> |
| | | <span slot="title" class="dialog-footer"> |
| | | {{ discussForm.ontitle }} |
| | | </span> |
| | | <div id="" v-if="discussForm.eventType == 1"> |
| | | <avue-form @submit="handleSubmit" :option="optionDiscuss" v-model="discussForm"></avue-form> |
| | | </div> |
| | | <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose"> |
| | | <span slot="title" class="dialog-footer"> |
| | | {{ discussForm.ontitle }} |
| | | </span> |
| | | <div id="" v-if="discussForm.eventType == 1"> |
| | | <avue-form @submit="handleSubmit" :option="optionDiscuss" v-model="discussForm"></avue-form> |
| | | </div> |
| | | |
| | | <div id="" v-else> |
| | | <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm"> |
| | | </avue-form> |
| | | </div> |
| | | </el-dialog> |
| | | <div id="" v-else> |
| | | <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm"> |
| | | </avue-form> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </basic-container> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getNotice, |
| | | upcomment |
| | | } from "@/api/article/article" |
| | | } from "@/api/article/article" |
| | | |
| | | import { |
| | | import { |
| | | getListPd, |
| | | removePd, |
| | | updatePd, |
| | | addPd, |
| | | getNoticePd, |
| | | upcommentPd |
| | | } from "@/api/discuss/publicDiscuss" |
| | | } from "@/api/discuss/publicDiscuss" |
| | | |
| | | import website from '@/config/website' |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | import { |
| | | import { |
| | | getDistrictTree |
| | | } from "@/api/district/index" |
| | | } from "@/api/district/index" |
| | | |
| | | import { |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | } from "vuex" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | export default { |
| | | data() { |
| | | return { |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | }, |
| | | dialogVisibles: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | dialogMenuPosition: 'center', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "招标标题", |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入招标标题", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | dialogVisibles: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | { |
| | | width: 110, |
| | | label: "招标封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | // { |
| | | // label: "招标来源", |
| | | // prop: "sourceName", |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // span: 24, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请输入招标类型", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | hide: true, |
| | | parent: false, |
| | | label: "招标范围", |
| | | prop: "articleList", |
| | | type: 'tree', |
| | | dicData: [], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | span: 12, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择招标范围", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "招标类型", |
| | | prop: "type", |
| | | value: 2, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择招标类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | dicData: [{ |
| | | label: "物业招标", |
| | | value: 2, |
| | | }], |
| | | }, |
| | | { |
| | | 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: 144, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "招标标题", |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入招标标题", |
| | | trigger: "blur", |
| | | },], |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "streetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布状态", |
| | | trigger: "blur", |
| | | }, ], |
| | | dicData: [{ |
| | | label: "未发布", |
| | | value: "0", |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "招标封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | // { |
| | | // label: "招标来源", |
| | | // prop: "sourceName", |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // span: 24, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请输入招标类型", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | hide: true, |
| | | parent: false, |
| | | label: "招标范围", |
| | | prop: "articleList", |
| | | type: 'tree', |
| | | dicData: [], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | span: 12, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择招标范围", |
| | | trigger: "blur", |
| | | },], |
| | | label: "已发布", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | slot: true, |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "招标类型", |
| | | prop: "type", |
| | | value: 2, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择招标类型", |
| | | trigger: "blur", |
| | | },], |
| | | dicData: [{ |
| | | label: "物业招标", |
| | | value: 2, |
| | | }], |
| | | label: "开启", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "视频", |
| | | prop: "videoUrl", |
| | | type: "upload", |
| | | accept: "video/mp4", |
| | | display: false, |
| | | hide: true, |
| | | span: 24, |
| | | listType: "picture-img", |
| | | action: "/api/depl/put-depl", |
| | | propsHttp: { |
| | | url: "data", |
| | | }, |
| | | }, |
| | | { |
| | | label: "招标内容", |
| | | prop: "content", |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | { |
| | | 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: 144, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | optionEnroll: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | label: '开启', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "streetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布状态", |
| | | trigger: "blur", |
| | | },], |
| | | dicData: [{ |
| | | label: "未发布", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "已发布", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | slot: true, |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "开启", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "视频", |
| | | prop: "videoUrl", |
| | | type: "upload", |
| | | accept: "video/mp4", |
| | | display: false, |
| | | hide: true, |
| | | span: 24, |
| | | listType: "picture-img", |
| | | action: "/api/depl/put-depl", |
| | | propsHttp: { |
| | | url: "data", |
| | | }, |
| | | }, |
| | | { |
| | | label: "招标内容", |
| | | prop: "content", |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | data: [], |
| | | optionEnroll: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | label: '开启', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, |
| | | |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | ] |
| | | ] |
| | | }, |
| | | optionDiscuss: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | label: '开启投票', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, { |
| | | label: '开启签名', |
| | | prop: 'signatureFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, |
| | | optionDiscuss: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | label: '开启投票', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, { |
| | | label: '开启签名', |
| | | prop: 'signatureFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | ] |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | districtTree: [], |
| | | } |
| | | ] |
| | | }, |
| | | districtTree: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.articleType": { |
| | | handler (val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | },] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | "form.articleType": { |
| | | handler(val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | }, ] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | 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' |
| | | } |
| | | } |
| | | } |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | 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: { |
| | | iscommentInput (e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | iscommentInput(e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | openDilog (row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm.eventType = type |
| | | this.discussForm.articleId = row.id |
| | | this.discussForm.title = row.title |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | handleSubmit (form, done) { |
| | | done() |
| | | addPd(form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.dialogVisibles = false |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | // loading(); |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | handleClose (done) { |
| | | done() |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | rowSave (row, done, loading) { |
| | | if (row.videoUrl.length == 0) { |
| | | row.videoUrl = "" |
| | | } |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add({ |
| | | ...row, |
| | | districtId: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | 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(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | |
| | | update({ |
| | | ...row, |
| | | district_id: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | 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 |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0] + ' 00:00:01', |
| | | endTime: dateTime[1] + ' 23:59:59', |
| | | ...this.query, |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | |
| | | values.type = 2 |
| | | 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 |
| | | this.data.forEach(item => { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree({ |
| | | filterFlag: 1 |
| | | }).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 |
| | | }) |
| | | }, |
| | | updateFb (row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | kqcomment () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | openDilog(row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm.eventType = type |
| | | this.discussForm.articleId = row.id |
| | | this.discussForm.title = row.title |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | handleSubmit(form, done) { |
| | | done() |
| | | addPd(form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.dialogVisibles = false |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | // loading(); |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | handleClose(done) { |
| | | done() |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | if (row.videoUrl.length == 0) { |
| | | row.videoUrl = "" |
| | | } |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add({ |
| | | ...row, |
| | | districtId: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | 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(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | |
| | | update({ |
| | | ...row, |
| | | district_id: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | 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 |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0] + ' 00:00:01', |
| | | endTime: dateTime[1] + ' 23:59:59', |
| | | ...this.query, |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | |
| | | values.type = 2 |
| | | 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 |
| | | this.data.forEach(item => { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree({ |
| | | filterFlag: 1 |
| | | }).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 |
| | | }) |
| | | }, |
| | | updateFb(row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | kqcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .avue-upload__icon { |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | } |
| | | |
| | | :deep(.avue-form__menu--center) { |
| | | :deep(.avue-form__menu--center) { |
| | | text-align: left; |
| | | } |
| | | } |
| | | |
| | | :deep(.avue-form__menu--center .el-button) { |
| | | :deep(.avue-form__menu--center .el-button) { |
| | | margin: 0 5px 0 0; |
| | | }</style> |
| | | } |
| | | </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"> |
| | | <template slot="menuLeft"> |
| | | <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">开启评论 |
| | | <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="menuLeft"> |
| | | <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 size="small" icon="el-icon-s-release" plain @click="gbcomment">关闭评论 |
| | | </el-button> --> |
| | | </template> |
| | | </template> |
| | | |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <!-- <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row,0)"> |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <!-- <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row,0)"> |
| | | 公益报名 |
| | | </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> |
| | | <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" |
| | | @click.stop="updateFb(row)"> |
| | | 发布 |
| | | </el-button> |
| | | </template> |
| | | <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> |
| | | </template> |
| | | |
| | | <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, 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-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> |
| | | </avue-crud> |
| | | <template slot-scope="{ row }" slot="iscomment"> |
| | | <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose"> |
| | | <span slot="title" class="dialog-footer"> |
| | | {{ discussForm.ontitle }} |
| | | </span> |
| | | <div id="" v-if="discussForm.eventType == 1"> |
| | | <avue-form @submit="handleSubmit" :option="optionDiscuss" v-model="discussForm"></avue-form> |
| | | </div> |
| | | <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose"> |
| | | <span slot="title" class="dialog-footer"> |
| | | {{ discussForm.ontitle }} |
| | | </span> |
| | | <div id="" v-if="discussForm.eventType == 1"> |
| | | <avue-form @submit="handleSubmit" :option="optionDiscuss" v-model="discussForm"></avue-form> |
| | | </div> |
| | | |
| | | <div id="" v-else> |
| | | <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm"> |
| | | </avue-form> |
| | | </div> |
| | | </el-dialog> |
| | | <div id="" v-else> |
| | | <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm"> |
| | | </avue-form> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </basic-container> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getNotice, |
| | | upcomment |
| | | } from "@/api/article/article" |
| | | } from "@/api/article/article" |
| | | |
| | | import { |
| | | import { |
| | | getListPd, |
| | | removePd, |
| | | updatePd, |
| | | addPd, |
| | | getNoticePd, |
| | | upcommentPd |
| | | } from "@/api/discuss/publicDiscuss" |
| | | } from "@/api/discuss/publicDiscuss" |
| | | |
| | | import website from '@/config/website' |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | import { |
| | | import { |
| | | getDistrictTree |
| | | } from "@/api/district/index" |
| | | } from "@/api/district/index" |
| | | |
| | | import { |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | } from "vuex" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | export default { |
| | | data() { |
| | | return { |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | }, |
| | | dialogVisibles: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | dialogMenuPosition: 'center', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "收支标题", |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入收支标题", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | dialogVisibles: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "缩略图", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "收支标题", |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入收支标题", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | // { |
| | | // label: "收支来源", |
| | | // prop: "sourceName", |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // span: 24, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请输入收支类型", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "缩略图", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | hide: true, |
| | | parent: false, |
| | | label: "收支范围", |
| | | prop: "articleList", |
| | | type: 'tree', |
| | | dicData: [], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | span: 12, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择收支范围", |
| | | trigger: "blur", |
| | | }, ], |
| | | |
| | | // { |
| | | // label: "收支来源", |
| | | // prop: "sourceName", |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | // span: 24, |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请输入收支类型", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | |
| | | { |
| | | hide: true, |
| | | parent: false, |
| | | label: "收支范围", |
| | | prop: "articleList", |
| | | type: 'tree', |
| | | dicData: [], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | span: 12, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择收支范围", |
| | | trigger: "blur", |
| | | },], |
| | | |
| | | }, |
| | | { |
| | | label: "收支类型", |
| | | prop: "type", |
| | | width: 80, |
| | | value: 1, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择收支类型", |
| | | trigger: "blur", |
| | | },], |
| | | dicData: [{ |
| | | label: "经营性收支", |
| | | value: 1, |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | 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", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "streetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布状态", |
| | | trigger: "blur", |
| | | },], |
| | | dicData: [{ |
| | | label: "未发布", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "已发布", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | slot: true, |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "开启", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "视频", |
| | | prop: "videoUrl", |
| | | type: "upload", |
| | | accept: "video/mp4", |
| | | display: false, |
| | | hide: true, |
| | | span: 24, |
| | | listType: "picture-img", |
| | | action: "/api/depl/put-depl", |
| | | propsHttp: { |
| | | url: "data", |
| | | }, |
| | | }, |
| | | { |
| | | label: "收支内容", |
| | | prop: "content", |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | optionEnroll: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | label: '开启', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, |
| | | { |
| | | label: "收支类型", |
| | | prop: "type", |
| | | width: 80, |
| | | value: 1, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择收支类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | dicData: [{ |
| | | label: "经营性收支", |
| | | value: 1, |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | ] |
| | | { |
| | | 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", |
| | | }, ], |
| | | }, |
| | | optionDiscuss: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | label: '开启投票', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, { |
| | | label: '开启签名', |
| | | prop: 'signatureFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | |
| | | { |
| | | width: 100, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "streetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布状态", |
| | | trigger: "blur", |
| | | }, ], |
| | | dicData: [{ |
| | | label: "未发布", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | ] |
| | | label: "已发布", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | districtTree: [], |
| | | } |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | slot: true, |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "开启", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "视频", |
| | | prop: "videoUrl", |
| | | type: "upload", |
| | | accept: "video/mp4", |
| | | display: false, |
| | | hide: true, |
| | | span: 24, |
| | | listType: "picture-img", |
| | | action: "/api/depl/put-depl", |
| | | propsHttp: { |
| | | url: "data", |
| | | }, |
| | | }, |
| | | { |
| | | label: "收支内容", |
| | | prop: "content", |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | optionEnroll: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | label: '开启', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, |
| | | |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | ] |
| | | }, |
| | | optionDiscuss: { |
| | | column: [{ |
| | | label: "", |
| | | type: 'title', |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | offset: 2, |
| | | styles: { |
| | | fontSize: '24px' |
| | | } |
| | | }, { |
| | | label: '开启投票', |
| | | prop: 'openFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, { |
| | | label: '开启签名', |
| | | prop: 'signatureFlag', |
| | | type: 'radio', |
| | | button: true, |
| | | row: true, |
| | | offset: 6, |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '不开启', |
| | | value: 1 |
| | | }] |
| | | }, |
| | | { |
| | | label: "截止时间", |
| | | row: true, |
| | | offset: 6, |
| | | prop: "endTime", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "timestamp", |
| | | }, |
| | | ] |
| | | }, |
| | | districtTree: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.articleType": { |
| | | handler (val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | },] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | "form.articleType": { |
| | | handler(val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | }, ] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | 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' |
| | | } |
| | | } |
| | | } |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | 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: { |
| | | iscommentInput (e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | iscommentInput(e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | openDilog (row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm.eventType = type |
| | | this.discussForm.articleId = row.id |
| | | this.discussForm.title = row.title |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | handleSubmit (form, done) { |
| | | done() |
| | | addPd(form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.dialogVisibles = false |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | // loading(); |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | handleClose (done) { |
| | | done() |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | rowSave (row, done, loading) { |
| | | if (row.videoUrl.length == 0) { |
| | | row.videoUrl = "" |
| | | } |
| | | row.userid = this.userInfo.user_id |
| | | console.log(row) |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add({ |
| | | ...row, |
| | | districtId: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | 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(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | |
| | | update({ |
| | | ...row, |
| | | district_id: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | 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 |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0] + ' 00:00:01', |
| | | endTime: dateTime[1] + ' 23:59:59', |
| | | ...this.query, |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | values.type = 1 |
| | | 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.data.forEach(item => { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree({ |
| | | filterFlag: 1 |
| | | }).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 |
| | | }) |
| | | }, |
| | | updateFb (row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | kqcomment () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | openDilog(row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm.eventType = type |
| | | this.discussForm.articleId = row.id |
| | | this.discussForm.title = row.title |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | handleSubmit(form, done) { |
| | | done() |
| | | addPd(form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.dialogVisibles = false |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | // loading(); |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | handleClose(done) { |
| | | done() |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | if (row.videoUrl.length == 0) { |
| | | row.videoUrl = "" |
| | | } |
| | | row.userid = this.userInfo.user_id |
| | | console.log(row) |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add({ |
| | | ...row, |
| | | districtId: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | 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(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | |
| | | update({ |
| | | ...row, |
| | | district_id: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | 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 |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0] + ' 00:00:01', |
| | | endTime: dateTime[1] + ' 23:59:59', |
| | | ...this.query, |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | values.type = 1 |
| | | 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.data.forEach(item => { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree({ |
| | | filterFlag: 1 |
| | | }).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 |
| | | }) |
| | | }, |
| | | updateFb(row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | kqcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-upload__icon { |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | }</style> |
| | | } |
| | | </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"> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </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="menuLeft"> |
| | | <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> --> |
| | | |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | | <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> |
| | | </template> |
| | | <!-- <template slot-scope="{type,size,row }" slot="menu"> |
| | | <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> |
| | | </template> --> |
| | | |
| | | <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, 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-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- <template slot-scope="{ row }" slot="iscomment"> |
| | | <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'" |
| | | :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc"> |
| | | </el-switch> |
| | | </template> --> |
| | | </avue-crud> |
| | | |
| | | </basic-container> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getNotice, |
| | | upcomment |
| | | } from "@/api/article/article" |
| | | } from "@/api/article/article" |
| | | |
| | | import { |
| | | import { |
| | | addPd, |
| | | } from "@/api/discuss/publicDiscuss" |
| | | } from "@/api/discuss/publicDiscuss" |
| | | |
| | | import website from '@/config/website' |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | import { |
| | | import { |
| | | getDistrictTree |
| | | } from "@/api/district/index" |
| | | } from "@/api/district/index" |
| | | |
| | | import { |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | } from "vuex" |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | export default { |
| | | data() { |
| | | return { |
| | | discussForm: { |
| | | ontitle: '', |
| | | title: '', |
| | | openFlag: 0, |
| | | numberRestrictions: 0, |
| | | voteRestrictions: 0, |
| | | userRestrictions: 0, |
| | | endTime: '', |
| | | articleId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | repeatVote: 0, |
| | | voteNumberPublic: 0, |
| | | appointUser: '', |
| | | userIds: '', |
| | | eventType: 1, |
| | | }, |
| | | dialogVisibles: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | addBtn: false, |
| | | menu: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: false, |
| | | // selection: true, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | // excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "标题", |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 46, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入业主大会标题", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | dialogVisibles: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | { |
| | | width: 110, |
| | | label: "封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | option: { |
| | | labelWidth: 120, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "标题", |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 46, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入业主大会标题", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | // hide: true, |
| | | span: 24, |
| | | }, |
| | | { |
| | | hide: true, |
| | | parent: false, |
| | | label: "公示范围", |
| | | prop: "articleList", |
| | | type: 'tree', |
| | | dicData: [], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | span: 12, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择公示范围", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "业主大会类型", |
| | | prop: "type", |
| | | value: 5, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择招标类型", |
| | | trigger: "blur", |
| | | },], |
| | | dicData: [{ |
| | | label: "业主大会", |
| | | value: 5, |
| | | }], |
| | | }, |
| | | { |
| | | 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: 144, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "streetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | display: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布状态", |
| | | trigger: "blur", |
| | | },], |
| | | dicData: [{ |
| | | label: "未发布", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "已发布", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | slot: true, |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "开启", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "内容", |
| | | prop: "content", |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | { |
| | | hide: true, |
| | | parent: false, |
| | | label: "公示范围", |
| | | prop: "articleList", |
| | | type: 'tree', |
| | | dicData: [], |
| | | props: { |
| | | label: "name", |
| | | value: 'id' |
| | | }, |
| | | span: 12, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择公示范围", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | data: [], |
| | | { |
| | | width: 100, |
| | | label: "业主大会类型", |
| | | prop: "type", |
| | | value: 5, |
| | | slot: true, |
| | | searchSpan: 4, |
| | | // search: true, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择招标类型", |
| | | trigger: "blur", |
| | | }, ], |
| | | dicData: [{ |
| | | label: "业主大会", |
| | | value: 5, |
| | | }], |
| | | }, |
| | | { |
| | | 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", |
| | | }, ], |
| | | }, |
| | | { |
| | | // hide: true, |
| | | parent: false, |
| | | label: "小区名称", |
| | | prop: "districtId", |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | width: 220, |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | width: 110, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "streetName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | |
| | | districtTree: [], |
| | | } |
| | | { |
| | | width: 156, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | prop: "communityName", |
| | | search: true, |
| | | searchSpan: 4 |
| | | }, |
| | | { |
| | | width: 144, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | search: true, |
| | | type: "select", |
| | | display: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择发布状态", |
| | | trigger: "blur", |
| | | }, ], |
| | | dicData: [{ |
| | | label: "未发布", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "已发布", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "评论区", |
| | | prop: "iscomment", |
| | | slot: true, |
| | | type: "switch", |
| | | activeColor: "#13ce66", |
| | | inactiveColor: "#ccc", |
| | | value: '1', |
| | | dicData: [{ |
| | | label: "关闭", |
| | | value: "0", |
| | | }, |
| | | { |
| | | label: "开启", |
| | | value: "1", |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "内容", |
| | | prop: "content", |
| | | component: "AvueUeditor", |
| | | options: { |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | | // customConfig: { |
| | | // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3'] |
| | | // },//wangEditor编辑的配置 |
| | | props: { |
| | | res: "data", |
| | | url: "link", |
| | | }, |
| | | }, |
| | | hide: true, |
| | | minRows: 6, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | |
| | | districtTree: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | "form.articleType": { |
| | | handler (val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | },] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | "form.articleType": { |
| | | handler(val) { |
| | | if (val) { |
| | | 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.rules = [{ |
| | | required: false, |
| | | message: "请选择视频", |
| | | trigger: "blur", |
| | | }, ] |
| | | } else { |
| | | videoUrl.display = false |
| | | content.display = true |
| | | videoUrl.rules = "" |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | 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' |
| | | } |
| | | } |
| | | } |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.article_add, true), |
| | | 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 = [] |
| | | this.selectionList.forEach((ele) => { |
| | | 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: { |
| | | iscommentInput (e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | iscommentInput(e, data) { |
| | | upcomment(data.id, e).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | openDilog (row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm.eventType = type |
| | | this.discussForm.articleId = row.id |
| | | this.discussForm.title = row.title |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | handleSubmit (form, done) { |
| | | done() |
| | | addPd(form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.dialogVisibles = false |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | // loading(); |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | handleClose (done) { |
| | | done() |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | rowSave (row, done, loading) { |
| | | row['type'] = 5 |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add({ |
| | | ...row, |
| | | districtId: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | 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(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | |
| | | update({ |
| | | ...row, |
| | | district_id: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | 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 |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0] + ' 00:00:01', |
| | | endTime: dateTime[1] + ' 23:59:59', |
| | | ...this.query, |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | values.type = 5 |
| | | 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 |
| | | this.data.forEach(item => { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree({ |
| | | filterFlag: 1 |
| | | }).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 |
| | | }) |
| | | }, |
| | | updateFb (row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | kqcomment () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | openDilog(row, type) { |
| | | this.dialogVisibles = true |
| | | this.discussForm.eventType = type |
| | | this.discussForm.articleId = row.id |
| | | this.discussForm.title = row.title |
| | | if (type == 0) { |
| | | this.discussForm.ontitle = '公益报名' |
| | | } else { |
| | | this.discussForm.ontitle = '创建议题' |
| | | } |
| | | }, |
| | | |
| | | handleSubmit(form, done) { |
| | | done() |
| | | addPd(form).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.dialogVisibles = false |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | // loading(); |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | handleClose(done) { |
| | | done() |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | row['type'] = 5 |
| | | row.userid = this.userInfo.user_id |
| | | row.articleRange = JSON.stringify(row.articleList) |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | add({ |
| | | ...row, |
| | | districtId: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | 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(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | |
| | | update({ |
| | | ...row, |
| | | district_id: row.articleList |
| | | }).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | 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 |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | | startTime: dateTime[0] + ' 00:00:01', |
| | | endTime: dateTime[1] + ' 23:59:59', |
| | | ...this.query, |
| | | } |
| | | values.dateTime = null |
| | | } |
| | | values.type = 5 |
| | | 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 |
| | | this.data.forEach(item => { |
| | | if (item.url.length > 0) { |
| | | var urls = [] |
| | | var names = item.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.url = urls.join(",") |
| | | } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | getDistrictTree({ |
| | | filterFlag: 1 |
| | | }).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 |
| | | }) |
| | | }, |
| | | updateFb(row) { |
| | | if (row.publish == "0") { |
| | | row.publish = "1" |
| | | } else { |
| | | row.publish = "0" |
| | | } |
| | | if (row.url.length > 0) { |
| | | var urls = [] |
| | | var split = row.url.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.url = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | kqcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "1") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | gbcomment() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据") |
| | | return |
| | | } |
| | | this.$confirm("确定将选择数据开启评论?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | return upcomment(this.ids, "0") |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .avue-upload__icon { |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | } |
| | | |
| | | :deep(.avue-form__menu--center) { |
| | | :deep(.avue-form__menu--center) { |
| | | text-align: left; |
| | | } |
| | | } |
| | | |
| | | :deep(.avue-form__menu--center .el-button) { |
| | | :deep(.avue-form__menu--center .el-button) { |
| | | margin: 0 5px 0 0; |
| | | }</style> |
| | | } |
| | | </style> |
| | |
| | | </el-card> |
| | | </el-form> |
| | | <deitDiscussion ref="DeitDiscussion"> |
| | | </deitDiscussion> |
| | | </deitDiscussion> |
| | | </basic-container> |
| | | |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process"; |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply"; |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process"; |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply"; |
| | | |
| | | import { |
| | | getLists |
| | | } from "@/api/discuss/topics" |
| | | import deitDiscussion from "../../components/deitDiscussion.vue" |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | cascader: ['articleId'], |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | import { |
| | | getLists |
| | | } from "@/api/discuss/topics" |
| | | import deitDiscussion from "../../components/deitDiscussion.vue" |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 120, |
| | | width: 220, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | }, |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同开始时间", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同结束时间", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | labelWidth: 140, |
| | | value: '按建筑面积分摊', |
| | | span: 12, |
| | | row: true, |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目预算总金额(元)", |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "实际预算金额(元)", |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "自筹金额(元)", |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预算应拨付金额(元)", |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | disabled:true, |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth:140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票结果", |
| | | trigger: "blur", |
| | | },], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | if (val.value && !this.form.id) { |
| | | this.articleRange = val.articleRange; |
| | | // this.showDialog = true; |
| | | // this.getDetail(val.value, val.articleRange) |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | cascader: ['articleId'], |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 120, |
| | | width: 220, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同开始时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同结束时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "楼栋", |
| | | prop: "buildingName", |
| | | labelWidth: 140, |
| | | value: '', |
| | | span: 12, |
| | | row: true, |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 120, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目预算总金额(元)", |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "实际预算金额(元)", |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "自筹金额(元)", |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预算应拨付金额(元)", |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票结果", |
| | | trigger: "blur", |
| | | }, ], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | if (val.value && !this.form.id) { |
| | | this.articleRange = val.articleRange; |
| | | // this.showDialog = true; |
| | | // this.getDetail(val.value, val.articleRange) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140, |
| | | |
| | | }, |
| | | |
| | | { |
| | | label: "项目摘要", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目进度描述", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | trigger: "blur", |
| | | }, ], |
| | | } |
| | | ], |
| | | }, |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140, |
| | | |
| | | }, |
| | | |
| | | { |
| | | label: "项目摘要", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目进度描述", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | trigger: "blur", |
| | | },], |
| | | } |
| | | ], |
| | | }, |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | |
| | | |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | created() { |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.processInstanceId = this.$route.params.processInstanceId; |
| | | this.businessId = this.$route.params.businessId; |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.flowList = data.data; |
| | | } |
| | | }) |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.form = data.data; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({ |
| | | path: `/work/start` |
| | | }); |
| | | }, |
| | | |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | }, |
| | | |
| | | |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | created() { |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.processInstanceId = this.$route.params.processInstanceId; |
| | | this.businessId = this.$route.params.businessId; |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.flowList = data.data; |
| | | } |
| | | }) |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.form = data.data; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({ |
| | | path: `/work/start` |
| | | }); |
| | | }, |
| | | |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style> |
| | | |
| | | |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process"; |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process"; |
| | | |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply"; |
| | | import { |
| | | completeTask |
| | | } from "@/api/work/work"; |
| | | import { |
| | | getLists |
| | | } from "@/api/discuss/topics" |
| | | import deitDiscussion from "../../components/deitDiscussion.vue" |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | taskId: '', |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | comment: '', |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | cascader: ['articleId'], |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply"; |
| | | import { |
| | | completeTask |
| | | } from "@/api/work/work"; |
| | | import { |
| | | getLists |
| | | } from "@/api/discuss/topics" |
| | | import deitDiscussion from "../../components/deitDiscussion.vue" |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | taskId: '', |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | width: 220, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | },], |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | comment: '', |
| | | }, |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同开始时间", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同结束时间", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | labelWidth: 140, |
| | | value: '按建筑面积分摊', |
| | | span: 12, |
| | | row: true, |
| | | }, |
| | | { |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: "项目预算总金额(元)", |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | }, |
| | | { |
| | | label: "实际预算金额(元)", |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | }, |
| | | { |
| | | label: "自筹金额(元)", |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | }, |
| | | { |
| | | label: "预算应拨付金额(元)", |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | }, |
| | | { |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`, |
| | | // slot: true, |
| | | formslot: true, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | width: 260, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票结果", |
| | | trigger: "blur", |
| | | },], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | cascader: ['articleId'], |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | width: 220, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同开始时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同结束时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "楼栋", |
| | | prop: "buildingName", |
| | | value: '', |
| | | span: 12, |
| | | row: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入楼栋", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "项目预算总金额(元)", |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | }, |
| | | { |
| | | label: "实际预算金额(元)", |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | }, |
| | | { |
| | | label: "自筹金额(元)", |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | }, |
| | | { |
| | | label: "预算应拨付金额(元)", |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | }, |
| | | { |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`, |
| | | // slot: true, |
| | | formslot: true, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | width: 260, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择投票结果", |
| | | trigger: "blur", |
| | | }, ], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | |
| | | |
| | | } |
| | | }, |
| | | |
| | | { |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140, |
| | | |
| | | }, |
| | | { |
| | | label: "项目摘要", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "项目进度描述", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | }, |
| | | // { |
| | | // label: "批复意见", |
| | | // span: 24, |
| | | // hide: true, |
| | | // prop: "comment", |
| | | // labelWidth: 140, |
| | | // type: "textarea", |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请输入批复意见", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | trigger: "blur", |
| | | }, ], |
| | | } |
| | | ], |
| | | }, |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | } |
| | | }, |
| | | |
| | | |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | }, |
| | | |
| | | { |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140, |
| | | |
| | | }, |
| | | { |
| | | label: "项目摘要", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | }, |
| | | { |
| | | label: "项目进度描述", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | }, |
| | | // { |
| | | // label: "批复意见", |
| | | // span: 24, |
| | | // hide: true, |
| | | // prop: "comment", |
| | | // labelWidth: 140, |
| | | // type: "textarea", |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请输入批复意见", |
| | | // trigger: "blur", |
| | | // }, ], |
| | | // }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | trigger: "blur", |
| | | },], |
| | | } |
| | | ], |
| | | }, |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | } |
| | | }, |
| | | |
| | | |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | |
| | | |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | |
| | | |
| | | created() { |
| | | this.init(); |
| | | }, |
| | | beforeRouteUpdate(to, from, next) { |
| | | // 在当前路由改变,但是该组件被复用时调用 |
| | | // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候 |
| | | // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用 |
| | | // 可以访问组件实例 `this` |
| | | if (to.fullPath !== from.fullPath) { |
| | | next(); |
| | | created() { |
| | | this.init(); |
| | | } |
| | | }, |
| | | methods: { |
| | | handleSubmit(form, done, loading) { |
| | | if (form.constructionSchemeUrls.length > 0) { |
| | | var urls = [] |
| | | var split = form.constructionSchemeUrls.split(","); |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/"); |
| | | urls.push(names[1]) |
| | | }, |
| | | beforeRouteUpdate(to, from, next) { |
| | | // 在当前路由改变,但是该组件被复用时调用 |
| | | // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候 |
| | | // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用 |
| | | // 可以访问组件实例 `this` |
| | | if (to.fullPath !== from.fullPath) { |
| | | next(); |
| | | this.init(); |
| | | } |
| | | }, |
| | | methods: { |
| | | handleSubmit(form, done, loading) { |
| | | if (form.constructionSchemeUrls.length > 0) { |
| | | var urls = [] |
| | | var split = form.constructionSchemeUrls.split(","); |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/"); |
| | | urls.push(names[1]) |
| | | }) |
| | | form.constructionSchemeUrls = urls.join(",") |
| | | } |
| | | update(form).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | init() { |
| | | this.taskId = this.$route.params.taskId; |
| | | this.processInstanceId = this.$route.params.processInstanceId; |
| | | this.businessId = this.$route.params.businessId; |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.flowList = data.data; |
| | | } |
| | | }) |
| | | form.constructionSchemeUrls = urls.join(",") |
| | | } |
| | | update(form).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.form = data.data; |
| | | } |
| | | }) |
| | | }, |
| | | handleAgree() { |
| | | // if (!this.form.comment) { |
| | | // this.$message.warning('请先填写批复意见'); |
| | | // return; |
| | | // } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | flag: 'ok', |
| | | comment: this.form.comment, |
| | | }; |
| | | completeTask(params).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.$message.success(data.msg); |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({ |
| | | path: `/property/propertyCapitalApply` |
| | | }); |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败'); |
| | | } |
| | | }) |
| | | }, |
| | | handleDisagree() { |
| | | this.form.comment = '关闭申请' |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见'); |
| | | return; |
| | | } |
| | | ); |
| | | }, |
| | | init() { |
| | | this.taskId = this.$route.params.taskId; |
| | | this.processInstanceId = this.$route.params.processInstanceId; |
| | | this.businessId = this.$route.params.businessId; |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.flowList = data.data; |
| | | } |
| | | }) |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.form = data.data; |
| | | } |
| | | }) |
| | | }, |
| | | handleAgree() { |
| | | // if (!this.form.comment) { |
| | | // this.$message.warning('请先填写批复意见'); |
| | | // return; |
| | | // } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | flag: 'ok', |
| | | comment: this.form.comment, |
| | | }; |
| | | completeTask(params).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.$message.success(data.msg); |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({ |
| | | path: `/property/propertyCapitalApply` |
| | | }); |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败'); |
| | | } |
| | | }) |
| | | }, |
| | | handleDisagree() { |
| | | this.form.comment = '关闭申请' |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见'); |
| | | return; |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | comment: this.form.comment, |
| | | }; |
| | | completeTask(params).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.$message.success(data.msg); |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({ |
| | | path: `/property/propertyCapitalApply` |
| | | }); |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败'); |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({ |
| | | path: `/property/todo` |
| | | }); |
| | | }, |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | comment: this.form.comment, |
| | | }; |
| | | completeTask(params).then(res => { |
| | | const data = res.data; |
| | | if (data.success) { |
| | | this.$message.success(data.msg); |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({ |
| | | path: `/property/propertyCapitalApply` |
| | | }); |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败'); |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag(); |
| | | this.$router.push({ |
| | | path: `/property/todo` |
| | | }); |
| | | }, |
| | | |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | }) |
| | | }, |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | label: "楼栋", |
| | | prop: "buildingName", |
| | | labelWidth: 140, |
| | | value: '按建筑面积分摊', |
| | | value: '', |
| | | span: 12, |
| | | row: true, |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系人', |
| | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process" |
| | | import { |
| | | historyFlowList, |
| | | leaveDetail |
| | | } from "@/api/work/process" |
| | | |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply" |
| | | import { |
| | | completeTask |
| | | } from "@/api/work/work" |
| | | import website from '@/config/website' |
| | | import { |
| | | getLists |
| | | } from "@/api/discuss/topics" |
| | | import deitDiscussion from "../../components/deitDiscussion.vue" |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getPropertyCapitalApply |
| | | } from "@/api/property/propertyCapitalApply" |
| | | import { |
| | | completeTask |
| | | } from "@/api/work/work" |
| | | import website from '@/config/website' |
| | | import { |
| | | getLists |
| | | } from "@/api/discuss/topics" |
| | | import deitDiscussion from "../../components/deitDiscussion.vue" |
| | | |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | taskId: '', |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | }, |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | cascader: ['articleId'], |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | export default { |
| | | components: { |
| | | deitDiscussion |
| | | }, |
| | | data() { |
| | | return { |
| | | taskId: '', |
| | | businessId: '', |
| | | processInstanceId: '', |
| | | src: '', |
| | | flowList: [], |
| | | form: { |
| | | flow: { |
| | | assigneeName: '', |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | startTime: '', |
| | | endTime: '', |
| | | reason: '', |
| | | }, |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | width: 220, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | option: { |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 1150, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 350, |
| | | border: true, |
| | | //stripe:true, |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "小区", |
| | | prop: "districtId", |
| | | searchSpan: 5, |
| | | search: true, |
| | | type: 'tree', |
| | | dicUrl: `/api/blade-district/district/getDistrictTree`, |
| | | cascader: ['articleId'], |
| | | props: { |
| | | label: "name", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | overHidden: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择小区", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '维修项目名称', |
| | | prop: 'name', |
| | | searchLabelWidth: 120, |
| | | searchSpan: 5, |
| | | search: true, |
| | | span: 12, |
| | | labelWidth: 140, |
| | | width: 220, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入维修项目名称", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同开始时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同结束时间", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "楼栋", |
| | | prop: "buildingName", |
| | | labelWidth: 140, |
| | | value: '', |
| | | span: 12, |
| | | row: true, |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | }, ], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目预算总金额(元)", |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "实际预算金额(元)", |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "自筹金额(元)", |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预算应拨付金额(元)", |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`, |
| | | // slot: true, |
| | | formslot: true, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择议事", |
| | | trigger: "blur", |
| | | }, ], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | } |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | // formslot: true, |
| | | slot: true, |
| | | label: "投票详情", |
| | | labelWidth: 140 |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | | label: "项目摘要", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目进度描述", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, { |
| | | label: "批复意见", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "comment", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入批复意见", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | listType: 'picture-img', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | trigger: "blur", |
| | | }, ], |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "预计开工时间", |
| | | prop: "runTime", |
| | | span: 12, |
| | | labelWidth: 140, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同开始时间", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预计竣工时间", |
| | | prop: "completedTime", |
| | | labelWidth: 140, |
| | | span: 12, |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择合同结束时间", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | labelWidth: 140, |
| | | value: '按建筑面积分摊', |
| | | span: 12, |
| | | // row: true, |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系人', |
| | | prop: 'linkman', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | search: true, |
| | | searchSpan: 4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系人", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: '联系方式', |
| | | prop: 'linkPhone', |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系方式", |
| | | trigger: "blur", |
| | | },], |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目预算总金额(元)", |
| | | prop: "budgetAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "实际预算金额(元)", |
| | | prop: "actualAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "自筹金额(元)", |
| | | prop: "selfAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "预算应拨付金额(元)", |
| | | prop: "budgetAppropriateAmount", |
| | | span: 12, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | type: 'number', |
| | | precision: 2, |
| | | value: '0.00', |
| | | disabled: true |
| | | }, |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | hide: true, |
| | | parent: false, |
| | | label: "投票结果", |
| | | prop: "articleId", |
| | | search: false, |
| | | viewDisabled: false, |
| | | type: 'select', |
| | | dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`, |
| | | // slot: true, |
| | | formslot: true, |
| | | cascader: ['vote'], |
| | | props: { |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | defaultExpandedKeys: ["361102003"], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择议事", |
| | | trigger: "blur", |
| | | },], |
| | | change: (val) => { |
| | | console.log("val===>", val) |
| | | // console.log("form===>",this.form) |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | }, |
| | | |
| | | { |
| | | disabled: true, |
| | | display: false, |
| | | span: 24, |
| | | hide: true, |
| | | prop: "vote", |
| | | // formslot: true, |
| | | slot:true, |
| | | label: "投票详情", |
| | | labelWidth:140 |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | | label: "项目摘要", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDigest", |
| | | placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, |
| | | { |
| | | label: "项目进度描述", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "projectDescribe", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | disabled: true |
| | | }, { |
| | | label: "批复意见", |
| | | span: 24, |
| | | hide: true, |
| | | prop: "comment", |
| | | labelWidth: 140, |
| | | type: "textarea", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入批复意见", |
| | | trigger: "blur", |
| | | },], |
| | | }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | listType: 'picture-img', |
| | | span: 24, |
| | | hide: true, |
| | | labelWidth: 140, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | trigger: "blur", |
| | | },], |
| | | } |
| | | ], |
| | | }, |
| | | topictData: [], |
| | | topicTitle: "", |
| | | articleRange: "" |
| | | } |
| | | }, |
| | | watch: { |
| | | 'form.districtId': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "articleId") |
| | | if (newData && this.form.articleId) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | console.log("data===>", newData) |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | 'form.articleId': { |
| | | handler(newData) { |
| | | console.log("data===>", newData) |
| | | this.getVoteDetail(this.form.articleId, this.articleRange) |
| | | const column = this.findObject(this.option.column, "vote") |
| | | if (newData) { |
| | | column.display = true; |
| | | } else { |
| | | column.display = false |
| | | } |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | |
| | | }, |
| | | |
| | | created() { |
| | | this.init() |
| | | }, |
| | | beforeRouteUpdate(to, from, next) { |
| | | // 在当前路由改变,但是该组件被复用时调用 |
| | | // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候 |
| | | // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用 |
| | | // 可以访问组件实例 `this` |
| | | if (to.fullPath !== from.fullPath) { |
| | | next() |
| | | created() { |
| | | this.init() |
| | | }, |
| | | beforeRouteUpdate(to, from, next) { |
| | | // 在当前路由改变,但是该组件被复用时调用 |
| | | // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候 |
| | | // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用 |
| | | // 可以访问组件实例 `this` |
| | | if (to.fullPath !== from.fullPath) { |
| | | next() |
| | | this.init() |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.taskId = this.$route.params.taskId |
| | | this.processInstanceId = this.$route.params.processInstanceId |
| | | this.businessId = this.$route.params.businessId |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.flowList = data.data |
| | | } |
| | | }) |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls |
| | | this.form = data.data |
| | | } |
| | | }) |
| | | }, |
| | | handleAgree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | flag: 'ok', |
| | | comment: this.form.comment, |
| | | } |
| | | completeTask(params).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/property/todo` |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败') |
| | | } |
| | | }) |
| | | }, |
| | | handleDisagree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | comment: this.form.comment, |
| | | } |
| | | completeTask(params).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/property/todo` |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败') |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/property/todo` |
| | | }) |
| | | }, |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | } |
| | | }) |
| | | }, |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.taskId = this.$route.params.taskId |
| | | this.processInstanceId = this.$route.params.processInstanceId |
| | | this.businessId = this.$route.params.businessId |
| | | historyFlowList(this.processInstanceId).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.flowList = data.data |
| | | } |
| | | }) |
| | | getPropertyCapitalApply(this.businessId).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls |
| | | this.form = data.data |
| | | } |
| | | }) |
| | | }, |
| | | handleAgree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | flag: 'ok', |
| | | comment: this.form.comment, |
| | | } |
| | | completeTask(params).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/property/todo` |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败') |
| | | } |
| | | }) |
| | | }, |
| | | handleDisagree() { |
| | | if (!this.form.comment) { |
| | | this.$message.warning('请先填写批复意见') |
| | | return |
| | | } |
| | | const params = { |
| | | taskId: this.taskId, |
| | | processInstanceId: this.processInstanceId, |
| | | comment: this.form.comment, |
| | | } |
| | | completeTask(params).then(res => { |
| | | const data = res.data |
| | | if (data.success) { |
| | | this.$message.success(data.msg) |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/property/todo` |
| | | }) |
| | | } else { |
| | | this.$message.error(data.msg || '提交失败') |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.$router.$avueRouter.closeTag() |
| | | this.$router.push({ |
| | | path: `/property/todo` |
| | | }) |
| | | }, |
| | | getVoteDetail(articleId, districtId) { |
| | | let params = { |
| | | level: 1, |
| | | articleId: articleId, |
| | | districtId: districtId |
| | | } |
| | | getLists(1, 10, params).then(res => { |
| | | const data = res.data.data |
| | | if (data.length) { |
| | | this.topictData = data[0].children; |
| | | this.topicTitle = data[0].discussContent; |
| | | } |
| | | }) |
| | | }, |
| | | openUserPopup(row) { |
| | | this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId]) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | position: relative; |
| | | /* 确保按钮相对于该元素定位 */ |
| | | } |
| | | .container { |
| | | position: relative; |
| | | /* 确保按钮相对于该元素定位 */ |
| | | } |
| | | |
| | | #myButton { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | } |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | | #myButton { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | } |
| | | |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | |
| | | v-text="textDispose(row, 'linkPhoneflag', 'linkPhone')"> |
| | | </el-button> |
| | | </template> |
| | | <template slot="constructionSchemeUrlsType" slot-scope="{file}"> |
| | | <!-- <template slot="constructionSchemeUrlsType" slot-scope="{file}"> |
| | | <span>{{ file }}</span> |
| | | </template> |
| | | </template> --> |
| | | </avue-crud> |
| | | |
| | | |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "项目分摊方式", |
| | | prop: "allocationWay", |
| | | value: '按建筑面积分摊', |
| | | label: "楼栋", |
| | | prop: "buildingName", |
| | | value: '', |
| | | span: 12, |
| | | row: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入楼栋", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 110, |
| | |
| | | prop: "projectDescribe", |
| | | type: "textarea" |
| | | }, |
| | | // { |
| | | // label: '施工方案附件', |
| | | // prop: 'constructionSchemeUrls', |
| | | // type: 'upload', |
| | | // span: 24, |
| | | // hide: true, |
| | | // multiple: true, |
| | | // listType: "text", |
| | | // propsHttp: { |
| | | // res: 'data', |
| | | // name: "name", |
| | | // url: "link" |
| | | // }, |
| | | // action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | // rules: [{ |
| | | // required: true, |
| | | // message: "请上传施工方案", |
| | | // trigger: "blur", |
| | | // }] |
| | | // }, |
| | | { |
| | | label: '施工方案附件', |
| | | prop: 'constructionSchemeUrls', |
| | | type: 'upload', |
| | | |
| | | label: "维修资金使用申请审批表", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file1", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | multiple: true, |
| | | // showFileList: true, |
| | | propsHttp: { |
| | | res: 'data', |
| | | name: "originalName", |
| | | url: "link" |
| | | }, |
| | | action: '/api/blade-resource/oss/endpoint/put-file-attach', |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传施工方案", |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }, ], |
| | | } |
| | | }], |
| | | }, |
| | | { |
| | | |
| | | label: "申请使用维修资金的报告、附维修部位彩色照片、业委会(物管会)会议纪要(社区意见)", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file2", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | |
| | | label: "公示单,现场勘察图片、公示照片(公示期7天)", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file3", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | |
| | | label: "维修单位出具的工程款发票(验收合格后以竣工决算审核报告审定金额开具)", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file4", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | label: "应急维修需提供专业机构出具的检验检测报告或(乡镇人民政府)街道办事处现场核实意见", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file5", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | |
| | | label: "业主签名表或线上表决记录(应急情况不提供)", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file6", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | label: "政府采购资料", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file7", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | |
| | | label: "维修和更新、改造方案、维修项目的协议或合同", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file8", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | |
| | | label: "维修改造工程竣工验收单一式两份(维修完工需经申请人签字);维修项目签证单(超出预算清单内容的需出具签证单)", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file9", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | |
| | | label: "维修项目决算、造价机构出具的决算审价报告", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file10", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | { |
| | | |
| | | label: "业主委员会情况登记表;经办人或代理人证件(复印件),复印件上签名、联系电话", |
| | | offset: 2, |
| | | labelPosition: "top", |
| | | prop: "file11", |
| | | type: "upload", |
| | | listType: "text", |
| | | action: "/api/blade-resource/oss/endpoint/put-file-attach", |
| | | propsHttp: { |
| | | res: "data", |
| | | name: 'name', |
| | | url: "link", |
| | | }, |
| | | span: 24, |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请上传文件", |
| | | trigger: "blur", |
| | | }], |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | |
| | | // }, |
| | | // deep: true, |
| | | // immediate: true |
| | | |
| | | // } |
| | | |
| | | 'form.districtId': { |
| | |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | rowView() { |
| | | this.showDialog = false; |
| | | }, |
| | |
| | | path: `/property/process/maintenanceFundApply/detail/${row.processInstanceId}/${row.id}` |
| | | }) |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | row.constructionSchemeUrls = func.join(row.constructionSchemeUrls) |
| | | if (row.constructionSchemeUrls.length > 0) { |
| | | var urls = [] |
| | | var split = row.constructionSchemeUrls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.constructionSchemeUrls = urls.join(",") |
| | | |
| | | setFile(fileObj) { |
| | | for (let i in fileObj) { |
| | | fileObj[i] = func.join(fileObj[i]) |
| | | if (fileObj[i].length > 0) { |
| | | var urls = [] |
| | | var split = fileObj[i].split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | fileObj[i] = urls.join(",") |
| | | } |
| | | } |
| | | return fileObj; |
| | | }, |
| | | |
| | | rowSave(row, done, loading) { |
| | | // row.constructionSchemeUrls = func.join(row.constructionSchemeUrls) |
| | | // if (row.constructionSchemeUrls.length > 0) { |
| | | // var urls = [] |
| | | // var split = row.constructionSchemeUrls.split(",") |
| | | // split.forEach(url => { |
| | | // var names = url.split("jczz/") |
| | | // urls.push(names[1]) |
| | | // }) |
| | | // row.constructionSchemeUrls = urls.join(",") |
| | | // } |
| | | |
| | | let keys = ["file1", "file2", "file3", "file4", "file5", "file6", "file7", "file8", "file9", "file10", "file11"] |
| | | let files = {}; |
| | | for (let i in row) { |
| | | if (keys.indexOf(i) != -1) { |
| | | |
| | | files[i] = row[i]; |
| | | } |
| | | } |
| | | for (let k in files) { |
| | | files[k] = func.join(files[k]) |
| | | if (files[k].length) { |
| | | let urls = []; |
| | | let split = files[k].split(","); |
| | | split.forEach(url => { |
| | | let names = url.split("jczz/"); |
| | | urls.push(names[1]); |
| | | }) |
| | | files[k] = urls.join(",") |
| | | } |
| | | } |
| | | |
| | | row.attachment = JSON.stringify(files); |
| | | for (let j in row) { |
| | | if (keys.indexOf(j) != -1) { |
| | | delete row[j]; |
| | | } |
| | | } |
| | | console.log("提交===>", row); |
| | | row.propertyFlag = 1 |
| | | add(row).then( |
| | | () => { |
| | |
| | | this.data = data.records |
| | | this.data.forEach(item => { |
| | | this.$set(item, 'linkPhoneflag', false) |
| | | if (item.constructionSchemeUrls.length > 0) { |
| | | var urls = [] |
| | | var names = item.constructionSchemeUrls.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | item.constructionSchemeUrls = urls.join(",") |
| | | } |
| | | // if (item.constructionSchemeUrls.length > 0) { |
| | | // var urls = [] |
| | | // var names = item.constructionSchemeUrls.split(",") |
| | | // names.forEach(name => { |
| | | // urls.push(website.minioUrl + name) |
| | | // }) |
| | | // item.constructionSchemeUrls = urls.join(",") |
| | | // } |
| | | }) |
| | | this.loading = false |
| | | this.selectionClear() |
| | |
| | | .workOrderStyle { |
| | | font-weight: normal; |
| | | } |
| | | </style> |
| | | </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"> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <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"> |
| | | </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" |
| | | const searchSpan = 4 |
| | | const labelWidth = 110 |
| | | export default { |
| | | 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 { |
| | | name: "propertyCharge", |
| | | data () { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | memberFlag: false, |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | dialogMenuPosition: 'center', |
| | | // menu: false, |
| | | // addBtn: false, |
| | | border: true, |
| | | index: true, |
| | | selection: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | //stripe:true, |
| | | viewBtn: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | label: "物业公司", |
| | | labelWidth: labelWidth, |
| | | prop: "propertyId", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-propertyCompany/propertyCompany/getPropertyCompanyList", |
| | | props: { |
| | | label: "name", |
| | | value: "deptId", |
| | | }, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | disabled: false, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择物业公司", |
| | | trigger: ["blur", "change"] |
| | | }, ], |
| | | }, |
| | | datetime: "", |
| | | selectionList: [], |
| | | memberFlag: false, |
| | | option: { |
| | | labelWidth: 96, |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 210, |
| | | |
| | | // menu: false, |
| | | // addBtn: false, |
| | | border: true, |
| | | index: true, |
| | | selection: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | //stripe:true, |
| | | viewBtn: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "物业公司", |
| | | labelWidth: labelWidth, |
| | | prop: "propertyId", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-propertyCompany/propertyCompany/getPropertyCompanyList", |
| | | props: { |
| | | label: "name", |
| | | value: "deptId", |
| | | }, |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | disabled: false, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择物业公司", |
| | | trigger: ["blur", "change"] |
| | | },], |
| | | }, |
| | | { |
| | | label: "类型", |
| | | labelWidth: labelWidth, |
| | | prop: "payType", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=payType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: ["blur", "change"] |
| | | },], |
| | | }, |
| | | |
| | | { |
| | | label: "收费项名称", |
| | | labelWidth: labelWidth, |
| | | prop: "name", |
| | | searchSpan: searchSpan, |
| | | searchLabelWidth: labelWidth, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入收费项名称", |
| | | trigger: ["blur", "change"] |
| | | },], |
| | | }, |
| | | { |
| | | label: "计算方式", |
| | | labelWidth: labelWidth, |
| | | prop: "calculationFormula", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=payCalculationFormula", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择计算方式", |
| | | trigger: ["blur", "change"] |
| | | },], |
| | | }, |
| | | { |
| | | label: "单价(元)", |
| | | labelWidth: labelWidth, |
| | | prop: "unitPrice", |
| | | type: 'number', |
| | | precision: 2, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入单价", |
| | | trigger: ["blur", "change"] |
| | | }] |
| | | }, |
| | | { |
| | | label: "缴费周期", |
| | | labelWidth: labelWidth, |
| | | placeholder: "几个月收费一次", |
| | | prop: "payPeriod", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=payPeriod", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择缴费周期", |
| | | trigger: ["blur", "change"] |
| | | },], |
| | | }, |
| | | { |
| | | label: "时间", |
| | | labelWidth: labelWidth, |
| | | placeholder: "时间", |
| | | prop: "createTime", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择缴费周期", |
| | | trigger: ["blur", "change"] |
| | | },], |
| | | }, |
| | | ], |
| | | { |
| | | label: "类型", |
| | | labelWidth: labelWidth, |
| | | prop: "payType", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=payType", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择类型", |
| | | trigger: ["blur", "change"] |
| | | }, ], |
| | | }, |
| | | data: [], |
| | | } |
| | | |
| | | { |
| | | label: "收费项名称", |
| | | labelWidth: labelWidth, |
| | | prop: "name", |
| | | searchSpan: searchSpan, |
| | | searchLabelWidth: labelWidth, |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入收费项名称", |
| | | trigger: ["blur", "change"] |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "计算方式", |
| | | labelWidth: labelWidth, |
| | | prop: "calculationFormula", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=payCalculationFormula", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择计算方式", |
| | | trigger: ["blur", "change"] |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "单价(元)", |
| | | labelWidth: labelWidth, |
| | | prop: "unitPrice", |
| | | type: 'number', |
| | | precision: 2, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入单价", |
| | | trigger: ["blur", "change"] |
| | | }] |
| | | }, |
| | | { |
| | | label: "缴费周期", |
| | | labelWidth: labelWidth, |
| | | placeholder: "几个月收费一次", |
| | | prop: "payPeriod", |
| | | checkStrictly: true, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=payPeriod", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | type: "select", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择缴费周期", |
| | | trigger: ["blur", "change"] |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "时间", |
| | | labelWidth: labelWidth, |
| | | placeholder: "时间", |
| | | prop: "createTime", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择缴费周期", |
| | | trigger: ["blur", "change"] |
| | | }, ], |
| | | }, |
| | | ], |
| | | }, |
| | | data: [], |
| | | } |
| | | }, |
| | | watch: {}, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.gridWorkLog_add, true), |
| | | viewBtn: this.vaildData(this.permission.gridWorkLog_view, true), |
| | | delBtn: this.vaildData(this.permission.gridWorkLog_delete, true), |
| | | editBtn: this.vaildData(this.permission.gridWorkLog_edit, true), |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.gridWorkLog_add, true), |
| | | viewBtn: this.vaildData(this.permission.gridWorkLog_view, true), |
| | | delBtn: this.vaildData(this.permission.gridWorkLog_delete, true), |
| | | editBtn: this.vaildData(this.permission.gridWorkLog_edit, true), |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | textDispose() { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'idCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | }, |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | textDispose () { |
| | | return (row, flag, type) => { |
| | | if (row[flag] || row[type] == null) { |
| | | return row[type] |
| | | } else { |
| | | if (type == 'idCard') { |
| | | return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2") |
| | | } else { |
| | | return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2") |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | showStringDispose (row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | manageMember (row) { |
| | | this.memberFlag = true |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | that.$refs.partyOrganizationMember.init(row) |
| | | }) |
| | | }, |
| | | rowSave (row, done, loading) { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate (row, index, done, loading) { |
| | | if (row.urls.length > 0) { |
| | | var urls = [] |
| | | var split = row.urls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.urls = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | // handleDelete() { |
| | | // if (this.selectionList.length === 0) { |
| | | // this.$message.warning("请选择至少一条数据"); |
| | | // return; |
| | | // } |
| | | // this.$confirm("确定将选择数据删除?", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning", |
| | | // }) |
| | | // .then(() => { |
| | | // return remove(this.ids); |
| | | // }) |
| | | // .then(() => { |
| | | // this.onLoad(this.page); |
| | | // this.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!", |
| | | // }); |
| | | // this.$refs.crud.toggleSelection(); |
| | | // }); |
| | | // }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | // getDetail(this.form.id).then((res) => { |
| | | // this.form = res.data.data |
| | | // const column = this.findObject(this.option.column, "principalId") |
| | | // let arr = [] |
| | | // arr.push(this.form.areaId) |
| | | // column.defaultExpandedKeys = arr |
| | | // }) |
| | | } |
| | | |
| | | // //如果当前角色为物业管理员,则默认物业公司为该用户的物业公司 |
| | | // if (this.userInfo.role_name.indexOf("wygly")>-1){ |
| | | // let column = this.findObject(this.option.column, "propertyId") |
| | | // column.disabled = true |
| | | // column.search = false |
| | | // this.form.propertyId = this.userInfo.dept_id |
| | | // } |
| | | |
| | | done() |
| | | }, |
| | | searchReset () { |
| | | this.query = {} |
| | | showStringDispose(row, type) { |
| | | row[type] = !row[type] |
| | | }, |
| | | manageMember(row) { |
| | | this.memberFlag = true |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | that.$refs.partyOrganizationMember.init(row) |
| | | }) |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | this.loading = true |
| | | |
| | | //如果当前角色为物业管理员,则默认筛选该物业公司 |
| | | if (this.userInfo.role_name.indexOf("wygly") > -1) { |
| | | let column = this.findObject(this.option.column, "propertyId") |
| | | column.disabled = true |
| | | column.search = false |
| | | this.form.propertyId = this.userInfo.dept_id |
| | | |
| | | params.propertyId = this.userInfo.dept_id |
| | | } |
| | | |
| | | |
| | | |
| | | 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() |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | if (row.urls.length > 0) { |
| | | var urls = [] |
| | | var split = row.urls.split(",") |
| | | split.forEach(url => { |
| | | var names = url.split("jczz/") |
| | | urls.push(names[1]) |
| | | }) |
| | | row.urls = urls.join(",") |
| | | } |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | // handleDelete() { |
| | | // if (this.selectionList.length === 0) { |
| | | // this.$message.warning("请选择至少一条数据"); |
| | | // return; |
| | | // } |
| | | // this.$confirm("确定将选择数据删除?", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning", |
| | | // }) |
| | | // .then(() => { |
| | | // return remove(this.ids); |
| | | // }) |
| | | // .then(() => { |
| | | // this.onLoad(this.page); |
| | | // this.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!", |
| | | // }); |
| | | // this.$refs.crud.toggleSelection(); |
| | | // }); |
| | | // }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | // getDetail(this.form.id).then((res) => { |
| | | // this.form = res.data.data |
| | | // const column = this.findObject(this.option.column, "principalId") |
| | | // let arr = [] |
| | | // arr.push(this.form.areaId) |
| | | // column.defaultExpandedKeys = arr |
| | | // }) |
| | | } |
| | | |
| | | // //如果当前角色为物业管理员,则默认物业公司为该用户的物业公司 |
| | | // if (this.userInfo.role_name.indexOf("wygly")>-1){ |
| | | // let column = this.findObject(this.option.column, "propertyId") |
| | | // column.disabled = true |
| | | // column.search = false |
| | | // this.form.propertyId = this.userInfo.dept_id |
| | | // } |
| | | |
| | | done() |
| | | }, |
| | | searchReset() { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true |
| | | |
| | | //如果当前角色为物业管理员,则默认筛选该物业公司 |
| | | if (this.userInfo.role_name.indexOf("wygly") > -1) { |
| | | let column = this.findObject(this.option.column, "propertyId") |
| | | column.disabled = true |
| | | column.search = false |
| | | this.form.propertyId = this.userInfo.dept_id |
| | | |
| | | params.propertyId = this.userInfo.dept_id |
| | | } |
| | | |
| | | |
| | | |
| | | 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() |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | | <style scoped></style> |
| src/views/property/propertyCompany.vue
src/views/property/propertyCompanyDistrict.vue
src/views/propertySupervision/components/done.vue
src/views/propertySupervision/components/todo.vue
src/views/propertySupervision/process/maintenanceFundApply/detail.vue
src/views/propertySupervision/process/maintenanceFundApply/form.vue
src/views/propertySupervision/process/maintenanceFundApply/handle.vue
src/views/publicSecurity/keynotePlaceManage.vue
src/views/publicSecurity/ninePlaceManage/patrolRecord.vue
src/views/publicSecurity/ninePlaceManage/situationRectification.vue
src/views/publicSecurity/noExplosionManage.vue
src/views/resource/distapch.vue
src/views/sms/sms.vue
src/views/sms/smsRecord.vue
src/views/sms/smsTemplate.vue
src/views/system/auth.vue
src/views/system/user.vue
src/views/userHouse/houseHoldList.vue
vue.config.js |