fieldList
This commit is contained in:
parent
f80e491f12
commit
791b6606eb
|
@ -154,7 +154,7 @@
|
|||
:title="tableForm.name"
|
||||
>
|
||||
<customForm
|
||||
:results="fieldList.results"
|
||||
:results="dialogFieldList"
|
||||
:hasPicture="hasPicture"
|
||||
:formID="formID"
|
||||
:isDisabled="isDisabled"
|
||||
|
@ -555,6 +555,7 @@
|
|||
item:{},
|
||||
step: defaultstep,
|
||||
stepList: [],
|
||||
dialogFieldList: [],
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList: [],
|
||||
|
@ -835,7 +836,7 @@
|
|||
}
|
||||
},
|
||||
checkValue() {
|
||||
this.field.field_key = this.field.field_key.replace(/[^a-zA-Z]/g, '');
|
||||
this.field.field_key = this.field.field_key.replace(/[^0-9a-zA-Z]/g, '');
|
||||
},
|
||||
//添加字段选项
|
||||
addDomain() {
|
||||
|
@ -852,9 +853,14 @@
|
|||
that.listQueryfield.form = that.formID;
|
||||
getrffieldList(that.listQueryfield).then((response) => {
|
||||
if (response.data) {
|
||||
this.hasPicture = false;
|
||||
that.fieldList = response.data;
|
||||
let list = response.data.results;
|
||||
}
|
||||
});
|
||||
getrffieldList({page:0,form:that.formID}).then((response) => {
|
||||
if (response.data) {
|
||||
this.hasPicture = false;
|
||||
let list = response.data;
|
||||
this.dialogFieldList= response.data;
|
||||
let arr = list.filter(item => {
|
||||
return item.field_type === 'draw'
|
||||
});
|
||||
|
@ -877,9 +883,6 @@
|
|||
that.$set(that.checkForm, key, '')
|
||||
}
|
||||
that.dialogVisibleForm = true;
|
||||
/* setTimeout(function () {
|
||||
that.canvasInit();
|
||||
}, 500);*/
|
||||
}
|
||||
});
|
||||
that.fieldLists();
|
||||
|
|
|
@ -249,7 +249,7 @@
|
|||
label-width="180px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-row v-for="(item,$index) in fieldList.results" :key="$index">
|
||||
<el-row v-for="(item,$index) in dialogFieldList" :key="$index">
|
||||
<el-form-item v-if="item.field_type==='string'" :label="item.field_name">
|
||||
<el-input placeholder="请输入"/>
|
||||
</el-form-item>
|
||||
|
@ -458,6 +458,7 @@
|
|||
return {
|
||||
step: defaultstep,
|
||||
stepList: [],
|
||||
dialogFieldList: [],
|
||||
productOptions: [],
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
|
@ -601,9 +602,14 @@
|
|||
},
|
||||
handleLook(scope) {
|
||||
this.dialogVisibleForm = true;
|
||||
this.tableForm = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogFieldList = [];
|
||||
this.tableForm = Object.assign({}, scope.row);
|
||||
this.formID = this.tableForm.id;
|
||||
this.fieldLists();
|
||||
getrffieldList({page:0,form:this.formID}).then((response) => {
|
||||
if (response.data) {
|
||||
this.dialogFieldList = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
checkPermission,
|
||||
//子工序列表
|
||||
|
@ -638,7 +644,6 @@
|
|||
this.step.instruction = null;
|
||||
},
|
||||
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
|
@ -659,6 +664,7 @@
|
|||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
|
||||
rowClick(row) {
|
||||
this.stepid = row.id;
|
||||
this.recordformLists();
|
||||
|
@ -673,6 +679,7 @@
|
|||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
|
||||
handleDeleteStep(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
|
@ -703,7 +710,6 @@
|
|||
}
|
||||
});
|
||||
} else {
|
||||
console.log(this.step)
|
||||
createStep(this.step).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
|
@ -717,11 +723,12 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleCurrentChange(row) {
|
||||
this.formID = row.id;
|
||||
this.fieldLists();
|
||||
|
||||
},
|
||||
|
||||
recordformLists() {
|
||||
this.listQueryrecordform.step = this.stepid;
|
||||
this.listQueryrecordform.type = 10;
|
||||
|
@ -729,7 +736,6 @@
|
|||
if (response.data) {
|
||||
this.recordformList = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
getFormList(){
|
||||
|
@ -737,18 +743,14 @@
|
|||
if (response.data) {
|
||||
this.formList = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
fieldLists() {
|
||||
this.listQueryfield.form = this.formID
|
||||
this.listQueryfield.form = this.formID;
|
||||
getrffieldList(this.listQueryfield).then((response) => {
|
||||
if (response.data) {
|
||||
this.fieldList = response.data;
|
||||
debugger;
|
||||
console.log(this.fieldList)
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//新增记录表
|
||||
|
@ -762,7 +764,6 @@
|
|||
},
|
||||
//新增字段
|
||||
handlefieldCreate() {
|
||||
|
||||
this.field_choice = [''];
|
||||
this.field = Object.assign({}, defaultfield);
|
||||
this.dialogType1 = "new";
|
||||
|
@ -773,8 +774,6 @@
|
|||
},
|
||||
handleEdit(scope) {
|
||||
this.recordform = Object.assign({}, scope.row); // copy obj
|
||||
debugger;
|
||||
console.log(this.recordform);
|
||||
this.dialogType = "edit";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
|
@ -798,7 +797,7 @@
|
|||
})
|
||||
.then(async () => {
|
||||
await deleterecordform(scope.row.id);
|
||||
this.recordformLists()
|
||||
this.recordformLists();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -813,7 +812,7 @@
|
|||
})
|
||||
.then(async () => {
|
||||
await deleterffield(scope.row.id);
|
||||
this.fieldLists()
|
||||
this.fieldLists();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -834,11 +833,10 @@
|
|||
}
|
||||
});
|
||||
} else {
|
||||
this.recordform.step = this.stepid
|
||||
|
||||
this.recordform.step = this.stepid;
|
||||
createrecordform(this.recordform).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.recordformLists()
|
||||
this.recordformLists();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
|
@ -858,7 +856,7 @@
|
|||
this.field.field_choice = this.field_choice;
|
||||
updaterffield(this.field.id, this.field).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.fieldLists()
|
||||
this.fieldLists();
|
||||
this.dialogVisible1 = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
|
@ -868,7 +866,7 @@
|
|||
this.field.field_choice = this.field_choice;
|
||||
createrffield(this.field).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.fieldLists()
|
||||
this.fieldLists();
|
||||
this.dialogVisible1 = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue