|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
v-if="showFlag"
|
|
|
|
|
:visible.sync="showFlag"
|
|
|
|
|
:modal= false
|
|
|
|
|
width="1400px"
|
|
|
|
|
width="1300px"
|
|
|
|
|
>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="24" :xs="24">
|
|
|
|
@ -51,26 +51,24 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="14">
|
|
|
|
|
<el-form-item v-if="form.startOA == '1'" label="不合格描述" prop="remark">
|
|
|
|
|
<el-input type='textarea' v-model="form.remark" placeholder="请输入不合格描述" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
-->
|
|
|
|
|
<el-col :span="14">
|
|
|
|
|
<el-form-item label="不合格描述" prop="remarkCode">
|
|
|
|
|
<!-- <el-input type='textarea' v-model="form.remark" placeholder="请输入不合格描述" /> -->
|
|
|
|
|
<el-select v-model="form.remarkCode" placeholder="请选择不合格描述" clearable>
|
|
|
|
|
-->
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="缺陷分类" prop="remarkCode">
|
|
|
|
|
<el-select v-model="form.remarkCode" placeholder="请选择缺陷分类" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in remarkList"
|
|
|
|
|
:key="dict.dictValue"
|
|
|
|
|
:label="dict.dictLabel"
|
|
|
|
|
:value="dict.dictValue"
|
|
|
|
|
v-for="dict in classInfoList"
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
:label="dict.className"
|
|
|
|
|
:value="dict.id"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="备注描述" prop="attr3">
|
|
|
|
|
<el-input type='textarea' v-model="form.attr3" placeholder="请输入备注描述" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
@ -79,9 +77,9 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- 序号 -->
|
|
|
|
|
<el-table-column label="检测规则Id" align="left" prop="recordId" v-if="false"/>
|
|
|
|
|
<el-table-column label="检测规则编码" align="left" prop="projectNo" width="120"/>
|
|
|
|
|
<el-table-column label="检验规则名称" align="left" prop="ruleName" width="300"/>
|
|
|
|
|
<el-table-column label="检验规则属性" align="left" prop="propertyCode" width="120" >
|
|
|
|
|
<el-table-column label="检测规则编码" align="left" prop="projectNo" width="120" fixed/>
|
|
|
|
|
<el-table-column label="检验规则名称" align="left" prop="ruleName" width="150" :show-overflow-tooltip="true" fixed/>
|
|
|
|
|
<el-table-column label="规则属性" align="left" prop="propertyCode" width="80" fixed>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag
|
|
|
|
|
:options="dict.type.qc_rule_prop"
|
|
|
|
@ -92,22 +90,29 @@
|
|
|
|
|
<el-table-column label="检验方式" align="left" prop="checkMode" width="150" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="检验工具" align="left" prop="checkTool" />
|
|
|
|
|
<el-table-column label="检验标准" align="left" prop="checkStandard" width="150" :show-overflow-tooltip="true"/>
|
|
|
|
|
<!--
|
|
|
|
|
<el-table-column label="上差值" align="left" prop="upperDiff" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
<el-table-column label="下差值" align="left" prop="downDiff" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
<el-table-column label="单位" align="left" prop="unitCode" width="80"/>
|
|
|
|
|
<el-table-column label="样本量编码" align="left" prop="sampleCode" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
<el-table-column label="抽样数量" align="left" prop="sampleQuality" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
<el-table-column label="单位" align="left" prop="unitCode" width="80"/>-->
|
|
|
|
|
<el-table-column label="样本量编码" align="left" prop="sampleCode" width="90" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
<!--<el-table-column label="抽样数量" align="left" prop="sampleQuality" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>-->
|
|
|
|
|
|
|
|
|
|
<el-table-column label="检测水平" align="left" prop="checkLevel" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
<el-table-column label="接受质量限" align="left" prop="sampleAql" width="80" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
<el-table-column label="接受质量限" align="left" prop="sampleAql" width="90" v-if="this.typeCode == 'material' || this.typeCode == 'product'"/>
|
|
|
|
|
<el-table-column label="检测结果" key="status" align="center" prop="status" width="90" v-if="this.viewStatus == '1' ">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="测量值" align="left" prop="actualValue" width="120"/>
|
|
|
|
|
<el-table-column label="抽样数量" align="left" prop="sampleQuality" width="110">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.sampleQuality" placeholder="请输入抽样数量" type="number"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="不良描述" align="left" prop="remark" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.remark" placeholder="请输入不良描述" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="不良类型" align="left" prop="defectCode" width="120">
|
|
|
|
|
<el-table-column label="不良类型" align="left" prop="defectCode" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
@ -138,6 +143,17 @@
|
|
|
|
|
></el-switch>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="检验图片" align="center" class-name="small-padding fixed-width"">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-picture"
|
|
|
|
|
@click="handleShowPic(scope.row)"
|
|
|
|
|
v-hasPermi="['quality:qcIncome:edit']"
|
|
|
|
|
>查看</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
@ -187,7 +203,7 @@
|
|
|
|
|
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains"
|
|
|
|
|
:label="'测量值' + index"
|
|
|
|
|
:label="'测量值' + (index+1)"
|
|
|
|
|
:key="domain.key"
|
|
|
|
|
:prop="'domains.' + index + '.value'"
|
|
|
|
|
:rules="{
|
|
|
|
@ -204,41 +220,106 @@
|
|
|
|
|
<el-button @click="handleResetForm()">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="不良类型" :visible.sync="defectOpen" width="600px" append-to-body>
|
|
|
|
|
<el-form :model="defectForm" ref="defectForm" label-width="100px" class="demo-dynamic">
|
|
|
|
|
<el-dialog title="不良类型" :visible.sync="defectOpen" width="600px" append-to-body>
|
|
|
|
|
<el-form :model="defectForm" ref="defectForm" label-width="100px" class="demo-dynamic">
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-for="(item, index) in defectForm.defectItems"
|
|
|
|
|
:label="item.defectSubclass"
|
|
|
|
|
:key="index"
|
|
|
|
|
:prop="`defectItems.${index}.noOkQuality`"
|
|
|
|
|
:rules="{
|
|
|
|
|
required: true, message: '不良类型不能为空', trigger: 'blur'
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<el-input type="number" v-model="item.noOkQuality" placeholder="请输入不良数量" />
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-input type="number" v-model="item.noOkQuality" placeholder="请输入不良数量"/>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-select placeholder="请选择缺陷分类" clearable v-model="item.classId">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in item.classList"
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
:label="dict.className"
|
|
|
|
|
:value="dict.id"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="submitDefectForm('defectForm')">提交</el-button>
|
|
|
|
|
<el-button @click="resetDefectForm('defectForm')">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!--图片预览弹窗-->
|
|
|
|
|
<el-dialog title="检验图片" :visible.sync="picValueOpen" width="700px" append-to-body>
|
|
|
|
|
<el-upload
|
|
|
|
|
:action="uploadUrl"
|
|
|
|
|
:headers="uploadHeaders"
|
|
|
|
|
:on-success="handleUploadSuccess"
|
|
|
|
|
list-type="picture-card"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
:auto-upload="false">
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="file" slot-scope="{file}">
|
|
|
|
|
<img
|
|
|
|
|
class="el-upload-list__item-thumbnail"
|
|
|
|
|
:src="file.url" alt=""
|
|
|
|
|
>
|
|
|
|
|
<span class="el-upload-list__item-actions">
|
|
|
|
|
<span
|
|
|
|
|
class="el-upload-list__item-preview"
|
|
|
|
|
@click="handlePictureCardPreview(file)"
|
|
|
|
|
>
|
|
|
|
|
<i class="el-icon-zoom-in"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
v-if="!disabled"
|
|
|
|
|
class="el-upload-list__item-delete"
|
|
|
|
|
@click="handleDownload(file)"
|
|
|
|
|
>
|
|
|
|
|
<i class="el-icon-download"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
v-if="!disabled"
|
|
|
|
|
class="el-upload-list__item-delete"
|
|
|
|
|
@click="handleRemove(file)"
|
|
|
|
|
>
|
|
|
|
|
<i class="el-icon-delete"></i>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
<br/>
|
|
|
|
|
<el-button size="small" type="primary" @click="submitPicForm">点击上传</el-button>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog :visible.sync="dialogVisible">
|
|
|
|
|
<img width="100%" :src="dialogImageUrl" alt="">
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
import { getCkeckProjectList,changeCheckDetailStatus,getIncome,commitActualValue,
|
|
|
|
|
commitCheckResult,getDefectList,getWeightValue,getnoOkVals,getAutoJudge
|
|
|
|
|
commitCheckResult,getDefectInfoList,getWeightValue,getnoOkVals,getAutoJudge,getClassInfoListByCheckType
|
|
|
|
|
} from "@/api/quality/income";
|
|
|
|
|
import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect";
|
|
|
|
|
import { getDictData,} from "@/api/system/dict/data";
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
export default {
|
|
|
|
|
name: "itemSelectUser",
|
|
|
|
|
dicts: ["qc_rule_prop","material_type_oa","material_from_oa","sample_level","sample_aql"],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
fileList:[],
|
|
|
|
|
uploadList: [],
|
|
|
|
|
uploadUrl: process.env.VUE_APP_BASE_API + "/file/upload",
|
|
|
|
|
uploadHeaders: {
|
|
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
|
|
},
|
|
|
|
|
dialogImageUrl: '',
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
disabled: false,
|
|
|
|
|
viewStatus : '0',
|
|
|
|
|
showFlag: false,
|
|
|
|
|
dyloading: false,
|
|
|
|
@ -255,7 +336,7 @@ export default {
|
|
|
|
|
// BOM产品表格数据
|
|
|
|
|
itemList: null,
|
|
|
|
|
qcCheckTaskDetails: [],
|
|
|
|
|
remarkList: [],
|
|
|
|
|
classInfoList: [],
|
|
|
|
|
//树名称
|
|
|
|
|
bomCode: undefined,
|
|
|
|
|
defaultProps: {
|
|
|
|
@ -282,8 +363,14 @@ export default {
|
|
|
|
|
sampleAql:null,
|
|
|
|
|
checkLevel:null
|
|
|
|
|
},
|
|
|
|
|
dynamicPicForm:{
|
|
|
|
|
domains: [{
|
|
|
|
|
value: ''
|
|
|
|
|
}],
|
|
|
|
|
},
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
valueOpen: false,
|
|
|
|
|
picValueOpen: false,
|
|
|
|
|
//检测详情的id
|
|
|
|
|
recordId:'',
|
|
|
|
|
weight: null,
|
|
|
|
@ -293,7 +380,6 @@ export default {
|
|
|
|
|
typeCode:'',
|
|
|
|
|
// 不良类型弹出层
|
|
|
|
|
defectOpen: false,
|
|
|
|
|
updateFlag: false,
|
|
|
|
|
//不良名称
|
|
|
|
|
defectList:[],
|
|
|
|
|
defectForm: {
|
|
|
|
@ -302,34 +388,28 @@ export default {
|
|
|
|
|
defectCode: '',
|
|
|
|
|
noOkQuality: 0,
|
|
|
|
|
belongToDetail: '',
|
|
|
|
|
belongTo: ''
|
|
|
|
|
belongTo: '',
|
|
|
|
|
classId:'',
|
|
|
|
|
classList:[]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
downDiff:null,
|
|
|
|
|
upperDiff:null,
|
|
|
|
|
aqlNoOkVal:0,
|
|
|
|
|
sampleCode: null,
|
|
|
|
|
checkLevel:null
|
|
|
|
|
checkLevel:null,
|
|
|
|
|
checkType:''
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getDefect();
|
|
|
|
|
this.handleGetDictData();
|
|
|
|
|
|
|
|
|
|
//this.handleGetDictData();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getDefect(){
|
|
|
|
|
getDefectList(this.typeCode).then(response => {
|
|
|
|
|
this.defectList = response;
|
|
|
|
|
this.defectForm.defectItems = this.defectList.map(item => ({
|
|
|
|
|
defectSubclass: item.defectSubclass,
|
|
|
|
|
defectCode: item.defectCode,
|
|
|
|
|
noOkQuality: 0
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
init(rowdata,typeCode){
|
|
|
|
|
this.data=rowdata;
|
|
|
|
|
this.queryParams.belongTo = this.data.recordId;
|
|
|
|
@ -342,7 +422,7 @@ export default {
|
|
|
|
|
this.queryParams.pageSize = 10;
|
|
|
|
|
this.getCheckInfo();
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getDefect();
|
|
|
|
|
this.handleGetDictData();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
view(rowdata,typeCode){
|
|
|
|
@ -356,7 +436,7 @@ export default {
|
|
|
|
|
this.queryParams.pageSize = 10;
|
|
|
|
|
this.getCheckInfo();
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getDefect();
|
|
|
|
|
this.handleGetDictData();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 查询表格列表*/
|
|
|
|
@ -371,12 +451,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleGetDictData() {
|
|
|
|
|
const query = {
|
|
|
|
|
dictType: 'unqualified_remark',
|
|
|
|
|
}
|
|
|
|
|
getDictData(query).then(response => {
|
|
|
|
|
getClassInfoListByCheckType({checkType:this.checkType}).then(response => {
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
this.remarkList = response.data;
|
|
|
|
|
this.classInfoList = response.data;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
@ -450,7 +527,7 @@ export default {
|
|
|
|
|
supplierCode: this.data.supplierCode,
|
|
|
|
|
supplierName: this.data.supplierName,
|
|
|
|
|
quality: this.data.quality,
|
|
|
|
|
unit: this.data.unit,
|
|
|
|
|
unit: this.data.unit
|
|
|
|
|
}
|
|
|
|
|
// 拼接数据
|
|
|
|
|
const finalData = {...this.form,...data}
|
|
|
|
@ -504,24 +581,19 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 不良类型弹窗 */
|
|
|
|
|
handleDefectType(row) {
|
|
|
|
|
this.defectForm.defectItems.forEach(item => {
|
|
|
|
|
item.belongToDetail = row.recordId;
|
|
|
|
|
item.belongTo = row.belongTo;
|
|
|
|
|
item.noOkQuality = 0;
|
|
|
|
|
});
|
|
|
|
|
getDefectValue(row.recordId).then(response => {
|
|
|
|
|
getDefectValue(row.recordId,this.checkType).then(response => {
|
|
|
|
|
let values = response.rows;
|
|
|
|
|
if(values.length > 0){
|
|
|
|
|
this.defectForm.defectItems = values.map(item => ({
|
|
|
|
|
//此处为qc_check_task_defect的recordId
|
|
|
|
|
recordId: item.recordId,
|
|
|
|
|
belongTo: this.queryParams.belongTo,
|
|
|
|
|
belongToDetail: row.recordId,
|
|
|
|
|
defectSubclass: item.defectSubclass,
|
|
|
|
|
defectCode: item.defectCode,
|
|
|
|
|
noOkQuality: item.noOkQuality,
|
|
|
|
|
classId: item.classId,
|
|
|
|
|
classList: item.classList
|
|
|
|
|
}));
|
|
|
|
|
this.updateFlag = true;
|
|
|
|
|
}else{
|
|
|
|
|
this.updateFlag = false;
|
|
|
|
|
}
|
|
|
|
|
this.defectOpen = true;
|
|
|
|
|
});
|
|
|
|
@ -536,7 +608,6 @@ export default {
|
|
|
|
|
let values = this.dynamicValidateForm.domains;
|
|
|
|
|
var actualValues = values.map(item => item.value);
|
|
|
|
|
if(this.typeCode=='material' || this.typeCode =='product'){//只有来料和成品有自动判定
|
|
|
|
|
debugger
|
|
|
|
|
//自动判定开始(仅使用范围形)
|
|
|
|
|
getAutoJudge(this.quality,
|
|
|
|
|
this.dynamicValidateForm.checkLevel,
|
|
|
|
@ -596,7 +667,6 @@ export default {
|
|
|
|
|
const formData = this.defectForm.defectItems;
|
|
|
|
|
if (valid) {
|
|
|
|
|
// 验证通过,可以提交数据
|
|
|
|
|
if(!this.updateFlag) {
|
|
|
|
|
commitDefectValue(formData).then(response => {
|
|
|
|
|
if(response.code === 200) {
|
|
|
|
|
this.$modal.msgSuccess("提交成功");
|
|
|
|
@ -607,27 +677,11 @@ export default {
|
|
|
|
|
this.defectOpen = false;
|
|
|
|
|
this.getDefect();
|
|
|
|
|
});
|
|
|
|
|
}else {
|
|
|
|
|
console.log(formData);
|
|
|
|
|
updateDefectValue(formData).then(response => {
|
|
|
|
|
if(response.code === 200) {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
}else {
|
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
|
}
|
|
|
|
|
this.defectForm.defectItems = [];
|
|
|
|
|
this.defectOpen = false;
|
|
|
|
|
this.getDefect();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
// 验证失败,提示错误信息
|
|
|
|
|
console.log('error submit!!');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
resetDefectForm() {
|
|
|
|
@ -663,6 +717,51 @@ export default {
|
|
|
|
|
setSampleAql(sampleAql){
|
|
|
|
|
this.sampleAql = sampleAql;
|
|
|
|
|
},
|
|
|
|
|
/** 检测图片弹窗操作 */
|
|
|
|
|
handleShowPic(row) {
|
|
|
|
|
var i=0;
|
|
|
|
|
this.handleResetPic();
|
|
|
|
|
this.picValueOpen = true;
|
|
|
|
|
this.recordId = row.recordId;
|
|
|
|
|
const files = row.fileUrls;
|
|
|
|
|
files.map(item => (
|
|
|
|
|
this.fileList.push({
|
|
|
|
|
uid: i++,
|
|
|
|
|
url: item
|
|
|
|
|
})
|
|
|
|
|
))
|
|
|
|
|
},
|
|
|
|
|
handleResetPic() {
|
|
|
|
|
this.dynamicPicForm.domains = [{ value: ''}];
|
|
|
|
|
},
|
|
|
|
|
handleRemove(file) {
|
|
|
|
|
this.fileList = this.fileList.filter(item => item !== file);
|
|
|
|
|
},
|
|
|
|
|
handlePictureCardPreview(file) {
|
|
|
|
|
this.dialogImageUrl = file.url;
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
},
|
|
|
|
|
handleDownload(file) {
|
|
|
|
|
window.location.href = file.url
|
|
|
|
|
},
|
|
|
|
|
handleUploadSuccess(res, file) {
|
|
|
|
|
debugger
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.uploadList.push({ name: res.data.name, url: res.data.url });
|
|
|
|
|
this.uploadedSuccessfully();
|
|
|
|
|
} else {
|
|
|
|
|
this.number--;
|
|
|
|
|
this.$modal.closeLoading();
|
|
|
|
|
this.$modal.msgError(res.msg);
|
|
|
|
|
this.$refs.fileUpload.handleRemove(file);
|
|
|
|
|
this.uploadedSuccessfully();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
submitPicForm() {
|
|
|
|
|
var picValues = null;
|
|
|
|
|
this.uploadList.map(item => picValues=picValues+item.url+',');
|
|
|
|
|
console.log(picValues)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|