字段信息管理

This commit is contained in:
shidongli 2024-07-01 09:59:19 +08:00
parent 1dc8b7d8ff
commit ec41b6db53

View File

@ -222,21 +222,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="字段排序"
:rules="rules.labelFieldInfoList.fieldSort"
:prop="`labelFieldInfoList.${index}.fieldSort`"
>
<el-input-number
v-model="aitem.fieldSort"
controls-position="right"
:min="0"
placeholder="请输入字段排序"
style="width: 210px"
/>
<!-- <el-input v-model="aitem.fieldSort" placeholder="请输入字段排序" oninput="value=value.replace(/[^\d]/g,'')"
maxlength="5"/> -->
</el-form-item>
<el-form-item label="任务类型" prop="taskTypeId">
<el-button
type=""
@ -293,6 +279,21 @@
>{{ aitem.taskPartitionDictName }}</el-button
>
</el-form-item>
<el-form-item
label="字段排序"
:rules="rules.labelFieldInfoList.fieldSort"
:prop="`labelFieldInfoList.${index}.fieldSort`"
>
<el-input-number
v-model="aitem.fieldSort"
controls-position="right"
:min="0"
placeholder="请输入字段排序"
style="width: 210px"
/>
<!-- <el-input v-model="aitem.fieldSort" placeholder="请输入字段排序" oninput="value=value.replace(/[^\d]/g,'')"
maxlength="5"/> -->
</el-form-item>
<el-form-item
label="字段编码"
:rules="rules.labelFieldInfoList.fieldCode"
@ -308,7 +309,7 @@
</el-form-item>
<el-form-item label="字段备注信息" prop="fieldRemark">
<el-input
style="width: 210px"
style="width: 530px"
v-model="aitem.fieldRemark"
placeholder="请输入字段备注信息"
type="textarea"
@ -375,14 +376,33 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="字段排序" prop="fieldSort">
<el-input-number
v-model="form.fieldSort"
controls-position="right"
:min="0"
placeholder="请输入字段排序"
style="width: 210px"
/>
<el-form-item label="任务类型" prop="taskTypeId">
<el-button
type=""
v-if="form.taskTypeName == '请选择任务类型'"
@click="clicktypexg()"
style="
width: 210px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ form.taskTypeName }}</el-button
>
<el-button
@click="clicktypexg()"
type=""
v-else
style="
width: 210px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ form.taskTypeName }}</el-button
>
</el-form-item>
<el-form-item label="任务细分" prop="taskPartitionDictId">
<el-button
@ -412,6 +432,15 @@
>{{ form.taskPartitionDictName }}</el-button
>
</el-form-item>
<el-form-item label="字段排序" prop="fieldSort">
<el-input-number
v-model="form.fieldSort"
controls-position="right"
:min="0"
placeholder="请输入字段排序"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="字段编码" prop="fieldCode">
<el-input
maxlength="50"
@ -423,7 +452,7 @@
</el-form-item>
<el-form-item label="字段备注信息" prop="fieldRemark">
<el-input
style="width: 210px"
style="width: 530px"
v-model="form.fieldRemark"
placeholder="请输入字段备注信息"
type="textarea"
@ -595,7 +624,7 @@
:data="taskTypeList"
@selection-change="handleSelectionChange"
>
<el-table-column label="请选择" width="100" align="center">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
@ -663,7 +692,7 @@ export default {
queryParamstask: {
pageNum: 1,
pageSize: 10,
taskTypeId: null,
taskTypeName: null,
taskPartitionName: null,
@ -675,13 +704,13 @@ export default {
},
nnerVisibleindex: '',
taskPartitionDictId: '',
taskTypeId:'',
taskTypeId: '',
maxTableHeight: undefined,
totaltask: 0,
//
innertype: false,
totaltype:0,
taskTypeList:[],
totaltype: 0,
taskTypeList: [],
queryType: {
pageNum: 1,
@ -849,22 +878,38 @@ export default {
});
},
//
clicktype(aitem, index){
console.log(aitem,'0000000')
clicktype(aitem, index) {
console.log(aitem, '0000000')
this.getListType();
this.taskTypeId = aitem.taskTypeId ? aitem.taskTypeId : '';
this.nnerVisibleindex = index;
this.innertype = true;
this.form.taskPartitionDictName= '请选择任务细分';
this.form.taskPartitionDictId='';
this.form.taskPartitionDictName = '请选择任务细分';
this.form.taskPartitionDictId = '';
},
//
clickinnerVisible(aitem, index) {
if (this.taskTypeId == '') {
this.$modal.msgError("请先选择任务类型");
} else {
this.taskTypeId = aitem.taskTypeId ? aitem.taskTypeId : '';
this.nnerVisibleindex = index;
this.innerVisible = true;
}
// this.getListpartit();
this.taskTypeId = aitem.taskTypeId ? aitem.taskTypeId : '';
this.nnerVisibleindex = index;
this.innerVisible = true;
},
//
clicktypexg() {
if (this.form.taskTypeId) {
this.taskTypeId = this.form.taskTypeId
}
this.getListType();
this.innertype = true;
},
//
clickinnerVisiblexg() {
@ -883,11 +928,10 @@ export default {
innerVisiblecancel() {
this.innerVisible = false;
},
typeecancel(){
typeecancel() {
this.innertype = false;
},
nurseclickzx(row) {
if (this.title == '添加标签字段信息') {
this.form.labelFieldInfoList[this.nnerVisibleindex].taskPartitionDictName =
row.taskPartitionName;
@ -903,8 +947,8 @@ export default {
},
//
nurseclicktype(row) {
console.log(row,'row')
this.queryParamstask.taskTypeId=row.id
console.log(row, 'row')
this.queryParamstask.taskTypeId = row.id
this.getListpartit()
if (this.title == '添加标签字段信息') {
this.form.labelFieldInfoList[this.nnerVisibleindex].taskTypeName =
@ -913,8 +957,9 @@ export default {
row.id;
} else if (this.titleup == '修改标签字段信息') {
this.form.taskTypeName = row.taskTypeName;
this.form.taskTypeId =
row.id;
this.form.taskTypeId =row.id;
this.form.taskPartitionDictName = "请选择任务细分";
this.form.taskPartitionDictId ='';
}
this.innertype = false;
},
@ -937,8 +982,8 @@ export default {
fieldSort: undefined,
taskPartitionDictName: '请选择任务细分',
taskPartitionDictId: '',
taskTypeName:'请选择任务类型',
taskTypeId:'',
taskTypeName: '请选择任务类型',
taskTypeId: '',
fieldCode: null,
};
@ -979,8 +1024,8 @@ export default {
updateTime: null,
taskPartitionDictName: null,
taskPartitionDictId: null,
taskTypeId:null,
taskTypeName:null,
taskTypeId: null,
taskTypeName: null,
};
@ -1024,8 +1069,8 @@ export default {
fieldSort: undefined,
taskPartitionDictName: '请选择任务细分',
taskPartitionDictId: '',
taskTypeName:'请选择任务类型',
taskTypeId:'',
taskTypeName: '请选择任务类型',
taskTypeId: '',
},
@ -1045,14 +1090,20 @@ export default {
if (!this.form.taskPartitionDictName || this.form.taskPartitionDictName == "") {
this.form.taskPartitionDictName = '请选择任务细分'
}
if (!this.form.taskTypeName || this.form.taskTypeName == "") {
this.form.taskTypeName = '请选择任务类型'
}
if (this.form.taskTypeId) {
this.queryParamstask.taskTypeId = this.form.taskTypeId
this.getListpartit();
}
this.openup = true;
this.titleup = "修改标签字段信息";
});
},
/** 提交按钮 */
submitForm() {
console.log(this.form)
// return
this.$refs["form"].validate(valid => {
var obj = JSON.parse(JSON.stringify(this.form))
@ -1060,21 +1111,29 @@ export default {
if (this.form.id != null) {
if (obj.taskPartitionDictName == '请选择任务细分') {
obj.taskPartitionDictName = ""
}
console.log(obj, 'obj')
// return
if (obj.taskTypeName == '请选择任务类型') {
obj.taskTypeName = ""
}
updateLabelfieldinfo(obj).then(response => {
this.$modal.msgSuccess("修改成功");
this.openup = false;
this.getList();
});
} else {
obj.labelFieldInfoList.forEach(e => {
if (e.taskPartitionDictName == '请选择任务细分') {
e.taskPartitionDictName = ""
}
if (e.taskTypeName == '请选择任务类型') {
e.taskTypeName = ""
}
});
console.log(obj, 'obj')
// return
addLabelfieldinfo(obj).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;