Browse Source

Merge branch 'dev_0814' of http://121.42.41.42:7070/r/esua-epdc-admin into dev_0814

master
王金鹏 6 years ago
parent
commit
89b753752e
  1. 31
      src/views/modules/user/partymembers.vue
  2. 6
      src/views/modules/user/user-add-or-update.vue
  3. 31
      src/views/modules/user/user.vue
  4. 36
      src/views/modules/user/usertag-add-or-update.vue

31
src/views/modules/user/partymembers.vue

@ -305,6 +305,37 @@ export default {
return row.registFlag === '1' ? '是' : row.registFlag === '0' ? '否' : '未知'
},
importData () {
},
//
getDataList () {
if (this.timeRange === null) {
this.dataForm.startTime = ''
this.dataForm.endTime = ''
}
this.dataListLoading = true
this.$http.get(
this.mixinViewModuleOptions.getDataListURL,
{
params: {
order: this.order,
orderField: this.orderField,
page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,
limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,
...this.dataForm
}
}
).then(({ data: res }) => {
this.dataListLoading = false
if (res.code !== 0) {
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
}).catch(() => {
this.dataListLoading = false
})
}
}
}

6
src/views/modules/user/user-add-or-update.vue

@ -186,7 +186,7 @@ export default {
return this.$message.error(res.msg)
}
//
this.registerResult(this.dataForm.id, this.dataForm.pass)
this.registerResult(this.dataForm.id)
this.$message({
message: this.$t('prompt.success'),
type: 'success',
@ -199,8 +199,8 @@ export default {
}).catch(() => { })
})
}, 1000, { 'leading': true, 'trailing': false }),
registerResult (userId, state) {
this.$http.get(`api/message/sms/registerResult?userId=` + userId + '&state=' + state).then(({ data: res }) => {
registerResult (userId) {
this.$http.get(`api/message/sms/registerResult?userId=` + userId).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}

31
src/views/modules/user/user.vue

@ -431,6 +431,37 @@ export default {
this.dataForm.isParty = ''
}
this.getDataList()
},
//
getDataList () {
if (this.time === null) {
this.dataForm.startTime = ''
this.dataForm.endTime = ''
}
this.dataListLoading = true
this.$http.get(
this.mixinViewModuleOptions.getDataListURL,
{
params: {
order: this.order,
orderField: this.orderField,
page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,
limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,
...this.dataForm
}
}
).then(({ data: res }) => {
this.dataListLoading = false
if (res.code !== 0) {
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
}).catch(() => {
this.dataListLoading = false
})
}
},
components: {

36
src/views/modules/user/usertag-add-or-update.vue

@ -1,16 +1,32 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="标签名" prop="tagName">
<el-input v-model="dataForm.tagName" placeholder="标签名"></el-input>
<el-dialog :visible.sync="visible"
:title="!dataForm.id ? $t('add') : $t('update')"
:close-on-click-modal="false"
:close-on-press-escape="false">
<el-form :model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="标签名"
prop="tagName">
<el-input v-model="dataForm.tagName"
maxlength="20"
show-word-limit
placeholder="标签名"></el-input>
</el-form-item>
<el-form-item label="标签描述" prop="tagDesc">
<el-input v-model="dataForm.tagDesc" placeholder="标签描述"></el-input>
<el-form-item label="标签描述"
prop="tagDesc">
<el-input v-model="dataForm.tagDesc"
maxlength="100"
show-word-limit
placeholder="标签描述"></el-input>
</el-form-item>
</el-form>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
<el-button type="primary"
@click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
@ -60,7 +76,7 @@ export default {
...this.dataForm,
...res.data
}
}).catch(() => {})
}).catch(() => { })
},
//
dataFormSubmitHandle: debounce(function () {
@ -81,7 +97,7 @@ export default {
this.$emit('refreshDataList')
}
})
}).catch(() => {})
}).catch(() => { })
})
}, 1000, { 'leading': true, 'trailing': false })
}

Loading…
Cancel
Save