diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue
index 07c0cf23..344782e3 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,38 @@
-
+
-
+
-
+
@@ -172,10 +194,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 +207,12 @@ export default {
pageSize: 20,
total: null,
tableData: [],
+ unloadPencent: 0,
addLevel: '1',
addType: 'add',
value: '',
+ optionsEditG: [],
+ optionsG: [],
options: [
{
label: '是',
@@ -220,7 +247,6 @@ export default {
customerId: '',
searchForm: {
gridId: '',
- agencyId: '',
mainDeed: '',
name: ''
},
@@ -238,8 +264,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 +304,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 +318,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
@@ -327,10 +358,10 @@ export default {
},
handleExport() {
let params = {
- formCode: 'resi_base_info',
- conditions: this.conditions
+ 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',
@@ -359,6 +390,33 @@ export default {
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 +430,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 +458,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 +503,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 +522,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 +544,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 +599,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 +659,8 @@ export default {
border-color: #409EFF;
}
.avatar {
- width: 70px;
- height: 70px;
+ width: 100px;
+ height: 100px;
display: block;
}
.avatar-uploader-icon {
@@ -596,9 +668,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;
}
}
diff --git a/src/views/modules/communityParty/regionalParty/activitys.vue b/src/views/modules/communityParty/regionalParty/activitys.vue
index 19b4fed3..e31257f5 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,29 @@
prop="title">
-
-
-
-
-
-
+
+
+
+
查询
重置
@@ -185,7 +184,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
- width="850px"
+ width="950px"
top="5vh"
@closed="diaClose">
{
- this.deleteUnit(row)
+ this.deleteActivity(row)
})
.catch(err => {
if (err == "cancel") {
@@ -407,9 +406,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
@@ -550,8 +549,8 @@ export default {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-')
const endTimeArray = util.dateFormatter(time[1], 'date').split('-')
- this.formData.startTime = startTimeArray[0] + startTimeArray[1] + startTimeArray[2]
- this.formData.endTime = endTimeArray[0] + endTimeArray[1] + endTimeArray[2]
+ this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00'
+ this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59'
// this.startTimeShow = startTimeArray[0] + '年' + startTimeArray[1] + '月' + startTimeArray[2] + '日'
// this.endTimeShow = endTimeArray[0] + '年' + endTimeArray[1] + '月' + endTimeArray[2] + '日'
@@ -626,6 +625,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..a509533a 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">
@@ -78,7 +78,7 @@
+ v-html="formData.content">
@@ -96,9 +96,9 @@
prop="activityTime"
label-width="150px">
+ value-format="yyyy-MM-dd HH:mm:ss"
+ 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: '', //活动结果
@@ -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)
@@ -288,7 +291,7 @@ export default {
if (code === 0) {
this.$message({
type: 'success',
- message: '新增联建单位成功'
+ message: '操作成功'
})
this.resetData()
this.$emit('dialogOk')
@@ -425,7 +428,7 @@ export default {
unitId: '',//单位ID
title: '',//活动标题
target: '',//活动目标
- contact: '',//活动内容
+ content: '',//活动内容
activityTime: '',//活动时间
peopleCount: 0,//服务人数
result: '', //活动结果
@@ -499,7 +502,7 @@ export default {
}
}
-