From f974eaf3d62c4b5071408ecb7be4a4d7f93c30ee Mon Sep 17 00:00:00 2001
From: 13176889840 <13176889840@163.com>
Date: Thu, 25 Nov 2021 15:05:37 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E5=85=9A=E5=91=98=E9=A3=8E=E9=87=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/communityParty/elegant/index.vue | 235 +++++++++++-------
1 file changed, 152 insertions(+), 83 deletions(-)
diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue
index 07c0cf23..6dac5ac4 100644
--- a/src/views/modules/communityParty/elegant/index.vue
+++ b/src/views/modules/communityParty/elegant/index.vue
@@ -6,7 +6,7 @@
@@ -43,7 +43,6 @@
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
- :on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
@@ -130,9 +129,10 @@
>
-
+
@@ -140,16 +140,37 @@
-
+
-
+
-
+
@@ -172,10 +193,12 @@ import axios from 'axios'
export default {
data() {
return {
+ uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
importBtnTitle: '导入人员数据',
importLoading: false,
tableLoading: false,
btnLoading: false,
+ uploading: false,
disabled: false,
pageLoading: false,
dialogVisible: false,
@@ -183,9 +206,12 @@ export default {
pageSize: 20,
total: null,
tableData: [],
+ unloadPencent: 0,
addLevel: '1',
addType: 'add',
value: '',
+ optionsEditG: [],
+ optionsG: [],
options: [
{
label: '是',
@@ -220,7 +246,6 @@ export default {
customerId: '',
searchForm: {
gridId: '',
- agencyId: '',
mainDeed: '',
name: ''
},
@@ -238,8 +263,11 @@ export default {
},
async created() {
this.customerId = localStorage.getItem('customerId')
- this.getTableData()
- this.getOptions()
+ setTimeout(() => {
+ this.getTableData()
+ this.getGridList('query')
+ this.getGridList('addorupdate')
+ }, 200)
this.pageLoading = true
},
mounted() {
@@ -275,7 +303,9 @@ export default {
}
},
handleProgress(event, file, fileList) {
- console.log('percentage', file.percentage)
+ console.log('percentage', event, file.percentage)
+ this.uploading = true
+ this.unloadPencent = Number(file.percentage.toFixed(0))
},
beforeExcelUpload (file) {
console.log('file', file)
@@ -287,10 +317,10 @@ export default {
this.$message.error('上传文件只能是xls/xlsx格式!')
}
- // if (!isLt1M) {
- // this.$message.error('上传图片大小不能超过 10MB!')
- // }
- return fileType
+ if (!isLt1M) {
+ this.$message.error('上传文件大小不能超过 10MB!')
+ }
+ return fileType && isLt1M
},
uploadHttpRequest(file) {
this.importLoading = true
@@ -326,39 +356,64 @@ export default {
})
},
handleExport() {
- let params = {
- formCode: 'resi_base_info',
- conditions: this.conditions
- }
-
+ let params = {}
+ // window.location.href = window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/export'
// .post('epmetuser/icresiuser/exportExcel', params)
- axios({
- url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/export',
- // url: 'epmetuser/icresiuser/exportExcel',
- method: 'post',
- data: params,
- responseType: 'blob'
- })
+ // axios({
+ // url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/export',
+ // // url: 'epmetuser/icresiuser/exportExcel',
+ // method: 'post',
+ // data: params,
+ // responseType: 'blob'
+ // })
+ this.$http.post('/resi/partymember/icpartymemberstyle/export')
.then(res => {
console.log('resllll', res)
- let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
- console.log('filename', fileName)
- let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
- var url = window.URL.createObjectURL(blob)
- var aLink = document.createElement('a')
- aLink.style.display = 'none'
- aLink.href = url
- aLink.setAttribute('download', fileName)
- document.body.appendChild(aLink)
- aLink.click()
- document.body.removeChild(aLink) //下载完成移除元素
- window.URL.revokeObjectURL(url) //释放掉blob对象
+ // let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
+ // console.log('filename', fileName)
+ // let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
+ // var url = window.URL.createObjectURL(blob)
+ // var aLink = document.createElement('a')
+ // aLink.style.display = 'none'
+ // aLink.href = url
+ // aLink.setAttribute('download', fileName)
+ // document.body.appendChild(aLink)
+ // aLink.click()
+ // document.body.removeChild(aLink) //下载完成移除元素
+ // window.URL.revokeObjectURL(url) //释放掉blob对象
})
.catch((err) => {
console.log('获取导出情失败', err)
return this.$message.error('网络错误')
})
},
+ beforeImgUpload (file) {
+ const isPNG = (file.type === 'image/png') || (file.type === 'image/jpeg')
+ const isLt1M = file.size / 1024 / 1024 < 10
+
+ if (!isPNG) {
+ this.$message.error('上传图片只能是 PNG 或 JPEG 格式!')
+ }
+ if (!isLt1M) {
+ this.$message.error('上传图片大小不能超过 10MB!')
+ }
+ return isPNG && isLt1M
+ },
+ handleImgSuccess (res, file) {
+ if (res.code === 0 && res.msg === 'success') {
+
+ console.log('res.data.url', res.data.url)
+ this.uploading = false
+ this.unloadPencent = 0
+ this.form.imageList.push(res.data.url)
+
+ } else {
+ this.$message.error(res.msg)
+ }
+ },
+ handleDelimg(item, index) {
+ this.form.imageList.splice(index, 1)
+ },
handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1
@@ -372,34 +427,27 @@ export default {
},
handlerCancle() {
+ for(const n in this.form) {
+ this.form[n] = ''
+ if (n === 'imageList') this.form[n] = []
+ }
+ this.disabled = false
this.dialogVisible = false
},
async handleLook(row) {
- const params = {
- categoryId: row.categoryId,
- usableFlag: !row.usableFlag
- }
- this.$http
- .post('/heart/icresidemanddict/updatestatus', params)
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg)
- } else {
- this.getTableData()
- }
- })
- .catch(() => {
- return this.$message.error('网络错误')
- })
+ this.disabled = true
+ await this.getDetail(row.id)
},
async handleEdit(row, addType) {
-
- this.form = { ...row }
- this.dialogVisible = true
+ // this.form = { ...row }
+ await this.getDetail(row.id)
+ // this.dialogVisible = true
},
async addNew() {
+ const { user } = await this.$store.state
const _form = {
- ...this.form
+ ...this.form,
+ agencyId: user.agencyId
}
await this.$http
.post('/resi/partymember/icpartymemberstyle/save', _form)
@@ -407,11 +455,13 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
- this.dialogVisible = false
+ this.$message.success('操作成功')
+ this.handlerCancle()
this.getTableData()
}
})
- .catch(() => {
+ .catch(err => {
+ console.log('err', err)
return this.$message.error('网络错误')
})
this.btnLoading = false
@@ -450,20 +500,18 @@ export default {
return this.$message.error('网络错误')
})
},
- sortData() {
- const _data = this.tableData.map((item, index)=> {
- return {
- id: item.id,
- sort: index
- }
- })
+ async getDetail(id) {
+ let params = {
+ id,
+ }
this.$http
- .post('/oper/customize/resicategorystatsconfig/updatesort', _data)
+ .post('/resi/partymember/icpartymemberstyle/detail', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
- // this.getTableData()
+ this.form = { ...res.data }
+ this.dialogVisible = true
}
})
.catch((err) => {
@@ -471,17 +519,20 @@ export default {
return this.$message.error('网络错误')
})
},
- async getOptions() {
- const params = {
- parentCategoryCode: 0
- }
- this.$http
- .post('/heart/icresidemanddict/subcodelist', params)
+ async getGridList(type, agencyId) {
+ const { user } = await this.$store.state
+ console.log('user---ppp', user)
+ // addorupdate query
+ await this.$http
+ .post('/gov/org/customergrid/gridoption', { agencyId: agencyId || user.agencyId, purpose: type })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
- this.demandOptions = res.data
+ console.log('获取查询详情成功', res.data)
+
+ if (type === 'query') this.optionsG = res.data
+ else this.optionsEditG = res.data
}
})
.catch(() => {
@@ -490,9 +541,10 @@ export default {
},
async getTableData() {
this.tableLoading = true
+ const { user } = await this.$store.state
let params = {
- // formCode: 'resi_base_info',
...this.searchForm,
+ agencyId: user.agencyId,
pageNo: this.currentPage,
pageSize: this.pageSize
}
@@ -544,6 +596,23 @@ export default {
.input-width-textarea {
width: 400px;
}
+ .imsg-list {
+ display: flex;
+ align-items: center;
+ .imgs-item {
+ position: relative;
+ margin-right: 10px;
+ .el-icon-delete {
+ position: absolute;
+ top: 0;
+ right: 0;
+ font-size: 18px;
+ color: red;
+ z-index: 3;
+ cursor: pointer;
+ }
+ }
+ }
}
@@ -587,8 +656,8 @@ export default {
border-color: #409EFF;
}
.avatar {
- width: 70px;
- height: 70px;
+ width: 100px;
+ height: 100px;
display: block;
}
.avatar-uploader-icon {
@@ -596,9 +665,9 @@ export default {
border-radius: 6px;
font-size: 28px;
color: #8c939d;
- width: 70px;
- height: 70px;
- line-height: 70px;
+ width: 100px;
+ height: 100px;
+ line-height: 100px;
text-align: center;
}
}
From e605e1b43128cb7c130065767992b09c4c69fa0a Mon Sep 17 00:00:00 2001
From: 13176889840 <13176889840@163.com>
Date: Thu, 25 Nov 2021 15:56:50 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E5=85=9A=E5=91=98=E9=A3=8E=E9=87=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/communityParty/elegant/index.vue | 46 ++++++++++---------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue
index 6dac5ac4..18fb80d3 100644
--- a/src/views/modules/communityParty/elegant/index.vue
+++ b/src/views/modules/communityParty/elegant/index.vue
@@ -356,31 +356,33 @@ export default {
})
},
handleExport() {
- let params = {}
- // window.location.href = window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/export'
+ let params = {
+ agencyId: this.$store.state.user.agencyId,
+ pageSize: 9999,
+ pageNo: this.currentPage
+ }
// .post('epmetuser/icresiuser/exportExcel', params)
- // axios({
- // url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/export',
- // // url: 'epmetuser/icresiuser/exportExcel',
- // method: 'post',
- // data: params,
- // responseType: 'blob'
- // })
- this.$http.post('/resi/partymember/icpartymemberstyle/export')
+ axios({
+ url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/export',
+ // url: 'epmetuser/icresiuser/exportExcel',
+ method: 'post',
+ data: params,
+ responseType: 'blob'
+ })
.then(res => {
console.log('resllll', res)
- // let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
- // console.log('filename', fileName)
- // let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
- // var url = window.URL.createObjectURL(blob)
- // var aLink = document.createElement('a')
- // aLink.style.display = 'none'
- // aLink.href = url
- // aLink.setAttribute('download', fileName)
- // document.body.appendChild(aLink)
- // aLink.click()
- // document.body.removeChild(aLink) //下载完成移除元素
- // window.URL.revokeObjectURL(url) //释放掉blob对象
+ let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
+ console.log('filename', fileName)
+ let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
+ var url = window.URL.createObjectURL(blob)
+ var aLink = document.createElement('a')
+ aLink.style.display = 'none'
+ aLink.href = url
+ aLink.setAttribute('download', fileName)
+ document.body.appendChild(aLink)
+ aLink.click()
+ document.body.removeChild(aLink) //下载完成移除元素
+ window.URL.revokeObjectURL(url) //释放掉blob对象
})
.catch((err) => {
console.log('获取导出情失败', err)
From 0cbd091a337ccefd2e53fa0d9fef37583d49877e Mon Sep 17 00:00:00 2001
From: jiangyy
Date: Thu, 25 Nov 2021 17:12:26 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E4=B9=9D=E5=B0=8F=E5=9C=BA=E6=89=80?=
=?UTF-8?q?=E8=81=94=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../regionalParty/activitys.vue | 77 +++----
.../regionalParty/activitysForm.vue | 27 +--
.../communityParty/regionalParty/units.vue | 99 +++------
.../regionalParty/unitsForm.vue | 57 ++----
.../ninePlaces/inspect/inspect.vue | 48 +++--
.../ninePlaces/inspect/inspectForm.vue | 52 ++---
.../ninePlaces/inspect/inspectReview.vue | 190 +++++++++---------
.../ninePlaces/places/places.vue | 4 -
.../communityService/ninePlaces/team/team.vue | 4 -
9 files changed, 265 insertions(+), 293 deletions(-)
diff --git a/src/views/modules/communityParty/regionalParty/activitys.vue b/src/views/modules/communityParty/regionalParty/activitys.vue
index 19b4fed3..2842a246 100644
--- a/src/views/modules/communityParty/regionalParty/activitys.vue
+++ b/src/views/modules/communityParty/regionalParty/activitys.vue
@@ -14,22 +14,26 @@
placeholder="全部"
clearable>
+ :key="item.value"
+ :label="item.label"
+ :value="item.value">
-
-
-
+
+
+
+
+
+
@@ -39,34 +43,28 @@
prop="title">
-
-
-
-
-
-
+
+
+
+
查询
重置
@@ -288,8 +286,8 @@ export default {
},
async loadUnit () {
- // const url = "/heart/icpartyunit/option"
- const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
+ const url = "/heart/icpartyunit/option"
+ // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
let params = {
agencyId: this.agencyId
@@ -308,8 +306,8 @@ export default {
//获取服务事项下拉框
async loadService () {
- // const url = "/heart/icresidemanddict/subcodelist"
- const url = "http://yapi.elinkservice.cn/mock/245/heart/icresidemanddict/subcodelist"
+ const url = "/heart/icresidemanddict/subcodelist"
+ // const url = "http://yapi.elinkservice.cn/mock/245/heart/icresidemanddict/subcodelist"
let params = {
parentCategoryCode: '1010'
@@ -329,8 +327,8 @@ export default {
async loadTable () {
this.tableLoading = true
- // const url = "/heart/icpartyactivity/list"
- const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
+ const url = "/heart/icpartyactivity/search"
+ // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
let params = {
agencyId: this.agencyId,
pageSize: this.pageSize,
@@ -397,7 +395,7 @@ export default {
type: "warning"
})
.then(() => {
- this.deleteUnit(row)
+ this.deleteActivity(row)
})
.catch(err => {
if (err == "cancel") {
@@ -407,9 +405,9 @@ export default {
});
},
- async deleteUnit (row) {
- // const url = "/heart/icpartyactivity/delete"
- const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/delete"
+ async deleteActivity (row) {
+ const url = "/heart/icpartyactivity/delete"
+ // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/delete"
let params = {
id: row.id
@@ -626,6 +624,9 @@ export default {
.item_width_1 {
width: 260px;
}
+.item_width_2 {
+ width: 520px;
+}
.div_table {
background: #ffffff;
diff --git a/src/views/modules/communityParty/regionalParty/activitysForm.vue b/src/views/modules/communityParty/regionalParty/activitysForm.vue
index a120e282..a85b8f7c 100644
--- a/src/views/modules/communityParty/regionalParty/activitysForm.vue
+++ b/src/views/modules/communityParty/regionalParty/activitysForm.vue
@@ -34,9 +34,9 @@
placeholder="请选择"
clearable>
+ :key="item.value"
+ :label="item.label"
+ :value="item.value">
@@ -96,7 +96,7 @@
prop="activityTime"
label-width="150px">
@@ -230,24 +230,26 @@ export default {
methods: {
async initForm (type, activityId) {
+ this.startLoading()
this.$refs.ref_form.resetFields();
- // debugger
- // map.setCenter(new TMap.LatLng(agencyObj.latitude, agencyObj.longitude))
-
this.formType = type
if (activityId) {
this.activityId = activityId
this.formData.id = activityId
await this.loadFormData()
+ } else {
+ map.setCenter(new TMap.LatLng(36.0722275, 120.38945519))
+ this.setMarker(36.0722275, 120.38945519)
}
+ this.endLoading()
},
//加载组织
async loadFormData () {
- // const url = '/heart/icpartyactivity/detail'
- const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/detail'
+ const url = '/heart/icpartyactivity/detail'
+ // const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/detail'
let params = {
id: this.activityId
}
@@ -256,7 +258,8 @@ export default {
if (code === 0) {
this.formData = data
-
+ map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
+ this.setMarker(this.formData.latitude, this.formData.longitude)
} else {
this.$message.error(msg)
}
@@ -279,8 +282,8 @@ export default {
},
async addActivity () {
- // let url = '/heart/icpartyactivity/save'
- let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/save"
+ let url = '/heart/icpartyactivity/save'
+ // let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/save"
const { data, code, msg } = await requestPost(url, this.formData)
diff --git a/src/views/modules/communityParty/regionalParty/units.vue b/src/views/modules/communityParty/regionalParty/units.vue
index 792c2244..ce93f05a 100644
--- a/src/views/modules/communityParty/regionalParty/units.vue
+++ b/src/views/modules/communityParty/regionalParty/units.vue
@@ -6,25 +6,11 @@
ref="ref_searchform"
:label-width="'100px'">
-
-
-
-
-
-
@@ -32,7 +18,7 @@
-
@@ -64,7 +50,6 @@
prop="contact">
@@ -75,7 +60,6 @@
prop="contactMobile">
@@ -84,11 +68,9 @@
查询
重置
@@ -133,12 +115,7 @@
align="center"
type="index"
width="50">
-
-
+
+ width="80">
-
+ min-width="180">
+
+
+ {{item}}
+
+
+ width="100">
+ width="100">
{
- item.serviceMatterShow = ''
- if (item.serviceMatterList.length > 0) {
- item.serviceMatterShow = item.serviceMatterList.jone('')
+ // this.tableData.forEach(item => {
+ // item.serviceMatterShow = ''
+ // if (item.serviceMatterList.length > 0) {
+ // item.serviceMatterShow = item.serviceMatterList.join('')
- }
+ // }
- });
+ // });
} else {
this.$message.error(msg)
}
@@ -477,8 +440,8 @@ export default {
},
async deleteUnit (row) {
- // const url = "/heart/icpartyunit/delete"
- const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/delete"
+ const url = "/heart/icpartyunit/delete"
+ // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/delete"
let params = {
id: row.id
@@ -501,7 +464,6 @@ export default {
//重置搜索条件
resetSearch () {
this.formData = {
- gridId: '',
unitName: '',
serviceMatter: '',
type: '',
@@ -676,6 +638,9 @@ export default {
.item_width_1 {
width: 260px;
}
+.item_width_2 {
+ width: 620px;
+}
.div_table {
background: #ffffff;
diff --git a/src/views/modules/communityParty/regionalParty/unitsForm.vue b/src/views/modules/communityParty/regionalParty/unitsForm.vue
index 0f9371a1..bfc2c23c 100644
--- a/src/views/modules/communityParty/regionalParty/unitsForm.vue
+++ b/src/views/modules/communityParty/regionalParty/unitsForm.vue
@@ -9,22 +9,6 @@
:disabled="formType === 'detail'"
class="form">
-
-
-
-
-
-
-
+ :min="0"
+ label="在职党员">
@@ -81,11 +80,9 @@
查询
重置
@@ -118,13 +115,13 @@
header-align="center"
align="center"
label="场所类型"
- min-width="180">
+ width="180">
+ width="180">
+ width="110">
+ width="110">
+ width="80">
0) {
+ this.tableData.forEach(item => {
+ if (item.firstTime) {
+ let firstTimeArray = item.firstTime.split(' ')
+ item.firstTime = firstTimeArray[0]
+ }
+
+ if (item.reviewTime) {
+ let reviewTimeArray = item.reviewTime.split(' ')
+ item.reviewTime = reviewTimeArray[0]
+ }
+
+ if (item.finalTime) {
+ let finalTimeArray = item.finalTime.split(' ')
+ item.finalTime = finalTimeArray[0]
+ }
+
+ if (item.firstResult) {
+ item.firstResult = item.firstResult === '0' ? '合格' : '不合格'
+ }
+ if (item.finalResult) {
+ item.finalResult = item.finalResult === '0' ? '合格' : '不合格'
+ }
+ });
+
+ }
+
} else {
this.$message.error(msg)
}
@@ -431,8 +455,8 @@ export default {
},
async deleteRecord (row) {
- // const url = "/gov/org/placepatrolrecord/del"
- const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/del"
+ const url = "/gov/org/placepatrolrecord/del"
+ // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/del"
let params = {
placePatrolRecordId: row.placePatrolRecordId
diff --git a/src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue b/src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue
index 1c09cbc1..83836816 100644
--- a/src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue
+++ b/src/views/modules/communityService/ninePlaces/inspect/inspectForm.vue
@@ -80,8 +80,8 @@
style="display:flex;flex-wrap:wrap"
v-model="formData.inspectorArray">
{{item.name}}
+ :key="item.id"
+ :label="item.id">{{item.name}}
@@ -91,7 +91,7 @@
prop="firstTime"
label-width="150px">
@@ -131,7 +131,7 @@
prop="reviewTime"
label-width="150px">
@@ -189,25 +189,26 @@ export default {
methods: {
- async initForm (type, placeOrgId) {
+ async initForm (type, placePatrolRecordId) {
this.$refs.ref_form.resetFields();
-
+ this.startLoading()
await this.loadPlaces()
await this.loadTeams()
this.formType = type
- if (placeOrgId) {
- this.placeOrgId = placeOrgId
- this.formData.placeOrgId = placeOrgId
+ if (placePatrolRecordId) {
+ this.placePatrolRecordId = placePatrolRecordId
+ this.formData.placePatrolRecordId = placePatrolRecordId
await this.loadFormData()
+ await this.loadInspectors()
}
-
+ this.endLoading()
},
//加载场所
async loadPlaces () {
- // const url = '/gov/org/placeorg/getlist'
- const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist'
+ const url = '/gov/org/placeorg/getlist'
+
let params = {
isPage: false
}
@@ -224,8 +225,8 @@ export default {
//加载分队
async loadTeams () {
- // const url = '/gov/org/placepatrolteam/getlist'
- const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/getlist'
+ const url = '/gov/org/placepatrolteam/getlist'
+ // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/getlist'
let params = {
isPage: false
}
@@ -247,14 +248,16 @@ export default {
//点击分队切换人员
async hancleChangeTeam (index) {
+ let array = []
+ this.formData.inspectorArray = [...array]
// this.formData.placePatrolTeamId = this.teamsList[index].teamId
await this.loadInspectors()
},
//加载分队下人员
async loadInspectors () {
- // const url = '/gov/org/placepatrolteamstaff/getlist'
- const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist'
+ const url = '/gov/org/placepatrolteamstaff/getlist'
+ // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist'
let params = {
teamId: this.formData.placePatrolTeamId
}
@@ -270,16 +273,19 @@ export default {
},
//加载form
async loadFormData () {
- // const url = '/gov/org/placeorg/detail'
- const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/detail'
+ const url = '/gov/org/placepatrolrecord/detail'
+
let params = {
- placeOrgId: this.placeOrgId
+ placePatrolRecordId: this.placePatrolRecordId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
- this.formData = data
+ data.inspectorArray = data.inspectors.split(',')
+ this.formData = { ...data }
+
+
} else {
this.$message.error(msg)
@@ -306,8 +312,8 @@ export default {
},
async addRecord () {
- // let url = "/gov/org/placepatrolrecord/add"
- let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add"
+ let url = "/gov/org/placepatrolrecord/add"
+ // let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add"
this.formData.inspectors = this.formData.inspectorArray.join(',')
const { data, code, msg } = await requestPost(url, this.formData)
@@ -374,7 +380,7 @@ export default {
ninePlaceVal: [
{ required: true, message: '场所类型不能为空', trigger: 'blur' },
],
- placeOrgName: [
+ placeOrgId: [
{ required: true, message: '场所名称不能为空', trigger: 'blur' }
],
placePatrolTeamId: [
diff --git a/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue b/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue
index 7af12868..12a350ac 100644
--- a/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue
+++ b/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue
@@ -25,9 +25,9 @@
label="复查时间"
width="250">
-
+
@@ -43,13 +43,13 @@
width="280">
-
+
@@ -67,23 +67,12 @@
min-width="380">
-
-
+
+ v-model="scope.row.inspectorArray">
{{item.name}}
+ :key="item.id"
+ :label="item.id">{{item.name}}
@@ -96,7 +85,7 @@
label="复查结论"
width="120">
-
+
- 保存
+ 修改
@@ -134,11 +129,10 @@
-
+
@@ -154,41 +148,7 @@ export default {
tableLoading: false,
placePatrolRecordId: '',
tableData: [],
- inspectorArray: [],
-
- inspectorsList1: [
- {
- name: '张三'
- },
- {
- name: '李四'
- },
- {
- name: '王二麻'
- },
- ],
- inspectorsList2: [
- {
- name: '张三2'
- },
- {
- name: '李四2'
- },
- {
- name: '王二麻2'
- },
- ],
- inspectorsList3: [
- {
- name: '张三3'
- },
- {
- name: '李四3'
- },
- {
- name: '王二麻3'
- },
- ]
+
}
},
@@ -210,8 +170,8 @@ export default {
//加载分队
async loadTeams () {
- // const url = '/gov/org/placepatrolteam/getlist'
- const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/getlist'
+ const url = '/gov/org/placepatrolteam/getlist'
+ // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/getlist'
let params = {
isPage: false
}
@@ -228,29 +188,28 @@ export default {
},
//点击分队切换人员
- async hancleChangeTeam (index) {
- // this.formData.placePatrolTeamId = this.teamsList[index].teamId
- await this.loadInspectors()
+ async hancleChangeTeam (row, index, tableIndex) {
+ this.tableData[tableIndex].inspectorArray = [...[]]
+ await this.loadInspectors(index, tableIndex)
},
//加载分队下人员
- async loadInspectors (index) {
+ async loadInspectors (index, tableIndex) {
-
- // const url = '/gov/org/placepatrolteamstaff/getlist'
- const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist'
+ const url = '/gov/org/placepatrolteamstaff/getlist'
+ // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist'
let params = {
- teamId: this.tableData[index].placePatrolTeamId
+ teamId: this.teamsList[index].teamId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
- let obj = this.tableData[index]
- obj.isSet = true
-
- obj.inspectorsList = this.inspectorsList1
- this.$set(this.tableData, index, obj)
+ // let obj = this.tableData[tableIndex]
+ this.tableData[tableIndex].inspectorsList = [...data]
+ // this.tableData[tableIndex]=
+ // obj.inspectorsList = data
+ // this.$set(this.tableData, tableIndex, obj)
console.log(this.tableData)
} else {
this.$message.error(msg)
@@ -259,8 +218,8 @@ export default {
//加载form
async loadTable () {
this.tableLoading = true
- // const url = /gov/org/placepatrolreviewrecord/getlist'
- const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolreviewrecord/getlist'
+ const url = '/gov/org/placepatrolreviewrecord/getlist'
+ // const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolreviewrecord/getlist'
let params = {
placePatrolRecordId: this.placePatrolRecordId
}
@@ -268,12 +227,22 @@ export default {
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (code === 0) {
- this.tableData = data.list
- this.tableData.forEach(item => {
- item.isSet = false
- let array = item.inspectors.split(',')
- this.inspectorArray.push(array)
- });
+
+ if (data.list && data.list.length > 0) {
+ data.list.forEach(item => {
+ item.isEdit = false
+ let array = item.inspectors.split(',')
+ item.inspectorArray = [...array]
+
+ });
+ let array = item.reviewTime.split(' ')
+ item.reviewTime = array[0]
+
+ this.tableData = { ...data.list }
+ } else {
+ this.tableData = []
+ }
+
} else {
this.$message.error(msg)
@@ -282,11 +251,14 @@ export default {
handleAdd () {
let obj = {
- isSet: true,
+ isNew: true,//是否新增
+ isEdit: true,//是否编辑
+ placePatrolRecordId: this.placePatrolRecordId,
reviewTime: '',
placePatrolTeamId: '',
inspectors: '',
inspectorArray: [],
+ inspectorsList: [],
reviewResult: '',
}
this.tableData.push(obj)
@@ -294,24 +266,31 @@ export default {
handleEdit (row, index) {
-
-
this.loadInspectors(index)
},
- async handleComfirm () {
+ async handleComfirm (row, tableIndex) {
+ let valiMsg = this.validata(row)
+ if (valiMsg) {
+ this.$message({
+ type: 'warning',
+ message: valiMsg
+ })
+ return false
+ }
- this.addReview()
+ this.addReview(row, tableIndex)
},
- async addReview () {
+ async addReview (row, tableIndex) {
+
+ let url = "/gov/org/placepatrolreviewrecord/add"
- // let url = "/gov/org/placepatrolrecord/add"
- let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add"
- this.formData.inspectors = this.formData.inspectorArray.join(',')
+ let params = JSON.parse(JSON.stringify(row))
+ params.inspectors = params.inspectorArray.join(',')
- const { data, code, msg } = await requestPost(url, this.formData)
+ const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
@@ -319,7 +298,9 @@ export default {
message: '操作成功'
})
- this.$emit('dialogOk')
+ params.isEdit = false
+ params.isNew = false
+ this.$set(this.tableData, tableIndex, params)
} else {
@@ -328,6 +309,23 @@ export default {
},
+ validata (row) {
+ let message = ''
+ if (row.reviewTime === '') {
+ message = message + '复查时间不能为空;'
+ }
+ if (row.placePatrolTeamId === '') {
+ message = message + '分队名称不能为空;'
+ }
+ if (row.inspectorArray.length === 0) {
+ message = message + '检查人员不能为空;'
+ }
+ if (row.reviewResult === '') {
+ message = message + '复查结论不能为空;'
+ }
+ return message
+ },
+
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
@@ -347,8 +345,8 @@ export default {
},
async deleteRecord (row) {
- // const url = "/gov/org/placepatrolrecord/delreview"
- const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/delreview"
+ const url = "/gov/org/placepatrolrecord/delreview"
+ // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/delreview"
let params = {
placePatrolReviewRecordId: row.placePatrolReviewRecordId
diff --git a/src/views/modules/communityService/ninePlaces/places/places.vue b/src/views/modules/communityService/ninePlaces/places/places.vue
index 46a14735..a9527929 100644
--- a/src/views/modules/communityService/ninePlaces/places/places.vue
+++ b/src/views/modules/communityService/ninePlaces/places/places.vue
@@ -11,7 +11,6 @@
prop="placeOrgName">
@@ -22,7 +21,6 @@
prop="mobile">
@@ -77,11 +75,9 @@
查询
重置
diff --git a/src/views/modules/communityService/ninePlaces/team/team.vue b/src/views/modules/communityService/ninePlaces/team/team.vue
index fa406e2b..8f73d6e5 100644
--- a/src/views/modules/communityService/ninePlaces/team/team.vue
+++ b/src/views/modules/communityService/ninePlaces/team/team.vue
@@ -11,7 +11,6 @@
prop="personInCharge">
@@ -22,7 +21,6 @@
prop="mobile">
@@ -62,11 +60,9 @@
查询
重置
From c8332afe4ca3adbdcc6c41e2159cc0237fa198d4 Mon Sep 17 00:00:00 2001
From: jiangyy
Date: Fri, 26 Nov 2021 09:37:36 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E8=81=94=E5=BB=BA=E6=B4=BB=E5=8A=A8?=
=?UTF-8?q?=E8=81=94=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../regionalParty/activitys.vue | 7 ++--
.../regionalParty/activitysForm.vue | 22 +++++++----
.../regionalParty/unitsForm.vue | 18 ++++-----
.../ninePlaces/inspect/inspectReview.vue | 37 ++++++++++++-------
4 files changed, 51 insertions(+), 33 deletions(-)
diff --git a/src/views/modules/communityParty/regionalParty/activitys.vue b/src/views/modules/communityParty/regionalParty/activitys.vue
index 2842a246..e31257f5 100644
--- a/src/views/modules/communityParty/regionalParty/activitys.vue
+++ b/src/views/modules/communityParty/regionalParty/activitys.vue
@@ -53,6 +53,7 @@
prop="startTime">
+ v-html="formData.content">
@@ -97,8 +97,8 @@
label-width="150px">
+ type="datetime"
+ placeholder="选择时间">
@@ -167,7 +167,7 @@
+ v-html="formData.result">
@@ -211,7 +211,7 @@ export default {
unitId: '',//单位ID
title: '',//活动标题
target: '',//活动目标
- contact: '',//活动内容
+ content: '',//活动内容
activityTime: '',//活动时间
peopleCount: 0,//服务人数
result: '', //活动结果
@@ -291,7 +291,7 @@ export default {
if (code === 0) {
this.$message({
type: 'success',
- message: '新增联建单位成功'
+ message: '操作成功'
})
this.resetData()
this.$emit('dialogOk')
@@ -428,7 +428,7 @@ export default {
unitId: '',//单位ID
title: '',//活动标题
target: '',//活动目标
- contact: '',//活动内容
+ content: '',//活动内容
activityTime: '',//活动时间
peopleCount: 0,//服务人数
result: '', //活动结果
@@ -502,7 +502,7 @@ export default {
}
}
-