允许积分设置负值@陈锐

This commit is contained in:
aixianling
2024-08-08 10:26:08 +08:00
parent 01cd905669
commit bc1504cce5

View File

@@ -27,7 +27,7 @@
<el-input placeholder="请输入三类" size="small" v-model="form.classThree"></el-input> <el-input placeholder="请输入三类" size="small" v-model="form.classThree"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="分值" prop="integral" style="width: 100%;" :rules="[{required: true, message: '请输入分值', trigger: 'change'}]"> <el-form-item label="分值" prop="integral" style="width: 100%;" :rules="[{required: true, message: '请输入分值', trigger: 'change'}]">
<el-input-number v-model="form.integral" :min="0"></el-input-number> <el-input-number v-model="form.integral"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
@@ -41,8 +41,7 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex' export default {
export default {
name: 'Add', name: 'Add',
props: { props: {
@@ -50,7 +49,7 @@
dict: Object, dict: Object,
params: Object params: Object
}, },
data () { data() {
return { return {
form: { form: {
classOne: '', classOne: '',
@@ -64,7 +63,7 @@
} }
}, },
created () { created() {
if (this.params && this.params.id) { if (this.params && this.params.id) {
this.id = this.params.id this.id = this.params.id
this.getInfo(this.params.id) this.getInfo(this.params.id)
@@ -72,7 +71,7 @@
}, },
methods: { methods: {
getInfo (id) { getInfo(id) {
this.instance.post(`/app/appintegralpublicityinfo/queryDetailById?id=${id}`).then(res => { this.instance.post(`/app/appintegralpublicityinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.form = { this.form = {
@@ -83,7 +82,7 @@
}) })
}, },
confirm () { confirm() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.isFlag = true this.isFlag = true
@@ -102,14 +101,14 @@
}) })
}, },
cancel (isRefresh) { cancel(isRefresh) {
this.$emit('change', { this.$emit('change', {
type: 'List', type: 'List',
isRefresh: !!isRefresh isRefresh: !!isRefresh
}) })
}, },
onUserChange (e) { onUserChange(e) {
if (e.length) { if (e.length) {
this.form.girdName = e[0].girdName this.form.girdName = e[0].girdName
} else { } else {
@@ -118,11 +117,11 @@
} }
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.time-select { .time-select {
padding: 0 16px; padding: 0 16px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
@@ -131,8 +130,9 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
cursor: pointer; cursor: pointer;
.el-icon-arrow-down { .el-icon-arrow-down {
line-height: 36px; line-height: 36px;
} }
} }
</style> </style>