ganttchange
This commit is contained in:
parent
0bd5516cef
commit
ac2dd89df4
|
@ -59,7 +59,6 @@
|
|||
style="width: 100%"
|
||||
@change="keyChange($index,item.field_key)"
|
||||
/>
|
||||
<!--</el-date-picker>-->
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-else-if="item.field_type === 'datetime'"
|
||||
|
@ -73,7 +72,6 @@
|
|||
style="width: 100%"
|
||||
@change="keyChange($index,item.field_key)"
|
||||
/>
|
||||
<!--</el-date-picker>-->
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-else-if="item.field_type === 'select'"
|
||||
|
@ -91,7 +89,6 @@
|
|||
:label="item1"
|
||||
:value="item1"
|
||||
/>
|
||||
<!--</el-option>-->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
|
@ -116,7 +113,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<span v-show="item.help_text" class="helpText">说明:{{item.help_text}}</span>
|
||||
<span v-if="item.need_judge&&item.is_testok===true" class="adoptTip">合格</span>
|
||||
<span v-if="item.need_judge&&item.is_testok===true" class="adoptTip">合格</span>
|
||||
<span v-if="item.need_judge&&item.is_testok===false" class="failTip">不合格</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -137,20 +134,15 @@
|
|||
<div class="canvasBtn" @click="error1">标记</div>
|
||||
<div class="canvasBtn" @click="word1()">文字</div>
|
||||
<div class="canvasBtn" @click="back()">回退</div>
|
||||
<!--<div class="canvasBtn" @click="saveTu()">保存</div>-->
|
||||
<div class="canvasBtn" @click="saveTu()">保存</div>
|
||||
</div>
|
||||
<div id="res"></div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-form-item label="是否合格">
|
||||
<!--<el-radio-group v-model="is_testok">
|
||||
<el-radio :label="testokTrue">检查合格</el-radio>
|
||||
<el-radio :label="testokFalse">检查不合格</el-radio>
|
||||
</el-radio-group>-->
|
||||
<el-radio v-model="is_testok" :label="testokTrue">检查合格</el-radio>
|
||||
<el-radio v-model="is_testok" :label="testokFalse">检查不合格</el-radio>
|
||||
</el-form-item>
|
||||
|
@ -160,7 +152,6 @@
|
|||
<el-button type="warning" @click="submitfield('2')">提交</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -202,6 +193,11 @@
|
|||
formData.forEach(item => {
|
||||
let obj = new Object();
|
||||
obj = item;
|
||||
if(item.field_type === 'draw'){
|
||||
obj.is_testok = true;
|
||||
}else{
|
||||
obj.is_testok = null;
|
||||
}
|
||||
that.formData.push(obj)
|
||||
});
|
||||
that.formData=[...formData];
|
||||
|
@ -270,10 +266,8 @@
|
|||
},
|
||||
methods:{
|
||||
filterBlock(parent,rule,index,field_key){
|
||||
debugger;
|
||||
let that = this;
|
||||
if(parent!==''&&parent!==null&&parent!==undefined){
|
||||
debugger;
|
||||
if(rule!==''&&rule!==null&&rule!==undefined){
|
||||
let reg = /\{(.+?)\}/g;
|
||||
//let str = rule.replace(temp,'').replace('$','');//=='有'
|
||||
|
@ -515,7 +509,6 @@
|
|||
if(v != '' && v != ' '){
|
||||
this.imgData=ctx3.getImageData(0,0,canvas3.width,canvas3.height);
|
||||
let img = ctx3.getImageData(0,0,canvas3.width,canvas3.height);
|
||||
// debugger;
|
||||
preDrawAry.push(img);
|
||||
ctx3.moveTo(oldX,oldY);
|
||||
ctx3.fillStyle="#e42343";
|
||||
|
@ -586,10 +579,7 @@
|
|||
let formData = new FormData();
|
||||
formData.append('file', file);
|
||||
upFile(formData).then((res) => {
|
||||
debugger;
|
||||
console.log(res);
|
||||
that.imgUrl=res.data.field;
|
||||
// console.log(res);
|
||||
that.imgUrl=res.data.path;
|
||||
})
|
||||
},
|
||||
//base64ToFile
|
||||
|
@ -632,7 +622,6 @@
|
|||
//替换变量
|
||||
a = a.replace(ky, 'yyy');
|
||||
let yyy = "'"+that.checkForm[ky]+"'";
|
||||
// debugger;
|
||||
if(eval(eval( a))){
|
||||
str += 'true';
|
||||
}else{
|
||||
|
@ -684,8 +673,8 @@
|
|||
upFile(formData).then((res) => {
|
||||
if(res){
|
||||
let key = drawArr[0].field_key;
|
||||
that.imgUrl=res.data.file;
|
||||
that.checkForm[key] = res.data.file;
|
||||
that.imgUrl=res.data.path;
|
||||
that.checkForm[key] = res.data.path;
|
||||
that.fieldData(isSubmit);
|
||||
}
|
||||
});
|
||||
|
@ -698,14 +687,12 @@
|
|||
that.field = []; //检查项目
|
||||
let submit = isSubmit=='1'?false:true;
|
||||
that.formData.forEach((item) => {
|
||||
if(!item.is_hidden){
|
||||
that.field.push({
|
||||
id: item.id,
|
||||
field_value: that.checkForm[item.field_key],
|
||||
is_testok: item.is_testok,//单项检查结果
|
||||
is_hidden: item.is_hidden
|
||||
});
|
||||
}
|
||||
that.field.push({
|
||||
id: item.id,
|
||||
field_value: that.checkForm[item.field_key],
|
||||
is_testok: item.is_testok,//单项检查结果
|
||||
is_hidden: item.is_hidden
|
||||
});
|
||||
});
|
||||
that.testrecord.record_data = that.field;//检查项列表
|
||||
that.testrecord.is_testok = that.is_testok;//检查表检查结果
|
||||
|
|
|
@ -677,10 +677,7 @@
|
|||
let formData = new FormData();
|
||||
formData.append('file', file);
|
||||
upFile(formData).then((res) => {
|
||||
debugger;
|
||||
console.log(res);
|
||||
that.imgUrl=res.data.field;
|
||||
// console.log(res);
|
||||
that.imgUrl=res.data.path;
|
||||
})
|
||||
},
|
||||
//base64ToFile
|
||||
|
@ -775,7 +772,7 @@
|
|||
upFile(formData).then((res) => {
|
||||
if(res){
|
||||
let key = drawArr[0].field_key;
|
||||
that.imgUrl=res.data.file;
|
||||
that.imgUrl=res.data.path;
|
||||
that.checkForm[key] = that.imgUrl;
|
||||
that.fieldData();
|
||||
}
|
||||
|
@ -789,14 +786,12 @@
|
|||
that.field = []; //检查项目
|
||||
let submit = isSubmit=='1'?false:true;
|
||||
that.formData.forEach((item) => {
|
||||
if(!item.is_hidden){
|
||||
that.field.push({
|
||||
id: item.id,
|
||||
field_value: that.checkForm[item.field_key],
|
||||
is_testok: item.is_testok,//单项检查结果
|
||||
is_hidden: item.is_hidden
|
||||
});
|
||||
}
|
||||
that.field.push({
|
||||
id: item.id,
|
||||
field_value: that.checkForm[item.field_key],
|
||||
is_testok: item.is_testok,//单项检查结果
|
||||
is_hidden: item.is_hidden
|
||||
});
|
||||
});
|
||||
// that.testrecord.form = that.formID;//检查表
|
||||
that.testrecord.record_data = that.field;//检查项列表
|
||||
|
@ -804,7 +799,6 @@
|
|||
// that.testrecord.wproduct = that.wproductId;//半成品ID
|
||||
// that.testrecord.is_submited = true;
|
||||
that.testrecord.id = that.recordId;
|
||||
debugger;
|
||||
if(submit){//提交
|
||||
this.$emit('recordSubmit',that.testrecord);
|
||||
}else {//保存
|
||||
|
|
|
@ -392,9 +392,14 @@
|
|||
let that = this;
|
||||
getPlanGantt({}).then(res=>{
|
||||
if(res.code===200){
|
||||
// debugger;
|
||||
let arr =[];
|
||||
let list = res.data.results;
|
||||
let arr =[],list=[];
|
||||
let li = res.data.results;
|
||||
li.forEach((item,index)=>{
|
||||
if(index===1){
|
||||
list.push(item)
|
||||
}
|
||||
});
|
||||
// let list = res.data.results[1];
|
||||
list.forEach(item => {
|
||||
if (!item.children || item.children.length < 1) {
|
||||
let startTime = new Date(item.start_date).getTime();
|
||||
|
|
|
@ -711,7 +711,7 @@
|
|||
//点击检验:如果有一个直接进入,如果有多个表再进行选择
|
||||
handleInspection(scope,index) {
|
||||
//调该物料对应的检查表
|
||||
debugger;
|
||||
// debugger;
|
||||
let that = this;
|
||||
this.innerIndex = index;
|
||||
// this.outerVisible = true;
|
||||
|
@ -761,7 +761,7 @@
|
|||
},
|
||||
//点击记录里的检验
|
||||
handleInspectionRecord(scope){
|
||||
debugger;
|
||||
// debugger;
|
||||
let that =this;
|
||||
that.recordVisible = false;
|
||||
that.recordId = scope.row.id;
|
||||
|
@ -780,7 +780,7 @@
|
|||
that.hasPicture = true;
|
||||
}
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
debugger;
|
||||
// debugger;
|
||||
let arr = [];
|
||||
let fieldList = res.data.record_data;
|
||||
for(let i=0;i<that.fieldList.length;i++){
|
||||
|
@ -841,11 +841,11 @@
|
|||
},
|
||||
//半产品复检
|
||||
handleReview() {
|
||||
debugger;
|
||||
// debugger;
|
||||
let that = this;
|
||||
testInit({ wproduct: this.wproduct,form: that.recordform}).then((response) => {
|
||||
if (response.data) {
|
||||
debugger;
|
||||
// debugger;
|
||||
that.hasPicture = false;
|
||||
that.recordId = response.data.id;
|
||||
that.formName = response.data.form_.name;
|
||||
|
@ -868,7 +868,7 @@
|
|||
|
||||
//根据选择的表,渲染检查项目
|
||||
submitrecordform(index) {
|
||||
debugger;
|
||||
// debugger;
|
||||
let that = this;
|
||||
this.outerVisible = false;
|
||||
if (that.recordform != "") {
|
||||
|
@ -894,7 +894,7 @@
|
|||
}
|
||||
});
|
||||
}else if(index==='2'){//复检
|
||||
debugger;
|
||||
// debugger;
|
||||
that.handleReview();
|
||||
}
|
||||
} else this.$message.error("请选择检查表!");
|
||||
|
@ -953,14 +953,13 @@
|
|||
},
|
||||
//保存检查项目
|
||||
recordSave(value) {
|
||||
debugger;
|
||||
let that = this;
|
||||
let id = value.id;
|
||||
let params = {};
|
||||
params.record_data = value.record_data;
|
||||
params.is_testok = value.is_testok;
|
||||
putTestRecordItem(id,params).then((res) => {
|
||||
debugger;
|
||||
// debugger;
|
||||
if (res.code >= 200) {
|
||||
that.recordVisible = false;
|
||||
that.limitedReview = false;
|
||||
|
|
Loading…
Reference in New Issue