优化
This commit is contained in:
@@ -13,8 +13,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<span>
|
<span>
|
||||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" v-show="crud.status.cu > 0" type="primary" @click="crud.submitCU">保存</el-button>
|
||||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
<el-button icon="el-icon-close" size="mini" type="info" v-show="crud.status.cu > 0" @click="crud.cancelCU">关闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="total_score">
|
<el-form-item label="备注" prop="total_score">
|
||||||
<label slot="label">备 注:</label>
|
<label slot="label">备 注:</label>
|
||||||
<el-input v-model="form.remark" style="width: 210px;" />
|
<el-input v-model="form.remark" style="width: 210px;" :disabled="crud.status.view > 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
v-show="crud.status.cu > 0"
|
||||||
:disabled="crud.status.view > 0"
|
:disabled="crud.status.view > 0"
|
||||||
@click="choosePoint"
|
@click="choosePoint"
|
||||||
>
|
>
|
||||||
@@ -87,15 +88,7 @@
|
|||||||
<el-table-column prop="single_score" label="单项分值" align="center" />
|
<el-table-column prop="single_score" label="单项分值" align="center" />
|
||||||
<el-table-column prop="workload" label="工作量" align="center">
|
<el-table-column prop="workload" label="工作量" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number
|
<el-input v-model="form.tableData[scope.$index].workload" size="mini" class="edit-input" :disabled="crud.status.view > 0" @input="change($event,form.tableData[scope.$index],scope.$index)" />
|
||||||
size="mini"
|
|
||||||
v-model="form.tableData[scope.$index].workload"
|
|
||||||
:controls="false"
|
|
||||||
:precision="2"
|
|
||||||
:min="0"
|
|
||||||
:disabled="crud.status.view > 0"
|
|
||||||
@change="change"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="workload_audit" label="审核工作量" align="center" />
|
<el-table-column prop="workload_audit" label="审核工作量" align="center" />
|
||||||
@@ -232,9 +225,21 @@ export default {
|
|||||||
this.form.num = this.form.tableData.length
|
this.form.num = this.form.tableData.length
|
||||||
},
|
},
|
||||||
change(val, row, index) {
|
change(val, row, index) {
|
||||||
|
// 对工作量进行校验
|
||||||
|
const numReg = /^[0-9]*$/
|
||||||
|
const numRe = new RegExp(numReg)
|
||||||
|
if (!numRe.test(val)) {
|
||||||
|
this.crud.notify('请输入不小于0的数字', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
row.workload = 0
|
||||||
|
} else {
|
||||||
|
if (row.workload_audit === '') {
|
||||||
|
row.workload = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
row.workload_audit = val
|
||||||
|
this.form.tableData.splice(index, 1, row)
|
||||||
// 将每行的算出来的分值相加
|
// 将每行的算出来的分值相加
|
||||||
let all = 0
|
let all = 0
|
||||||
row.workload_audit = val
|
|
||||||
this.form.tableData.forEach((item) => {
|
this.form.tableData.forEach((item) => {
|
||||||
all = all + parseFloat(item.workload_audit) * parseFloat(item.single_score)
|
all = all + parseFloat(item.workload_audit) * parseFloat(item.single_score)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<span>
|
<span>
|
||||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" v-show="crud.status.cu > 0" @click="crud.submitCU">保存</el-button>
|
||||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
<el-button icon="el-icon-close" size="mini" type="info" v-show="crud.status.cu > 0" @click="crud.cancelCU">关闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="total_score">
|
<el-form-item label="备注" prop="total_score">
|
||||||
<label slot="label">备 注:</label>
|
<label slot="label">备 注:</label>
|
||||||
<el-input v-model="form.remark" style="width: 210px;" />
|
<el-input v-model="form.remark" style="width: 210px;" :disabled="crud.status.view > 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="crud.status.view > 0"
|
:disabled="crud.status.view > 0"
|
||||||
|
v-show="crud.status.cu > 0"
|
||||||
@click="choosePoint"
|
@click="choosePoint"
|
||||||
>
|
>
|
||||||
选择项点
|
选择项点
|
||||||
|
|||||||
Reference in New Issue
Block a user