From 95e1ff0da999c50855a9822a5cf865913b63e4f3 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 12 Oct 2021 14:10:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=85=91=E6=8D=A2=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E8=AE=B0=E5=BD=95=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/points/activepointlog.vue | 41 ++++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src/views/modules/points/activepointlog.vue b/src/views/modules/points/activepointlog.vue index 1109edb9..a90ff53e 100644 --- a/src/views/modules/points/activepointlog.vue +++ b/src/views/modules/points/activepointlog.vue @@ -11,6 +11,15 @@ + + + + {{ $t('query') }} @@ -29,6 +38,8 @@ + + @@ -74,18 +85,44 @@ export default { dataForm: { id: '', operationType: '', - userName: '' + userName: '', + deptId: '' }, operationTypeArr: [ { dictValue: '1', dictName: '加积分' }, { dictValue: '0', dictName: '减积分' } - ] + ], + ids: [], + options: [] } }, components: { AddOrUpdate }, + created: function () { + this.getOptions() + }, + watch: { + ids: function (val) { + if (val.length === 0) { + this.dataForm.deptId = '' + } else { + this.dataForm.deptId = this.ids[val.length - 1] + } + } + }, methods: { + getOptions () { + this.$http + .get(`/sys/user/deptOptions/getByLoginUser`) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }) + .catch(() => {}) + }, btKeyUpuserName (e) { e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '') this.dataForm.userName = e.target.value