Browse Source

民警管理增加解散群功能,取消了批量删除的功能

feature/yujt_analysis_pc
zhangyuan 6 years ago
parent
commit
9ec9ed674e
  1. 15
      src/views/modules/police/police.vue
  2. 2
      src/views/modules/property/propertyproject.vue

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

@ -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)
}

2
src/views/modules/property/propertyproject.vue

@ -22,7 +22,7 @@
</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission(':propertyproject:delete')" type="danger" @click="deleteHandle()">{{
<el-button v-if="$hasPermission(':propertyproject:delete:')" type="danger" @click="deleteHandle()">{{
$t('deleteBatch') }}
</el-button>
</el-form-item>

Loading…
Cancel
Save