From b022beed1d9121c4fe3b17f20008e2c140d19358 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Sat, 15 Feb 2020 15:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=93=A8=E5=8D=A1=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epidemicsentrypost-add-or-update.vue | 8 +-- .../modules/custom/epidemicsentrypost.vue | 70 +++++++++++++++---- 2 files changed, 62 insertions(+), 16 deletions(-) diff --git a/src/views/modules/custom/epidemicsentrypost-add-or-update.vue b/src/views/modules/custom/epidemicsentrypost-add-or-update.vue index 7852898f..e1e27eb1 100644 --- a/src/views/modules/custom/epidemicsentrypost-add-or-update.vue +++ b/src/views/modules/custom/epidemicsentrypost-add-or-update.vue @@ -83,7 +83,7 @@ export default { // 哨卡名称查询(未绑定网格id的) querySentryPostName () { this.$http - .get(`custom/epidemicsentrypost/selectListSentryPostName`) + .get(`custom/epidemicSentryPost/selectListSentryPostName`) .then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) @@ -103,7 +103,7 @@ export default { // 获取信息 getInfo () { this.$http - .get(`/news/epidemicsentrypost/${this.dataForm.id}`) + .get(`/news/epidemicSentryPost/${this.dataForm.id}`) .then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) @@ -121,7 +121,7 @@ export default { // return this.$message.error('哨卡编码不可为空') // } // this.$http - // .get(`custom/epidemicsentrypost/sentryPostCodeIsRepeat/${this.dataForm.sentryPostCode}`) + // .get(`custom/epidemicSentryPost/sentryPostCodeIsRepeat/${this.dataForm.sentryPostCode}`) // .then(({ data: res }) => { // if (res.code !== 0) { // return this.$message.error(res.msg) @@ -148,7 +148,7 @@ export default { return this.$message.error('哨卡编码仅支持数字或字母') } this.$http[!this.dataForm.id ? 'post' : 'put']( - '/custom/epidemicsentrypost/', + '/custom/epidemicSentryPost/', this.dataForm ) .then(({ data: res }) => { diff --git a/src/views/modules/custom/epidemicsentrypost.vue b/src/views/modules/custom/epidemicsentrypost.vue index 0d9e0fe6..db89adb7 100644 --- a/src/views/modules/custom/epidemicsentrypost.vue +++ b/src/views/modules/custom/epidemicsentrypost.vue @@ -6,12 +6,12 @@ :close-on-press-escape="false" > - - + {{ $t('add') }} @@ -23,12 +23,31 @@ - + - - + + + + @@ -62,20 +81,22 @@ export default { data () { return { mixinViewModuleOptions: { - getDataListURL: '/custom/epidemicsentrypost/page', + getDataListURL: '/custom/epidemicSentryPost/page', getDataListIsPage: true }, visible: false, dataForm: { id: '', - gridId: '' + gridId: '', + sentryPostCode: '' } } }, methods: { init () { this.visible = true - this.getDataList() + this.dataForm.sentryPostCode = '' + this.getDataList(this.dataForm.gridId) }, // 新增 修改 addOrUpdateHandle () { @@ -91,6 +112,25 @@ export default { }, // 批量生成功能 initDeptMaCodeHandle () { + this.$http + .post(`custom/epidemicSentryPost/createCodes`, { gridId: this.dataForm.gridId }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + }) + .catch(() => {}) + }, + // 单独生成哨卡码 + singleMaCodeHandle (id) { + this.$http + .post(`custom/epidemicSentryPost/createCode`, { postId: id }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + }) + .catch(() => {}) } }, components: { @@ -98,3 +138,9 @@ export default { } } +