Browse Source

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

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

13
src/views/modules/police/police.vue

@ -27,7 +27,7 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
<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-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -46,6 +46,9 @@
<el-button v-if="$hasPermission(':police:delete')" type="text" size="small" <el-button v-if="$hasPermission(':police:delete')" type="text" size="small"
@click="beforeDeleteHandle(scope.row.id)">{{ $t('delete') }} @click="beforeDeleteHandle(scope.row.id)">{{ $t('delete') }}
</el-button> </el-button>
<el-button v-if="$hasPermission(':police:save')" type="text" size="small"
@click="supplementHandle(scope.row)">补建群
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -116,20 +119,20 @@
this.deleteHandle(id); this.deleteHandle(id);
}) })
}, },
supplementHandle(id) { supplementHandle(data) {
if (!id && this.dataListSelections.length <= 0) { if (!data && this.dataListSelections.length <= 0) {
return this.$message({ return this.$message({
message: '请选择需要补建的社区', message: '请选择需要补建的社区',
type: 'warning', type: 'warning',
duration: 500 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'), confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'), cancelButtonText: this.$t('cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).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) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }

Loading…
Cancel
Save