Browse Source

民警信息及警民群信息,补建群改为单条操作

feature/yujt_analysis_pc
zhangyuan 5 years ago
parent
commit
16bd57d83e
  1. 15
      src/views/modules/police/police.vue

15
src/views/modules/police/police.vue

@ -27,7 +27,7 @@
</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission(':police:save')" type="primary" @click="supplementHandle()">警民群补建
<el-button v-if="$hasPermission(':police:save:')" type="primary" @click="supplementHandle()">警民群补建
</el-button>
</el-form-item>
</el-form>
@ -46,6 +46,9 @@
<el-button v-if="$hasPermission(':police:delete')" type="text" size="small"
@click="beforeDeleteHandle(scope.row.id)">{{ $t('delete') }}
</el-button>
<el-button v-if="$hasPermission(':police:save')" type="text" size="small"
@click="supplementHandle(scope.row)">补建群
</el-button>
</template>
</el-table-column>
</el-table>
@ -107,7 +110,7 @@
handleChange(value) {
this.dataForm.deptId = value.slice(-1).shift()
},
beforeDeleteHandle (id) {
beforeDeleteHandle(id) {
this.$confirm('删除民警将会解散全部警民群,是否继续操作?', this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
@ -116,20 +119,20 @@
this.deleteHandle(id);
})
},
supplementHandle(id) {
if (!id && this.dataListSelections.length <= 0) {
supplementHandle(data) {
if (!data && this.dataListSelections.length <= 0) {
return this.$message({
message: '请选择需要补建的社区',
type: 'warning',
duration: 500
})
}
this.$confirm(this.$t('prompt.info', {'handle': '补建'}), this.$t('prompt.title'), {
this.$confirm(this.$t('prompt.info', {'handle': '补建'}), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.put('/property/police/supplement', id ? [id] : this.dataListSelections.map(item => item)).then(({data: res}) => {
this.$http.put('/property/police/supplement', data ? [data] : this.dataListSelections.map(item => item)).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}

Loading…
Cancel
Save