154 lines
3.6 KiB
Python
154 lines
3.6 KiB
Python
<template>
|
|
<div id="print">
|
|
<el-form ref="elForm" :model="formData" size="medium" label-width="70px">
|
|
<el-row :gutter="12">
|
|
|
|
<el-col>
|
|
<el-card shadow="always">
|
|
<el-table id="evl"
|
|
ref="multipleTable"
|
|
:data="eltList"
|
|
style="width: 100%;margin-top:10px;"
|
|
border
|
|
fit
|
|
highlight-current-row
|
|
|
|
@selection-change='selectRow'
|
|
max-height="600">
|
|
<el-table-column type="selection" label="选择" align="center" width="55"></el-table-column>
|
|
|
|
<el-table-column align="center" label="项目内容" width="750">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.content }}
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column label="符合">
|
|
<template slot-scope="scope">
|
|
<el-radio-group v-model="radio[scope.$index]" @change="changeHandler">
|
|
<el-radio :label="item.id" :key="item.id" v-for="item in scope.row.options ">{{item.name}}</el-radio>
|
|
</el-radio-group>
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
</el-card>
|
|
</el-col>
|
|
|
|
</el-row>
|
|
</el-form>
|
|
<div slot="footer" align="center">
|
|
<el-button @click="close(false)">取消</el-button>
|
|
<el-button type="primary" @click="dialogFormAdd">保存</el-button>
|
|
</div>
|
|
|
|
</div>
|
|
</template>
|
|
<script type="text/javascript">
|
|
import { createEvaluationDetail, updateEvaluationDetail, getEvaluationDetailList } from "@/api/evaluationdetail";
|
|
import { getEvaluationsList } from "@/api/evaluationitem";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import { options } from "runjs";
|
|
export default {
|
|
|
|
inheritAttrs: false,
|
|
components: { Treeselect },
|
|
props: ["action", "certapp"],
|
|
data() {
|
|
return {
|
|
|
|
formData: {
|
|
field_code: 'QMS',
|
|
result:null,
|
|
is_approve: true,
|
|
remark:null,
|
|
cert_app:this.certapp
|
|
|
|
|
|
},
|
|
radio: [],
|
|
review_options:[
|
|
{
|
|
id : "1",
|
|
name : "符合"
|
|
},
|
|
{
|
|
id : "2",
|
|
name : "不符合"
|
|
}
|
|
,
|
|
{
|
|
id : "3",
|
|
name : "不适用"
|
|
}
|
|
,
|
|
{
|
|
id : "4",
|
|
name : "需说明"
|
|
}
|
|
],
|
|
|
|
eltList: [],
|
|
|
|
dgType: 0,
|
|
dgVisiable: false,
|
|
|
|
};
|
|
},
|
|
computed: {},
|
|
watch: {
|
|
|
|
},
|
|
created() {
|
|
|
|
this.getList()
|
|
},
|
|
mounted() {},
|
|
methods: {
|
|
getList() {
|
|
|
|
getEvaluationsList().then(response => {
|
|
|
|
this.eltList = response.data.results
|
|
for (var i = 0; i < this.eltList.length; i++) {
|
|
this.eltList[i].options = this.review_options;
|
|
}
|
|
|
|
});
|
|
},
|
|
// 获取表格选中时的数据
|
|
selectRow (val) {
|
|
this.selectlistRow = val
|
|
},
|
|
changeHandler(value) {
|
|
this.radioresult = value;
|
|
}
|
|
,
|
|
handleSelectionChange(val) {
|
|
this.multipleTable = val; // this.multipleTable 选中的值
|
|
console.log(val);
|
|
},
|
|
dialogFormAdd() {
|
|
//for (var i = 0; i < this.multipleTable.length; i++) {
|
|
// var halo = this.multipleTable[i];
|
|
// console.log(halo);
|
|
|
|
//}
|
|
console.log(this.selectlistRow);
|
|
},
|
|
handelConfirm() {
|
|
let val = this.selectlistRow
|
|
console.log(this.selectlistRow);
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
};
|
|
</script>
|
|
<style>
|
|
</style>
|