Browse Source

修改新闻列表页面;其他

feature/yujt_analysis_pc
yujt 5 years ago
parent
commit
6783802bb0
  1. 69
      src/views/modules/news/allnews.vue
  2. 2
      src/views/modules/police/group-detail.vue
  3. 6
      src/views/modules/police/police.vue
  4. 18
      src/views/modules/property/propertyproject-add-or-update.vue

69
src/views/modules/news/allnews.vue

@ -5,7 +5,7 @@
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-form-item label="发布部门">
<el-cascader v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
@ -81,7 +81,7 @@
header-align="center"
align="center"></el-table-column>
<el-table-column prop="allDeptNames"
label="所属网格"
label="发布部门"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="createdTime"
@ -144,10 +144,7 @@ export default {
deleteIsBatch: true
},
dataForm: {
id: '',
streetId: '',
communityId: '',
gridId: '',
deptId: '',
startTime: '',
endTime: '',
keyword: '',
@ -156,9 +153,6 @@ export default {
time: '',
options: [],
deptIdList: [],
streetList: [],
communityList: [],
gridList: [],
categorys: [],
onLine: {
id: '',
@ -176,7 +170,6 @@ export default {
this.options = res.data.options
})
.catch(() => { })
this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))
this.getListCategory()
},
methods: {
@ -201,58 +194,6 @@ export default {
return '已下线'
}
},
//
getDeptInfoList (dataReceiver, faDeptId) {
this.$http.get(`/sys/dept/sublist/` + faDeptId).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dataReceiver === 'street') {
this.streetList = res.data
} else if (dataReceiver === 'community') {
this.communityList = res.data
} else if (dataReceiver === 'grid') {
this.gridList = res.data
}
}).catch(() => { })
},
changeStreet (event) {
if (this.dataForm.streetId === '') {
this.communityList = []
this.gridList = []
this.dataForm.communityId = ''
this.dataForm.gridId = ''
return
}
this.dataForm.streetId = event
let choosenItem = this.streetList.filter(item => item.id === this.dataForm.streetId)[0]
this.initDeptIdAndName(choosenItem)
this.dataForm.communityId = this.dataForm.gridId = null
this.communityList = this.gridList = []
this.getDeptInfoList('community', event)
},
changeCommunity (event) {
if (this.dataForm.communityId === '') {
this.gridList = []
this.dataForm.gridId = ''
return
}
this.communityId = event
let choosenItem = this.communityList.filter(item => item.id === this.dataForm.communityId)[0]
this.initDeptIdAndName(choosenItem)
this.dataForm.gridId = null
this.gridList = []
this.getDeptInfoList('grid', event)
},
changeGrid (event) {
this.dataForm.gridId = event
let choosenItem = this.gridList.filter(item => item.id === this.gridId)[0]
this.initDeptIdAndName(choosenItem)
},
initDeptIdAndName (choosenItem) {
this.dataForm.dept = choosenItem.name
this.dataForm.deptId = choosenItem.id
},
setRegistTime () {
console.log(this.time[0])
this.dataForm.startTime = this.time[0]
@ -349,9 +290,9 @@ export default {
watch: {
'deptIdList': function (val) {
if (val.length !== 0) {
this.dataForm.gridId = val[val.length - 1]
this.dataForm.deptId = val[val.length - 1]
} else {
this.dataForm.gridId = ''
this.dataForm.deptId = ''
}
}
}

2
src/views/modules/police/group-detail.vue

@ -178,7 +178,7 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (res.data.resultCode == 1) {
if (res.data.resultCode === 1) {
this.$confirm(res.data.resultMessage, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

6
src/views/modules/police/police.vue

@ -104,7 +104,7 @@
dataForm: {
id: ''
},
options: [],
options: []
}
},
components: {
@ -136,7 +136,7 @@
// cancelButtonText: this.$t('cancel'),
// type: 'warning'
// }).then(() => {
this.deleteHandle(id);
this.deleteHandle(id)
// })
},
supplementHandle (data) {
@ -159,7 +159,7 @@
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.put('/property/police/supplement', data ? data : this.dataListSelections[0]).then(({data: res}) => {
this.$http.put('/property/police/supplement', data || this.dataListSelections[0]).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}

18
src/views/modules/property/propertyproject-add-or-update.vue

@ -91,11 +91,11 @@
methods: {
init () {
//
this.getByLoginUser();
this.getPropertyList();
this.visible = true;
this.getByLoginUser()
this.getPropertyList()
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
@ -127,15 +127,15 @@
})
},
deptHandleChange (value) {
this.dataForm.gridId = value.slice(-1).shift();
this.dataForm.gridId = value.slice(-1).shift()
},
propertyHandleChange (value) {
console.log(value)
let obj = this.propertyList.find((item) => {
return item.dictValue === value;
});
return item.dictValue === value
})
console.log(obj.dictName)
this.dataForm.propertyName = obj.dictName;
this.dataForm.propertyName = obj.dictName
},
//
getInfo () {
@ -155,7 +155,7 @@
},
//
dataFormSubmitHandle: debounce(function () {
this.dataForm.allDeptNames = this.$refs['grid'].inputValue;
this.dataForm.allDeptNames = this.$refs['grid'].inputValue
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false

Loading…
Cancel
Save