|
|
|
@ -11,6 +11,15 @@ |
|
|
|
<el-form-item label="用户姓名" prop="userName" label-width="100px"> |
|
|
|
<el-input v-model="dataForm.userName" placeholder="用户姓名" clearable @keyup.native="btKeyUpuserName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="用户部门" label-width="90px"> |
|
|
|
<el-cascader |
|
|
|
v-model="ids" |
|
|
|
:options="options" |
|
|
|
:props="{ checkStrictly: true }" |
|
|
|
clearable |
|
|
|
> |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
@ -29,6 +38,8 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="userName" label="用户姓名" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="deptName" label="用户部门" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="mobile" label="用户电话" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="operationTypeName" label="积分操作类型" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="points" label="积分" header-align="center" align="center"></el-table-column> |
|
|
|
<!--<el-table-column prop="operationCode" label="操作编码" header-align="center" align="center"></el-table-column>--> |
|
|
|
@ -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 |
|
|
|
|