From 9081024f205ed8c4ebee00c8731b7213acb2c6fa Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Tue, 20 Feb 2024 17:26:08 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web
---
src/views/cGovernance/gridPatrolRecord.vue | 4
src/views/gzll/owners.vue | 1022 +++---
src/views/cGovernance/taskECall.vue | 24
src/views/property/todo.vue | 427 +-
src/views/publicSecurity/ninePlaceManage/patrolRecord.vue | 186
src/views/userHouse/hireInfoList.vue | 56
src/views/userHouse/lable/list.vue | 4
src/views/work/done.vue | 33
src/views/property/propertyCapitalApply.vue | 27
src/views/publicSecurity/ninePlaceManage/situationRectification.vue | 2
src/views/grid/index.vue | 51
src/views/task/index.vue | 25
src/views/place/index.vue | 25
src/views/task/reportForRepairs.vue | 25
src/views/publicSecurity/positionManage/fileManage.vue | 18
src/api/userHouse/list/houseRental.js | 2
src/views/property/companyManage.vue | 460 +-
src/views/article/articleComment.vue | 26
src/views/property/inviteTenders.vue | 1503 +++++-----
src/views/property/oiae.vue | 1498 +++++-----
src/views/cGovernance/reportForRepairs.vue | 25
src/views/cGovernance/gridWorkLog.vue | 26
src/views/gzll/todo.vue | 426 +-
src/views/property/propertyCompanyDistrict.vue | 34
src/views/publicSecurity/keynotePlaceManage.vue | 4
src/views/publicSecurity/ninePlaceManage/archivesManage.vue | 20
src/views/publicSecurity/positionManage/TransactRegist.vue | 420 +-
src/views/grid/gridman.vue | 33
src/views/patrolList/patrolRecord.vue | 664 ++--
src/views/work/todo.vue | 33
src/views/property/ownersCommittee.vue | 1258 ++++----
31 files changed, 4,489 insertions(+), 3,872 deletions(-)
diff --git a/src/api/userHouse/list/houseRental.js b/src/api/userHouse/list/houseRental.js
index 6dd412e..b30272b 100644
--- a/src/api/userHouse/list/houseRental.js
+++ b/src/api/userHouse/list/houseRental.js
@@ -36,7 +36,7 @@
export const add = (row) => {
return request({
- url: '/api/blade-houseRental/houseRental/submit',
+ url: '/api/blade-houseRental/houseRental/add',
method: 'post',
data: row
})
diff --git a/src/views/article/articleComment.vue b/src/views/article/articleComment.vue
index 6c857fc..d42b9f9 100644
--- a/src/views/article/articleComment.vue
+++ b/src/views/article/articleComment.vue
@@ -11,6 +11,12 @@
@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>
</basicContainer>
</template>
@@ -71,6 +77,7 @@
searchSpan: 4,
search: true,
searchLabelWidth: 46,
+ slot: true
},
{
width: 110,
@@ -110,8 +117,26 @@
})
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]
+ },
+
selectionChange (list) {
this.selectionList = list
},
@@ -185,6 +210,7 @@
this.page.total = data.total
this.dataList = data.records
this.dataList.forEach(item => {
+ this.$set(item, 'phoneflag', false)
if (item.avatar) {
// var urls = []
// var names = item.avatar.split(",")
diff --git a/src/views/cGovernance/gridPatrolRecord.vue b/src/views/cGovernance/gridPatrolRecord.vue
index 35b52dc..8243539 100644
--- a/src/views/cGovernance/gridPatrolRecord.vue
+++ b/src/views/cGovernance/gridPatrolRecord.vue
@@ -392,6 +392,10 @@
})
this.loading = false
this.selectionClear()
+ }).catch(err => {
+ setTimeout(() => {
+ this.loading = false
+ }, 1000)
})
}
},
diff --git a/src/views/cGovernance/gridWorkLog.vue b/src/views/cGovernance/gridWorkLog.vue
index 6b805b8..52bafe8 100644
--- a/src/views/cGovernance/gridWorkLog.vue
+++ b/src/views/cGovernance/gridWorkLog.vue
@@ -15,6 +15,12 @@
@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>
</template>
@@ -148,6 +154,7 @@
disabled: true,
searchSpan: 4,
search: true,
+ slot: true
},
{
@@ -345,6 +352,20 @@
return data.name
}
+ },
+
+ 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")
+ }
+ }
+ }
}
},
@@ -353,6 +374,10 @@
},
methods: {
+ showStringDispose (row, type) {
+ row[type] = !row[type]
+ },
+
getUserList (param = '') {
let dicUrl = `/api/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20`
const column = this.findObject(this.option.column, "householdId")
@@ -519,6 +544,7 @@
this.page.total = data.total
this.data = data.records
this.data.forEach(item => {
+ this.$set(item, 'phoneflag', false)
if (item.url) {
if (item.url.length > 0) {
var urls = []
diff --git a/src/views/cGovernance/reportForRepairs.vue b/src/views/cGovernance/reportForRepairs.vue
index 0a02bfb..3bf8e84 100644
--- a/src/views/cGovernance/reportForRepairs.vue
+++ b/src/views/cGovernance/reportForRepairs.vue
@@ -97,6 +97,12 @@
除
</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="replyPopup" center @close="popupClose">
@@ -574,9 +580,27 @@
return tags
}
+ },
+
+ 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]
+ },
+
rowExpansion (row) {
this.$refs.crud.toggleRowExpansion(row)
},
@@ -864,6 +888,7 @@
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 = []
diff --git a/src/views/cGovernance/taskECall.vue b/src/views/cGovernance/taskECall.vue
index 2508504..a53d835 100644
--- a/src/views/cGovernance/taskECall.vue
+++ b/src/views/cGovernance/taskECall.vue
@@ -11,6 +11,11 @@
除
</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>
</template>
@@ -188,6 +193,7 @@
validator: validatorPhone,
trigger: 'blur'
}],
+ slot: true
},
{
label: "事发地点",
@@ -398,8 +404,25 @@
})
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]
+ },
+
rowSave (row, done, loading) {
if (row.imageUrls.length > 0) {
var urls = []
@@ -554,6 +577,7 @@
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 = []
diff --git a/src/views/grid/gridman.vue b/src/views/grid/gridman.vue
index 14296e3..e9216df 100644
--- a/src/views/grid/gridman.vue
+++ b/src/views/grid/gridman.vue
@@ -10,6 +10,11 @@
除
</el-button>
</template>
+ <template slot-scope="{row, size}" slot="mobile">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'mobileflag')"
+ v-text="textDispose(row, 'mobileflag', 'mobile')">
+ </el-button>
+ </template>
</avue-crud>
</basic-container>
</template>
@@ -122,6 +127,7 @@
trigger: "blur",
},
],
+ slot: true
},
{
@@ -197,8 +203,25 @@
})
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]
+ },
+
rowSave (row, done, loading) {
if (row.picUrl) {
var names = row.picUrl.split("jczz/")
@@ -335,7 +358,15 @@
}
this.loading = true
getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = res.data.data
+ const data = {
+ ...res.data.data,
+ records: res.data.data.records.map(item => {
+ return {
+ ...item,
+ 'mobileflag': false
+ }
+ })
+ }
this.page.total = data.total
this.data = data.records
this.data.forEach(item => {
diff --git a/src/views/grid/index.vue b/src/views/grid/index.vue
index 588c31a..107fbec 100644
--- a/src/views/grid/index.vue
+++ b/src/views/grid/index.vue
@@ -9,6 +9,11 @@
<el-button size="small" icon="el-icon-delete" plain v-if="permission.grid_delete" @click="handleDelete">删 除
</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>
</basic-container>
</template>
@@ -70,6 +75,7 @@
search: true,
searchSpan: 4,
searchLabelWidth: 76,
+ row:true,
rules: [{
required: true,
message: "请选择所属社区",
@@ -85,6 +91,7 @@
search: false,
type: "tree",
dicUrl: "/api/blade-system/region/tree",
+ row:true,
props: {
label: "name",
value: "id",
@@ -97,7 +104,6 @@
},
],
},
-
{
overHidden: true,
label: "网格名称",
@@ -108,6 +114,20 @@
{
required: true,
message: "请输入网格名称",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ overHidden: true,
+ label: "网格编号",
+ prop: "gridCode",
+ searchSpan: 4,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入网格编号",
trigger: "blur",
},
],
@@ -145,6 +165,7 @@
trigger: 'blur'
}
],
+ slot: true
},
{
label: "区域",
@@ -214,8 +235,26 @@
})
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]
+ },
+
rowSave (row, done, loading) {
add(row).then(
() => {
@@ -326,7 +365,15 @@
this.loading = true
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
- const data = res.data.data
+ const data = {
+ ...res.data.data,
+ records: res.data.data.records.map(item => {
+ return {
+ ...item,
+ 'principalPhoneflag': false
+ }
+ })
+ }
this.page.total = data.total
this.data = data.records
this.loading = false
diff --git a/src/views/gzll/owners.vue b/src/views/gzll/owners.vue
index 914b8fb..57b36b0 100644
--- a/src/views/gzll/owners.vue
+++ b/src/views/gzll/owners.vue
@@ -1,545 +1,571 @@
<!-- 走访日志 -->
<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" @row-save="rowSave" @row-update="rowUpdate"
- @row-del="rowDel" :before-open="beforeOpen" @search-reset="searchReset" @selection-change="selectionChange"
- @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
- <template slot-scope="scope" slot="menu">
- <el-button type="text" icon="el-icon-circle-plus-outline" size="small" @click="manageMember(scope.row)">业委会成员
- </el-button>
- </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" @row-save="rowSave" @row-update="rowUpdate"
+ @row-del="rowDel" :before-open="beforeOpen" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot-scope="scope" slot="menu">
+ <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
+ @click="manageMember(scope.row)">业委会成员
+ </el-button>
+ </template>
- <template slot-scope="{ row, size }" slot="status">
- <el-tag :size="size" :type="showStatus(row.status).type" v-text="showStatus(row.status).text">
- </el-tag>
- </template>
- </avue-crud>
+ <template slot-scope="{ row, size }" slot="status">
+ <el-tag :size="size" :type="showStatus(row.status).type" v-text="showStatus(row.status).text">
+ </el-tag>
+ </template>
+ <template slot-scope="{row, size}" slot="mobile">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'mobileflag')"
+ v-text="textDispose(row, 'mobileflag', 'mobile')">
+ </el-button>
+ </template>
+ </avue-crud>
- <el-drawer title="业委会成员" size="40%" append-to-body :visible.sync="memberFlag" :direction="'rtl'">
- <ownersMemberManager ref="ownersMemberManager" />
- </el-drawer>
- </basic-container>
+ <el-drawer title="业委会成员" size="40%" append-to-body :visible.sync="memberFlag" :direction="'rtl'">
+ <ownersMemberManager ref="ownersMemberManager" />
+ </el-drawer>
+ </basic-container>
</template>
<script>
- import {
+import {
getList,
add,
update,
remove,
getDetatil
- } from "@/api/owners_committee"
- import {
+} from "@/api/owners_committee"
+import {
mapGetters
- } from "vuex"
- import website from '@/config/website'
- import func from "@/util/func"
- import ownersMemberManager from "./components/ownersMemberManager"
+} from "vuex"
+import website from '@/config/website'
+import func from "@/util/func"
+import ownersMemberManager from "./components/ownersMemberManager"
- export default {
+export default {
components: {
- ownersMemberManager
+ ownersMemberManager
},
- data() {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
- datetime: "",
- selectionList: [],
- memberFlag: false,
- option: {
- labelWidth: 120,
- searchLabelWidth: 96,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 300,
-
- // 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: [{
- hide: true,
- label: "小区",
- prop: "areaId",
- searchSpan: 5,
- type: 'tree',
- dicUrl: `/api/blade-district/district/getDistrictTree`,
- props: {
- label: "name",
- value: "id"
- },
- defaultExpandedKeys: ["361102003"],
- cascader: ['principalId'],
- overHidden: true,
- change: ({
- value,
- column,
- item,
- dic
- }) => {
- this.form.areaName = ''
-
- if (value) {
- this.form.areaName = item.name
- }
- },
- rules: [{
- required: true,
- message: "请选择小区",
- trigger: "blur",
- }, ],
+ data () {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
},
+ datetime: "",
+ selectionList: [],
+ memberFlag: false,
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 300,
- {
- overHidden: true,
- width: 120,
- label: "业委会名称",
- prop: "name",
- search: true,
- searchLabelWidth: 90,
- rules: [{
- required: true,
- message: "请输入业委会名称",
- trigger: "blur",
- }, ],
- },
+ // 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: [{
+ hide: true,
+ label: "小区",
+ prop: "areaId",
+ searchSpan: 5,
+ type: 'tree',
+ dicUrl: `/api/blade-district/district/getDistrictTree`,
+ props: {
+ label: "name",
+ value: "id"
+ },
+ defaultExpandedKeys: ["361102003"],
+ cascader: ['principalId'],
+ overHidden: true,
+ change: ({
+ value,
+ column,
+ item,
+ dic
+ }) => {
+ this.form.areaName = ''
- {
- overHidden: true,
- width: 220,
- label: '小区名称',
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- prop: "areaName"
- },
+ if (value) {
+ this.form.areaName = item.name
+ }
+ },
+ rules: [{
+ required: true,
+ message: "请选择小区",
+ trigger: "blur",
+ },],
+ },
- {
- label: "总人数",
- prop: "peopleTotal",
- display: false,
- },
- {
- label: "业委会负责人",
- prop: "principalId",
- type: "tree",
- remote: true,
- props: {
- label: 'name',
- value: 'id'
- },
- hide: true,
- dicUrl: `/api/blade-system/user/searchUserByDistrictId?districtId={{key}}`,
- defaultExpandedKeys: [],
- change: ({
- value,
- column,
- item,
- dic
- }) => {
- this.form.mobile = ''
- this.form.principalName = ''
+ {
+ overHidden: true,
+ width: 120,
+ label: "业委会名称",
+ prop: "name",
+ search: true,
+ searchLabelWidth: 90,
+ rules: [{
+ required: true,
+ message: "请输入业委会名称",
+ trigger: "blur",
+ },],
+ },
- if (value) {
- this.form.mobile = item.phone
- this.form.principalName = item.name
- }
- },
- rules: [{
- required: true,
- message: "请选择业委会负责人",
- trigger: "blur",
- }, ],
- },
- {
- width: 120,
- label: "负责人名称",
- prop: "principalName",
- display: false,
- rules: [{
- required: true,
- message: "请输入负责人名称",
- trigger: "blur",
- }, ],
- },
- {
- width: 120,
- label: "负责人手机号",
- prop: "mobile",
- rules: [{
- required: true,
- message: "请输入负责人手机号",
- trigger: "blur",
- }, ],
- },
+ {
+ overHidden: true,
+ width: 220,
+ label: '小区名称',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "areaName"
+ },
- {
- width: 120,
- label: "业委会届别",
- prop: "session",
- type: "number",
- rules: [{
- required: true,
- message: "请输入业委会届别",
- trigger: "blur",
- }, ],
- value: 1
- },
-
- {
- width: 100,
- label: "成立时间",
- prop: "establishTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
-
- {
- span: 24,
- label: "所在地址",
- prop: "location",
- },
-
- {
- width: 124,
- label: "任期开始时间",
- prop: "startTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: "请输入任期开始时间",
- trigger: "blur",
- }, ],
- },
-
- {
- width: 124,
- label: "任期结束时间",
- prop: "endTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: "请输入任期结束时间",
- trigger: "blur",
- }, ],
- },
-
- {
- width: 110,
- label: "图片",
- prop: "imageUrl",
- type: "upload",
- listType: "picture-img",
- action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
- res: "data",
- name: 'name',
- url: "link",
- },
- viewDisplay: false,
- span: 24,
- },
-
- {
- span: 12,
- label: "排序",
- prop: "sort",
- type: 'number',
- rules: [{
- required: true,
- message: "请输入排序",
- trigger: "blur",
- }, ],
- value: 1
- },
-
- {
- width: 100,
- span: 12,
- label: "状态",
- slot: true,
- prop: "status",
- type: 'switch',
- activeColor: "#13ce66",
- inactiveColor: "#ccc",
- dicData: [{
- label: "关闭",
- value: 1
+ {
+ label: "总人数",
+ prop: "peopleTotal",
+ display: false,
},
{
- label: "正常",
- value: 0
+ label: "业委会负责人",
+ prop: "principalId",
+ type: "tree",
+ remote: true,
+ props: {
+ label: 'name',
+ value: 'id'
+ },
+ hide: true,
+ dicUrl: `/api/blade-system/user/searchUserByDistrictId?districtId={{key}}`,
+ defaultExpandedKeys: [],
+ change: ({
+ value,
+ column,
+ item,
+ dic
+ }) => {
+ this.form.mobile = ''
+ this.form.principalName = ''
+
+ if (value) {
+ this.form.mobile = item.phone
+ this.form.principalName = item.name
+ }
+ },
+ rules: [{
+ required: true,
+ message: "请选择业委会负责人",
+ trigger: "blur",
+ },],
},
- ],
- value: 0,
- rules: [{
- required: true,
- message: "请输入排序",
- trigger: "blur",
- }, ],
- },
-
- {
- span: 20,
- label: "简介",
- prop: "profile",
- component: "AvueUeditor",
- options: {
- action: "/api/blade-resource/oss/endpoint/put-file",
- props: {
- res: "data",
- url: "link",
+ {
+ width: 120,
+ label: "负责人名称",
+ prop: "principalName",
+ display: false,
+ rules: [{
+ required: true,
+ message: "请输入负责人名称",
+ trigger: "blur",
+ },],
},
- },
- hide: true,
- minRows: 6,
+ {
+ width: 120,
+ label: "负责人手机号",
+ prop: "mobile",
+ rules: [{
+ required: true,
+ message: "请输入负责人手机号",
+ trigger: "blur",
+ },],
+ slot: true
+ },
+
+ {
+ width: 120,
+ label: "业委会届别",
+ prop: "session",
+ type: "number",
+ rules: [{
+ required: true,
+ message: "请输入业委会届别",
+ trigger: "blur",
+ },],
+ value: 1
+ },
+
+ {
+ width: 100,
+ label: "成立时间",
+ prop: "establishTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ },
+
+ {
+ span: 24,
+ label: "所在地址",
+ prop: "location",
+ },
+
+ {
+ width: 124,
+ label: "任期开始时间",
+ prop: "startTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请输入任期开始时间",
+ trigger: "blur",
+ },],
+ },
+
+ {
+ width: 124,
+ label: "任期结束时间",
+ prop: "endTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请输入任期结束时间",
+ trigger: "blur",
+ },],
+ },
+
+ {
+ width: 110,
+ label: "图片",
+ prop: "imageUrl",
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ viewDisplay: false,
+ span: 24,
+ },
+
+ {
+ span: 12,
+ label: "排序",
+ prop: "sort",
+ type: 'number',
+ rules: [{
+ required: true,
+ message: "请输入排序",
+ trigger: "blur",
+ },],
+ value: 1
+ },
+
+ {
+ width: 100,
+ span: 12,
+ label: "状态",
+ slot: true,
+ prop: "status",
+ type: 'switch',
+ activeColor: "#13ce66",
+ inactiveColor: "#ccc",
+ dicData: [{
+ label: "关闭",
+ value: 1
+ },
+ {
+ label: "正常",
+ value: 0
+ },
+ ],
+ value: 0,
+ rules: [{
+ required: true,
+ message: "请输入排序",
+ trigger: "blur",
+ },],
+ },
+
+ {
+ span: 20,
+ label: "简介",
+ prop: "profile",
+ component: "AvueUeditor",
+ options: {
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ props: {
+ res: "data",
+ url: "link",
+ },
+ },
+ hide: true,
+ minRows: 6,
+ },
+
+ // {
+ // label: "简介",
+ // prop: "profile",
+ // viewDisplay: false,
+ // type: "textarea"
+ // },
+
+ ],
},
-
- // {
- // label: "简介",
- // prop: "profile",
- // viewDisplay: false,
- // type: "textarea"
- // },
-
- ],
- },
- data: [],
- }
+ 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),
- }
- },
- ids() {
- let ids = []
- this.selectionList.forEach((ele) => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
- showStatus() {
- return (data) => {
- if (data == 0) {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList () {
return {
- text: '正常',
- type: 'success'
+ 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),
}
- } else {
- return {
- text: '关闭',
- type: 'info'
+ },
+ ids () {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+ showStatus () {
+ return (data) => {
+ if (data == 0) {
+ return {
+ text: '正常',
+ type: 'success'
+ }
+ } else {
+ return {
+ text: '关闭',
+ type: 'info'
+ }
+ }
}
- }
+ },
+
+ 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: {
- manageMember(row) {
- this.memberFlag = true
- var that = this
- this.$nextTick(() => {
- that.$refs.ownersMemberManager.init(row)
- })
- },
- rowSave(row, done, loading) {
- row.imageUrl = func.join(row.imageUrl)
- if (row.imageUrl.length > 0) {
- var urls = []
- var split = row.imageUrl.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.imageUrl = urls.join(",")
- }
- row.propertyFlag = 1
- add(row).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
+ showStringDispose (row, type) {
+ row[type] = !row[type]
+ },
+
+ manageMember (row) {
+ this.memberFlag = true
+ var that = this
+ this.$nextTick(() => {
+ that.$refs.ownersMemberManager.init(row)
})
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
- rowUpdate(row, index, done, loading) {
- if (row.imageUrl.length > 0) {
- var urls = []
- var split = row.imageUrl.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.imageUrl = 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)) {
- getDetatil(this.form.id).then((res) => {
- this.form = res.data.data
- this.form.propertyFlag = 1
- if (this.form.constructionSchemeUrls.length > 0) {
- var urls = []
- var names = this.form.constructionSchemeUrls.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- this.form.constructionSchemeUrls = urls.join(",")
- const column = this.findObject(this.option.column, "principalId")
- let arr = []
- arr.push(this.form.areaId)
- column.defaultExpandedKeys = arr
+ },
+ rowSave (row, done, loading) {
+ row.imageUrl = func.join(row.imageUrl)
+ if (row.imageUrl.length > 0) {
+ var urls = []
+ var split = row.imageUrl.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrl = urls.join(",")
}
- })
- }
- // con
- 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
-
- 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.map(item => {
- if (item.imageUrl && item.imageUrl.length > 0) {
- var urls = []
- var names = item.imageUrl.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- item.imageUrl = urls.join(",")
+ row.propertyFlag = 1
+ 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.imageUrl.length > 0) {
+ var urls = []
+ var split = row.imageUrl.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrl = 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)) {
+ getDetatil(this.form.id).then((res) => {
+ this.form = res.data.data
+ this.form.propertyFlag = 1
+ if (this.form.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var names = this.form.constructionSchemeUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.constructionSchemeUrls = urls.join(",")
+ const column = this.findObject(this.option.column, "principalId")
+ let arr = []
+ arr.push(this.form.areaId)
+ column.defaultExpandedKeys = arr
+ }
+ })
+ }
+ // con
+ 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()
+ },
- return item
- })
+ 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
- this.loading = false
- this.selectionClear()
- })
- }
+ 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.map(item => {
+ this.$set(item, 'mobileflag', false)
+ if (item.imageUrl && item.imageUrl.length > 0) {
+ var urls = []
+ var names = item.imageUrl.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrl = urls.join(",")
+ }
+
+ return item
+ })
+
+ this.loading = false
+ this.selectionClear()
+ })
+ }
},
- }
+}
</script>
<style scoped>
- .avue-upload__icon {
+.avue-upload__icon {
line-height: 6;
- }
+}
</style>
\ No newline at end of file
diff --git a/src/views/gzll/todo.vue b/src/views/gzll/todo.vue
index 0651969..7c8d446 100644
--- a/src/views/gzll/todo.vue
+++ b/src/views/gzll/todo.vue
@@ -1,215 +1,247 @@
<template>
- <basic-container>
- <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.gzll_todo_handle"
- @click.stop="handleWork(row)">处理
- </el-button>
- <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>
- </avue-crud>
- <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design>
- </basic-container>
+ <basic-container>
+ <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.gzll_todo_handle"
+ @click.stop="handleWork(row)">处理
+ </el-button>
+ <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>
+ </basic-container>
</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 {
- 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 {
+ 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,
- dialogWidth: 900,
- dialogClickModal: 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,
+ height: 'auto',
+ calcHeight: 30,
+ tip: false,
+ simplePage: true,
+ border: true,
+ index: true,
+ // selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ dialogWidth: 900,
+ dialogClickModal: 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',
+ },
+ ]
},
- {
- 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,
- },
- {
- label: '项目名称',
- prop: 'name',
- // search: true,
- },
- {
- label: '当前步骤',
- prop: 'taskName',
- },
- // {
- // label: '流程版本',
- // prop: 'processDefinitionVersion',
- // // slot: true,
- // width: 80,
- // },
- {
- width: 144,
- label: '申请时间',
- prop: 'createTime',
- },
- ]
- },
- data: []
- }
+ 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")
+ }
+ }
+ }
+ }
},
methods: {
- 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: `/gzll/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}`
- })
- },
- 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
+ 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: `/gzll/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}`
+ })
+ },
+ 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
+ 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()
+ })
}
- this.loading = true
- todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data
- this.page.total = data.total
- this.data = data.records
- this.loading = false
- this.selectionClear()
- })
- }
}
- }
+}
</script>
\ No newline at end of file
diff --git a/src/views/patrolList/patrolRecord.vue b/src/views/patrolList/patrolRecord.vue
index 5bb1ad1..b321b9a 100644
--- a/src/views/patrolList/patrolRecord.vue
+++ b/src/views/patrolList/patrolRecord.vue
@@ -1,39 +1,51 @@
<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>
- </avue-crud>
+ <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>
- <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-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-card class="trackClass" style="overflow-y: auto">
<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>
- </el-collapse>
+ <div v-for="(item, index) in 10" :key="index">
+ <el-collapse-item title="一致性 Consistency" name="1">
+ <div>{{ index }}
- <!-- <el-form :model="form" label-position="right" size="mini" class="taskinfoForm" label-width="70px">
+ <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>
+ </el-collapse>
+
+ <!-- <el-form :model="form" label-position="right" size="mini" class="taskinfoForm" label-width="70px">
<el-row>
<el-col :span="24">
<el-form-item label="巡查内容">
@@ -59,332 +71,350 @@
</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,
- },
- 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,
- column: [{
- label: "所属街道",
- prop: "streetName",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
+export default {
+ data () {
+ return {
+ isDetail: false,
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
},
- {
- 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,
- },
+ 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,
+ 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: "principal",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ },
- {
- label: "场所负责人电话",
- prop: "principalPhone",
- span: 24,
- row: true,
- searchSpan: 4,
+ {
+ 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: "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: [],
+ data: [],
- patrolTree: [],
- }
+ 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),
- }
- },
+ ...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]
+ },
- 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(() => {
+ getDetail (row) {
+ this.isDetail = true
+ },
+ searchReset () {
+ this.query = {}
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 => {
- 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: "操作成功!",
- })
+ },
+ searchChange (params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
+ },
+ 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 = {}) {
+ 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()
+ }
+ )
+ },
},
- }
+}
</script>
<style>
- .avue-upload__icon {
+.avue-upload__icon {
line-height: 6;
- }
+}
</style>
\ No newline at end of file
diff --git a/src/views/place/index.vue b/src/views/place/index.vue
index f543cbf..428e24f 100644
--- a/src/views/place/index.vue
+++ b/src/views/place/index.vue
@@ -41,6 +41,12 @@
@click="ManageTenants(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>
<baseAllInfo ref="BaseAllInfo"></baseAllInfo>
@@ -649,9 +655,27 @@
return ''
}
}
+ },
+
+ 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]
+ },
+
locationDispose (data) {
data = data.split(',')
@@ -862,6 +886,7 @@
this.data = data.records
this.data.forEach(item => {
+ this.$set(item, 'principalPhoneflag', false)
if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
var urls = []
var names = item.imageUrls.split(",").filter(item => item != '')
diff --git a/src/views/property/companyManage.vue b/src/views/property/companyManage.vue
index ae77edd..a5f339b 100644
--- a/src/views/property/companyManage.vue
+++ b/src/views/property/companyManage.vue
@@ -1,265 +1,267 @@
<!-- 物业公司管理 -->
<template>
- <basic-container>
- <div class="basic-info">
- <avue-form :option="wyOption" v-model="wyForm"></avue-form>
- </div>
- <div class="detail-container">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="基础信息" name="info1"></el-tab-pane>
- <el-tab-pane label="经营信息" name="info2"></el-tab-pane>
- <el-tab-pane label="纳税信息" name="info3"></el-tab-pane>
- <el-tab-pane label="党建信息" name="info4"></el-tab-pane>
- <el-tab-pane label="企业良好行为" name="info5"></el-tab-pane>
- <el-tab-pane label="项目良好行为" name="info6"></el-tab-pane>
- <el-tab-pane label="违法违规行为惩戒" name="info7"></el-tab-pane>
- </el-tabs>
- <div class="answer">
- <div class="topic-item" v-for="(item, index) in questionBankData" :key="index">
- <div class="topic-title">
- {{ index + 1 }} .{{ item.subjectName }}
- </div>
-
- <div class="topic-options" v-if="item.choicesType == 0">
- <el-radio-group v-model="item.chooseId">
- <el-radio :label="item1.id" v-for="(item1, index1) in item.subjectOptionList"
- :key="index1">{{ item1.optionName }}</el-radio>
- </el-radio-group>
- </div>
-
- <div class="topic-options" v-if="item.choicesType == 3">
- <div class="input-num-item" v-for="(item1, index1) in item.subjectOptionList" :key="index1">
- <div class="num-name">{{ item1.optionName }}:</div>
- <el-input-number v-model="item1.numbers" @change="handleChange" :min="0" :max="25"
- :label="item1.optionName"></el-input-number>
- </div>
- </div>
+ <basic-container>
+ <div class="basic-info">
+ <avue-form :option="wyOption" v-model="wyForm"></avue-form>
</div>
+ <div class="detail-container">
+ <el-tabs v-model="activeName" @tab-click="handleClick">
+ <el-tab-pane label="基础信息" name="info1"></el-tab-pane>
+ <el-tab-pane label="经营信息" name="info2"></el-tab-pane>
+ <el-tab-pane label="纳税信息" name="info3"></el-tab-pane>
+ <el-tab-pane label="党建信息" name="info4"></el-tab-pane>
+ <el-tab-pane label="企业良好行为" name="info5"></el-tab-pane>
+ <el-tab-pane label="项目良好行为" name="info6"></el-tab-pane>
+ <el-tab-pane label="违法违规行为惩戒" name="info7"></el-tab-pane>
+ </el-tabs>
+ <div class="answer">
+ <div class="topic-item" v-for="(item, index) in questionBankData" :key="index">
+ <div class="topic-title">
+ {{ index + 1 }} .{{ item.subjectName }}
+ </div>
- </div>
- </div>
- <div class="submit-btn">
- <el-button type="primary" @click="handleSubmit">保存</el-button>
- </div>
- </basic-container>
+ <div class="topic-options" v-if="item.choicesType == 0">
+ <el-radio-group v-model="item.chooseId">
+ <el-radio :label="item1.id" v-for="(item1, index1) in item.subjectOptionList" :key="index1">{{
+ item1.optionName }}</el-radio>
+ </el-radio-group>
+ </div>
+
+ <div class="topic-options" v-if="item.choicesType == 3">
+ <div class="input-num-item" v-for="(item1, index1) in item.subjectOptionList" :key="index1">
+ <div class="num-name">{{ item1.optionName }}:</div>
+ <el-input-number v-model="item1.numbers" @change="handleChange" :min="0" :max="25"
+ :label="item1.optionName"></el-input-number>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <div class="submit-btn">
+ <el-button type="primary" @click="handleSubmit">保存</el-button>
+ </div>
+ </basic-container>
</template>
<script>
- import {
+import {
getList
- } from "@/api/subjectChoices/subjectChoices"
- import {
+} from "@/api/subjectChoices/subjectChoices"
+import {
getDetailByDeptId
- } from "@/api/property/companyManage.js"
- import {
+} from "@/api/property/companyManage.js"
+import {
update,
- } from "@/api/property/propertyCompany"
- import {
+} from "@/api/property/propertyCompany"
+import {
save
- } from "@/api/answerRecord/answerRecord"
- export default {
- data() {
- return {
- wyOption: {
- submitBtn: false,
- emptyBtn: false,
- column: [{
- label: "物业公司名称",
- labelWidth: 120,
- type: 'input',
- prop: "name",
- span: 24,
- // offset: 2,
- }, {
- labelWidth: 120,
- label: '省份',
- prop: 'province',
- type: 'select',
- span: 8,
- dicUrl: `/api/blade-system/region/select?code=100000`,
- props: {
- label: 'name',
- value: 'code'
+} from "@/api/answerRecord/answerRecord"
+export default {
+ data () {
+ return {
+ wyOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: "物业公司名称",
+ labelWidth: 120,
+ type: 'input',
+ prop: "name",
+ span: 24,
+ // offset: 2,
+ }, {
+ labelWidth: 120,
+ label: '省份',
+ prop: 'province',
+ type: 'select',
+ span: 8,
+ dicUrl: `/api/blade-system/region/select?code=100000`,
+ props: {
+ label: 'name',
+ value: 'code'
+ },
+ cascader: ['city'],
+ }, {
+ labelWidth: 60,
+ label: '城市',
+ prop: 'city',
+ type: 'select',
+ span: 8,
+ dicUrl: `/api/blade-system/region/select?code={{key}}`,
+ props: {
+ label: 'name',
+ value: 'code'
+ },
+ cascader: ['area'],
+ }, {
+ labelWidth: 60,
+ label: '地区',
+ prop: 'area',
+ type: 'select',
+ span: 8,
+ dicUrl: `/api/blade-system/region/select?code={{key}}`,
+ props: {
+ label: 'name',
+ value: 'code'
+ }
+ }, {
+ label: "地址",
+ labelWidth: 120,
+ type: 'input',
+ prop: "address",
+ span: 24,
+ // offset: 2,
+ }, {
+ label: "社会信用代码",
+ labelWidth: 120,
+ type: 'input',
+ prop: "socialCreditCode",
+ span: 24,
+ // offset: 2,
+ }, {
+ label: "简介",
+ labelWidth: 120,
+ component: "AvueUeditor",
+ prop: "remark",
+ span: 24,
+ // offset: 2,
+ }]
},
- cascader: ['city'],
- }, {
- labelWidth: 60,
- label: '城市',
- prop: 'city',
- type: 'select',
- span: 8,
- dicUrl: `/api/blade-system/region/select?code={{key}}`,
- props: {
- label: 'name',
- value: 'code'
+ wyForm: {},
+ activeName: 'info1',
+ questionBankData: [],
+ page: {
+ pageSize: 20,
+ currentPage: 1,
},
- cascader: ['area'],
- }, {
- labelWidth: 60,
- label: '地区',
- prop: 'area',
- type: 'select',
- span: 8,
- dicUrl: `/api/blade-system/region/select?code={{key}}`,
- props: {
- label: 'name',
- value: 'code'
- }
- }, {
- label: "地址",
- labelWidth: 120,
- type: 'input',
- prop: "address",
- span: 24,
- // offset: 2,
- }, {
- label: "社会信用代码",
- labelWidth: 120,
- type: 'input',
- prop: "socialCreditCode",
- span: 24,
- // offset: 2,
- }, {
- label: "简介",
- labelWidth: 120,
- component: "AvueUeditor",
- prop: "remark",
- span: 24,
- // offset: 2,
- }]
- },
- wyForm: {},
- activeName: 'info1',
- questionBankData: [],
- page: {
- pageSize: 20,
- currentPage: 1,
- },
- }
+ }
},
watch: {},
- created() {
- this.initBasicInfo()
+ created () {
+ this.initBasicInfo()
},
methods: {
- // 获取基本信息
- initBasicInfo() {
- getDetailByDeptId().then(res => {
- this.wyForm = res.data.data
- this.questionBankOnLoad(this.page)
- })
- },
-
- // 保存基本信息
- saveBasicInfo() {
- update(this.wyForm).then(
- () => {
- this.$message({
- type: "success",
- message: "操作成功!",
+ // 获取基本信息
+ initBasicInfo () {
+ getDetailByDeptId().then(res => {
+ this.wyForm = res.data.data
+ this.questionBankOnLoad(this.page)
})
- this.initBasicInfo()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
+ },
- // 获取题目
- questionBankOnLoad(page, params = {
- subclassName: '基础信息',
- propertyId: this.wyForm.id
- }) {
- getList(
- page.currentPage,
- page.pageSize,
- params
- ).then(res => {
- const data = res.data.data
- this.page.total = data.total
- this.questionBankData = data.records
- this.questionBankData.forEach(item => {
- item.propertyId = this.wyForm.id
- })
- })
- },
-
- // 保持题目
- saveQuestionBank() {
- save(this.questionBankData).then(
- () => {
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- // this.questionBankOnLoad(this.page, param = {
- // subclassName: this.activeName,
- // propertyId: this.wyForm.id
- // })
- },
- (error) => {
- window.console.log(error)
- }
- )
- },
-
- // 点击tab切换
- handleClick(tab) {
- let param = {
- subclassName: tab.label,
- propertyId: this.wyForm.id
- }
- this.questionBankOnLoad(this.page, param)
- },
-
- // 保存按钮
- handleSubmit() {
// 保存基本信息
- this.saveBasicInfo()
- // 保持考试信息
- this.saveQuestionBank()
- },
+ saveBasicInfo () {
+ update(this.wyForm).then(
+ () => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.initBasicInfo()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ // 获取题目
+ questionBankOnLoad (page, params = {
+ subclassName: '基础信息',
+ propertyId: this.wyForm.id
+ }) {
+ getList(
+ page.currentPage,
+ page.pageSize,
+ params
+ ).then(res => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.questionBankData = data.records
+ this.questionBankData.forEach(item => {
+ item.propertyId = this.wyForm.id
+ })
+ })
+ },
+
+ // 保持题目
+ saveQuestionBank () {
+ save(this.questionBankData).then(
+ () => {
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // })
+ // this.questionBankOnLoad(this.page, param = {
+ // subclassName: this.activeName,
+ // propertyId: this.wyForm.id
+ // })
+ },
+ (error) => {
+ window.console.log(error)
+ }
+ )
+ },
+
+ // 点击tab切换
+ handleClick (tab) {
+ let param = {
+ subclassName: tab.label,
+ propertyId: this.wyForm.id
+ }
+ // 保持考试信息
+ this.saveQuestionBank()
+ this.questionBankOnLoad(this.page, param)
+ },
+
+ // 保存按钮
+ handleSubmit () {
+ // 保存基本信息
+ this.saveBasicInfo()
+ // 保持考试信息
+ this.saveQuestionBank()
+ },
}
- }
+}
</script>
<style lang="scss" scoped>
- :deep(.answer) {
+:deep(.answer) {
.topic-item {
- margin-bottom: 20px;
+ margin-bottom: 20px;
- .topic-title {
- margin-bottom: 10px;
- }
-
- .topic-options {
- display: flex;
-
- .el-radio {
- margin-bottom: 10px;
+ .topic-title {
+ margin-bottom: 10px;
}
- .input-num-item {
- display: flex;
- margin-right: 20px;
-
- .num-name {
+ .topic-options {
display: flex;
- align-items: center;
- margin-right: 6px;
- }
- }
- }
- }
- }
- .submit-btn {
+ .el-radio {
+ margin-bottom: 10px;
+ }
+
+ .input-num-item {
+ display: flex;
+ margin-right: 20px;
+
+ .num-name {
+ display: flex;
+ align-items: center;
+ margin-right: 6px;
+ }
+ }
+ }
+ }
+}
+
+.submit-btn {
display: flex;
justify-content: center;
margin-bottom: 30px;
- }
+}
</style>
\ No newline at end of file
diff --git a/src/views/property/inviteTenders.vue b/src/views/property/inviteTenders.vue
index ca88ede..53b4831 100644
--- a/src/views/property/inviteTenders.vue
+++ b/src/views/property/inviteTenders.vue
@@ -1,815 +1,818 @@
<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,
- },
- 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,
+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,
- 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: "招标封面",
- 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",
- }, ],
- },
- {
- 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",
- },
-
- {
- 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",
+ 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: "已发布",
- value: "1",
- }
- ],
- },
- {
- width: 100,
- label: "评论区",
- prop: "iscomment",
- slot: true,
- type: "switch",
- activeColor: "#13ce66",
- inactiveColor: "#ccc",
- value: '1',
- 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",
- }
- ],
- },
- {
- 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",
+ 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,
+ }],
},
- },
- 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: "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",
+ },
- {
- label: "截止时间",
- row: true,
- offset: 6,
- prop: "endTime",
- type: "datetime",
- format: "yyyy-MM-dd hh:mm:ss",
- valueFormat: "timestamp",
+ {
+ 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,
+ },
+ ],
},
- ]
- },
- 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
- }]
+ 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",
+ },
+ ]
},
- {
- 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: [],
- }
+ 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) {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList () {
return {
- text: type == 1 ? '未发布' : '关闭',
- type: 'info'
+ 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),
}
- } else if (data == 1) {
- return {
- text: type == 1 ? '已发布' : '开启',
- type: 'success'
+ },
+ 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(",")
+ 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 = '创建议题'
}
- 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],
- endTime: dateTime[1],
- ...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: "操作成功!",
- })
+ },
+
+ handleSubmit (form, done) {
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: "操作成功!",
+ 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",
})
- 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(() => {
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset () {
+ this.query = {}
this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
+ },
+ 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>
\ No newline at end of file
+}</style>
\ No newline at end of file
diff --git a/src/views/property/oiae.vue b/src/views/property/oiae.vue
index 1c1f85e..735e361 100644
--- a/src/views/property/oiae.vue
+++ b/src/views/property/oiae.vue
@@ -1,823 +1,825 @@
<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,
- },
- 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,
-
- 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",
- }],
+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,
},
-
- {
- 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,
+ 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,
- // {
- // label: "收支来源",
- // prop: "sourceName",
- // search: true,
- // searchSpan: 4,
- // span: 24,
- // rules: [{
- // required: true,
- // message: "请输入收支类型",
- // trigger: "blur",
- // }, ],
- // },
+ 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",
+ }],
+ },
- {
- hide: true,
- parent: false,
- label: "收支范围",
- prop: "articleList",
- type: 'tree',
- dicData: [],
- props: {
- label: "name",
- value: 'id'
- },
- span: 12,
- 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,
+ },
- },
- {
- 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: "sourceName",
+ // search: true,
+ // searchSpan: 4,
+ // span: 24,
+ // 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",
- }, ],
- },
+ {
+ 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: "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: "收支类型",
+ 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",
},
{
- 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",
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "streetName",
+ search: true,
+ searchSpan: 4
},
- },
- 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",
+ {
+ 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,
+ },
+ ],
},
- ]
- },
- 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
- }]
+ 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",
+ },
+ ]
},
- {
- 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: [],
- }
+ 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) {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList () {
return {
- text: type == 1 ? '未发布' : '关闭',
- type: 'info'
+ 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),
}
- } else if (data == 1) {
- return {
- text: type == 1 ? '已发布' : '开启',
- type: 'success'
+ },
+ 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(",")
+ 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 = '创建议题'
}
- 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],
- endTime: dateTime[1],
- ...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: "操作成功!",
- })
+ },
+
+ handleSubmit (form, done) {
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: "操作成功!",
+ 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",
})
- 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(() => {
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset () {
+ this.query = {}
this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
+ },
+ 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>
\ No newline at end of file
+}</style>
\ No newline at end of file
diff --git a/src/views/property/ownersCommittee.vue b/src/views/property/ownersCommittee.vue
index 911c7ff..85e3903 100644
--- a/src/views/property/ownersCommittee.vue
+++ b/src/views/property/ownersCommittee.vue
@@ -1,683 +1,685 @@
<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,
- },
- 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,
+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",
+ 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",
+ },],
},
{
- label: "已发布",
- value: "1",
- }
- ],
- },
- {
- width: 100,
- label: "评论区",
- prop: "iscomment",
- slot: true,
- type: "switch",
- activeColor: "#13ce66",
- inactiveColor: "#ccc",
- value: '1',
- 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: "开启",
- 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,
+ parent: false,
+ label: "公示范围",
+ prop: "articleList",
+ type: 'tree',
+ dicData: [],
+ props: {
+ label: "name",
+ value: 'id'
+ },
+ span: 12,
+ rules: [{
+ required: true,
+ message: "请选择公示范围",
+ trigger: "blur",
+ },],
},
- },
- hide: true,
- minRows: 6,
- span: 24,
- },
- ],
- },
- 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",
+ },],
+ },
+ {
+ width: 144,
+ label: "发布时间",
+ prop: "createTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
- districtTree: [],
- }
+ {
+ 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,
- }
+ "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) {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList () {
return {
- text: type == 1 ? '未发布' : '关闭',
- type: 'info'
+ 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),
}
- } else if (data == 1) {
- return {
- text: type == 1 ? '已发布' : '开启',
- type: 'success'
+ },
+ 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(",")
+ 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 = '创建议题'
}
- 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],
- endTime: dateTime[1],
- ...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: "操作成功!",
- })
+ },
+
+ handleSubmit (form, done) {
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: "操作成功!",
+ 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",
})
- 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(() => {
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset () {
+ this.query = {}
this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
+ },
+ 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>
\ No newline at end of file
+}</style>
\ No newline at end of file
diff --git a/src/views/property/propertyCapitalApply.vue b/src/views/property/propertyCapitalApply.vue
index af374f2..f37a247 100644
--- a/src/views/property/propertyCapitalApply.vue
+++ b/src/views/property/propertyCapitalApply.vue
@@ -23,6 +23,12 @@
<!-- <template slot="constructionSchemeUrlsType" slot-scope="{file}">
<span>{{ file }}</span>
</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>
</basic-container>
</template>
@@ -336,8 +342,26 @@
})
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]
+ },
+
handleWork (row) {
this.$router.push({
path: `/work/process/maintenanceFundApply/edit/${row.taskId}/${row.processInstanceId}/${row.id}`
@@ -505,6 +529,7 @@
this.page.total = data.total
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(",")
@@ -526,4 +551,4 @@
.avue-upload__icon {
line-height: 6;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/property/propertyCompanyDistrict.vue b/src/views/property/propertyCompanyDistrict.vue
index 022f8c1..c241be9 100644
--- a/src/views/property/propertyCompanyDistrict.vue
+++ b/src/views/property/propertyCompanyDistrict.vue
@@ -11,6 +11,11 @@
@click="handleDelete">删 除
</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>
</basic-container>
</template>
@@ -197,6 +202,7 @@
trigger: 'blur'
}
],
+ slot: true
},
{
label: "物业成员",
@@ -298,8 +304,26 @@
})
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]
+ },
+
initData () {
getPropertyCompanyList().then(res => {
const column = this.findObject(this.option.column, "propertyCompanyId")
@@ -440,7 +464,15 @@
}
this.loading = true
getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = res.data.data
+ const data = {
+ ...res.data.data,
+ records: res.data.data.records.map(item => {
+ return {
+ ...item,
+ 'principalPhoneflag': false
+ }
+ })
+ }
this.page.total = data.total
this.data = data.records
this.loading = false
diff --git a/src/views/property/todo.vue b/src/views/property/todo.vue
index 4cb4a06..19de4b8 100644
--- a/src/views/property/todo.vue
+++ b/src/views/property/todo.vue
@@ -1,215 +1,248 @@
<template>
- <basic-container>
- <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>
- </avue-crud>
- <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design>
- </basic-container>
+ <basic-container>
+ <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>
+ </basic-container>
</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 {
- 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 {
+ 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,
- dialogWidth: 900,
- dialogClickModal: 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,
+ height: 'auto',
+ calcHeight: 30,
+ tip: false,
+ simplePage: true,
+ border: true,
+ index: true,
+ // selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ dialogWidth: 900,
+ dialogClickModal: 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',
+ },
+ ]
},
- {
- 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,
- },
- {
- label: '项目名称',
- prop: 'name',
- // search: true,
- },
- {
- label: '当前步骤',
- prop: 'taskName',
- },
- // {
- // label: '流程版本',
- // prop: 'processDefinitionVersion',
- // // slot: true,
- // width: 80,
- // },
- {
- width: 144,
- label: '申请时间',
- prop: 'createTime',
- },
- ]
- },
- data: []
- }
+ 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")
+ }
+ }
+ }
+ }
},
methods: {
- 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
+ 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()
+ })
}
- this.loading = true
- todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data
- this.page.total = data.total
- this.data = data.records
- this.loading = false
- this.selectionClear()
- })
- }
}
- }
+}
</script>
\ No newline at end of file
diff --git a/src/views/publicSecurity/keynotePlaceManage.vue b/src/views/publicSecurity/keynotePlaceManage.vue
index 7825f5d..1bbac9d 100644
--- a/src/views/publicSecurity/keynotePlaceManage.vue
+++ b/src/views/publicSecurity/keynotePlaceManage.vue
@@ -10,8 +10,8 @@
<el-button type="text" :size="size" icon="el-icon-view" v-if="permission.place_view" plain
@click="lookDetail(row, 0)">查 看
</el-button>
- <el-button type="text" :size="size" icon="el-icon-s-check" v-if="permission.place_check && row.status == 1"" plain
- @click=" goAudit(row)">审 核
+ <el-button type="text" :size="size" icon="el-icon-s-check" v-if="permission.place_check && row.status == 1"
+ plain @click=" goAudit(row)">审 核
</el-button>
<el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.place_del" plain
@click="rowDel(row)">删 除
diff --git a/src/views/publicSecurity/ninePlaceManage/archivesManage.vue b/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
index a73a429..f28ded0 100644
--- a/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
+++ b/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
@@ -83,16 +83,6 @@
columnBtn: false,
dialogClickModal: false,
column: [{
- label: "地区",
- prop: "townStreetName",
- align: 'center',
- search: true,
- searchSpan: 3,
- searchLabelWidth: 46,
- labelWidth: 120,
- width: 156,
- searchPlaceholder: '请输入地区'
- }, {
label: "场所名称",
prop: "placeName",
align: 'center',
@@ -142,6 +132,16 @@
slot: true,
width: 120
}, {
+ label: "地区",
+ prop: "townStreetName",
+ align: 'center',
+ search: true,
+ searchSpan: 3,
+ searchLabelWidth: 46,
+ labelWidth: 120,
+ width: 156,
+ searchPlaceholder: '请输入地区'
+ }, {
label: "辖区派出所",
prop: "deptName",
align: 'center',
diff --git a/src/views/publicSecurity/ninePlaceManage/patrolRecord.vue b/src/views/publicSecurity/ninePlaceManage/patrolRecord.vue
index 5906e5d..71c64d2 100644
--- a/src/views/publicSecurity/ninePlaceManage/patrolRecord.vue
+++ b/src/views/publicSecurity/ninePlaceManage/patrolRecord.vue
@@ -185,100 +185,98 @@
searchShowBtn: false,
columnBtn: false,
dialogClickModal: false,
- column: [{
- label: "所属街道",
- prop: "streetName",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- align: 'center'
- },
- {
- label: "所属社区",
- prop: "communityName",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- width: 160,
- overHidden: true,
- align: 'center'
- },
- {
- label: "所属网格",
- prop: "gridName",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- align: 'center'
- },
- {
- label: "场所名称",
- prop: "placeName",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- align: 'center'
- },
- {
- label: "场所隐患",
- prop: "remark",
- span: 24,
- row: true,
- searchSpan: 4,
- align: 'center'
- },
-
- {
- label: "场所负责人",
- prop: "principal",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- align: 'center'
- },
-
- {
- label: "场所负责人电话",
- prop: "principalPhone",
- span: 24,
- row: true,
- slot: true,
- searchSpan: 4,
- align: 'center'
- },
- {
- label: "场所地址",
- prop: "location",
- span: 24,
- row: true,
- searchSpan: 4,
- searchLabelWidth: 46,
- overHidden: true,
- align: 'center'
- },
- {
- width: 110,
- label: "签名",
- prop: "signaturePath",
- type: "upload",
- listType: "picture-img",
- span: 24,
- align: 'center'
- },
- {
- label: "创建时间",
- prop: "createTime",
- span: 24,
- row: true,
- searchSpan: 4,
- searchLabelWidth: 46,
- align: 'center'
- },
+ column: [
+ {
+ label: "场所名称",
+ prop: "placeName",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ align: 'center'
+ },
+ {
+ label: "场所地址",
+ prop: "location",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ searchLabelWidth: 46,
+ overHidden: true,
+ align: 'center'
+ }, {
+ label: "所属街道",
+ prop: "streetName",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ align: 'center'
+ },
+ {
+ label: "所属社区",
+ prop: "communityName",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ width: 160,
+ overHidden: true,
+ align: 'center'
+ },
+ {
+ label: "所属网格",
+ prop: "gridName",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ align: 'center'
+ },
+ {
+ label: "场所隐患",
+ prop: "remark",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ align: 'center'
+ },
+ {
+ label: "场所负责人",
+ prop: "principal",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ align: 'center'
+ },
+ {
+ label: "场所负责人电话",
+ prop: "principalPhone",
+ span: 24,
+ row: true,
+ slot: true,
+ searchSpan: 4,
+ align: 'center'
+ },
+ {
+ width: 110,
+ label: "签名",
+ prop: "signaturePath",
+ type: "upload",
+ listType: "picture-img",
+ span: 24,
+ align: 'center'
+ },
+ {
+ label: "创建时间",
+ prop: "createTime",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ searchLabelWidth: 46,
+ align: 'center'
+ },
],
},
data: [],
diff --git a/src/views/publicSecurity/ninePlaceManage/situationRectification.vue b/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
index f400be5..da04a65 100644
--- a/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
+++ b/src/views/publicSecurity/ninePlaceManage/situationRectification.vue
@@ -215,7 +215,7 @@
searchSpan: 4,
searchLabelWidth: 76,
}, {
- label: "地址名称",
+ label: "场所地址",
prop: "addressName",
align: 'center',
search: true,
diff --git a/src/views/publicSecurity/positionManage/TransactRegist.vue b/src/views/publicSecurity/positionManage/TransactRegist.vue
index 6e5497a..1d09f72 100644
--- a/src/views/publicSecurity/positionManage/TransactRegist.vue
+++ b/src/views/publicSecurity/positionManage/TransactRegist.vue
@@ -28,6 +28,17 @@
<el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
</el-button>
</template>
+
+ <template slot-scope="{row, size}" slot="phoneNumber">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneNumberflag')"
+ v-text="textDispose(row, 'phoneNumberflag', 'phoneNumber')">
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="transactionObjectTel">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'transactionObjectTelflag')"
+ v-text="textDispose(row, 'transactionObjectTelflag', 'transactionObjectTel')">
+ </el-button>
+ </template>
</avue-crud>
@@ -66,7 +77,21 @@
update,
add,
} from "@/api/task/labelReporting"
-
+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 {
mapGetters
} from "vuex"
@@ -139,155 +164,207 @@
selection: true,
dialogClickModal: false,
column: [
-
- {
- width: 110,
- span: 12,
- label: "交易对象",
- prop: "transactionObject",
- searchSpan: 4,
- searchLabelWidth: 100,
- search: true,
- align: 'center'
- },
- {
- width: 110,
- span: 12,
- label: "交易对象电话",
- prop: "transactionObjectTel",
- searchSpan: 4,
- searchLabelWidth: 100,
- search: true,
- align: 'center'
- },
- {
- width: 110,
- span: 12,
- label: "身份证号",
- prop: "idCard",
- searchSpan: 4,
- searchLabelWidth: 100,
- search: true,
- align: 'center'
- },
- {
- width: 110,
- span: 12,
- label: "交易数量",
- prop: "goodsNums",
- align: 'center'
- },
- {
- width: 110,
- span: 12,
- label: "交易金额",
- prop: "transactionMoney",
- align: 'center'
- },
- {
- width: 110,
- span: 12,
- label: "场所名称",
- prop: "placeName",
- searchSpan: 4,
- searchLabelWidth: 100,
- search: true,
- align: 'center'
- },
- {
- width: 110,
- span: 12,
- label: "场所负责人",
- prop: "principal",
- searchSpan: 4,
- searchLabelWidth: 100,
- search: true,
- align: 'center'
- }, {
- width: 120,
- span: 12,
- label: "联系方式",
- prop: "principalPhone",
- searchSpan: 4,
- search: true,
- rules: [{
- validator: validatorPhone,
- trigger: 'blur'
- }],
- align: 'center'
- }, {
- overHidee: true,
- span: 12,
- label: "地址",
- prop: "location",
- searchSpan: 4,
- minWidth:220,
- overHidden:true,
- // search: true,
- rules: [{
- required: true,
- message: "请输入地址",
- trigger: "blur",
- },],
- align: 'center'
- }, {
- width: 110,
- label: "所属街道",
- // hide: true,
- // search: true,
- parent: false,
- searchSpan: 4,
- prop: "streetName",
- align: 'center'
- }, {
- width: 156,
- parent: false,
- searchSpan: 4,
- label: "所属社区",
- prop: "communityName",
- align: 'center'
- },
- {
- label: "阵地类型",
- prop: "frontType",
- dicUrl: "/api/blade-system/dict-biz/tree?code=frontType",
- props: {
- label: "title",
- value: "key",
+ {
+ width: 110,
+ span: 12,
+ label: "场所名称",
+ prop: "districtName",
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ search: true,
+ align: 'center',
+ labelWidth: 110,
},
- type: 'select',
- search: true,
- searchSpan:4,
- align: 'center',
- width: 120,
- },
- {
- width: 100,
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- label: '审核状态',
- prop: 'confirmFlag',
- type: 'radio',
- slot: true,
- dicData: [{
- label: '待审核',
- value: 1
+ {
+ span: 12,
+ label: "场所地址",
+ prop: "localtion",
+ searchSpan: 4,
+ minWidth: 220,
+ overHidden: true,
+ // search: true,
+ rules: [{
+ required: true,
+ message: "请输入地址",
+ trigger: "blur",
+ },],
+ align: 'center',
+ labelWidth: 110,
+ },
+ {
+ label: "阵地类型",
+ prop: "frontType",
+ dicUrl: "/api/blade-system/dict-biz/tree?code=frontType",
+ props: {
+ label: "title",
+ value: "key",
+ },
+ type: 'select',
+ search: true,
+ searchSpan: 4,
+ align: 'center',
+ width: 120,
+ labelWidth: 110,
+ },
+ {
+ width: 110,
+ span: 12,
+ label: "场所负责人",
+ prop: "owner",
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ search: true,
+ align: 'center',
+ labelWidth: 110,
}, {
- label: '已审核',
- value: 2
+ width: 120,
+ span: 12,
+ label: "联系方式",
+ prop: "phoneNumber",
+ searchSpan: 4,
+ search: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: 'blur'
+ }],
+ align: 'center',
+ slot: true,
+ labelWidth: 110,
+ },
+ {
+ width: 110,
+ span: 12,
+ label: "交易对象",
+ prop: "transactionObject",
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ search: true,
+ align: 'center',
+ labelWidth: 110,
+ },
+ {
+ width: 110,
+ span: 12,
+ label: "交易对象电话",
+ prop: "transactionObjectTel",
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ search: true,
+ align: 'center',
+ labelWidth: 110,
+ slot: true
+ },
+ {
+ width: 110,
+ span: 12,
+ label: "身份证号",
+ prop: "idCard",
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ search: true,
+ align: 'center',
+ labelWidth: 110,
+ },
+ {
+ width: 110,
+ span: 12,
+ label: "交易数量",
+ prop: "goodsNums",
+ align: 'center',
+ labelWidth: 110,
+ },
+ {
+ width: 110,
+ span: 12,
+ label: "交易金额",
+ prop: "transactionMoney",
+ align: 'center',
+ labelWidth: 110,
+ },
+ {
+ width: 110,
+ span: 12,
+ label: "交易过程",
+ prop: "transactionProcess",
+ align: 'center',
+ labelWidth: 110,
+ },
+ {
+ width: 140,
+ span: 12,
+ label: "发生时间",
+ prop: "createTime",
+ align: 'center',
+ labelWidth: 110,
+ },
+ {
+ width: 110,
+ label: "所属街道",
+ // hide: true,
+ // search: true,
+ parent: false,
+ searchSpan: 4,
+ prop: "streetName",
+ align: 'center',
+ labelWidth: 110,
}, {
- label: '未通过',
- value: 3
+ width: 156,
+ parent: false,
+ searchSpan: 4,
+ label: "所属社区",
+ prop: "communityName",
+ align: 'center',
+ labelWidth: 110,
+ },
+ {
+ width: 100,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: '审核状态',
+ prop: 'confirmFlag',
+ type: 'radio',
+ slot: true,
+ dicData: [{
+ label: '待审核',
+ value: 1
+ }, {
+ label: '已审核',
+ value: 2
+ }, {
+ label: '未通过',
+ value: 3
+ }, {
+ label: '待接收',
+ value: 4
+ }],
+ align: 'center',
+ labelWidth: 110,
}, {
- label: '待接收',
- value: 4
- }],
- align: 'center'
- }],
+ width: 110,
+ label: '物品图片',
+ prop: 'goodsImageUrls',
+ fileType: 'img',
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ disabled: true,
+ span: 12,
+ labelWidth: 110,
+ }, {
+ width: 110,
+ label: '身份证照片',
+ prop: 'imageUrls',
+ fileType: 'img',
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ disabled: true,
+ span: 12,
+ labelWidth: 110,
+ },],
},
data: [],
-
auditBasePopup: false,
}
},
@@ -350,9 +427,48 @@
return tags
}
+ },
+
+ 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]
+ },
+
+ handleExport () {
+ this.$confirm("是否导出交易登记数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ // data.isNine = 1
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-taskLabelReportingEvent/taskLabelReportingEvent/export-taskLabelReportingEvent?${this.website.tokenHeader}=${getToken()}&` + data
+ ).then(res => {
+ console.log('exportBlob', res)
+ downloadXls(res.data, `交易登记${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
// 弹窗关闭回调
handleClose () {
this.cancelAudit()
@@ -572,10 +688,10 @@
},
beforeOpen (done, type) {
- if (["edit", "view"].includes(type)) {
+ if (["edit"].includes(type)) {
getDetail(this.form.id).then((res) => {
- this.form = res.data.data
- done()
+ this.form = res.data.data
+ done()
})
} else {
done()
@@ -617,6 +733,8 @@
this.page.total = data.total
this.data = data.records
this.data.forEach(item => {
+ this.$set(item, 'phoneNumberflag', false)
+ this.$set(item, 'transactionObjectTelflag', false)
if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
var urls = []
var names = item.imageUrls.split(",").filter(item => item != '')
@@ -625,6 +743,14 @@
})
item.imageUrls = urls.join(",")
}
+ if (item.goodsImageUrls && item.goodsImageUrls != '' && item.goodsImageUrls != null && item.goodsImageUrls.length) {
+ var urls = []
+ var names = item.goodsImageUrls.split(",").filter(item => item != '')
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.goodsImageUrls = urls.join(",")
+ }
})
this.loading = false
this.selectionClear()
diff --git a/src/views/publicSecurity/positionManage/fileManage.vue b/src/views/publicSecurity/positionManage/fileManage.vue
index 6ca1e6d..9c80dc6 100644
--- a/src/views/publicSecurity/positionManage/fileManage.vue
+++ b/src/views/publicSecurity/positionManage/fileManage.vue
@@ -83,15 +83,6 @@
columnBtn: false,
dialogClickModal: false,
column: [{
- label: "地区",
- prop: "townStreetName",
- align: 'center',
- search: true,
- searchSpan: 3,
- searchLabelWidth: 46,
- labelWidth: 120,
- width: 156
- }, {
label: "场所名称",
prop: "placeName",
align: 'center',
@@ -145,6 +136,15 @@
searchSpan: 4,
searchLabelWidth: 96
}, {
+ label: "地区",
+ prop: "townStreetName",
+ align: 'center',
+ search: true,
+ searchSpan: 3,
+ searchLabelWidth: 46,
+ labelWidth: 120,
+ width: 156
+ }, {
label: "责任民警",
prop: "policeName",
align: 'center',
diff --git a/src/views/task/index.vue b/src/views/task/index.vue
index 09e97d0..69cb516 100644
--- a/src/views/task/index.vue
+++ b/src/views/task/index.vue
@@ -11,6 +11,11 @@
除
</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>
<!-- <template slot-scope="scope" slot="menu">
<el-button type="text" icon="el-icon-circle-plus-outline" size="small"
@click="taskApply(scope.row)">任务分发
@@ -111,6 +116,7 @@
searchLabelWidth: 76,
search: true,
editDisabled: true,
+ slot: true
},
{
width: 110,
@@ -195,8 +201,26 @@
})
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]
+ },
+
// 任务派发
taskApply (row) {
var that = this
@@ -358,6 +382,7 @@
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 = []
diff --git a/src/views/task/reportForRepairs.vue b/src/views/task/reportForRepairs.vue
index 2609458..3b6f7d8 100644
--- a/src/views/task/reportForRepairs.vue
+++ b/src/views/task/reportForRepairs.vue
@@ -97,6 +97,12 @@
除
</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="replyPopup" center @close="popupClose">
@@ -595,9 +601,27 @@
return tags
}
+ },
+
+ 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]
+ },
+
rowExpansion (row) {
this.$refs.crud.toggleRowExpansion(row)
},
@@ -885,6 +909,7 @@
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 = []
diff --git a/src/views/userHouse/hireInfoList.vue b/src/views/userHouse/hireInfoList.vue
index 460b5f4..0380030 100644
--- a/src/views/userHouse/hireInfoList.vue
+++ b/src/views/userHouse/hireInfoList.vue
@@ -37,11 +37,6 @@
@search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
@current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange"></avue-crud>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="roleBox = false">取 消</el-button>
- <el-button type="primary" @click="submitRole">确 定</el-button>
- </span>
</el-dialog>
<el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
@@ -125,7 +120,7 @@
total: 0
},
houseHoldOption: {
- height: 'auto',
+ height: '500',
calcHeight: 80,
tip: false,
searchShow: true,
@@ -146,12 +141,14 @@
{
label: "电话",
prop: "phoneNumber",
+ width:100,
// search: true,
searchSpan: 4,
},
{
label: "身份证号",
prop: "idCard",
+ width:160,
// search: true,
searchSpan: 4,
},
@@ -197,6 +194,8 @@
{
label: "地址",
prop: "address",
+ minWidth:160,
+ overHidden:true,
display: false
},
]
@@ -207,7 +206,6 @@
searchShow: true,
searchMenuSpan: 3,
menuWidth: 280,
-
height: 'auto',
calcHeight: 80,
tip: false,
@@ -218,11 +216,10 @@
addBtn: true,
dialogType: 'drawer',
dialogClickModal: false,
-
column: [
{
label: "房屋",
- prop: "address",
+ prop: "houseName",
display: false
},
{
@@ -237,33 +234,24 @@
searchMenuSpan: 6,
submitText: "确定",
column: [
- {
- width: 220,
- overHidden: true,
- label: '小区名称',
- prop: "districtName",
- search: true,
- searchSpan: 4,
- rules: [{
- required: true,
- message: "请输入小区名称",
- trigger: "blur",
- },],
- },
+ // {
+ // width: 220,
+ // overHidden: true,
+ // label: '小区名称',
+ // prop: "districtName",
+ // search: true,
+ // searchSpan: 4,
+ // rules: [{
+ // required: true,
+ // message: "请输入小区名称",
+ // trigger: "blur",
+ // },],
+ // },
{
label: "地址",
prop: "address",
- width: 180,
+ minWidth: 180,
display: false
- },
- {
- label: "手机",
- prop: "phone",
- rules: [{
- required: true,
- message: "请输入绑定手机",
- trigger: "blur",
- },],
},
],
},
@@ -273,9 +261,7 @@
total: 0
},
formatter: (row) => {
- console.log(row, 888)
- if (!row.districtName) return ''
- return row.districtName + '-' + row.unit + row.building + row.room
+ return row.houseName
},
onLoad: ({
page,
diff --git a/src/views/userHouse/lable/list.vue b/src/views/userHouse/lable/list.vue
index 058f1c1..a8250b2 100644
--- a/src/views/userHouse/lable/list.vue
+++ b/src/views/userHouse/lable/list.vue
@@ -46,7 +46,7 @@
lazy: true,
rowKey: 'id',
- defaultExpandAll: true,
+ // defaultExpandAll: true,
column: [{
label: '名称',
prop: 'name'
@@ -196,4 +196,4 @@
-<style></style>
\ No newline at end of file
+<style></style>
diff --git a/src/views/work/done.vue b/src/views/work/done.vue
index 20f8859..feb7db9 100644
--- a/src/views/work/done.vue
+++ b/src/views/work/done.vue
@@ -14,6 +14,11 @@
<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>
</basic-container>
@@ -113,6 +118,7 @@
label: '联系电话',
prop: 'linkPhone',
// search: true,
+ slot: true
}, {
label: '项目名称',
prop: 'name',
@@ -147,8 +153,25 @@
})
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]
+ },
+
searchReset () {
this.query = {}
this.onLoad(this.page)
@@ -191,7 +214,15 @@
}
this.loading = true
doneList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data
+ 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
diff --git a/src/views/work/todo.vue b/src/views/work/todo.vue
index 88dc91e..6181cc6 100644
--- a/src/views/work/todo.vue
+++ b/src/views/work/todo.vue
@@ -17,6 +17,11 @@
<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>
</basic-container>
@@ -120,6 +125,7 @@
label: '联系电话',
prop: 'linkPhone',
// search: true,
+ slot: true
},
{
label: '项目名称',
@@ -155,8 +161,25 @@
})
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]
+ },
+
searchReset () {
this.query = {}
this.onLoad(this.page)
@@ -204,7 +227,15 @@
}
this.loading = true
todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data
+ 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
--
Gitblit v1.9.3