Browse Source

Merge remote-tracking branch 'origin/migration' into migration

migration
wanggongfeng 5 years ago
parent
commit
c79a2280e3
  1. 40
      src/views/modules/sys/deptmacode-optimize.vue

40
src/views/modules/sys/deptmacode-optimize.vue

@ -38,6 +38,12 @@
type="primary" type="primary"
@click="createGridLeaderMaCodeHandle()">生成网格长注册码</el-button> @click="createGridLeaderMaCodeHandle()">生成网格长注册码</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:deptmacode:leader')"
type="primary"
@click="createGridBranchparty()">生成网格党支部注册码</el-button>
</el-form-item>
</el-form> </el-form>
<el-table v-loading="dataListLoading" <el-table v-loading="dataListLoading"
:data="dataList" :data="dataList"
@ -140,7 +146,8 @@ export default {
gridList: [], gridList: [],
maCodeCategorys: [ maCodeCategorys: [
{ id: '0', name: '群众注册码' }, { id: '0', name: '群众注册码' },
{ id: '1', name: '网格长注册码' } { id: '1', name: '网格长注册码' },
{ id: '2', name: '网格党支部注册码' }
] ]
} }
}, },
@ -307,6 +314,37 @@ export default {
}, },
errorExceed (file, fileList) { errorExceed (file, fileList) {
this.$message.error('上传失败请重试') this.$message.error('上传失败请重试')
},
//
createGridBranchparty () {
this.$confirm(
this.$t('prompt.info', { handle: '生成网格党支部注册小程序码' }),
this.$t('生成'),
{
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}
)
.then(() => {
this.$http
.post(`/sys/deptmacode/createGridBranchParty`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.getDataList()
}
})
})
.catch(() => { })
})
.catch(() => { })
} }
} }
} }

Loading…
Cancel
Save