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