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" <el-form :inline="true"
:model="dataForm" :model="dataForm"
@keyup.enter.native="getDataList()"> @keyup.enter.native="getDataList()">
<el-form-item label="所属机构"> <el-form-item label="发布部门">
<el-cascader v-model="deptIdList" <el-cascader v-model="deptIdList"
:options="options" :options="options"
:props="{ checkStrictly: true }" :props="{ checkStrictly: true }"
@ -81,7 +81,7 @@
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="allDeptNames" <el-table-column prop="allDeptNames"
label="所属网格" label="发布部门"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="createdTime" <el-table-column prop="createdTime"
@ -144,10 +144,7 @@ export default {
deleteIsBatch: true deleteIsBatch: true
}, },
dataForm: { dataForm: {
id: '', deptId: '',
streetId: '',
communityId: '',
gridId: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
keyword: '', keyword: '',
@ -156,9 +153,6 @@ export default {
time: '', time: '',
options: [], options: [],
deptIdList: [], deptIdList: [],
streetList: [],
communityList: [],
gridList: [],
categorys: [], categorys: [],
onLine: { onLine: {
id: '', id: '',
@ -176,7 +170,6 @@ export default {
this.options = res.data.options this.options = res.data.options
}) })
.catch(() => { }) .catch(() => { })
this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))
this.getListCategory() this.getListCategory()
}, },
methods: { methods: {
@ -201,58 +194,6 @@ export default {
return '已下线' 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 () { setRegistTime () {
console.log(this.time[0]) console.log(this.time[0])
this.dataForm.startTime = this.time[0] this.dataForm.startTime = this.time[0]
@ -349,9 +290,9 @@ export default {
watch: { watch: {
'deptIdList': function (val) { 'deptIdList': function (val) {
if (val.length !== 0) { if (val.length !== 0) {
this.dataForm.gridId = val[val.length - 1] this.dataForm.deptId = val[val.length - 1]
} else { } 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) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
if (res.data.resultCode == 1) { if (res.data.resultCode === 1) {
this.$confirm(res.data.resultMessage, '提示', { this.$confirm(res.data.resultMessage, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

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

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

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

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

Loading…
Cancel
Save