添加字段
This commit is contained in:
parent
f5d7d1bf49
commit
b88b8587f2
@ -41,6 +41,15 @@
|
|||||||
>
|
>
|
||||||
<a-input-number placeholder="请输入未整改" style="width: 100%" v-decorator="['wzg', {rules: [{required: true, message: '请输入未整改!'}]}]" />
|
<a-input-number placeholder="请输入未整改" style="width: 100%" v-decorator="['wzg', {rules: [{required: true, message: '请输入未整改!'}]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
label="施工地点"
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
>
|
||||||
|
<a-select style="width: 100%" placeholder="请选择施工地点" v-decorator="['workPlace', {rules: [{ required: true, message: '请选择施工地点!' }]}]">
|
||||||
|
<a-select-option v-for="(item,index) in workPlaceData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@ -62,7 +71,8 @@
|
|||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this)
|
form: this.$form.createForm(this),
|
||||||
|
workPlaceData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -70,6 +80,8 @@
|
|||||||
// 初始化方法
|
// 初始化方法
|
||||||
add (record) {
|
add (record) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
const workPlaceOption = this.$options
|
||||||
|
this.workPlaceData = workPlaceOption.filters['dictData']('work_place')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 提交表单
|
* 提交表单
|
||||||
|
|||||||
@ -42,6 +42,15 @@
|
|||||||
>
|
>
|
||||||
<a-input-number placeholder="请输入未整改" style="width: 100%" v-decorator="['wzg', {rules: [{required: true, message: '请输入未整改!'}]}]" />
|
<a-input-number placeholder="请输入未整改" style="width: 100%" v-decorator="['wzg', {rules: [{required: true, message: '请输入未整改!'}]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
label="施工地点"
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
>
|
||||||
|
<a-select style="width: 100%" placeholder="请选择施工地点" v-decorator="['workPlace', {rules: [{ required: true, message: '请选择施工地点!' }]}]">
|
||||||
|
<a-select-option v-for="(item,index) in workPlaceData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@ -63,7 +72,8 @@
|
|||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this)
|
form: this.$form.createForm(this),
|
||||||
|
workPlaceData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -71,13 +81,16 @@
|
|||||||
// 初始化方法
|
// 初始化方法
|
||||||
edit (record) {
|
edit (record) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
const workPlaceOption = this.$options
|
||||||
|
this.workPlaceData = workPlaceOption.filters['dictData']('work_place')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.form.setFieldsValue(
|
this.form.setFieldsValue(
|
||||||
{
|
{
|
||||||
id: record.id,
|
id: record.id,
|
||||||
yhsl: record.yhsl,
|
yhsl: record.yhsl,
|
||||||
yzg: record.yzg,
|
yzg: record.yzg,
|
||||||
wzg: record.wzg
|
wzg: record.wzg,
|
||||||
|
workPlace: record.workPlace
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|||||||
@ -90,6 +90,11 @@
|
|||||||
title: '未整改',
|
title: '未整改',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'wzg'
|
dataIndex: 'wzg'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '施工地点',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'workPlace'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
|
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
|
||||||
|
|||||||
@ -34,6 +34,24 @@
|
|||||||
>
|
>
|
||||||
<a-input-number placeholder="请输入数量" style="width: 100%" v-decorator="['totalNum', {rules: [{required: true, message: '请输入数量!'}]}]" />
|
<a-input-number placeholder="请输入数量" style="width: 100%" v-decorator="['totalNum', {rules: [{required: true, message: '请输入数量!'}]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
label="施工地点"
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
>
|
||||||
|
<a-select style="width: 100%" placeholder="请选择施工地点" v-decorator="['workPlace', {rules: [{ required: true, message: '请选择施工地点!' }]}]">
|
||||||
|
<a-select-option v-for="(item,index) in workPlaceData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
label="级别"
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
>
|
||||||
|
<a-select style="width: 100%" placeholder="请选择级别" v-decorator="['level', {rules: [{ required: true, message: '请选择级别!' }]}]">
|
||||||
|
<a-select-option v-for="(item,index) in levelData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@ -56,7 +74,9 @@
|
|||||||
nameData: [],
|
nameData: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this)
|
form: this.$form.createForm(this),
|
||||||
|
workPlaceData: [],
|
||||||
|
levelData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -66,6 +86,10 @@
|
|||||||
this.visible = true
|
this.visible = true
|
||||||
const nameOption = this.$options
|
const nameOption = this.$options
|
||||||
this.nameData = nameOption.filters['dictData']('work_task_type')
|
this.nameData = nameOption.filters['dictData']('work_task_type')
|
||||||
|
const workPlaceOption = this.$options
|
||||||
|
this.workPlaceData = workPlaceOption.filters['dictData']('work_place')
|
||||||
|
const levelOption = this.$options
|
||||||
|
this.levelData = levelOption.filters['dictData']('work_level')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 提交表单
|
* 提交表单
|
||||||
|
|||||||
@ -35,6 +35,24 @@
|
|||||||
>
|
>
|
||||||
<a-input-number placeholder="请输入数量" style="width: 100%" v-decorator="['totalNum', {rules: [{required: true, message: '请输入数量!'}]}]" />
|
<a-input-number placeholder="请输入数量" style="width: 100%" v-decorator="['totalNum', {rules: [{required: true, message: '请输入数量!'}]}]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
label="施工地点"
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
>
|
||||||
|
<a-select style="width: 100%" placeholder="请选择施工地点" v-decorator="['workPlace', {rules: [{ required: true, message: '请选择施工地点!' }]}]">
|
||||||
|
<a-select-option v-for="(item,index) in workPlaceData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
label="级别"
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
>
|
||||||
|
<a-select style="width: 100%" placeholder="请选择级别" v-decorator="['level', {rules: [{ required: true, message: '请选择级别!' }]}]">
|
||||||
|
<a-select-option v-for="(item,index) in levelData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@ -57,7 +75,9 @@
|
|||||||
nameData: [],
|
nameData: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this)
|
form: this.$form.createForm(this),
|
||||||
|
workPlaceData: [],
|
||||||
|
levelData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -67,12 +87,18 @@
|
|||||||
this.visible = true
|
this.visible = true
|
||||||
const nameOption = this.$options
|
const nameOption = this.$options
|
||||||
this.nameData = nameOption.filters['dictData']('work_task_type')
|
this.nameData = nameOption.filters['dictData']('work_task_type')
|
||||||
|
const workPlaceOption = this.$options
|
||||||
|
this.workPlaceData = workPlaceOption.filters['dictData']('work_place')
|
||||||
|
const levelOption = this.$options
|
||||||
|
this.levelData = levelOption.filters['dictData']('work_level')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.form.setFieldsValue(
|
this.form.setFieldsValue(
|
||||||
{
|
{
|
||||||
id: record.id,
|
id: record.id,
|
||||||
name: record.name,
|
name: record.name,
|
||||||
totalNum: record.totalNum
|
totalNum: record.totalNum,
|
||||||
|
workPlace: record.workPlace,
|
||||||
|
level: record.level
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|||||||
@ -98,6 +98,16 @@
|
|||||||
title: '数量',
|
title: '数量',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'totalNum'
|
dataIndex: 'totalNum'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '施工地点',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'workPlace'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '级别',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'level'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
|
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user