|
|
|
@ -22,7 +22,7 @@ |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button v-if="$hasPermission(':police:delete')" type="danger" @click="deleteHandle()">{{ |
|
|
|
<el-button v-if="$hasPermission(':police:delete:')" type="danger" @click="deleteHandle()">{{ |
|
|
|
$t('deleteBatch') }} |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
@ -44,7 +44,7 @@ |
|
|
|
@click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }} |
|
|
|
</el-button> |
|
|
|
<el-button v-if="$hasPermission(':police:delete')" type="text" size="small" |
|
|
|
@click="deleteHandle(scope.row.id)">{{ $t('delete') }} |
|
|
|
@click="beforeDeleteHandle(scope.row.id)">{{ $t('delete') }} |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -107,6 +107,15 @@ |
|
|
|
handleChange(value) { |
|
|
|
this.dataForm.deptId = value.slice(-1).shift() |
|
|
|
}, |
|
|
|
beforeDeleteHandle (id) { |
|
|
|
this.$confirm('删除民警将会解散全部警民群,是否继续操作?', this.$t('prompt.title'), { |
|
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.deleteHandle(id); |
|
|
|
}) |
|
|
|
}, |
|
|
|
supplementHandle(id) { |
|
|
|
if (!id && this.dataListSelections.length <= 0) { |
|
|
|
return this.$message({ |
|
|
|
@ -120,7 +129,7 @@ |
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http.put('/property/police/supplement', id ? [id] : this.dataListSelections.map(item => item.deptId)).then(({data: res}) => { |
|
|
|
this.$http.put('/property/police/supplement', id ? [id] : this.dataListSelections.map(item => item)).then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
|