|
|
@@ -18,12 +18,17 @@
|
|
|
<el-col :span="4">
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form :model="parameterform" label-width="200px" label-position="left">
|
|
|
+ <el-form :model="parameterForm" label-width="200px" label-position="left">
|
|
|
<el-form-item label="是否需要现场考察报告 ">
|
|
|
- <el-switch on-text="是" off-text="否" on-color="#13ce66" v-model="parameterform.isInvestigate"></el-switch>
|
|
|
+ <el-switch on-text="是" off-text="否" on-color="#13ce66" v-model="parameterForm.isInvestigate"></el-switch>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="增项申请时间限制 " prop="newpass">
|
|
|
- <el-input v-model="parameterform.sAddLimitMonth" :min="0" style="width:100%" @keyup.native="proving1">
|
|
|
+ <el-form-item label="增项申请次数 " prop="appendApplyNums">
|
|
|
+ <el-input v-model="parameterForm.appendApplyNums" :min="1" style="width:100%" @keyup.native="proving2">
|
|
|
+ <template slot="append">次/年</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="增项申请时间间隔 " prop="sAddLimitMonth">
|
|
|
+ <el-input v-model="parameterForm.sAddLimitMonth" :min="0" style="width:100%" @keyup.native="proving1">
|
|
|
<template slot="append">个月</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -39,9 +44,10 @@
|
|
|
name: 'paramset',
|
|
|
data () {
|
|
|
return {
|
|
|
- parameterform: {
|
|
|
+ parameterForm: {
|
|
|
isInvestigate: false,
|
|
|
- sAddLimitMonth: 0
|
|
|
+ sAddLimitMonth: '0',
|
|
|
+ appendApplyNums: '2' // 增项 每年可申请次数
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -53,34 +59,37 @@
|
|
|
let _this = this
|
|
|
_this.$axios.get('paramset/getparamset', {})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data && res.data.length > 0) {
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
switch (res.data[i].Parametercode) {
|
|
|
case 'isInvestigate':
|
|
|
if (res.data[i].Parametercontent === 'true') {
|
|
|
- _this.parameterform.isInvestigate = true
|
|
|
+ _this.parameterForm.isInvestigate = true
|
|
|
}
|
|
|
break
|
|
|
case 'sAddLimitMonth':
|
|
|
- _this.parameterform.sAddLimitMonth = (res.data[i].Parametercontent)
|
|
|
+ _this.parameterForm.sAddLimitMonth = Number(res.data[i].Parametercontent)
|
|
|
+ break
|
|
|
+ case 'appendApplyNums':
|
|
|
+ _this.parameterForm.appendApplyNums = res.data[i].Parametercontent
|
|
|
+ break
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- submitForm (formName) {
|
|
|
- let _this = this
|
|
|
- _this.$axios.put('paramset/saveparamset', _this.parameterform)
|
|
|
+ submitForm () {
|
|
|
+ this.parameterForm.sAddLimitMonth = this.parameterForm.sAddLimitMonth + ''
|
|
|
+ this.parameterForm.appendApplyNums = this.parameterForm.appendApplyNums + ''
|
|
|
+ this.$axios.put('paramset/saveparamset', this.parameterForm)
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
+ this.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
|
})
|
|
|
} else {
|
|
|
- _this.$message({
|
|
|
+ this.$message({
|
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
|
})
|
|
|
@@ -89,8 +98,12 @@
|
|
|
.catch(() => {})
|
|
|
},
|
|
|
proving1 () {
|
|
|
- this.parameterform.sAddLimitMonth = this.parameterform.sAddLimitMonth.replace(/[^\.\d]/g, '')
|
|
|
- this.parameterform.sAddLimitMonth = this.parameterform.sAddLimitMonth.replace('.', '')
|
|
|
+ this.parameterForm.sAddLimitMonth = this.parameterForm.sAddLimitMonth.replace(/[^\.\d]/g, '')
|
|
|
+ this.parameterForm.sAddLimitMonth = this.parameterForm.sAddLimitMonth.replace('.', '')
|
|
|
+ },
|
|
|
+ proving2 () {
|
|
|
+ this.parameterForm.appendApplyNums = this.parameterForm.appendApplyNums.replace(/[^\.\d]/g, '')
|
|
|
+ this.parameterForm.appendApplyNums = this.parameterForm.appendApplyNums.replace('.', '')
|
|
|
}
|
|
|
}
|
|
|
}
|